You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New secp256k1 modules often take use of BIP340 tagged hashes, with corresponding functions to initialize _sha256 objects with a fixed midstate for efficiency reasons. Right now there seems to be no standard way to create these functions, presumably every contributor does this in a slightly different way (I guess all ways involve cluttering the code with printf statements though). I was wondering if it's worth it to provide a small tool for that, which could also be useful for reviewing.
Proof-of-concept (not involving the build system yet): theStack@009cac6
The text was updated successfully, but these errors were encountered:
Last time I needed this, I used this Python library: https://github.com/cloudtools/sha256. I believe that's a bit simpler than maintaining a C program (with build system integration, etc.)
Of course, we could also add a small Python snippet that prints a BIP340 midstate explicitly.
New secp256k1 modules often take use of BIP340 tagged hashes, with corresponding functions to initialize _sha256 objects with a fixed midstate for efficiency reasons. Right now there seems to be no standard way to create these functions, presumably every contributor does this in a slightly different way (I guess all ways involve cluttering the code with printf statements though). I was wondering if it's worth it to provide a small tool for that, which could also be useful for reviewing.
Proof-of-concept (not involving the build system yet): theStack@009cac6
The text was updated successfully, but these errors were encountered: