Public Key to Public Key Hash

Now that we have our public key, how do we get to our address? We’ll be going over that in this section.

If quantum computers exist, we could use them to solve the elliptic curve discrete logarithm problem and find the private key given a public key.

Quantum computers can’t reverse hash functions, so we choose to run two hash functions on our public key.

First SHA-256, which we mentioned previously as a hash function prevalent throughout the Bitcoin protocol, and second, RIPEMD-160, which shortens the address size down from 256 bits to 160 bits.

Together, the combination of using SHA-256 and RIPEMD-160 is called “double hash” or HASH160.

After all this, we have our public key hash.

Public Key Hash to Address