Keys and Addresses
Now that we've covered the basics of public and private keys, let's dive in a bit deeper and take a look at how Bitcoin generates these keys.
Introduction
Public Keys
The public key is calculated from the private key using elliptic curve multiplication, which is irreversible: , where is the private key, is a constant point called the generator point, and is the resulting public key. The reverse operation, known as "finding the discrete logarithm" - calculating if you know - is as difficult as trying all possible values of , i.e., a brute-force search. Before we demonstrate how to generate a public key from a private key, let's look at elliptic curve cryptography in a bit more detail.
Tip: Elliptic curve multiplication is a type of function that cryptographers call a "one-way" function: it is easy to do in one direction (multiplication) and impossible to do in the reverse direction ("division", or finding the discrete logarithm). The owner of the private key can easily create the public key and then share it with the world knowing that no one can reverse the function and calculate the private key from the public key. This mathematical trick becomes the basis for unforgeable and secure digital signatures that prove ownership of bitcoin funds.