An elliptic curve
They can be classified into these categories based on the values of the discriminant
The figure below shows sketches of
An elliptic curve
Where
Where
An elliptic curve E defined over field K is the set of solutions
The elliptic curves have two geometrical properties given as follows:
The elliptic curves are horizontally symmetrical to the x-axis. This means that if there exists a point P(x, y), then a point Q(x, -y) also exists. This property is useful in ECC while calculating the addition of two points, that is,
This property is useful in the ECC, as it helps set the basis for the addition operation used in ECC. The line drawn between two points on the curve will give a third point that can be mirrored horizontally to obtain the result of the addition operation.
Elliptic curves are mainly used in ECC, a key-based encryption technique used to encrypt data. It consists of a public-private key similar to RSA, but it provides more security with a shorter key length, so it saves computational power while encrypting and decrypting. ECC has many applications, such as encryption, digital signatures, and pseudo-random generators.
The code below is used to draw an elliptic curve. Change the values of variables a
and b
to draw different elliptic curves:
import numpy as npimport matplotlib.pyplot as pltimport sysa = -1b = 3y, x = np.ogrid[-5:5:100j, -5:5:100j]#The contour function takes equation of the elliptic curve as inputplt.contour(x.ravel(), y.ravel(), pow(y, 2) - pow(x, 3) - x * a - b, [0])plt.grid()plt.show() # To show the elliptic curve