-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ext/crypto): support importing ECSDA and ECDH #13088
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good start. Thanks @seanwykes.
Co-authored-by: Luca Casonato <[email protected]>
Co-authored-by: Luca Casonato <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the version bumps necessary? I would rather wait for them until rsa
has gotten a new release, so we don't duplicate so many dependencies.
Not as such .. bumped during attempts to improve p384 coverage (pkcs8 etc). Will back-out the changes .. |
@seanwykes I have unbumped the crates locally - will push that shortly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some WPT regressions it seems that I need to be dealt with before merge. (I can do this)
I will try to get this landed for 1.17.0 tomorrow. If it doesn't make it, I'll try to land it for 1.17.1 in a week from now. Maybe we can have web crypto "done" by the end of the year.
I can take a look at getting the |
@lucacasonato WPT - import_export/ec will only pass the supported cases when #13104 is in, since the tests need exportKey to function. PTAL @ #13104 it should hopefully be in reasonable shape. ;) |
I am aware. I meant the cases in |
|
Yeah, just found that too. This code needs a general rewrite in the future. I'll clean up this PR now, and then land it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @seanwykes.
ID_SECP256R1_OID => Some(EcNamedCurve::P256), | ||
// id-secp384r1 | ||
ID_SECP384R1_OID => Some(EcNamedCurve::P384), | ||
// id-secp384r1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// id-secp521r1
@lucacasonato - thanks for your help, cleanups and fixes. Learnt a lot about paradigmatic Rust from this exercise. |
importKey implemented for ECDSA and ECDH, extracted from #13013 with modifications
public key - curves P-256 and P-384
private key - curve P-256 only
Restrictions on to P-384 curve due to lack of support in p384 crate.