- Foundations of Blockchain
- Koshik Raj
- 368字
- 2021-07-02 14:17:13
Operations on elliptic curves
Elliptic curves used in cryptography are curves that are constructed in a finite field. They have the following form:
y2 = x3 + ax + b mod (p)
The modulus operation on p indicates that the curve is over a finite field of prime numbers of the order p. We need to understand some terminology and operations of elliptic curves before moving on to the cryptographic applications.
All the elements used in ECC must be agreed upon by the cryptography actors. These elements are called elliptical curve domain parameters. {p, a, b, G, n, h} are the parameters used in ECC. These parameters are defined as follows:
- p: The finite field is defined by this prime number.
- a and b: These are the constants used in the equation.
- G: The set of all points in the curve is defined by this generator, also known as the base point.
- n: This represents the order of the base point or generator G, a smallest positive number n such that nG = ∞.
- h: This is the cofactor, which is the ratio of the orders of the group and sub group (n), and it must be small (h <= 4), usually h=1.
( ECDSA) curve uses a unique set of domain parameters defined in secp256k1. You can find the technical specifications of the curve used in secp256k1 in a later section of this chapter.
The operations performed on an elliptical curve are called dot operations, and they are point addition and point doubling. We will explain both of these operations using a geometrical approach to facilitate a clear understanding. Python scripts and notebooks related to these operations can be found in the GitHub repository for this book:
We will use the elliptical curve in Figure 2.6 to perform all the operations.