<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">This is a meta-discussion for any approach that allows the witness committing to only transaction outputs, but not inputs.<div class=""><br class=""></div><div class="">We can already do the following things with the existing bitcoin script system:</div><div class="">* commit to both inputs and outputs: SIGHASH_ALL or SIGHASH_SINGLE, with optional SIGHASH_ANYONECANPAY</div><div class="">* commit to only inputs but not outputs: SIGHASH_NONE with optional SIGHASH_ANYONECANPAY</div><div class="">* not commit to any input nor output: not using any sigop; using a trivial private key; using the SIGHASH_SINGLE bug in legacy script</div><div class=""><br class=""></div><div class="">The last one is clearly unsafe as any relay/mining node may redirect the payment to any output it chooses. The witness/scriptSig is also replayable, so any future payment to this script will likely be swept immediately</div><div class=""><br class=""></div><div class="">SIGHASH_NONE with ANYONECANPAY also allows redirection of payment, but the signature is not replayable</div><div class=""><br class=""></div><div class="">But it’s quite obvious that not committing to outputs are inherently insecure</div><div class=""><br class=""></div><div class="">The existing system doesn’t allow committing only to outputs, and we now have 3 active proposals for this function:</div><div class=""><br class=""></div><div class="">1. CAT and CHECKSIGFROMSTACK (CSFS):&nbsp;<a href="https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-May/016946.html" class="">https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-May/016946.html</a></div><div class="">2. ANYPREVOUT (aka NOINPUT):&nbsp;<a href="https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-May/016929.html" class="">https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-May/016929.html</a></div><div class="">3. CHECKOUTPUTSHASHVERIFY (COHV):&nbsp;<a href="https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-May/016934.html" class="">https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-May/016934.html</a></div><div class=""><br class=""></div><div class="">With outputs committed, redirecting payment is not possible. On the other hand, not committing to any input means the witness is replayable without the consent of address owner. Whether replayability is acceptable is subject to controversy, but the ANYPREVOUT proposal fixes this by requiring a chaperone signature that commits to input. However, if the rationale for chaperone signature stands, it should be applicable to all proposals listed above.</div><div class=""><br class=""></div><div class="">A more generic approach is to always require a “safe" signature that commits to at least one input. However, this interacts poorly with the "unknown public key type” upgrade path described in bip-tapscript (<a href="https://github.com/sipa/bips/blob/bip-schnorr/bip-tapscript.mediawiki" class="">https://github.com/sipa/bips/blob/bip-schnorr/bip-tapscript.mediawiki</a>), since it’d be a hardfork to turn an “unknown type sig” into a “safe sig”. But we could still use a new “leaf version” every time we introduce new sighash types, so we could have a new definition for “safe sig”. I expect this would be a rare event and it won’t consume more than a couple leaf versions. By the way, customised sighash policies could be done with CAT/CSFS.</div></body></html>