From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YCAP5-0005cX-Lz for bitcoin-development@lists.sourceforge.net; Fri, 16 Jan 2015 17:09:47 +0000 Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of gmail.com designates 209.85.216.174 as permitted sender) client-ip=209.85.216.174; envelope-from=etotheipi@gmail.com; helo=mail-qc0-f174.google.com; Received: from mail-qc0-f174.google.com ([209.85.216.174]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1YCAP4-0004dF-7J for bitcoin-development@lists.sourceforge.net; Fri, 16 Jan 2015 17:09:47 +0000 Received: by mail-qc0-f174.google.com with SMTP id c9so17930327qcz.5 for ; Fri, 16 Jan 2015 09:09:40 -0800 (PST) X-Received: by 10.224.113.200 with SMTP id b8mr25593440qaq.35.1421428180732; Fri, 16 Jan 2015 09:09:40 -0800 (PST) Received: from [192.168.1.28] (c-69-143-204-74.hsd1.md.comcast.net. [69.143.204.74]) by mx.google.com with ESMTPSA id p7sm4660053qat.4.2015.01.16.09.09.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Jan 2015 09:09:40 -0800 (PST) Message-ID: <54B945D3.1000404@gmail.com> Date: Fri, 16 Jan 2015 12:09:39 -0500 From: Alan Reiner User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: bitcoin-development@lists.sourceforge.net References: <6E575287-887C-4628-834C-282B67AFAA94@eeqj.com> <3382316.6TbFyFjyI6@crushinator> <54B93D89.5020005@thomaskerin.io> In-Reply-To: <54B93D89.5020005@thomaskerin.io> Content-Type: multipart/alternative; boundary="------------000708080106040307040601" X-Spam-Score: 0.4 (/) 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 (etotheipi[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 1.0 FREEMAIL_REPLY From and body contain different freemails X-Headers-End: 1YCAP4-0004dF-7J Subject: Re: [Bitcoin-development] convention/standard for sorting public keys for p2sh multisig transactions 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: Fri, 16 Jan 2015 17:09:47 -0000 This is a multi-part message in MIME format. --------------000708080106040307040601 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit I see no reason to restrict compressed/uncompressed. Strings don't have to be the same length to sort them lexicographically. If a multi-sig participant provides an uncompressed key, they are declaring that the key that they use and it will only be used uncompressed. Clients don't have to go looking for all combinations of compressed & uncompressed. On 01/16/2015 11:34 AM, Thomas Kerin wrote: > > > It seems there is scope for further narrowing down how a multisig > scripthash address should be determined - what do people think of > anticipating only compressed keys for scripts? > > It's possible to cause confusion if one put forward a compressed key > at some time, and an uncompressed key at another. A different script > hash would be produced even though there is no difference to the keys > involved. The client will not search for this. > > > Having spoken with Jean-Pierre and Ruben about this for quite some > time now, there is 100% the need for a BIP outlining this. Everyone > has had the idea at some point, and some of us already using it, but > people shouldn't have to go digging in BIP45 for the two lines which > mention it. All we need is a place to put the docs. > > I am building up a list of implementations which currently support > sorting, and briefly describing a motivation for such a BIP. > > > On 16/01/15 10:16, Ruben de Vries wrote: > > Since we only need the sorting for creating the scriptPubKey, > > wouldn't it make the most sense to sort it by the way it represented > in that context? > > > > On Thu, Jan 15, 2015 at 2:03 PM, Wladimir > wrote: > > > On Thu, Jan 15, 2015 at 1:17 AM, Matt Whitlock > > wrote: > > > On Wednesday, 14 January 2015, at 3:53 pm, Eric Lombrozo wrote: > > >> Internally, pubkeys are DER-encoded integers. > > > > > > I thought pubkeys were represented as raw integers (i.e., > they're embedded in Script as a push operation whose payload is the > raw bytes of the big-endian representation of the integer). As far as > I know, DER encoding is only used for signatures. Am I mistaken? > > > OP_CHECKSIG (and OP_CHECKSIGVERIFY) takes a DER-encoded pubkey and a > > DER-encoded signature on the stack. > > > Possibly you're confused with OP_HASH160 OP_EQUALVERIFY as > > used in outputs, which compares the 160-bit hash of the pubkey > against > > the given hash (usually taken from a bitcoin address). > > > It doesn't help understanding to consider either as integers. > They are > > binary blob objects with either a fixed format (DER) or a fixed size > > (hashes). > > > Wladimir > > > > > > -- > > BlockTrail B.V. > > Barbara Strozzilaan 201 > > 1083HN Amsterdam > > The Netherlands > > > Phone:+31 (0)612227277 > > E-mail:ruben@blocktrail.com > > Web:www.blocktrail.com > > > > Github:www.github.com/rubensayshi > > > BlockTrail B.V. Is registered with the Dutch Chamber of Commerce in > Amsterdam with registration No.:60262060 and VAT No.:NL853833035B01 > > > > > ------------------------------------------------------------------------------ > > New Year. New Location. New Benefits. New Data Center in Ashburn, VA. > > GigeNET is offering a free month of service with a new server in > Ashburn. > > Choose from 2 high performing configs, both with 100TB of bandwidth. > > Higher redundancy.Lower latency.Increased capacity.Completely compliant. > > http://p.sf.net/sfu/gigenet > > > > _______________________________________________ > > Bitcoin-development mailing list > > Bitcoin-development@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/bitcoin-development > > > > > ------------------------------------------------------------------------------ > New Year. New Location. New Benefits. New Data Center in Ashburn, VA. > GigeNET is offering a free month of service with a new server in Ashburn. > Choose from 2 high performing configs, both with 100TB of bandwidth. > Higher redundancy.Lower latency.Increased capacity.Completely compliant. > http://p.sf.net/sfu/gigenet > > > _______________________________________________ > Bitcoin-development mailing list > Bitcoin-development@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bitcoin-development --------------000708080106040307040601 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit I see no reason to restrict compressed/uncompressed.  Strings don't have to be the same length to sort them lexicographically.  If a multi-sig participant provides an uncompressed key, they are declaring that the key that they use and it will only be used uncompressed.   Clients don't have to go looking for all combinations of compressed & uncompressed.

On 01/16/2015 11:34 AM, Thomas Kerin wrote:
>

It seems there is scope for further narrowing down how a multisig scripthash address should be determined - what do people think of anticipating only compressed keys for scripts?

It's possible to cause confusion if one put forward a compressed key at some time, and an uncompressed key at another. A different script hash would be produced even though there is no difference to the keys involved. The client will not search for this.


Having spoken with Jean-Pierre and Ruben about this for quite some time now, there is 100% the need for a BIP outlining this. Everyone has had the idea at some point, and some of us already using it, but people shouldn't have to go digging in BIP45 for the two lines which mention it. All we need is a place to put the docs.

I am building up a list of implementations which currently support sorting, and briefly describing a motivation for such a BIP.


On 16/01/15 10:16, Ruben de Vries wrote:
> Since we only need the sorting for creating the scriptPubKey,
> wouldn't it make the most sense to sort it by the way it represented in that context?


> On Thu, Jan 15, 2015 at 2:03 PM, Wladimir <laanwj@gmail.com <mailto:laanwj@gmail.com>> wrote:

>     On Thu, Jan 15, 2015 at 1:17 AM, Matt Whitlock <bip@mattwhitlock.name <mailto:bip@mattwhitlock.name>> wrote:
>     > On Wednesday, 14 January 2015, at 3:53 pm, Eric Lombrozo wrote:
>     >> Internally, pubkeys are DER-encoded integers.
>     >
>     > I thought pubkeys were represented as raw integers (i.e., they're embedded in Script as a push operation whose payload is the raw bytes of the big-endian representation of the integer). As far as I know, DER encoding is only used for signatures. Am I mistaken?

>     OP_CHECKSIG (and OP_CHECKSIGVERIFY) takes a DER-encoded pubkey and a
>     DER-encoded signature on the stack.

>     Possibly you're confused with OP_HASH160 <hash160> OP_EQUALVERIFY as
>     used in outputs, which compares the 160-bit hash of the pubkey against
>     the given hash (usually taken from a bitcoin address).

>     It doesn't help understanding to consider either as integers. They are
>     binary blob objects with either a fixed format (DER) or a fixed size
>     (hashes).

>     Wladimir




> --
> BlockTrail B.V.
> Barbara Strozzilaan 201
> 1083HN Amsterdam
> The Netherlands

> Phone:+31 (0)612227277
> E-mail:ruben@blocktrail.com <mailto:ruben@blocktrail.com>
> Web:www.blocktrail.com
> <http://www.blocktrail.com/>
> Github:www.github.com/rubensayshi <http://www.github.com/rubensayshi>

> BlockTrail B.V. Is registered with the Dutch Chamber of Commerce in Amsterdam with registration No.:60262060 and VAT No.:NL853833035B01


> ------------------------------------------------------------------------------
> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
> GigeNET is offering a free month of service with a new server in Ashburn.
> Choose from 2 high performing configs, both with 100TB of bandwidth.
> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
> http://p.sf.net/sfu/gigenet


> _______________________________________________
> Bitcoin-development mailing list
> Bitcoin-development@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bitcoin-development

>
>
>
> ------------------------------------------------------------------------------
> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
> GigeNET is offering a free month of service with a new server in Ashburn.
> Choose from 2 high performing configs, both with 100TB of bandwidth.
> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
> http://p.sf.net/sfu/gigenet
>
>
> _______________________________________________
> Bitcoin-development mailing list
> Bitcoin-development@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bitcoin-development



--------------000708080106040307040601--