Skip to content
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) - import ECDSA/ECDH P384 PKCS8/JWK #13154

Merged
merged 18 commits into from
Jan 19, 2022
Merged

feat(ext/crypto) - import ECDSA/ECDH P384 PKCS8/JWK #13154

merged 18 commits into from
Jan 19, 2022

Conversation

cryptographix
Copy link
Contributor

@cryptographix cryptographix commented Dec 20, 2021

Towards #11690.
Currently limitations in p386 crate, related to missing ProjectiveArithmetic trait, do not allow import of P384 private keys, since we must validate the key before importing. On the other hand, ring crate supports parsing PKCS#8 but does not give access to internals.

PR uses der::asn1 to implement a parser/builder for PKCS#8 EC private keys, with import_key.rs altered to import ECDSA/ECDH PKCS#8 and JWK for both P256 and P384.

@bartlomieju bartlomieju requested a review from littledivy January 4, 2022 23:41
@bartlomieju
Copy link
Member

@littledivy @lucacasonato please review

Copy link
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seanwykes can you rebase? I'd like to land this before release on Thrusday

@cryptographix
Copy link
Contributor Author

@seanwykes can you rebase? I'd like to land this before release on Thursday

Done.

WPT looks good.
Jose testes: 144 passed; 1 failed - due to missing P384 ECDH derive-key. @panva

After landing, need to revise WebCrypto progress issue ..

Copy link
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just a tiny correction.

@littledivy littledivy merged commit 9139985 into denoland:main Jan 19, 2022
@panva
Copy link
Contributor

panva commented Jan 19, 2022

@seanwykes can you rebase? I'd like to land this before release on Thursday

Done.

WPT looks good. Jose testes: 144 passed; 1 failed - due to missing P384 ECDH derive-key. @panva

After landing, need to revise WebCrypto progress issue ..

@seanwykes that's great! Shall I expect P-384 ECDH to land eventually or mark it as not supported by Deno?

@cryptographix
Copy link
Contributor Author

@seanwykes that's great! Shall I expect P-384 ECDH to land eventually or mark it as not supported by Deno?

@panva Deno depends on an upstream package from Rust Crypto. I'm sure Deno will upgrade once they have support, but no timescales yet AFAIK.

@cryptographix cryptographix deleted the ec-import-parse-pkcs8 branch January 24, 2022 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants