simpleledger / slp-specifications

Simple Ledger Protocol (SLP) Specifications
MIT License
57 stars 40 forks source link

About BitcoinFiles: A File #32

Closed DesWurstes closed 3 years ago

DesWurstes commented 3 years ago

Redeem script shall have the following format: OP_DROP ... OP_DROP <PubKey> OP_CHECKSIG

Unlocking script shall have the following format: <signature> <data> ... <data> <redeem script>

The specification doesn't take any measures against the following attack:

because The specification says only the redeemscript of P2SH is covered by the signature.

Or does it?

If it doesn't then I suggest many times (OP_CAT OP_HASH160) and storing the final hash in the redeemscript and checking for equality.


The other attack is stealing the P2SH output coins. No, the signature covers output values.