Bitcoin Forum

Bitcoin => Bitcoin Discussion => Topic started by: kellrobinson on March 09, 2014, 04:16:23 PM



Title: 256 bits in base58
Post by: kellrobinson on March 09, 2014, 04:16:23 PM
It only takes 44 characters in base58 to encode 256 bits, so why do private keys have 50 characters?


Title: Re: 256 bits in base58
Post by: krampus on March 09, 2014, 04:18:19 PM
NSA tracking bits.


Title: Re: 256 bits in base58
Post by: DeathAndTaxes on March 09, 2014, 04:21:34 PM
It includes a checksum (just like addresses) to avoid importing incorrect key.  It also includes a compressed or uncompressed flag so the proper PubKeyHash can be computed.

https://en.bitcoin.it/wiki/Wallet_import_format


Title: Re: 256 bits in base58
Post by: Peter R on March 09, 2014, 04:23:57 PM
https://en.bitcoin.it/wiki/Wallet_import_format

There is a checksum appended (and an ID byte prepended).  

Nearly any 256 bit number is a valid ECDSA private key.  Make a single typo and it's still a valid private key (to a different address).  The checksum makes WIF robust against typos/import errors.  Take one of your base58 WIF keys, make some typos and try to import it: you'll see that it doesn't work.  

Bitcoin addresses also have similar checksums appended.  This means that if you make a typo or drop the last character when entering a send-to address, that the checksum won't "check" and you won't lose your bitcoins.  

EDIT: D&T you beat me!  


Title: Re: 256 bits in base58
Post by: DeathAndTaxes on March 09, 2014, 04:36:20 PM
EDIT: D&T you beat me! 

I winz one internets!  Don't feel bad if Danny was here he would have beat both of us.  The guy must either type 500 wpm or has a mind machine interface.


Title: Re: 256 bits in base58
Post by: DannyHamilton on March 09, 2014, 11:25:47 PM
EDIT: D&T you beat me!  
I winz one internets!  Don't feel bad if Danny was here he would have beat both of us.  The guy must either type 500 wpm or has a mind machine interface.

Was out selling bitcoins to a local (and getting my hair cut, and working out at the gym, and a few other errands).

Missed my opportunity to beat you both.  I'll get you next time.

I don't type very fast at all.  I've been a programmer for over 30 years, and I still do most of my typing with only 6 fingers (and my thumbs for the spacebar).  I do make judicial use of search, copy, and paste.  Saves me a huge amount of typing (and a huge amount of remembering).