diff --git a/bip-csfs.mediawiki b/bip-csfs.mediawiki index c2acc89e2..8c524e072 100644 --- a/bip-csfs.mediawiki +++ b/bip-csfs.mediawiki @@ -54,7 +54,7 @@ BIP340 signature verification and ECDSA signature verification respectively. # Message hashing: ECDSA requires the message to be securely hashed to 32-bytes before being used in the signing protocol, so a SHA256 hash is taken before the message is passed for ECDSA signing. BIP340 is compatible with any size of message and does not require it to be a securely hashed input, so the message is not hashed prior to BIP340 signing. # Verify NOP upgrade: To bring both ECDSA and BIP340 signing to bitcoin script, a NOP upgrade path was chosen for OP_CHECKSIGFROMSTACKVERIFY. This necessarily means leaving the 3 arguments on the stack when executing OP_CHECKSIGFROMSTACKVERIFY. Scripts will need to drop or otherwise manage these stack elements. -# Add/multisig: No concession is made to ```OP_CHECKMULTISIG``` or ```OP_CHECKSIGADD``` semantics with OP_CHECKSIGFROMSTACK(VERIFY). In Tapscript, add semantics can be implemented with 1 additional vByte per key (OP_TOALTSTACK OP_CHECKSIGFROMSTACK OP_FROMALTSTACK OP_ADD OP_TOALTSTACK). +# Add/multisig: No concession is made to OP_CHECKMULTISIG or OP_CHECKSIGADD semantics with OP_CHECKSIGFROMSTACK(VERIFY). In Tapscript, add semantics can be implemented with 1 additional vByte per key (OP_TOALTSTACK OP_CHECKSIGFROMSTACK OP_FROMALTSTACK OP_ADD OP_TOALTSTACK). # Splitting R/S on the stack: Implementing split/separate signatures is left as an exercise for future bitcoin upgrades, such as OP_CAT. # BIP118-style Taproot internal key: Rather than introducing an additional key type in this change, we suggest implementing OP_INTERNALKEY or separately introducing that key type for all Tapscript signature checking operations in a separate change. # Unknown key lengths: The semantics of other signature checking opcodes in their respective script types (legacy, segwit-v0, tapscript-c0) are applied. @@ -71,22 +71,22 @@ types. When combined with OP_CHECKTEMPLATEVERIFY (BIP119/CTV), OP_CHECKSIGFROMSTACK (CSFS) can be used in Lightning Symmetry channels. -The construction OP_CHECKTEMPLATEVERIFY <pubkey> OP_CHECKSIGFROMSTACK is -logically equivalent to <bip118_pubkey> OP_CHECKSIG and a signature over +The construction OP_CHECKTEMPLATEVERIFY OP_CHECKSIGFROMSTACK is +logically equivalent to OP_CHECKSIG and a signature over SIGHASH_ALL|SIGHASH_ANYPREVOUTANYSCRIPT. The OP_CHECKSIGFROMSTACK construction is 8 vBytes larger. ===Delegation=== Using a script like: -OP_DUP <pubkey> OP_CHECKSIGFROMSTACK OP_DROP OP_CHECKSIG +OP_DUP OP_CHECKSIGFROMSTACK OP_DROP OP_CHECKSIG A script can delegate signing to another key. ==Reference Implementation== A reference implementation is provided in provided here: -https://github.com/brandonblack/bitcoin/commit/bf375614f7bd73a2a84cdd4b660e6c02ad4bcbc3 +https://github.com/brandonblack/bitcoin/commit/5aae0503ceab93101c459748347a111e4a4852c4 ==Backward Compatibility==