Post
Topic
Board Development & Technical Discussion
Merits 66 from 23 users
Topic OP
There are 2^256 private keys out there: how big is that number?
by
fillippone
on 26/05/2019, 14:10:00 UTC
⭐ Merited by GazetaBitcoin (12) ,1miau (10) ,NeuroticFish (7) ,qwk (5) ,CryptopreneurBrainboss (4) ,Welsh (4) ,El duderino_ (3) ,franckuestein (3) ,Piggy (2) ,LoyceV (2) ,redsn0w (2) ,odolvlobo (1) ,pooya87 (1) ,vapourminer (1) ,o_e_l_e_o (1) ,Heisenberg_Hunter (1) ,ETFbitcoin (1) ,JayJuanGee (1) ,witcher_sense (1) ,RapTarX (1) ,Quickseller (1) ,Coin-1 (1) ,joker_josue (1)
Yesterday while browsing down the Bitcoin rabbit hole I stumbled on the infamous keys.lol website

https://keys.lol
(Warning: time sink!)

Basically it’s a website that randomly generates 128 private keys on each page, then checks the balance of the related addresses (compressed and uncompressed) on the blockchain reporting eventual positive balances or past transactions.

Wow!
If you find a positive balance in this client side generated pages, you are actually owner of the private keys, so you are legitimate owner of such balance, and nothing prevents you from transferring to your own wallet.

I spent a few hours on that website, generating thousands of private keys, of course without finding anything, not a single used address, let alone one with a balance.

Then, I started to think I could engineer a little bit the process, and speaking with some fellow users here in the forum, I thought we could have a script generating random private keys, then ask my own bitcoin node the balance in such address and eventually transfer any balance to my own wallet. Working in local should speed up a little bit the process, I thought.

I knew from start the  possibilities to find something were tiny, but I wanted to try because looking for balances and finding nothing, would reassure me that nobody could do the same with my own bitcoin so jealously held in my cold wallet.

While waiting for @babo to disclose his script, I thought to myself “Fillippone only pawn in the game of life”...how come nobody ever thought about that?

Back into the rabbit hole, I quickly discovered the Large Bitcoin Collider.

https://lbc.cryptoguru.org/about

Wow this is a serious project.
Basically thousands of distributed servers generating and checking 26 Trillions (!!!) of private keys on a daily basis.
Over the first three years, they managed to find 7 private keys. That’s a lot! I imagined the odds were much lower., but probably there is some kind of bug in some wallet utilising a suboptimal random number generator to create keys. (Further research needed here!)


Let’s quickly review a few numbers:
Number of private keys theoretically possible: 2^256 or roughly 10^77
Number of bitcoin addresses: 2^160
Number of private keys searched by Bitcoin collider: 2^160
Numbers of atoms in the universe: 10^78 to 10^82
Number of used Bitcoin addresses: 18,000,000

The number of private keys ACTUALLY possible, is a little bit smaller than 2^256, as specified here

Let’s work out a few examples.
  • Suppose we have a billion active addresses, each of them with a positive balance: we know this is roughly 10^3 bigger than the actual number.
    Probably the number of atoms in the universe is 10^3 times bigger than the number of addresses, so it is fair to say that finding a private Key with a positive amount is roughly as likely as finding one of those atoms spread all over the whole visible universe.
    How big is a billions of atoms? According to this Quora answer, it’s smaller than an E.Coli bacteria. So guess taking this bacteria, shred at atomic level, distribute it in the universe and trying to find one of those an atoms. Pretty tough, isn’t it?

  • Second example is from this article. Suppose we want to scan all private keys in search of a positive balance and suppose that each inhabitant of the earth has a scanning speed one billion times higher than twice the current computing power of the Bitcoin network, thus:
    * 10 billion people;
    * multiplied by one billion;
    * multiplied by twice the computing power of Bitcoin, about 100 thousand terahash per second;
    we obtain: 1,000,000,000,000*1,000,000,000*100,000*100,0000,000,000 = 10^10*10^9*10^5*10^12 = 10^36
    For simplicity, we rounded down ‘115,792,089,237,316,195,423,570,985,008,687,907,852,837,564,279,074,904,382,605,163,141,518,161,494,336’ to 10^77, and we obtained that, if we checked every single private key, in search of a positive balance, it would take 10^77/10^36 = 10^41 seconds, how many years would it be?
    Since there are about 31557600 seconds in a year, it corresponds to about 10^41/31557600 = 31^33 years, which is more or less 10^23 times the estimated age of the universe (currently estimated at 13.82 billion years), in short
    100,000,000,000,000,000,000,000, i.e. about 100 billion billion times the age of the universe.

  • This video on how much secure is the SHA 256 algorithm.
     https://youtu.be/S9JGmA5_unY

  • All previous example didn’t account for the energy involved in such calculations. Of course all those very powerful machines would need to be powered by some kind of energy. How much energy would be necessary? Well, a lot, according to this infographic:



    Link to Reddit


Other examples about how much it would take to randomly guess  a private key:

Further references:


Other vey big numbers:

Here are only a few examples, if you have additional resources or comment, don’t hesitate to post yours below and I will add to the list!




If you think this thread or any other of my threads is worth being translated in your onw local board, please do! I will be happy to provide assistance!

Russian Translation by zasad@: 2 ^ 256 зaкpытыx ключeй