summaryrefslogtreecommitdiff
path: root/75/448fe295a49dd02ca79be140a64d31033f06c2
blob: 76f8c0352b8c5c6d3b412c12b0ec827a39b10404 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
Return-Path: <pete@petertodd.org>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id 837E5266
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Thu,  7 Sep 2017 05:56:13 +0000 (UTC)
X-Greylist: from auto-whitelisted by SQLgrey-1.7.6
Received: from outmail148100.authsmtp.co.uk (outmail148100.authsmtp.co.uk
	[62.13.148.100])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id CFA72D3
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Thu,  7 Sep 2017 05:56:12 +0000 (UTC)
Received: from mail-c245.authsmtp.com (mail-c245.authsmtp.com [62.13.128.245])
	by punt23.authsmtp.com (8.14.2/8.14.2/) with ESMTP id v875u4QQ037254;
	Thu, 7 Sep 2017 06:56:04 +0100 (BST)
Received: from petertodd.org (ec2-52-5-185-120.compute-1.amazonaws.com
	[52.5.185.120]) (authenticated bits=0)
	by mail.authsmtp.com (8.14.2/8.14.2/) with ESMTP id v875u1lZ007764
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 7 Sep 2017 06:56:02 +0100 (BST)
Received: from [127.0.0.1] (localhost [127.0.0.1])
	by petertodd.org (Postfix) with ESMTPSA id 444C840101;
	Thu,  7 Sep 2017 05:56:01 +0000 (UTC)
Received: by localhost (Postfix, from userid 1000)
	id 7607A202B4; Thu,  7 Sep 2017 01:55:57 -0400 (EDT)
Date: Thu, 7 Sep 2017 01:55:57 -0400
From: Peter Todd <pete@petertodd.org>
To: "Russell O'Connor" <roconnor@blockstream.io>,
	Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Message-ID: <20170907055557.GA12638@fedora-23-dvm>
References: <CAMZUoKmD4v4vn9L=kdyJNk-km3XHpNVkD_tmS+SseMsf6YaVPg@mail.gmail.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature"; boundary="0OAP2g/MAC+5xKAE"
Content-Disposition: inline
In-Reply-To: <CAMZUoKmD4v4vn9L=kdyJNk-km3XHpNVkD_tmS+SseMsf6YaVPg@mail.gmail.com>
User-Agent: Mutt/1.5.23 (2014-03-12)
X-Server-Quench: 3b3a1b68-9391-11e7-801f-9cb654bb2504
X-AuthReport-Spam: If SPAM / abuse - report it at:
	http://www.authsmtp.com/abuse
X-AuthRoute: OCd2Yg0TA1ZNQRgX IjsJECJaVQIpKltL GxAVKBZePFsRUQkR
	aQdMdgUUC1AEAgsB AmEbW1JeVVt7WWA7 bghPaBtcak9QXgdq
	T0pMXVMcUg1vBFkA WnQeUh51cQEIf395 ZAhhDHMKXRZ8fVt0
	QUdVCGwHMGB9YGAe Bl1RJFFSdQcYLB1A alQxNiYHcQ5VPz4z
	GA41ejw8IwAXBi1O XkkoIEgRRUtDIiQx Sgtq
X-Authentic-SMTP: 61633532353630.1039:706
X-AuthFastPath: 0 (Was 255)
X-AuthSMTP-Origin: 52.5.185.120/25
X-AuthVirus-Status: No virus detected - but ensure you scan with your own
	anti-virus system.
X-Spam-Status: No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW
	autolearn=disabled version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
	smtp1.linux-foundation.org
Subject: Re: [bitcoin-dev] Fast Merkle Trees
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: Thu, 07 Sep 2017 05:56:13 -0000


--0OAP2g/MAC+5xKAE
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Sep 06, 2017 at 09:59:54PM -0400, Russell O'Connor via bitcoin-dev =
wrote:
> The fast hash for internal nodes needs to use an IV that is not the
> standard SHA-256 IV. Instead needs to use some other fixed value, which
> should itself be the SHA-256 hash of some fixed string (e.g. the string
> "BIP ???" or "Fash SHA-256").

Note that in general, designs should *not* create new hash functions by usi=
ng
custom IVs, but rather use bog-standard SHA256, and make a fixed first bloc=
k.
That allows unoptimised implementations to just hash a block with the second
initialization value, and optimized implementations to start with the fixed
midstate.

--=20
https://petertodd.org 'peter'[:-1]@petertodd.org

--0OAP2g/MAC+5xKAE
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature

-----BEGIN PGP SIGNATURE-----

iQEcBAEBCAAGBQJZsN9tAAoJECSBQD2l8JH77pAIAJ49ZmbMUrkSJumHkfj6YoG4
3WspIs25cWXI1wx6d4FrFck4eoBsEabWGlL3VgCj2EiU37ilwFp+tbtn1tUjO9YS
aPjMKRXLuqdMPq/JxvLipAf9ftVgGBjHrHYf3vg2tAY7IgJel3ZC7lHIJToh1Y57
0r3IbW9NNI49xkUmyNpqZ/Ytv2ESgAtroxEKMztulIzkxYT/tf/MYejJxZtvIqN4
9i3nTDVUiSd+ZXFMjo6NXpo4kZRDUu4Hd/Cp2DuH1NVISr1abybpKZr7zsPdsH8n
h4jlg70nL2bLe9ErDdfq8XIs+0TlRNzVFdO83xbGBUirghZWgUg3hEjeVmym2FA=
=yaSx
-----END PGP SIGNATURE-----

--0OAP2g/MAC+5xKAE--