ECDSA
ECDSA
In this method, a diagonal line is drawn through the curve that intersects
the curve at two points P and Q, which yields a third point between the
curve and the line. This point is mirrored as P+Q, representing the
addition's result as R.
This is shown as P+Q in the following diagram:
Elliptic curves are a family of curves which have the formula
2
y =(x ¿¿ 3+ax +b)¿
Depending on what value of a and b you pick, you’ll get a curve that
looks like some of the following:
Point doubling
It is a fundamental operation in elliptic curve cryptography (ECC) used to
efficiently compute the scalar multiplication of a point on an elliptic curve
by an integer. Given a point PP on an elliptic curve and an integer nn,
point doubling calculates
Q=nP
The point-doubling operation is based on the geometric properties of
elliptic curves.
In brief, the process involves finding the tangent line to the curve at the
given point PP and then finding the point of intersection of this tangent
line with the curve. This resulting point of intersection is then reflected
across the x-axis to obtain QQ.
The mathematical steps involved in point doubling are as follows:
1. Find the tangent line: Given the point P=(x1,y1) on the curve
y2=x3+ax+b, the slope of the tangent line at PP is calculated as:
2
3 x 1+ a
m=
y1
In order to sign and verify using the ECDSA scheme, first key pair needs
to be generated:
1. First, define an elliptic curve E:
With modulus P
Coefficients a and b\
Generator point A that forms a cyclic group of prime
order q
2. An integer d is chosen randomly so that 0 < d < q.
3. Calculate public key B so that B = d A.
The public key is the sextuple in the form shown here:
Kpb = (p,a,b,q,A,B)
The private key, d is randomly chosen in step 2:
Kpr = d
Now the signature can be generated using the private and public
key.
4. First, an ephemeral key Ke is chosen, where 0 < Ke < q. It should
be ensured that Ke is truly random and that no two signatures
have the same key; otherwise, the private key can be calculated.
5. Another value R is calculated using R = KeA; that is, by multiplying
A (the generator point) and the random ephemeral key.
6. Initialize a variable r with the x coordinate value of point R so that
r = xR.
7. The signature can be calculated as follows:
s= ( h ( m )+ dr ) K e modq
−1
Here, m is the message for which the signature is being computed, and
h(m) is the hash of the message m.
Signature verification is carried out by following this process:
1. Auxiliary value w is calculated as w = s-1 mod q.
2. Auxiliary value u1 = w. h(m) mod q.
3. Auxiliary value u2 = w. r mod q.
4. Calculate point P, P = u1A + u2B.
ECDSA can technically only sign messages 256 bits long, this is not a
problem: messages are always hashed before being signed, so
effectively any size message can be efficiently signed.