# How private key is generated?

I read here that:

If you could process one trillion private keys per second, it would take more than one million times the age of the universe to count them all. Even worse, just enumerating these keys would consume more than the total energy output of the sun for 32 years.

However this website http://directory.io says that they generated all private keys. Who is right? or what is it that I misunderstand ?

And why this (from here)

A private key is a 256-bit value, meaning there are approximately 1.1579e77 possible keys (There are about 1.2288e66 invalid values...

• – Murch
Jul 7, 2016 at 12:46
• That site is kind of a joke to those who know about cryptography, but can be confusing to newcomers. The thing to remember is that you can't search by public key or Bitcoin address. If you could, then the site's claim would be real. Luckily, you can't, and it's not ;) Just read their FAQ: directory.io/faq Jul 7, 2016 at 14:26
• Ok, thank you very much @Jestin, I should've read more on the website. Jul 7, 2016 at 14:59

## 2 Answers

They never claimed to have generated all private keys, only the ability to generate any possible private key.

The web site dynamically calculates a set of keys for a given page number. It does not store every possible key.

The web site cannot be used to discover a private key for a particular address because there is no way to search for an address.

• Thank you very much. I edited the question with another sub question. Jul 8, 2016 at 15:35

Directory.io is a parlor trick and nothing more. It simply generates keys from the beginning of the private key spectrum as the user browses through the paginated "directory". You could generate keys magnitudes of orders faster using a vanity address generator. A private key is basically a 256 bit number, or 256 1's and 0's. If 7 billion people (nearly everyone on earth) started generating 1 million keys per second for 100 years that would only be 0.000000000006 of the total space. So you can rest assured as long as keys are generated randomly no two parties should ever generate a colliding key.