diff options
author | Johnson Lau <jl2012@xbt.hk> | 2018-12-13 04:00:50 +0800 |
---|---|---|
committer | bitcoindev <bitcoindev@gnusha.org> | 2018-12-12 20:01:07 +0000 |
commit | 97589cff2cf4496431f4bf51f285a1a32a42dbf2 (patch) | |
tree | ecd91632f018f1fda26e70aa4ecadddc5c050e0d /5c | |
parent | e426d91b7cac04ca17a803651698f4a412488cd8 (diff) | |
download | pi-bitcoindev-97589cff2cf4496431f4bf51f285a1a32a42dbf2.tar.gz pi-bitcoindev-97589cff2cf4496431f4bf51f285a1a32a42dbf2.zip |
Re: [bitcoin-dev] Safer sighashes and more granular SIGHASH_NOINPUT
Diffstat (limited to '5c')
-rw-r--r-- | 5c/9a4c76d3ea55539413dadde16bd15e56a3fc31 | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/5c/9a4c76d3ea55539413dadde16bd15e56a3fc31 b/5c/9a4c76d3ea55539413dadde16bd15e56a3fc31 new file mode 100644 index 000000000..bf646015a --- /dev/null +++ b/5c/9a4c76d3ea55539413dadde16bd15e56a3fc31 @@ -0,0 +1,109 @@ +Return-Path: <jl2012@xbt.hk> +Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org + [172.17.192.35]) + by mail.linuxfoundation.org (Postfix) with ESMTPS id 541BEF85 + for <bitcoin-dev@lists.linuxfoundation.org>; + Wed, 12 Dec 2018 20:01:07 +0000 (UTC) +X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 +Received: from sender-of-o51.zoho.com (sender-of-o51.zoho.com [135.84.80.216]) + by smtp1.linuxfoundation.org (Postfix) with ESMTPS id E52FE708 + for <bitcoin-dev@lists.linuxfoundation.org>; + Wed, 12 Dec 2018 20:01:06 +0000 (UTC) +ARC-Seal: i=1; a=rsa-sha256; t=1544644857; cv=none; d=zoho.com; s=zohoarc; + b=CSe1ntS/nAu3NmJX9SZ3teZTpqvuV8/FwcvMdE+7RRSlTxpflQu8jZkTo4Cq1HGFsnmb1hZ8U3Xtt756lTDJUMroO6tczzrN3pRxuSn/5JweyR5n9Y3TttE88rFlyF41WirovZxUXb5mIxL2ju9aKv9jOCokThEFaattw+oIZKo= +ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; + s=zohoarc; t=1544644857; + h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results; + bh=VHbEZFqRN+SPjYNOq7iUTpoZoUe77AfBKrc4MY07QWE=; + b=SM0IbkOLEWXoImKa3K5GekJvoR/cUrhRujhdMY0Gc4VNqE2ISVWkgnjkdpML/lWq4ZbieWYBWwUkJSv9oqKqMfShWB6NWhiLKZJYjPBqzNhxLZ5we6+uhZJRrPaJRsfW52gxtmUbJGk2j0j1DQKNdhK3JQR2pIKCpFF/BMt7hZk= +ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=xbt.hk; + spf=pass smtp.mailfrom=jl2012@xbt.hk; + dmarc=pass header.from=<jl2012@xbt.hk> header.from=<jl2012@xbt.hk> +Received: from [10.8.0.105] (n218103234118.netvigator.com [218.103.234.118]) + by mx.zohomail.com with SMTPS id 1544644854417547.3091275917728; + Wed, 12 Dec 2018 12:00:54 -0800 (PST) +Content-Type: text/plain; + charset=utf-8 +Mime-Version: 1.0 (Mac OS X Mail 12.0 \(3445.100.39\)) +From: Johnson Lau <jl2012@xbt.hk> +In-Reply-To: <87ftv3xerx.fsf@rustcorp.com.au> +Date: Thu, 13 Dec 2018 04:00:50 +0800 +Content-Transfer-Encoding: quoted-printable +Message-Id: <DAAB7568-A004-4897-B5B3-0FBBC6895246@xbt.hk> +References: <CAPg+sBhuPG-2GXc+Bp0yv5ywry2fk56LPLT4AY0Kcs+YEoz4FA@mail.gmail.com> + <87ftv3xerx.fsf@rustcorp.com.au> +To: Rusty Russell <rusty@rustcorp.com.au>, + bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org> +X-Mailer: Apple Mail (2.3445.100.39) +X-ZohoMailClient: External +X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE + autolearn=ham version=3.3.1 +X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on + smtp1.linux-foundation.org +X-Mailman-Approved-At: Thu, 13 Dec 2018 22:09:29 +0000 +Subject: Re: [bitcoin-dev] Safer sighashes and more granular SIGHASH_NOINPUT +X-BeenThere: bitcoin-dev@lists.linuxfoundation.org +X-Mailman-Version: 2.1.12 +Precedence: list +List-Id: Bitcoin Protocol Discussion <bitcoin-dev.lists.linuxfoundation.org> +List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>, + <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe> +List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/> +List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org> +List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help> +List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>, + <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe> +X-List-Received-Date: Wed, 12 Dec 2018 20:01:07 -0000 + + + +> On 12 Dec 2018, at 5:42 PM, Rusty Russell via bitcoin-dev = +<bitcoin-dev@lists.linuxfoundation.org> wrote: +>=20 +> Pieter Wuille via bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org> = +writes: +>> Here is a combined proposal: +>> * Three new sighash flags are added: SIGHASH_NOINPUT, SIGHASH_NOFEE, +>> and SIGHASH_SCRIPTMASK. +>> * A new opcode OP_MASK is added, which acts as a NOP during = +execution. +>> * The sighash is computed like in BIP143, but: +>> * If SIGHASH_SCRIPTMASK is present, for every OP_MASK in scriptCode +>> the subsequent opcode/push is removed. +>=20 +> I'm asking on-list because I'm sure I'm not the only confused one. +>=20 +> Having the SIGHASH_SCRIPTMASK flag is redundant AFAICT: why not always +> perform mask-removal for signing? + +Because a hardware wallet may want to know what exact script it is = +signing? + +Masked script has reduced security, but this is a tradeoff with = +functionality (e.g. eltoo can=E2=80=99t work without masking part of the = +script). So when you don=E2=80=99t need that extra functionality, you go = +back to better security + +However, I=E2=80=99m not sure if there is any useful NOINPUT case with = +unmasked script. + +>=20 +> If you're signing arbitrary scripts, you're surely in trouble already? +>=20 +> And I am struggling to understand the role of scriptmask in a taproot +> world, where the alternate script is both hidden and general? + +It makes sure that your signature is applicable to a specific script = +branch, not others (assuming you use the same pubkey in many branches, = +which is avoidable) + +>=20 +> I look forward to learning what I missed! +> Rusty. +> _______________________________________________ +> bitcoin-dev mailing list +> bitcoin-dev@lists.linuxfoundation.org +> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev + + + |