What are elliptic curves?

An elliptic curve EE is a cubic curve. The elliptic curves can be of two types:

  1. SingularSingular elliptical curves are the ones that do not have a well-defined tangent line at a specific point on the curve due to a cusp .
  2. Non-singular

They can be classified into these categories based on the values of the discriminant Δ\Delta of their equations. If Δ=0\Delta = 0, then the curve is singular else, it is non-singular. This answer will focus on the non-singular elliptical curves due to their use case in elliptic curve cryptography (ECC).

The figure below shows sketches of y2=x3y^2 = x^3 where Δ=0\Delta = 0 and y2=x31x+3y^2 = x^3 -1x + 3 where Δ0\Delta \neq 0. They represent a singular and a non-singular curve, respectively:

The sketches of a singular and a non-singular elliptic curve

Weierstrass equation

An elliptic curve EE is a smooth non-singular cubic curve defined over the field KK with char(K)2,3char(K)\neq 2, 3, and is represented by the Weierstrass general form given below:

Where aiKa_i ∈ K . However, the short form of the Weierstrass equation is usually preferred to represent the elliptic curve, which is defined as follows:

Where A,BKA, B ∈ K, and A and B are constants that satisfy the following discriminant Δ\Delta equation condition:

An elliptic curve E defined over field K is the set of solutions (x,y)K2(x, y) \in \mathbb{K}^{2} of equation 2 and an extra point O \mathcal{O} at infinity:

Geometric properties

The elliptic curves have two geometrical properties given as follows:

Horizontal symmetry

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, P1P2P_1 \oplus P_2.

The elliptic curve is horizontally symmetrical about the x-axis

A straight line will intersect the elliptic curve at most three locations

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.

A straight line intersecting an elliptic curve

Application of elliptic curves

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.

Code example

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 np
import matplotlib.pyplot as plt
import sys
a = -1
b = 3
y, x = np.ogrid[-5:5:100j, -5:5:100j]
#The contour function takes equation of the elliptic curve as input
plt.contour(x.ravel(), y.ravel(), pow(y, 2) - pow(x, 3) - x * a - b, [0])
plt.grid()
plt.show() # To show the elliptic curve

Free Resources

Copyright ©2024 Educative, Inc. All rights reserved