Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Z14fA-0007MW-JD for bitcoin-development@lists.sourceforge.net; Sat, 06 Jun 2015 03:20:48 +0000 Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of gmail.com designates 209.85.216.51 as permitted sender) client-ip=209.85.216.51; envelope-from=stephencalebmorse@gmail.com; helo=mail-vn0-f51.google.com; Received: from mail-vn0-f51.google.com ([209.85.216.51]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1Z14f9-0003nE-Fe for bitcoin-development@lists.sourceforge.net; Sat, 06 Jun 2015 03:20:48 +0000 Received: by vnbg7 with SMTP id g7so5308932vnb.1 for ; Fri, 05 Jun 2015 20:20:42 -0700 (PDT) X-Received: by 10.52.174.48 with SMTP id bp16mr11675833vdc.35.1433560841993; Fri, 05 Jun 2015 20:20:41 -0700 (PDT) Received: from [192.168.0.2] (cpe-76-179-51-147.maine.res.rr.com. [76.179.51.147]) by mx.google.com with ESMTPSA id qj9sm10463943vdb.9.2015.06.05.20.20.41 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 05 Jun 2015 20:20:41 -0700 (PDT) Content-Type: multipart/alternative; boundary=Apple-Mail-C514C442-008D-4833-9E35-01E9235278EC Mime-Version: 1.0 (1.0) From: Stephen X-Mailer: iPhone Mail (12F70) In-Reply-To: Date: Fri, 5 Jun 2015 23:20:38 -0400 Content-Transfer-Encoding: 7bit Message-Id: <44BE16F9-AB24-4A8E-BC7F-03A6C590FCE7@gmail.com> References: To: Kristov Atlas X-Spam-Score: -0.6 (/) 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 (stephencalebmorse[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 1.0 HTML_MESSAGE BODY: HTML included in message 0.0 MIME_QP_LONG_LINE RAW: Quoted-printable line longer than 76 chars -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 X-Headers-End: 1Z14f9-0003nE-Fe Cc: Bitcoin development mailing list Subject: Re: [Bitcoin-development] Lexicographical Indexing of Transaction Inputs and Outputs 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: Sat, 06 Jun 2015 03:20:48 -0000 --Apple-Mail-C514C442-008D-4833-9E35-01E9235278EC Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Hi Kristov, I like the idea. Mainly because having a standard reminds developers to cons= ider this issue. In addition, we would have visibility into the portion of t= he network that adopts this strategy to enhance privacy. A few points of fee= dback: - I think your explanation of sorting could be significantly shortened and c= larified by simply saying that the TXIDs of inputs should be compared as uin= t256 integers.=20 - The malleability of input TXIDs, as mentioned in the proposal, could caus= e inputs to be ordered in a non-standard way. Reordering then them would inv= alidate the signatures (assuming SIGHASH_ALL), so the transaction would be l= eft with improperly ordered inputs. While not a huge issue, it's not ideal. I= think the best way to get around this would be to use normalized TXIDs, but= you might also be able to sort based on the previous outputs that each of t= he inputs are spending? These both require information that may not be readi= ly available, however, and use of normalized transaction IDs is not fully de= veloped yet.=20 Best, Stephen=20 > On Jun 5, 2015, at 8:12 PM, Kristov Atlas w= rote: >=20 > Hello all, >=20 > I have written a draft of a BIP to standardize the sorting of tx inputs an= d outputs for privacy and security reasons. A few colleagues have reviewed t= his and provided feedback privately, but now it's ready for feedback from a w= ider audience. >=20 > If there is positive sentiment about the proposal after feedback is integr= ated, I aim for a bip number to be assigned and have it accepted into https:= //github.com/bitcoin/bips=20 >=20 > Link: https://github.com/kristovatlas/rfc/blob/master/bips/bip-li01.mediaw= iki >=20 > For your convenience, here's the abstract: >=20 > "Currently there is no standard for bitcoin wallet clients when ordering t= ransaction inputs and outputs. As a result, wallet clients often have a disc= ernible blockchain fingerprint, and can leak private information about their= users. By contrast, a standard for non-deterministic sorting could be diffi= cult to audit. This document proposes deterministic lexicographical sorting,= using hashes of previous transactions and output indices to sort transactio= n inputs, as well as value and locking scripts to sort transaction outputs."= >=20 > Thanks, >=20 > Kristov Atlas > Open Bitcoin Privacy Project Contributor, Blockchain.info Security Enginee= r, etc. > Twitter: @kristovatlas > Blog: kristovatlas.com > --------------------------------------------------------------------------= ---- > _______________________________________________ > Bitcoin-development mailing list > Bitcoin-development@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bitcoin-development --Apple-Mail-C514C442-008D-4833-9E35-01E9235278EC Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hi Kristov,

I= like the idea. Mainly because having a standard reminds developers to consi= der this issue. In addition, we would have visibility into the portion of th= e network that adopts this strategy to enhance privacy. A few points of feed= back:

 - I think your explanation of sorting c= ould be significantly shortened and clarified by simply saying that the TXID= s of inputs should be compared as uint256 integers. 
 - T= he malleability of input TXIDs, as mentioned in the proposal, could cause in= puts to be ordered in a non-standard way. Reordering then them would invalid= ate the signatures (assuming SIGHASH_ALL), so the transaction would be left w= ith improperly ordered inputs. While not a huge issue, it's not ideal. I thi= nk the best way to get around this would be to use normalized TXIDs, but you= might also be able to sort based on the previous outputs that each of the i= nputs are spending? These both require information that may not be readily a= vailable, however, and use of normalized transaction IDs is not fully develo= ped yet. 

Best,
Stephen 
<= div>


On Jun 5, 2015, at 8:12 PM, Kristov Atlas <kristovatlas.lists@gmail.com= > wrote:

Hello all,

I have written a= draft of a BIP to standardize the sorting of tx inputs and outputs for priv= acy and security reasons. A few colleagues have reviewed this and provided f= eedback privately, but now it's ready for feedback from a wider audience.
If there is positive sentiment about the proposal after feedback i= s integrated, I aim for a bip number to be assigned and have it accepted int= o https://github.com/bitcoin/bip= s

Link: https://github.com/kristovatlas/rfc/blob/master/= bips/bip-li01.mediawiki

For your convenience, here's the ab= stract:

"Currently there is no standard for bitcoin wallet clients wh= en ordering transaction inputs and outputs. As a result, wallet clients ofte= n have a discernible blockchain fingerprint, and can leak private informatio= n about their users. By contrast, a standard for non-deterministic sorting c= ould be difficult to audit. This document proposes deterministic lexicograph= ical sorting, using hashes of previous transactions and output indices to so= rt transaction inputs, as well as value and locking scripts to sort transact= ion outputs."

Thanks,

Kristov Atlas
Open B= itcoin Privacy Project Contributor, Blockchain.info Security Engineer, etc.<= br>
Twitter: @kristovatlas
Blog: kristovatlas.com
--------------------= ----------------------------------------------------------
<= /blockquote>
___________________________= ____________________
Bitcoin-development mailing list=
Bitco= in-development@lists.sourceforge.net
https://lists.sour= ceforge.net/lists/listinfo/bitcoin-development
= --Apple-Mail-C514C442-008D-4833-9E35-01E9235278EC--