Author

Topic: Is there a list of historical bitcoin core bugs related to SigHash? (Read 181 times)

legendary
Activity: 2053
Merit: 1356
aka tonikt
It's in the function called IsValidSignatureEncoding() in src/script/interpreter.cpp

https://github.com/bitcoin/bitcoin/blob/master/src/script/interpreter.cpp#L107

The rules from that function are being enforced since BIP66 was "activated", which was at (including) block #330776

legendary
Activity: 1042
Merit: 2805
Bitcoin and C♯ Enthusiast
Your question is not about sighash, sighash flag is always just the last byte. Your question is about signature encoding.

Search for invalid DER encoding bitcoin   or similar.

That is part of the information I've already found that includes malleability fixes. But some parts are missing.
Let me be more specific, One case is invalid SigHash byte. I have found transactions (already mined) that have 0x00 as their SigHash byte (flag) which is clearly a bug and is not about encoding.
Is this currently fixed? At which fork (block height, is it along BIP66?)?
Also I'm wondering what other "special cases" exist that I'm not aware of. For instance is/was 0x05 (=0b0000_0101) considered valid SigHash and equal to SigHash_All?
staff
Activity: 4284
Merit: 8808
I can't find that much information regarding historical bugs that concerned SigHash types. I have found a couple of transactions that should have been logically invalid but were accepted as valid in the history such as SigHash zero or the case where some garbage bytes are added at the end of the signature before the SigHash byte.
I'm also wondering whether such cases are invalid today or just non-standard.

I'd appreciate it if you could provide some detailed information about this.

Your question is not about sighash, sighash flag is always just the last byte. Your question is about signature encoding.

Search for invalid DER encoding bitcoin   or similar.
legendary
Activity: 1042
Merit: 2805
Bitcoin and C♯ Enthusiast
I can't find that much information regarding historical bugs that concerned SigHash types. I have found a couple of transactions that should have been logically invalid but were accepted as valid in the history such as SigHash zero or the case where some garbage bytes are added at the end of the signature before the SigHash byte.
I'm also wondering whether such cases are invalid today or just non-standard.

I'd appreciate it if you could provide some detailed information about this.
Jump to: