On bitcoin wiki OP_CHECKSIG documentation :
Firstly always thisthe Bitcoin Wiki's (the default) procedure is appliedOP_CHECKSIG documentation:
- the public key and the signature are popped from the stack, in that order. If the hash-type value is 0, then it is replaced by the last_byte of the signature. Then the last byte of the signature is always deleted.
Firstly always this (the default) procedure is applied:
- the public key and the signature are popped from the stack, in that order. If the hash-type value is 0, then it is replaced by the last_byte of the signature. Then the last byte of the signature is always deleted.
The signature format is :
0x30 [total-length] 0x02 [R-length] [R] 0x02 [S-length] [S] [sighash]
0x30 [total-length] 0x02 [R-length] [R] 0x02 [S-length] [S] [sighash]
In case if hash type is 0 then we should get last byte from [S] and remove it I think it will corrupt signature !!!
May beMaybe I notdon't correctly understand this documentation. Could any bodyanybody explain the correct behavior ifin this case
Thank you?