-
Notifications
You must be signed in to change notification settings - Fork 84
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
Pure Rust cryptography backend #423
Comments
We know the windows story is a bit rough. The real limit here is time. Swappable backends is a nice idea, but we'd need a pretty big effort to actually do it. If we did, we'd only support the openssl backend as a project anyway, so third parties would need to support their own externally.
In the past they did not :) |
The devil is in the details as well with all this:
An alternative cryptography backend isn't just "write the code": it's something we'd need to support going forward, and is another variable in our already large build matrix (currently 33 targets; each new backend would increase that by 30 targets). This feels like an X-Y problem, but I think the main point you're making is:
Providing a choice of cryptographic backend provider risks not being a technical consideration of security trade-offs, but a choice based on the path of least resistance: where someone who couldn't (or wouldn't) setup I've spent a lot of time improving the Windows (and I feel that making the build process well polished, follow best-practices1 and well documented2 is the better way to deal with that issue. We can do our part, but really a lot of that effort belongs upstream. Footnotes
|
To be honest, the security of the As for My main idea was to probably use Also about the backends, the issue might needs its title changed to something like "Enable alternative cryptography backends", where The only officially supported backend would remain the OpenSSL backend. Just to allow for other alternative implementors to provide crypto primitives. |
Ironically we opted not to use ring, because it breaks on anything that isn't x86_64/aarch64 with annoying regularity. I think however, what you are proposing to make a "cryptography" trait, would work. |
We might end up ditching openssl for the rust-crypto ecosystem because we've had too many issues getting things into rust-openssl. |
Is your feature request related to a problem? Please describe.
Not exactly a problem, but would swappable cryptography backends be in scope for this project?
Or is this something that you'd rather not bother with.
I do get why OpenSSL is a nice choice, since you can just point at it and say "our crypto provider. You already know it", but the portability story to things like Windows is a bit painful.
Describe the solution you'd like
A set of traits via which the crypto provider can be made pluggable, that way someone can develop a Rust-native cryptography provider.
Describe alternatives you've considered
N/A
Additional context
The README mentions that OpenSSL is the only Rust-available cryptography library which can construct keys from their raw parts. Well, that isn't 100% correct.
The
p256
crate supports this, if a bit convoluted.You need to:
EncodedPoint
from the X and Y coordinatesAffinePoint
AffinePoint
into aPublicKey
But it does work!
And about RSA, both, the
rsa
crate andring
, support construction from raw components.The text was updated successfully, but these errors were encountered: