Bitcoin Forum
December 08, 2016, 06:33:32 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: question about address generation  (Read 1009 times)
bitcoinsarefun
Member
**
Offline Offline

Activity: 98



View Profile
March 26, 2012, 01:33:12 PM
 #1

why it 0x04 appended to the public key before beginning other functions on it?
1481222012
Hero Member
*
Offline Offline

Posts: 1481222012

View Profile Personal Message (Offline)

Ignore
1481222012
Reply with quote  #2

1481222012
Report to moderator
1481222012
Hero Member
*
Offline Offline

Posts: 1481222012

View Profile Personal Message (Offline)

Ignore
1481222012
Reply with quote  #2

1481222012
Report to moderator
1481222012
Hero Member
*
Offline Offline

Posts: 1481222012

View Profile Personal Message (Offline)

Ignore
1481222012
Reply with quote  #2

1481222012
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218


Gerald Davis


View Profile
March 26, 2012, 01:49:07 PM
 #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.
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1036


View Profile WWW
March 26, 2012, 06: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.

aka sipa, core dev team

Tips and donations: 1KwDYMJMS4xq3ZEWYfdBRwYG2fHwhZsipa
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218


Gerald Davis


View Profile
March 26, 2012, 06:31:32 PM
 #4

Thanks Pieter I learned something today (I knew it would be a good idea to get out of bed).
Red Emerald
Hero Member
*****
Offline Offline

Activity: 742



View Profile WWW
March 26, 2012, 06: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.

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!