Closed junderw closed 2 years ago
Why just not to increase rust performance instead of increasing C dependency base for trivial functionality? We do not expose any hashing functions from secp and use pure rust implementation in bitcoin_hashes
, I do not see why to make an exclusion for tagged hashes.
The SHA256 function are (currently) internal functions of the C library, we really should not expose them here.
Sorry, it seems I've missed the forest for the trees here a bit.
You are right, this would be better served with an issue/PR to bitcoin_hashes.
Methods:
secp256k1_sha256_initialize
secp256k1_sha256_initialize_tagged
secp256k1_sha256_write
secp256k1_sha256_finalize
Reasoning:
Currently, schnorrsig upstream is using mid-state of certain tagged hashes to make schnorr sign etc. a bit faster. By exposing these methods, we could provide similar performance versions of each of the tagged hashes used in various bitcoin use cases.