When we create an account in the Ethereum main network, how does the protocol guarantee the unique address of an account? Since even if we are not connected to the network we can create an account, is there a possibility of two accounts getting the same address? Is the account information kept in the blockchain ?
[Ethereum] Account uniqueness guaranteed
accountsaddressescryptographySecurity
Best Answer
Quoting Chris613 on ethereum forum about cpp ethereum :
So as the hashing algorithm used for the address has a very very big number of possibilities and a very very low rate of collisions, final addresses should be unique.
As you can't guess a PK from its address, creating a PK that matches the address would require to try a lot of PK combinations before finding a match. So this is not about brute-forcing addresses, but trying public keys and then private keys to finally match an address.
None is known to have succeed to do it today.
A quantum computer could probably do that but one able to do this sort of calculation still doesn't exist. Next generation of crypto money will have to take quantum computer in account for sure.
Edit: Private keys must be less than the order of the curve because otherwise they will 'loop back around' and be equal to other people's private keys, due to how EC groups work. Think of an analogue clock: at 13:00, the clock points to 1. What's happening here is similar, but using a much larger number (just under 2^256). On a clock this is fine because we know whether it's morning or afternoon, but here same private key => same public key => same address, meaning if two private keys are equivalent, the owners of both could access and form valid transactions originating from the same account.
The public key check is checking it's a valid, rational point of the curve. This is pretty much just checking that the two 256 bit numbers are whole numbers and satisfy a formula necessary for all the arithmetic to hold correctly.
Hash functions are actually not entirely broken under quantum cryptography, so the address -> public key stage could still be fairly robust. However, calculating people's private keys from their public keys would be trivial, and so next gen cryptocurrencies will have to take in quantum crypto indeed!