# Is it feasible to calculate EC private key k from public key K for very low values of k?

If an EC private key k is very small, say "1", is it feasible to calculate the private key k from its public key K, since there would only be one step back to generator point G and therefore the discrete logarithm would only need to be found once to land on G?

Even if this is not feasible without brute force, is there anything preventing a database of private/public keys being built over time, starting at 1,2,3... etc, such that all very low-numbered private keys could easily be revealed.

For instance, for the first billions of possible values of k, their K is saved in a database. Any public K could then be checked against these values for a match and if there is a match the private k is instantly known. I know the probability is still infinitesimally small but also billions of times higher than randomly checking values of k (and would continue increasing over time)

## 1 Answer

Yes you could start creating a database of private/public keys but that wouldn’t get you anywhere, there is not enough storage in the world to ever store any significant portion of the key space.

To get a sense of the numbers we are talking about, the approximated number of protons in the universe is 10^80. Even if each row in the database can be stored in a proton (it can’t, it takes 256 bits) and all matter in the universe was repurposed for your database there would still not be enough space.

Not to mention the computation work required to calculate all the public keys.

• Thanks Mike, yes I realise it's an unimaginably huge number and obviously impossible to ever hope to store any meaningful % of the total number of possible keys, but I'm still curious about the lowest numbers - say if someone just happened to end up with a private key of 10, isn't it feasible that the public key for this would be easily recognisable because it's likely that several people will have experimented with inputting such a low number into online public key generators just to see what comes out
– b0d
May 15, 2022 at 16:12
• yes low entropy keys will be precalculated and your money will be snatched immediately, this includes brainwallet keys but if you use a proper RNG you have nothing to worry about. May 15, 2022 at 17:35
• In fact you can see that any coins sent to the address associated with the key 10 are instantly snatched blockchain.com/btc/address/1GDWJm5dPj6JTxF68WEVhicAS4gS3pvjo7 May 15, 2022 at 17:40
• One more question then - do most wallet providers include a mechanism in their code to prevent very low-numerated keys from being generated?
– b0d
May 16, 2022 at 3:54
• No because the odds of this happening by chance is practically zero, you would have to do it on purpose May 16, 2022 at 12:53