-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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): add x25519 and Ed25519 CFRG curves #14119
Conversation
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
Not stale! |
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.
I am stoked to see this. Do you plan for X448 and Ed448 as well?
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 🙌
Yes, planned but we'll have to evaluate existing Rust crates that do curve448 - I couldn't find a 'widely-used' crate. That said it shouldn't be too hard to write our own. |
@littledivy I'm finding it hard to navigate what has been implemented here. I'm able to generate both key types. Despite import code being added for both I can import neither one (Ed says the algorithm is unrecognized, X says the key data is invalid). X export seems to be omitted despite being the same as Ed wrt to the key material. Ed signatures fail to validate. |
Yikes! Seems like I didn't push all changes from my local branch :( |
@littledivy I hope it's not lost ;) |
When storing public and private keys in the key store, use a different handle for each key so that they can be looked up in the future. Refs: #14119 Refs: denoland/std#2631
Implements Curve25519 from https://github.com/WICG/webcrypto-secure-curves
We will probably have to rollout our own Curve448, there is no ring, RustCrypto OR rust-dalek crate for that. Left that for now.