Re: [Bitcoin-development] convention/standard for sorting public keys for p2sh multisig transactions

2015-01-15 Thread Jean-Pierre Rupp
A public key is a point in the elliptic curve.  As such it has an X and
a Y component.  Its serialization is described very succintly here:

https://en.bitcoin.it/wiki/Protocol_specification#Signatures

On 15/01/15 01:17, Matt Whitlock wrote:
> 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?

-- 
Be Happy :)

--
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


Re: [Bitcoin-development] convention/standard for sorting public keys for p2sh multisig transactions

2015-01-15 Thread Jonathan Brown
In BIP45 it mentions "lexicographically sorting the public keys".

https://github.com/bitcoin/bips/blob/master/bip-0045.mediawiki#Address_Generation_Procedure

On 15 January 2015 at 03:32, Jeff Garzik  wrote:

> Sounds like this warrants a micro-BIP just to get everybody on the same
> page.
>
>
> On Wed, Jan 14, 2015 at 11:37 AM, Ruben de Vries 
> wrote:
>
>> For p2sh multisig TXs the order of the public keys affect the hash and
>> there doesn't seem to be an agreed upon way of sorting the public keys.
>>
>> If there would be a standard (recommended) way of sorting the public keys
>> that would make it easier for services that implement some form of multisig
>> to be compatible with each other without much hassle and making it possible
>> to import keys from one service to another.
>>
>> I'm not suggesting forcing the order, just setting a standard to
>> recommend, there doesn't seem to be much reason for (new) services to not
>> follow that recommendation.
>>
>> Ryan from BitPay broad this up before (
>> https://sourceforge.net/p/bitcoin/mailman/message/32092958/) and in
>> bitcore they've implemented lexicographical sorting on the hex of the
>> public key.
>> In a short search I can't find any other library that has a sorting
>> function, let alone using it by default, so bitcore is currently my only
>> reference.
>>
>>
>> ​Ruben de Vries
>> ​CTO, BlockTrail
>>
>>
>> --
>> 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
>>
>>
>
>
> --
> Jeff Garzik
> Bitcoin core developer and open source evangelist
> BitPay, Inc.  https://bitpay.com/
>
>
> --
> 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