-
Notifications
You must be signed in to change notification settings - Fork 282
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
Add ES* family #21
Comments
Hey, Have you been investigating this? We need it for Apple push notifications and are looking into ways of implementing them in Rust. We could fork and use some C bindings to get the job done, but I guess the changes would never get into the mainline here. There are options to do the signing with:
Is there any progression or people who've been trying to do this with Rust? |
I didn't look into it yet but from a very quick research, it seems that Ring does support verifying ECDS https://briansmith.org/rustdoc/ring/?search=ECDSA but not signing. I'm not a crypto expert either so I definitely don't want to build it myself |
I asked about ECDSA in #rust-crypto yesterday and they gave me this: https://gitlab.com/ilari_l/btls/tree/master I'll investigate how and where should I use it and at least fork your project for basis. I don't know do you want to have this include in the HEAD, but we're in serious need for this with Apple notifications. |
ECDSA signing with P-256 and P-384 is in ring 0.13.0-alpha4. See the comments in briansmith/ring#207 for details. Please try it out and let me know if you run into any issues before I release the 0.13.0 final version. |
Thanks for the notice! |
I don't have the bandwidth to work on that but I would welcome a PR |
I'm willing to work on this issue, but there are currently some obstacles in ring API. I've described them in the related issue. |
@Keats Do you mind changing the type of the key from enum Key {
Bytes(Vec<u8>),
ECDSAKeyPair(ring::signature::ECDSAKeyPair),
} It will allow us to use ring's ECDSAKeyPair in |
That would expose |
Unfortunately there is no activity on that matter :-( |
I've got ECDSA signing working in my fork, tested working for APNS JWT auth using my fork of apns2-rust. I didn't implement signature verification yet since I didn't need it, but can add that and submit a PR if there's interest. Unfortunately, ECDSA signing requires ring 0.14, so the long-standing issue with linking multiple versions of ring into the same project might bite people here. For example, if you use this you can't also use rustls (which uses ring 0.13) in the same project. |
I will update Rustls soon. I already have a PR for it. |
Oh I thought the versioning fix was meant to be merged in 0.13 :( |
OK, I'll try to implement verification this weekend and submit a pull request |
Finally got around to this today: #73 |
ES256, ES384 and ES512
The text was updated successfully, but these errors were encountered: