-
Notifications
You must be signed in to change notification settings - Fork 77
Support ECDSA with secp256k1 curve in AwsLcRsAlgorithm #427
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
Conversation
|
The crate is named webpki for a reason.
This doesn't hold up for me. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #427 +/- ##
=======================================
Coverage 97.04% 97.04%
=======================================
Files 20 20
Lines 4230 4230
=======================================
Hits 4105 4105
Misses 125 125 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@ctz wrote in rustls/pki-types#96:
I think this is a polite way of saying "we will not be merging this into mainline webpki or rustls", so I'll close this PR. |
|
Names don't define the nature of their referents, the referents provide meaning to names. Sometimes, old names stick without a clear reason. Despite the name, the For example, one can see here that the crate called I can see the point that there are established practices on the "web", however the "web" is a also a fluid and constantly developing thing. Standards don't always keep up with practice. The TLS 1.3 standard came out in 2018, seven years ago, which is a long time for the "web". Yes, TLS 1.3 (as defined in RFC8446) doesn't mention the secp256k1 curve but it also doesn't say that only the listed signature schemes are ever allowed. The listed schemes are mandatory to implement if one wants to claim TLS 1.3 compatibility, of course. This PR isn't breaking that. If we forget for a moment about names and published standards and look at the pure technical matter, what would be a technical argument against merging this PR? Can it be about increasing the maintenance burden? I'd say not. Let's take a look at what this PR does in detail:
I could clarify my argument for putting these changes into This holds even more for the choice of the EC curve in the signature algorithm. Each signature algorithm definition in
These tests are actually generated with a script, so maintanability isn't really an issue with these tests. |
I would not count this as a customization. On the other hand, I'm also quite happy to remain not responsible for the added security risks of cryptography that is irrelevant to all of my use cases. |
That would be a valid argument if this PR implemented any new cryptography. It doesn't! This PR only enables the use of cryptography already implemented in I can understand that one might want the default |
This is a follow-up PR to rustls/pki-types#96 that is meant to upstream @zama-ai 's work on enabling the use of TLS certificates signed with ECDSA+secp256k1 curve in applications based on
rustls.The discussion in rustls/pki-types#96 had a valid argument that it's not strictly speaking necessary to upstream all these changes because an application could define its custom
CryptoProviderwith its own list of allowedSignatureVerificationAlgorithms. However, there's still the question of the best way to define aSignatureVerificationAlgorithmin this particular case.Since we're not adding some completely novel algorithm but ECDSA+secp256k1 that is already implemented in
aws_lc_rs, writing an implementation ofSignatureVerificationAlgorithmfrom scratch feels excessive given that therustls-webpkicrate already provides theAwsLcRsAlgorithmstruct that implementsSignatureVerificationAlgorithmfor many algorithms implemented inaws_lc_rs.Writing and maintaining a new implementation would require an effort comparable with forking and maintaining
rustls-webpki. Rewriting/copying the test suite alone is, perhaps, a good argument to not follow that path.With this in mind, we'd like to propose these small changes to
AwsLcRsAlgorithmthat do no more than add support for another well-known ECDSA curve. If accepted, a customCryptoProvidersupporting ECDSA+secp256k1 would, indeed, become an easy affair.