The Esoteric Math Behind a Bitcoin Private Key

Philip Francis
Decentralize.Today
Published in
4 min readAug 25, 2016

A statement I often hear about Bitcoin is that the protocol itself isn’t hackable. This is a very contrary view to the opinion of most nontechnical internet users. After all, everything is hackable online, right? I decided to do some research to try to understand this concept better . Below is a straightforward explanation of how secure a Bitcoin private key really is. Spoiler alert… I’m blown away.

For anyone new to Bitcoin, a private key is a 32 byte set of alphanumeric characters. Owning this key gives you title to the Bitcoin you own on the blockchain. The private key can represent an integer between one and about 10⁷⁷. For all practical purposes, this number is basically infinite.

Before getting started I want to give credit to James D’Angelo on Youtube. He provided a very informative video on this topic that this blog is meant to summarize. He also has a “Bitcoin 101” series that I would recommend to any newcomer wanting to understand the technology better.

The Math behind private key generation for Bitcoin (layman’s terms)

Drawer example:

-Drawer= Bitcoin private key

-What if we used a drawer to store $2,000?

-This drawer is open and accessible to all, and completely insecure.

-How about we upgrade the security to one drawer inside a house of four drawers. This would give the thief a 1 in 4 chance of finding the right drawer. (Still very insecure)

-Now I am going to build a house of sixty drawers. Remember, one of the drawers has access to the $2000 that was originally stored.

Picture this house of sixty drawers sitting on the lawn of a public park. Leaving the area would likely result in the loss of $2000.

-Note that these drawers have no locks or “encryption.” They are open to all, exactly how Bitcoin was designed.

- Now we will put this one drawer inside a house of ten million drawers. Would this make the $2,000 is safe? No!

Ten million drawers is obviously safer, but not if people knew you were storing money inside of it. It would be attacked persistently until the money was found and finally stolen from the drawer.

-How many drawers would we need to make it secure from thieves? Is there a number? Is 300 billion drawers enough?

What if thieves had drones that specifically target these drawers? What if each person on earth had an app that could control these drones opening one billion drawers per day? Is 300 Billion really enough? No!

7 billion people x 1 billion drawers opened per day x 365 days x 100 years “average lifespan”= 260 x 10²¹. One sextillion drawers would be opened every 100 years. This equals the number of grains of sand on earth.

What if:

there were 10²⁹ drawers? This gives someone a one in one million chance of finding the unique drawer within 100 years with all of humanity and it’s drones looking for it.

there were 10³⁵ drawers? This is one trillion times more drawers than everyone could open together in a span of 100 years.

there were 10³⁸ drawers? This gives someone a one in one quadrillion chance of the right drawer being opened within 100 years

Bitcoin on average has a one in quindecillion chance of a private key being guessed within 100 years. Quindecillion is 10⁴⁸.

Processing one trillion private keys per second, it would take more than one million times the age of the universe to count them all.

Big numbers kill the hacker

What about computers specifically designed to target and hack Bitcoin??

-By the end of 2016, there will be one zettabyte of internet traffic for the first time ever.

-1000 zettabytes= 1 yottabyte

-Storing information about all of the addresses in Bitcoin would require 5 yottabytes² of data.

-There literally isn’t enough coal and gas on earth to store the database.

-It would consume more than the total energy output of the sun for 32 years.

Final thoughts

Bitcoin as a platform is arguably the most secure piece of technology that exists on the internet. Bitcoin uses no encryption because it doesn’t need to. Go to a Bitcoin private key generator (Bitaddress.org) and copy and paste the key into Google. The search will yield no results. In fact, it will be the first and last time the internet will ever see that group of characters together. The big numbers in Bitcoin ultimately kill the hacker from ever reaching the underlying protocol.

Twitter: @philfrancis77

--

--

Philip Francis
Decentralize.Today

Bitcoin. Cryptocurrency. Coffee. Blockchain Seed Investments. Let's change the world.