Bitcoin Forum
May 04, 2024, 02:15:16 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: bitaddress.org - bug generating private keys?  (Read 685 times)
taturii (OP)
Member
**
Offline Offline

Activity: 96
Merit: 10


View Profile
March 26, 2014, 10:21:31 AM
 #1

Hi,

I've visited bitaddress.org to generate a paper wallet, but all the private adddresses generated start with '5H', '5J' or '5K'. Anyone knows if this is a bug of the RNG, javascript, browser... or whatever?
1714832116
Hero Member
*
Offline Offline

Posts: 1714832116

View Profile Personal Message (Offline)

Ignore
1714832116
Reply with quote  #2

1714832116
Report to moderator
1714832116
Hero Member
*
Offline Offline

Posts: 1714832116

View Profile Personal Message (Offline)

Ignore
1714832116
Reply with quote  #2

1714832116
Report to moderator
"You Asked For Change, We Gave You Coins" -- casascius
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714832116
Hero Member
*
Offline Offline

Posts: 1714832116

View Profile Personal Message (Offline)

Ignore
1714832116
Reply with quote  #2

1714832116
Report to moderator
1714832116
Hero Member
*
Offline Offline

Posts: 1714832116

View Profile Personal Message (Offline)

Ignore
1714832116
Reply with quote  #2

1714832116
Report to moderator
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4616



View Profile
March 26, 2014, 02:07:36 PM
 #2

Hi,

I've visited bitaddress.org to generate a paper wallet, but all the private adddresses generated start with '5H', '5J' or '5K'. Anyone knows if this is a bug of the RNG, javascript, browser... or whatever?

This is not a bug.

When converting a private key from a 256 bit binary number to Wallet Import Format, a byte with the value of 128 is added to the front of the number as a version number.

Then a 4 byte checksum is added to the end of the number.

The version number combined with the following byte result in a base58check value between 5H and 5K.  As such, the wallet import format bitcoin private for an uncompressed public key will always start with '5H', '5J', or '5K'.
taturii (OP)
Member
**
Offline Offline

Activity: 96
Merit: 10


View Profile
March 26, 2014, 06:39:13 PM
 #3

Thanks for your response. I didn't know that the private key was formatted like a Bitcoin address (version byte plus checksum bytes at the end). Is it possible to import a raw private key (i.e. a 256 bit random number) or is mandatory to format the key in that way?
grue
Legendary
*
Offline Offline

Activity: 2058
Merit: 1431



View Profile
March 26, 2014, 07:04:09 PM
 #4

Thanks for your response. I didn't know that the private key was formatted like a Bitcoin address (version byte plus checksum bytes at the end). Is it possible to import a raw private key (i.e. a 256 bit random number) or is mandatory to format the key in that way?
There are tools that can convert between hexadecimal and base58 (wallet import format). The one I can remember right now is sx.

It is pitch black. You are likely to be eaten by a grue.

Adblock for annoying signature ads | Enhanced Merit UI
cp1
Hero Member
*****
Offline Offline

Activity: 616
Merit: 500


Stop using branwallets


View Profile
March 26, 2014, 08:48:51 PM
 #5

Thanks for your response. I didn't know that the private key was formatted like a Bitcoin address (version byte plus checksum bytes at the end). Is it possible to import a raw private key (i.e. a 256 bit random number) or is mandatory to format the key in that way?

Unless your wallet has some import raw key mode, you'll have to format in the wallet import format:  https://en.bitcoin.it/wiki/Wallet_import_format

Guide to armory offline install on USB key:  https://bitcointalk.org/index.php?topic=241730.0
Abdussamad
Legendary
*
Offline Offline

Activity: 3612
Merit: 1564



View Profile
March 27, 2014, 10:17:29 AM
 #6

Thanks for your response. I didn't know that the private key was formatted like a Bitcoin address (version byte plus checksum bytes at the end). Is it possible to import a raw private key (i.e. a 256 bit random number) or is mandatory to format the key in that way?

Most clients expect WIF but it's not hard to get it in WIF format. Just use the wallet details tab on bitaddress.org. Paste your hex key in there and it'll give you all sorts of formats. Probably best to do this on an offline system or via a live cd where you load bitaddress.org and then disconnect from the net.
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!