Author

Topic: question about address generation (Read 1286 times)

hero member
Activity: 742
Merit: 500
March 26, 2012, 01:34:43 PM
#5
There are several ways to serialize EC public keys, as specified by the SEC specification. A summary:
* 0x00: The point at infinity
* 0x02 + x_coord: Compressed representation of a point with an even y_coord
* 0x03 + x_coord: Compressed representation of a point with an odd y_coord
* 0x04 + x_coord + y_coord: Uncompressed representation of a point

Up to 0.5.x, bitcoin always used uncompressed EC points (=public keys). Starting with 0.6.0, compressed public keys will be used for new or upgraded wallets.
Thanks for this.  I was trying to figure out how bitcoin was doing compressed public keys just last night.
donator
Activity: 1218
Merit: 1079
Gerald Davis
March 26, 2012, 01:31:32 PM
#4
Thanks Pieter I learned something today (I knew it would be a good idea to get out of bed).
legendary
Activity: 1072
Merit: 1181
March 26, 2012, 01:08:36 PM
#3
There are several ways to serialize EC public keys, as specified by the SEC specification. A summary:
* 0x00: The point at infinity
* 0x02 + x_coord: Compressed representation of a point with an even y_coord
* 0x03 + x_coord: Compressed representation of a point with an odd y_coord
* 0x04 + x_coord + y_coord: Uncompressed representation of a point

Up to 0.5.x, bitcoin always used uncompressed EC points (=public keys). Starting with 0.6.0, compressed public keys will be used for new or upgraded wallets.
donator
Activity: 1218
Merit: 1079
Gerald Davis
March 26, 2012, 08:49:07 AM
#2
My understanding is it is to identify the underlying encryption protocol.  All keys today have the prefix 0x04 because they all use ECDSA (w/ secp256k1 curve).   It is possible for Bitcoin to support future algorithms (if ECDSA became compromised or degraded).  The 0x04 allows the client to "check" the algorithm being used.  If it finds a key w/ anything other than 0x04 it will fail but future clients could be extended.

You have to imagine if ECDSA was "partially compromised" existing keys will remain for a long time.  Having a encryption identifier would allow a client to handle both encryption methods at the same time.  Old clients would be ECDSA only and new clients would support the old & new algorithms.

If you mean why 0x04 not 0x03 or 0x99?  I don't think it has any specific meaning other than an identifier.
member
Activity: 98
Merit: 10
March 26, 2012, 08:33:12 AM
#1
why it 0x04 appended to the public key before beginning other functions on it?
Jump to: