Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 50D7BC75; Wed, 9 Oct 2019 16:56:55 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.wpsoftware.net (wpsoftware.net [96.53.77.134]) by smtp1.linuxfoundation.org (Postfix) with ESMTP id 7C49814D; Wed, 9 Oct 2019 16:56:53 +0000 (UTC) Received: from boulet (boulot.lan [192.168.0.193]) by mail.wpsoftware.net (Postfix) with ESMTPSA id 673F640148; Wed, 9 Oct 2019 16:56:52 +0000 (UTC) Date: Wed, 9 Oct 2019 16:56:51 +0000 From: Andrew Poelstra To: Ethan Heilman Message-ID: <20191009165651.GN13224@boulet> References: <87wodp7w9f.fsf@gmail.com> <20191001155929.e2yznsetqesx2jxo@erisian.com.au> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="aj68N5rnBpm/Ladk" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: ZmnSCPxj via bitcoin-dev , "lightning-dev@lists.linuxfoundation.org" Subject: Re: [bitcoin-dev] [Lightning-dev] OP_CAT was Re: Continuing the discussion about noinput / anyprevout X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Bitcoin Protocol Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Oct 2019 16:56:55 -0000 --aj68N5rnBpm/Ladk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 03, 2019 at 11:05:52AM -0400, Ethan Heilman wrote: > To avoid derailing the NO_INPUT conversation, I have changed the > subject to OP_CAT. >=20 > Responding to: > """ > * `SIGHASH` flags attached to signatures are a misdesign, sadly > retained from the original BitCoin 0.1.0 Alpha for Windows design, on > par with: > [..] > * `OP_CAT` and `OP_MULT` and `OP_ADD` and friends > [..] > """ >=20 > OP_CAT is an extremely valuable op code. I understand why it was > removed as the situation at the time with scripts was dire. However > most of the protocols I've wanted to build on Bitcoin run into the > limitation that stack values can not be concatenated. For instance > TumbleBit would have far smaller transaction sizes if OP_CAT was > supported in Bitcoin. If it happens to me as a researcher it is > probably holding other people back as well. If I could wave a magic > wand and turn on one of the disabled op codes it would be OP_CAT. Of > course with the change that size of each concatenated value must be 64 > Bytes or less. > Just throwing my two cents in here - as others have noted, OP_CAT lets you create Merkle trees (allowing e.g. log-sized accountable threshold sigs, at least in a post-Schnorr future). It also allows manipulating signatures - e.g. forcing the revelation of discrete logs by requiring the user use the (1/2) point as a nonce (this starts with 11 zero bytes, which no other computationally accessible point does), or by requiring two sigs with the same nonce. It also lets you do proof-of-work-like computations on hashes or curvepoints; or enforce that EC points come from a hash and have no known discrete log. You can also switch on hashes, something currently impossible because of the 4-byte limitation on numeric opcodes. I don't have specific application of these in mind but definitely have cut off many lines of inquiry because they were impossible. You could build a crappy Lamport signature, though the key would be so big that you'd never do this pre-MAST :P. --=20 Andrew Poelstra Director of Research, Blockstream Email: apoelstra at wpsoftware.net Web: https://www.wpsoftware.net/andrew The sun is always shining in space -Justin Lewis-Webster --aj68N5rnBpm/Ladk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEkPnKPD7Je+ki35VexYjWPOQbl8EFAl2eEUoACgkQxYjWPOQb l8H8cAf/XMopJh0OsTBCZDzB94+l/KbczJC7QVpeV0SrlV2oiEnPuYQ8BO+cVJ59 898kI0w5DU+D5iyF4K7iLSLmT4FIRThZxrURZKameNS6DLEidDm4L4ztagd6LY35 nXjFrhysREoYdNbi07xoeRWrXL9f0ihsAHdp5ujKWVpX7+q+DhHh/WLcXFJ9rCBJ rERzReXJDY8O/izznb4TKNuEZEYfWTGrGT3IxUatDlQtsat5krj9mN4Iq8dgnnet DJWbMV7BsCjw8u2cG7LdykC+Kmvu4DFoEGebfhLT8yckXQPkGLyDjQqN2ZAhfJH/ M9PkwmOztn+Ei3WDAdZ9AYFrBHRxlA== =z+SE -----END PGP SIGNATURE----- --aj68N5rnBpm/Ladk--