Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1RzWrV-0005Eo-IT for bitcoin-development@lists.sourceforge.net; Mon, 20 Feb 2012 17:17:17 +0000 Received-SPF: pass (sog-mx-3.v43.ch3.sourceforge.com: domain of gmail.com designates 74.125.82.175 as permitted sender) client-ip=74.125.82.175; envelope-from=gavinandresen@gmail.com; helo=mail-we0-f175.google.com; Received: from mail-we0-f175.google.com ([74.125.82.175]) by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1RzWrR-0003aW-DG for bitcoin-development@lists.sourceforge.net; Mon, 20 Feb 2012 17:17:17 +0000 Received: by werc1 with SMTP id c1so4690442wer.34 for ; Mon, 20 Feb 2012 09:17:07 -0800 (PST) Received-SPF: pass (google.com: domain of gavinandresen@gmail.com designates 10.180.102.35 as permitted sender) client-ip=10.180.102.35; Authentication-Results: mr.google.com; spf=pass (google.com: domain of gavinandresen@gmail.com designates 10.180.102.35 as permitted sender) smtp.mail=gavinandresen@gmail.com; dkim=pass header.i=gavinandresen@gmail.com Received: from mr.google.com ([10.180.102.35]) by 10.180.102.35 with SMTP id fl3mr18655743wib.22.1329758227356 (num_hops = 1); Mon, 20 Feb 2012 09:17:07 -0800 (PST) MIME-Version: 1.0 Received: by 10.180.102.35 with SMTP id fl3mr15525524wib.22.1329758227200; Mon, 20 Feb 2012 09:17:07 -0800 (PST) Received: by 10.223.116.15 with HTTP; Mon, 20 Feb 2012 09:17:07 -0800 (PST) In-Reply-To: <3DA9C79B-D91D-48B2-9469-37BAA037FC50@ceptacle.com> References: <3DA9C79B-D91D-48B2-9469-37BAA037FC50@ceptacle.com> Date: Mon, 20 Feb 2012 12:17:07 -0500 Message-ID: From: Gavin Andresen To: =?ISO-8859-1?Q?Michael_Gr=F8nager?= Content-Type: multipart/alternative; boundary=f46d044517f3c4fb5504b96876d2 X-Spam-Score: -1.1 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (gavinandresen[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 1.0 HTML_MESSAGE BODY: HTML included in message -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.5 AWL AWL: From: address is in the auto white-list X-Headers-End: 1RzWrR-0003aW-DG Cc: Bitcoin Dev Subject: Re: [Bitcoin-development] BIP-13 X-BeenThere: bitcoin-development@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 17:17:17 -0000 --f46d044517f3c4fb5504b96876d2 Content-Type: text/plain; charset=ISO-8859-1 RE: > base58-encode: [one-byte network ID][20-byte hash][one-byte address class][3-byte checksum] How will the code distinguish between the old scheme: [one-byte-version][20-byte-hash][4-byte-checksum] and the new? 1 in 256 old addresses will have a first-byte-of-checksum that matches the new address class; I guess the code would do something like: a) If the 4-byte checksum matches, then assume it is a singlesig address (1 in 2^32 multisig addresses will incorrectly match) b) If the one-byte-address-class and 3-byte checksum match, then it is a valid p2sh c) Otherwise, invalid address The 1 in 2^32 multisig addresses also being valid singlesig addresses makes me think this scheme won't work-- an attacker willing to generate 8 billion or so ECDSA keys could generate a single/multisig collision. I'm not sure how that could be leveraged to their advantage, but I bet they'd find a way. RE: should it be a BIP: The BIP process is described in BIP 0001, and you're following it perfectly so far: 1) Post a rough draft of the idea here to see if there's any chance it'll be adopted 2) Assuming a positive response and no major flaws: write up a draft BIP 3) Post the draft BIP here, where it can be picked apart. 4) Assuming no major flaws, ask the BIP editor (Amir) for a BIP number I'd also encourage you to actually implement your idea between steps 3 and 4. But in this particular case, I think an attacker being able to create singlesig/p2sh address collisions counts as a major flaw. -- -- Gavin Andresen --f46d044517f3c4fb5504b96876d2 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable RE:
> base58-encode: [one-byte network ID][20-byte hash][one-byte add= ress class][3-byte checksum]

How will the code distinguish between t= he old scheme:
[one-byte-version][20-byte-hash][4-byte-checksum]
and the new?

1 in 256 old addresses will have a first-byte-of-checks= um that matches the new address class; I guess the code would do something = like:

a) If the 4-byte checksum matches, then assume it is a singles= ig address (1 in 2^32 multisig addresses will incorrectly match)
b) If the one-byte-address-class and 3-byte checksum match, then it is a va= lid p2sh
c) Otherwise, invalid address

The 1 in 2^32 multisig add= resses also being valid singlesig addresses makes me think this scheme won&= #39;t work-- an attacker willing to generate 8 billion or so ECDSA keys cou= ld generate a single/multisig collision. =A0I'm not sure how that could= be leveraged to their advantage, but I bet they'd find a way.

RE: should it be a BIP: =A0The BIP process is described in BIP 0001, and you'= ;re following it perfectly so far:

1) Post a rough draft= of the idea here to see if there's any chance it'll be adopted
2) Assuming a positive response and no major flaws: write up a draft B= IP
3) Post the draft BIP here, where it can be picked apart.
4) Assuming no major flaws, ask the BIP editor (Amir) for a BIP numbe= r

I'd also encourage you to actually implement your i= dea between steps 3 and 4. But in this particular case, I think an attacker= being able to create singlesig/p2sh address collisions counts as a major f= law.

--
--
Gavin Andresen
--f46d044517f3c4fb5504b96876d2--