Bitcoin Forum
July 08, 2024, 12:44:21 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How were BIP32 version bytes determined? [SOLVED]  (Read 1218 times)
JayCoin (OP)
Sr. Member
****
Offline Offline

Activity: 409
Merit: 251


Crypt'n Since 2011


View Profile WWW
July 09, 2014, 12:54:36 AM
Last edit: July 09, 2014, 04:01:59 PM by JayCoin
 #1

BIP32 version bytes for public and private keys are

PUBLIC = 0x0488b21e
PRIVATE = 0x0488ade4

How were these determined so that the prefixes of extended keys start with "xpub" and "xprv" ?

Was it guess and check?

I want to come up with some version bytes for some altcoins that don't have standard version bytes yet.

Hello There!
DannyHamilton
Legendary
*
Offline Offline

Activity: 3430
Merit: 4681



View Profile
July 09, 2014, 01:35:23 AM
 #2

Write out what you want the version bytes to say.

Convert from base 58 to hex (base 16).

Done.
JayCoin (OP)
Sr. Member
****
Offline Offline

Activity: 409
Merit: 251


Crypt'n Since 2011


View Profile WWW
July 09, 2014, 04:00:08 PM
 #3

It was a little harder than that. The bytes don't line up between base58 and hex. I used a little trial and error. I bet if I was better with base58 math then it would be easier.

here are some bip32 numbers I came up with for Namecoin:

Private: 0x01c5c63d  = "Nprv"
Public: 0x01c5ca77 = "Npub"

Hello There!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!