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
When computing tagged-hashes for Schnorr sigs the 3 methods (challenge, aux, nonce) first call secp256k1_sha256_initialize that sets the hashstate (ie. s[0] to s[7] and bytes) to their default SHA256 values then they each immediately change all those values to the precomputed "midstate" values. The first call to secp256k1_sha256_initialize seems wasteful.
This issue would be better opened / reported upstream: https://github.com/bitcoin-core/secp256k1, as the code here is a (semi-regularly updated) subtree of that repository.
When computing tagged-hashes for Schnorr sigs the 3 methods (challenge, aux, nonce) first call
secp256k1_sha256_initialize
that sets the hashstate (ie. s[0] to s[7] and bytes) to their default SHA256 values then they each immediately change all those values to the precomputed "midstate" values. The first call tosecp256k1_sha256_initialize
seems wasteful.bitcoin/src/secp256k1/src/modules/schnorrsig/main_impl.h
Lines 16 to 28 in 7386da7
bitcoin/src/secp256k1/src/hash_impl.h
Lines 31 to 41 in 7386da7
The text was updated successfully, but these errors were encountered: