Foundations of Blockchain
上QQ阅读APP看书,第一时间看更新

Elliptic-curve cryptography

ECC is a public-private cryptography based on the elliptic curve mentioned earlier. It performs the addition of points on the elliptic curve to compute public-private key pairs. ECC requires smaller key sizes than other asymmetric key cryptosystems, such as RSA. ECC is widely used in key exchange mechanisms and digital signatures and is rarely used in encryption systems.

ECC provides the same level of security as RSA, but has a smaller key size. A 256-bit ECC key is equivalent to a 3,072-bit RSA key. Similarly, a 384-bit ECC key provides the same level of security as a 7,680-bit RSA key, and so on. We can clearly see the advantage of less computation time due to the smaller key size in ECC.

Due to its key size advantage compared to RSA, ECC is used in Bitcoin's addressing system, along with transaction signing operations. It is also popular in other blockchain applications. Other applications of ECC are Tor, iMessages, SSH, and SSL/TLS.

Before diving into the cryptography applications of ECC, let's look at some of its properties:

  • An elliptic curve is represented by a cubic equation:

y= x3 + ax + b

  • An elliptic curve has horizontal symmetry
  • A non-vertical line will intersect the curve at a maximum of three points

RSA cryptography uses prime factorization. The factorization of a semi-prime number is really difficult. When used in this domain, it forms a trapdoor (one way) function. Similarly, elliptic-curve-based algorithms can use discrete logarithms. Finding the discrete logarithm of a random element on an elliptic curve with respect to a point on the same curve is a severe problem. We will go through the step-by-step procedure of constructing a public key from a private key and study the one-way nature of the ECC key generation process.