-
Notifications
You must be signed in to change notification settings - Fork 204
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
Add support for BIP340 signtures where the messages are not exactly 32 bytes #1041
Add support for BIP340 signtures where the messages are not exactly 32 bytes #1041
Conversation
k256/src/schnorr/signing.rs
Outdated
@@ -78,7 +78,7 @@ impl SigningKey { | |||
/// The preferred interfaces are the [`Signer`] or [`RandomizedSigner`] traits. | |||
pub fn sign_prehash_with_aux_rand( |
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.
Perhaps this method should be renamed to reflect the input is no longer necessarily a prehash?
Something like sign_raw
perhaps?
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.
Yeah makes sense, I renamed to sign_raw
. I didn't know if you wanted to keep any compatability forwarding (eg a #[deprecated]
sign_prehash_with_aux_rand
that forwards to sign_raw
), so I left it out for now.
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.
That's fine. We can make a note in the changelog.
This was an extension to BIP340 that was introduced in 2022. The official BIP340 test vectors do contain data for this case (tests 15-18) which are included here. Fixes RustCrypto#1040
This is a backport of RustCrypto#1041 onto the 0.13 branch, with some small changes to accomodate SemVer. Fixes RustCrypto#1040
This was an extension to BIP340 that was introduced in 2022. The official BIP340 test vectors do contain data for this case (tests 15-18) which are included here.
Fixes #1040