All private keys are 2
256, but all addresses that
can exist are 2
160, which is an
enormous difference. This means that there
must be some address collisions.
If I wanted to calculate the storage that would be needed for 1M of addresses I would do that on a csv file:
PRIVATE_KEY1,ADDRESS1_LEGACY,ADDRESS1_BECH32,ADDRESS1_P2SH
PRIVATE_KEY2,ADDRESS2_LEGACY,ADDRESS2_BECH32,ADDRESS2_P2SH
...
PRIVATE_KEY10000000,ADDRESS10000000_LEGACY,ADDRESS10000000_BECH32,ADDRESS10000000_P2SH
One line is 165 bytes:
L1CaDFTppeWGoz7pstPR1B8GUCTa2vw5C2fHBGp1G33vQd9PepBM,1BUp7h85TuZxPFarjD2zjChPpr5Upwnj1A,bc1qwtearx8uglkvf2ehv37na5k7myl9sll9uyjqx0,3PE7q99B22vj3qHYesF8YSioTpwC1EYCtk
So, 1 million of addresses would be 165 million bytes which is equal with 165 megabytes. Pretty heavy csv file, my computer would crash if I opened it.
_______________________________________________
But how about 2
256 lines? Well, that's:
115792089237316195423570985008687907853269984665640564039457584007913129639936 times 165.
= 1910569472415717224488921252643350479578954746983069306651050136130566639058944
0 bytes
We can't pretend to understand that number, but let's try. Based on this
quora link, the 2018's 3D flash drives contain 1600 bits per cubic nanometer. This means that we will need:
9,552,847,362,078,586,122,444,606,263,216,752,397,894,773,734,915,346,533,255,250,680,652 cubic meters of pure hardware.
Universe has been calculated that it's 1.8 x 10^28 cubic meters. That's 1/530713742337699229024700347956486244327 of the needed hardware space. Have I made any mistakes? Because it seems too huge to me.