Computing the public key

Now that we have defined point doubling, we can calculate a point on the curve that is the multiple of the given point generator, point G (for example, 4G = G + G + G + G), and this could be computed using point doubling.

Let's use this concept to compute a public-private key pair in an asymmetric cryptography system.

Every curve domain parameter is the same for a given specification. Refer to the technical specifications of the secp256k1 standard in a later section of this chapter that is used in Bitcoin and other blockchain applications' digital signature algorithms. Let's say k is a randomly chosen private key, and K is the public key to be generated. The generator of the curve, G, has a standard value. The public key could be computed by performing the following operation on the curve:

K = k*G

We can generate the public key using this equation on an elliptic curve using point doubling. Point doubling on an elliptic curve is a one-way operation. It is, therefore, a challenging task to compute the multiplied value k after the required point K has been found:

Figure 2.9: Multiplying the generator by an integer using point doubling

Figure 2.9 shows the process of multiplying an integer value by the base point G. In this case, points 2G and 4G are derived using point doubling of G on the given curve. This geometrical method could be used to generate the public key, K, by multiplying the generator by the private key k times.