vbuterin / pybitcointools

SImple, common-sense Bitcoin-themed Python ECC library
1.28k stars 856 forks source link

SIGHASH_SINGLE must return 1 for output index > input index #120

Open wizardofozzie opened 8 years ago

wizardofozzie commented 8 years ago

When signing a Tx with SIGHASH_SINGLE at index i, if i > j (where j is input index), txhash(signature_form, 1, SIGHASH_SINGLE) == 0100000000000000000000000000000000000000000000000000000000000000 See this exploit utilising pybitcointools

daedalus commented 8 years ago

Does this exploit should be allowed or definitively patched? Maybe you want to see this: https://github.com/daedalus/pybitcointools/tree/SIGHASH_TEST

zilveer commented 6 years ago

any ideas on how to solve this?