-
Couldn't load subscription status.
- Fork 163
Update to signature::DigestSigner/Verifier changes
#1064
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
|
Looking into how this would work for ML-DSA, because it uses a custom SHAKE wrapper internally that doesn't implement |
|
So the wrapper isn't necessary to compute µ, we can use |
|
@daxpedda the only digest-related functionality that's really needed by the caller now is |
|
@daxpedda want to try it out with |
|
Working on it right now. |
bf0510e to
7333465
Compare
| &self, | ||
| f: F, | ||
| ) -> Result<Signature<P>, Error> { | ||
| let mut digest = Shake256::default().chain(self.tr).chain([0, 0]); |
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.
Ideally, we should just call a method on SigningKey here so we don't duplicate the internals.
I could change SigningKey::raw_sign_deterministic() to take a Fn instead as well.
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.
So I did try this in daxpedda@2c77bab.
I believe my attempt ended up being quite awful.
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.
@daxpedda could you extract some methods, one to do setup and one to do finalization? Kind of like what you proposed in RustCrypto/traits#2004 but to abstract over the internals for computing Shake256
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.
On it.
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.
Done in #1073.
7333465 to
490c6eb
Compare
490c6eb to
41f19bb
Compare
|
@daxpedda mind doing a PR for https://github.com/RustCrypto/elliptic-curves too? |
Will do! |
`try_sign_digest_with_rng` and `verify_digest` have been updated in RustCrypto/signatures#1064
Companion PR to RustCrypto/traits#2004.