Bitcoin Forum
May 03, 2024, 12:09:36 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Full Hex Private Key: 64 characters?  (Read 807 times)
terrabyte (OP)
Newbie
*
Offline Offline

Activity: 20
Merit: 0


View Profile
February 23, 2017, 07:43:10 AM
 #1

Is it true that all of the full hex private keys are 64 hex characters long?

I have a friend that wrote down a private key years ago on a piece of paper. Unfortunately, he was messy on a few spots, and there's a hole on one of the characters, etc. I have written a program that will spit out all the possible combinations, then computed the corresponding WIF & public addresses, and then check the address for activity and balance.

In this case, the original private key combinations are ranging from 61 to 65 characters long. It would be nice to narrow down the combinations if I can safely discard the non-64 length ones.

(The reason I'm having a hard time being sure, is because you would be surprised what little shows up in my searches. Almost all talk about private keys starts with either compressed or the Base58 WIF Key. What little talk there is about the hex private key often mention 65 characters. I believe that's because of the prefix character added for computation. Also, when using bitaddress.org page for testing, even though an error pops up saying a 61 or 65 character private key is invalid, it then goes ahead and shows the results of the public address. For the 61-63 character addresses, it seems to be prefixing zeros to make it 64 characters long. Not sure how he computed the 65 length ones)

Thank you for setting me straight!

"Governments are good at cutting off the heads of a centrally controlled networks like Napster, but pure P2P networks like Gnutella and Tor seem to be holding their own." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714738176
Hero Member
*
Offline Offline

Posts: 1714738176

View Profile Personal Message (Offline)

Ignore
1714738176
Reply with quote  #2

1714738176
Report to moderator
cr1776
Legendary
*
Offline Offline

Activity: 4032
Merit: 1299


View Profile
February 23, 2017, 11:15:41 AM
 #2

Is it true that all of the full hex private keys are 64 hex characters long?

I have a friend that wrote down a private key years ago on a piece of paper. Unfortunately, he was messy on a few spots, and there's a hole on one of the characters, etc. I have written a program that will spit out all the possible combinations, then computed the corresponding WIF & public addresses, and then check the address for activity and balance.

In this case, the original private key combinations are ranging from 61 to 65 characters long. It would be nice to narrow down the combinations if I can safely discard the non-64 length ones.

(The reason I'm having a hard time being sure, is because you would be surprised what little shows up in my searches. Almost all talk about private keys starts with either compressed or the Base58 WIF Key. What little talk there is about the hex private key often mention 65 characters. I believe that's because of the prefix character added for computation. Also, when using bitaddress.org page for testing, even though an error pops up saying a 61 or 65 character private key is invalid, it then goes ahead and shows the results of the public address. For the 61-63 character addresses, it seems to be prefixing zeros to make it 64 characters long. Not sure how he computed the 65 length ones)

Thank you for setting me straight!



Check out these for more information:
http://bitcoin.stackexchange.com/questions/2013/why-does-the-length-of-a-bitcoin-key-vary
And
https://en.bitcoin.it/wiki/Private_key

BurtW
Legendary
*
Offline Offline

Activity: 2646
Merit: 1131

All paid signature campaigns should be banned.


View Profile WWW
February 24, 2017, 12:58:12 AM
 #3

A private key is always exactly 256 bits long
256 bits is 256/8 = 32 bytes
When converted to a ASCII string as a hexidecimal number it will always be exactly 64 hex characters (2 ASCII hex characters per byte)

Then it can a encoded, but that is another story for another time.

Our family was terrorized by Homeland Security.  Read all about it here:  http://www.jmwagner.com/ and http://www.burtw.com/  Any donations to help us recover from the $300,000 in legal fees and forced donations to the Federal Asset Forfeiture slush fund are greatly appreciated!
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!