Bitcoin Private Keys and Grains of Sand…..

by | Jul 21, 2022

First, let me quickly go over what a Private Key is.

A private key is a secure code that enables the holder to make cryptocurrency transactions and prove ownership of their holdings. Bitcoin keys specifically feature a 256-bit string displayed as a combination of letters and numbers. It’s stored within your crypto wallet, enabling you to access your Bitcoin whenever you need to.

Anyone who has access to your private key has access to all the funds in your bitcoin wallet. Also, if you lose your private key, you lose access to any bitcoin you may have in the lost keys associated wallet.

Here is an example of what a bitcoin private key looks like:

E9 87 3D 79 C6 D8 7D C0 FB 6A 57 78 63 33 89 F4 45 32 13 30 3D A6 1F 20 BD 67 FC 23 3A A3 32 62

That is it, this 256-bit hexadecimal string is all that stands between you and your bitcoin wallet. Lose it, you lose your bitcoin, share it and you’ve just given away access to your bank. But one question many ponder on is ‘how easy it would be to randomly stumble upon an active bitcoin wallet simply by generating your own private key?’. After all, anyone can just type in a 256-bit hexadecimal variation and check the balance, then repeat – or maybe even use software to randomly generate millions of private keys a day. Surely, eventually one could stumble upon someones bitcoin wallet…. right?

 

So, Imagine this……

It is estimated that there are 7.5 sextillion grains of sand on earth. That’s 75 followed by 17 zeros. Now imagine if each one of these grains of sand was an exact replica of earth, each with its own 7.5 sextillion grains of sand. Now imagine if each one of the 7.5 sextillion grains of sand on the 7.5 sextillion earths had 26 billion unique private keys each.

That is how many possibilities there are for bitcoin private keys. All the worlds computing power combined would still take millions of years to generate even a single active bitcoin private key. Quantum computing will speed up, but that is some way off and already there is an update to protect against quantum hackers.

The biggest security threat to your bitcoin wallet aside from how you store it, is  how the key was generated. Computer random generators are not as random as one might expect.

 

Not so Random

Random number generators are typically software, pseudo-random number generators. Their outputs are not truly random numbers. Instead, they rely on algorithms to mimic the selection of a value to approximate true randomness. Pseudo random number generators work with the user setting the distribution, or scope from which the random number is selected (e.g. lowest to highest), and the number is instantly presented.

The outputted values from a pseudo-random number are adequate for use in most applications, but they should not always be relied on for secure cryptographic implementations. For such uses, a cryptographically secure pseudo-random number generator is called for.

A true random number generator(TRNG) is cryptographically secure and requires data points taken from physical attributes, such as atmospheric or thermal conditions. Such tools may also take into account measurement biases. They may also utilize physical coin flipping and dice rolling processes.

One of the most important security considerations you will make is how your private key is generated. Some people create them manually using coin flipping. Binary format 256-bit private keys can be generated by flipping a coin 160 times and recording each tails landed as a 0 and heads as a 1. String these numbers together and you have a truly random number (well, kind of, and certainly unpredictable to another….). Most, however, rely on whichever wallet software they are using to create their private keys for them.

A good and secure software wallet will use some kind of entropy(unique measurable property), this will ensure a good amount of randomness to the generated private key. For wallets like Bitcoin Core or Exodus, the software uses a combination of 4 entropies: low-level processor instructions, entropy from the OS, dynamic events and static events.

Each of these are unique to your computing device and are frequently changing at all times. Hardware wallets like Ledger Nano devices use their own hardware Random Number Generator (RNG) chip embedded in the device to generate the private key. These RNG chips have been evaluated by a third-party laboratory and have obtained the highest level of certification (EAL5+, AIS-31). These hardware RNG devices typically use several oscillators running in parallel and are sampled a specific timing. This very tiny source of entropy is amplified by different means and the result is used to feed the Random Number Generator.

If you are a paranoid person, or you just like to do things the best way possible, coin flipping is probably the best way to generate a private key.

If you like articles like this and want to learn more about bitcoin, cryptocurrency and the wider world of financial freedom then please sign up to our free newsletter and check out our subscription services here.

Want to learn more about cryptocurrency? Then check out our range of one-on-one sessions here.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

Recent

Loading...