-
Notifications
You must be signed in to change notification settings - Fork 64
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
Consolidate EVP_PKEY usage; Add (unstable) ML-DSA API #679
Conversation
b78d1ff
to
4dc893c
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #679 +/- ##
==========================================
- Coverage 95.80% 93.00% -2.80%
==========================================
Files 61 71 +10
Lines 8143 9754 +1611
Branches 0 9754 +9754
==========================================
+ Hits 7801 9072 +1271
- Misses 342 395 +53
- Partials 0 287 +287 ☔ View full report in Codecov by Sentry. |
/// The longest signature is for ML-DSA-87 | ||
pub(crate) const MAX_LEN: usize = 4627; | ||
|
||
/// A public key signature returned from a signing operation. | ||
#[derive(Clone, Copy)] |
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.
We have a signature::Signature
struct intended to be the type for signatures we return; it's currently used by EcdsaKeyPair::sign
and Ed25519KeyPair::sign
, but not RsaKeyPair::sign
. I setup PqdsaKeyPair::sign
to use it. Unfortunately, the signature::Signature
type is Copy so its use requires that a nearly 5KB object be passed around on the stack.
I'm wondering whether we should create a separate type (e.g, PqdsaSignature
) that's not Copy
, or follow the pattern used for RSA and have the consumer provide the buffer that we write the signature into.
Closing this PR. I'm planning to split this into two PRs. |
Description of changes:
EVP_PKEY_keygen
EVP_DigestSign
andEVP_DigestVerify
.Call-outs:
EVP_PKEY_keygen
. When the "fips" feature is enabled, the FIPS-approved key generation mechanism will be used for all RSA keys.Testing:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.