1

I have a question about the P2SH unlocking script. Can I put common operants and operators in the P2SH unlocking script? And if yes, how can I create such script?

e.g.

unlocing script: <sig1> <pk1> CHECKSIG <pk1> <redeem script>

redeem script: HASH160 <address> EQUALVERIFY <sig2> <pk2> CHECKSIG

Murch
  • 75,206
  • 34
  • 186
  • 622

1 Answers1

1

Can I put common operants and operators in the P2SH unlocking script?

No, you can not.

1) Unlocking script ( scriptSig ) should contain only push operations, yours contains OP_CHECKSIG

2) It has no sense to put signature sig2 into the redeem script and check it with OP_CHECKSIG because such script definetely fail on execution. If you want to put any data in the redeem script - you can do it in other way.

amaclin
  • 6,760
  • 1
  • 21
  • 32