-
Notifications
You must be signed in to change notification settings - Fork 198
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
BIP340 Schnorr should accept arbitrary length messages #1040
Comments
We can support this, but I wonder if Or that is to say, we can add another method
Huh? How? |
Sorry, that's not the case - I misread the signing code. |
This is an odd detail in the section of BIP340 you linked above:
So this is in fact some separate signing/verification mode that conditionally hashes depending on the input length? |
I'm assuming that's referring to the inner tagged hash that actually generates the Schnorr challenge and by "more hashing" they mean "more iterations of the compression function" |
But all those things remain the same for small messages as well? |
@randombit if you're familiar with the specific semantics of this (I'm still a bit unclear) perhaps you could open a PR which implements this? |
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
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
BIP340 was modified last year to allow arbitrary length inputs instead of just 32 bytes. But
verify_prehash
continues to require the message be exactly 32 bytes. Curiously (IIUC) it's already possible to sign messages longer than 32 bytes, as I don't see any length check in that code. As I understand it all that's required is to remove the lineand pass the arbitrarily sized prehash to the inner tagged hash.
The text was updated successfully, but these errors were encountered: