Conversation
cjpatton
reviewed
Apr 21, 2026
jedisct1
reviewed
Apr 23, 2026
jedisct1
reviewed
Apr 23, 2026
|
|
||
| impl MlDsaPublicKey { | ||
| /// Parses a public key from its serialized form. | ||
| pub fn from_bytes(algorithm: Algorithm, bytes: &[u8]) -> Result<Self, ErrorStack> { |
Contributor
There was a problem hiding this comment.
Maybe there should be a to_bytes() counterpart?
cjpatton
approved these changes
Apr 23, 2026
Collaborator
cjpatton
left a comment
There was a problem hiding this comment.
Looks good, one cosmetic thing for consistency with mlkem
jedisct1
added a commit
to jedisct1/rust-superboring
that referenced
this pull request
Apr 23, 2026
See recent comments from cloudflare/boring#497
jedisct1
reviewed
Apr 23, 2026
| MlDsa87(Box<ffi::MLDSA87_private_key>), | ||
| } | ||
|
|
||
| impl MlDsaPrivateKey { |
Contributor
There was a problem hiding this comment.
It would be very useful to have a public_key() function as well. Should be pretty straightforward:
pub fn public_key(&self) -> MlDsaPublicKey {
let inner = match &self.inner {
SigningKeyInner::MlDsa44(sk) => VerifyingKeyInner::MlDsa44(Box::new(
ml_dsa::signature::Keypair::verifying_key(sk.as_ref()),
)),
SigningKeyInner::MlDsa65(sk) => VerifyingKeyInner::MlDsa65(Box::new(
ml_dsa::signature::Keypair::verifying_key(sk.as_ref()),
)),
SigningKeyInner::MlDsa87(sk) => VerifyingKeyInner::MlDsa87(Box::new(
ml_dsa::signature::Keypair::verifying_key(sk.as_ref()),
)),
};
MlDsaPublicKey {
algorithm: self.algorithm,
inner,
}
}
Collaborator
Author
There was a problem hiding this comment.
That's from RustCrypto's implementation. Boring's version is a bit more involved. I'll leave it for later.
f743a23 to
91a2c70
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.