mimblewimble / secp256k1-zkp

Fork of secp256k1-zkp for the Grin/MimbleWimble project
MIT License
32 stars 42 forks source link

fix: wrong sizeof() usage in secp256k1_compute_sighash_single() #21

Closed garyyu closed 6 years ago

garyyu commented 6 years ago

secp256k1_compute_sighash_single() function internally has a wrong sizeof() usage on a pointer which will be always 4 or 8.

yeastplume commented 6 years ago

This is a good find, it should be as you say... so at the moment it's only putting the first 8 bytes of the key into the sighash whereas it should be writing the full 32 bytes.

However, changing this here will break consensus since all transactions thus far have been using the incorrect hash function. We'll need to hard fork before we can include this.