Timeline for Why does pay to pubkey hash contain OP_CHECKSIG at the end instead of beginning?
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 23, 2018 at 16:39 | comment | added | diego nunes | Actually, the scriptSig would be "<sig> <pubkey>" to use OP_OVER. If it was already "<pubkey> <sig>" the suggestion in the first comment would work, but it would require a change in the scriptSig, not only the scriptPubKey. | |
Oct 8, 2017 at 8:59 | vote | accept | Vlad | ||
Oct 8, 2017 at 8:07 | comment | added | Pieter Wuille | What would work (but be inefficient): scriptSig={<pubkey> <sig>}, scriptPubKey={OP_OVER OP_CHECKSIGVERIFY OP_HASH160 <pubkeyhash> OP_EQUAL}. | |
Oct 8, 2017 at 7:50 | comment | added | Pieter Wuille | Not quite. After OP_DUP, your stack will be <sig> <pubkey> <pubkey>. Invoking OP_CHECKSIGVERIFY at that point will do a verification with <pubkey> as signature. | |
Oct 8, 2017 at 7:08 | comment | added | Vlad |
aha i see. thanks for the answer. Just to make sure i understood completely, so if we do scriptPubKey: OP_DUP OP_CHECKSIGVERIFY OP_HASH160 <pubKeyHash> OP_EQUAL and scriptSig: <sig> <pubKey> , this would: 1. work; 2. but not efficient therefore not used because hashing is much faster than checksig?
|
|
Oct 8, 2017 at 6:41 | history | answered | Pieter Wuille | CC BY-SA 3.0 |