ECDSA (Elliptic Curve Digital Signature Algorithm)

Elliptic Curve Digital Signature Algorithm

ECDSA stands for “Elliptic Curve Digital Signature Algorithm”, it is a cryptographically secure digital signature scheme, based on the elliptic-curve cryptography (ECC). it’s used to create a digital signature of data (a file for example) in order to allow you to verify its authenticity without compromising its security. Think of it like a real signature, you can recognize someone’s signature, but you can’t forge it without others knowing. The difference however between an ECDSA signature and a real signature is that it's simply impossible to forge the ECDSA signature. ECDSA keys and signatures are shorter than in RSA for the same security level. A 256-bit ECDSA signature has the same security strength like 3072-bit RSA signature.

Blockchain implementations such as bitcoin and Ethereum use elliptic curves to generate public and private key pairs. Elliptic curve was invented by Neal Koblitz and Victor Miller in 1985.

A 256 ECC(Elliptic curve cryptography) public key provides comparable security to a 3072-bit RSA public key.Hence, the primary advantage of using ECC is reduced key size and speed. .

Elliptic curves has nothing to do with ellipses, Ellipses are formed by quadratic curves, (X2) while elliptic c urves are formed by cubic equations (X3) .The Standard for Efficient Cryptography Group (SECG) is an international consortium to develop commercial standards for efficient and interoperable cryptography based on ECC. .

The SECG Website is https://www.secg.org .

The SECG has published a document with a recommended set of elliptic curve domain parameters, referred by the letters , {p, a, b, G, n, h}, they are collectively referred to as Elliptic curve domain parameters.

Creating digital signatures based on the math of elliptic curves is called the Elliptic Curve Digital Signing Algorithm, short ECDSA.
An elliptic curve is the set of points that satisfy a specific mathematical equation. The equation for an elliptic curve looks something like this:

y2 = x3 + ax + b



From the curve above, the elliptic curve has some interesting characteristics;

  • 1. Its symmetric around the x-axis and for any x coordinate, you will have two values of y, one will be positive and another negative.
  • 2. If a line is tanganet to the curve, it intersects another point.
  • 3. If you draw a straight line through the curve, it would intersect in not more than three points.
  • 4. All vertical lines, (slope = infinity) intersects the point at infinity
  • 5. The curve has an ever increasing slope after a point of inflection.

We have a curve defined by the math function

y2 = (x3 + a * x + b) mod p

a and b are constant values, and can be real numbers, integers or rational numbers. The modulo is a prime number and makes sure that all the values are within our range of 160 bits and it allows the use of “modular square root” and “modular multiplicative inverse” mathematics which make calculating stuff easier (I think). Since we have a modulo (p) , it means that the possible values of y2 are between 0 and p-1, which gives us p total possible values. However, since we are dealing with integers, only a smaller subset of those values will be a “perfect square” (the square value of two integers), which gives us N possible points on the curve where N < p (N being the number of perfect squares between 0 and p). Since each x will yield two points (positive and negative values of the square-root of y2 ), this means that there are N/2 possible ‘x‘ coordinates that are valid and that give a point on the curve. So this elliptic curve has a finite number of points on it, and it’s all because of the integer calculations and the modulus.

Assume, we want to add two points on the line, say P1(x1,y1) and P2(x2,y2)

The first step is to find the point-slope form of the line.

Then we can define the slope as

λ = ( y2 - y1)/( x2 - x1)

y- y1 = λ ( x - x1)

The slope intercept form of the line is:

y = λx - λx1 + y1

Let, µ = y1 - λx1

y = λx + µ

Then to find the coordinates of the third point (x3,y3)

Replace y in the Original equation of the curve.

y2 = x3 + ax + b

where a and b are constants

( λx + µ)2 = x3 + ax + b

After distributing and rearranging, we get the polynomial

0 = x3 - λ2x2 - 2 λx µ - µ2 + ax + b

The polynomial has 3 roots. x1, x2, x3,

And since it is a polynomial, The coefficient of x2 is the opposite sum of the roots.

x1 + x2 + x3 = λ2

x3 = λ2 - x1 - x2

We fix x3 in to our original equation and reflect it

y3 = y1 - y3 – y1

y3 = λ(x1 - x3) – y1

Algebraically,

for P + P = R = 2P

slope S = (3x2p) + a / ( 2yp)

for the x-cordinate

xr = s2 - 2xp

for the y-cordinate

yr = s(xp - xr) - yp

Why do we reflect ?

When we try to add infinity to a point. i.e adding points on a vertical line,
The third point is usually infinity.

Then find the third point of intersection

Reflect it and the result is the original point

P + ∞ = P , therefore, infinity is the identity for point addition

Inverses

Adding a point with its reflection is ∞, since they are in a straight line

P + P’ = ∞

Therefore, the reflection of a point is its inverse.

So, if we have to add a point and its reflection

P = (x, y) and -P(x, -y)

Then we can say, a point minus itself is infinity

P – P = ∞

The elliptic curve performs two major function;

  • • Point addition
  • • Point Multiplication(point doubling).

Mathematically,

The addition Law, states to add two points on the curve, say A and B, we first find the line between the two points , then we find the third point of intersection X, then we reflect it to get C.

Then, a second case,The multiplication is when we want to add a point to itself, say A.
We find the tangent line, to the point

And then find the second point of intersection, then we reflect it to get 2A.



Point Addition

Consider the curve above. We have two points A and B, to add the points, we draw the line between then and you notice the third intersection X, from there we draw a vertical line down and across the x-axis where the line intersects the curve again is the sum of the two points C..remember that the curve is symmetric on the x axis In this case, we define X = -C to represent the symmetrical point of X on the x axis. This explains the concept of point addition.so, A+B = C.

In ECC adding two vertical points, is an undefined procedure, this results to what is know as elliptic identity and commonly denoted as infinity X + C = ∞. This is because , to add two vertical points, the line does not make a third interception as explained above.

Point Multiplication

So, lets consider adding a point to itself, we do this by drawing a tangent to that point , say A considering the curve below. Then, from its point of intersection on the curve , we draw a vertical line down , across the x-axis to the point where it intersects the curve, then we call this new point B. Now, this is referred to as point doubling and is the way we use to achieve multiplication . so we refer B as A+A= 2A.



So to calculate 3A, we perform point doubling three times, so we add A to itself 3 times so we draw a line between 2A and A and where the line cuts the curve, we draw a vertical line across the x-axis and this new point is 3A. so, to perform few computations involves a lot of jumping around the curve , this is where ECC gets its strength since it is infeasible to divide the multiplication and find the specific point you multiplied to get there , unlike regular algebras. And this is known as the Elliptic Law Discrete Logarithm.

To recap, if you have a point say,
R = k*P, k(No of times P was added) . where you know R(The result of adding P , K times), and P(The starting point of addittion). there is no way to find out what the value of ‘K‘ is. Since there is no point subtraction or point division, you cannot just resolve k = R/P. Also, since you could be doing millions of point additions, you will just end up on another point on the curve, and you’d have no way of knowing “how” you got there. You can’t reverse this operation, and you can’t find the value ‘k‘ which was multiplied with your point P to give you the resulting point R.



We will discuss the part of ECC that is related to Diffie -hellman, Bitcoin Cryptography and digital signatures in the next chapter.





John Doe
1:53:8pm On 2019.12.18
just a technicality: eliptic curve can t be defined as a function, it s more of a formula. That s why it s called a curve, not a math function..
Jane Doe
02:29:18pm On 2024.10.01
555
Jane Doe
02:29:36pm On 2024.10.01
555
Jane Doe
02:29:50pm On 2024.10.01
555
John Doe
11:34:17am On 2019.10.20
Thanks, brother, you re a huge help in my Crypto class!.
John Doe
1:33:38am On 2019.11.15
My brain hurts. But you made it hurt much less than Vitalik. I’m now going to impress the F out of my friends. 🤓.
John Doe
12:52:43pm On 2019.11.25
amazing tutorial!! very helpful.
John Doe
09:46:08pm On 2022.09.14
chat random gay gay ky chat rooms <a href="https://free-gay-sex-chat.com/">free gay sex chat fcn </a>.
John Doe
05:29:53am On 2022.09.16
gay slam chat <a href=https://chatcongays.com>gay zoom webcam chat</a> hiv gay chat san diego.
John Doe
02:00:36am On 2022.09.20
help on essay <a href=https://au-bestessays.org>best college essay writing service</a> us essay writers.
John Doe
09:16:32pm On 2022.09.20
essay writing services legal <a href=https://bestcampusessays.com>reviews of essay writing services</a> which essay writing service is the best.
John Doe
07:34:03pm On 2022.09.21
lord of the flies essay help <a href=https://besteasyessays.org>professional essay writing services</a> personal essay writing service.
John Doe
11:15:57am On 2022.09.23
essay help <a href=https://bestessaysden.com>buy custom essays online</a> essay help toronto.
John Doe
12:55:46am On 2022.09.25
writing custom essays <a href=https://bestsessays.org>write my essay review</a> writing essay help.
John Doe
07:54:29pm On 2022.09.25
write my essay org <a href=https://buyacademicessay.com>college application essay help</a> custom essay meister.
John Doe
03:32:55pm On 2022.09.26
i need help to write an essay <a href=https://buy-eessay-online.com>custom essay meister</a> cheapest essay writers.
John Doe
10:40:47am On 2022.09.27
essay on customer service <a href=https://buytopessays.com>help with essay papers</a> help writing a essay.
John Doe
06:36:11am On 2022.09.28
online essay editing services <a href=https://cheapessaywritingservice1.com>need someone to write my essay</a> i need help writing a essay.
John Doe
02:32:55am On 2022.09.29
custom essay order <a href=https://customcollegeessays.net>how to write my college essay</a> persuasive essay writer.
John Doe
10:11:33pm On 2022.09.29
custom essays for cheap <a href=https://customessays-writing.org>best custom essay writing services</a> cheap essay services.
John Doe
05:05:39pm On 2022.09.30
cheap essay writing services <a href=https://customessaywwriting.com>recommended essay writing service</a> online essay writing services.
John Doe
11:34:54am On 2022.10.01
professional essay writing help <a href=https://customs-essays-writing.org>need help in writing an essay</a> college admission essay help.
John Doe
07:09:11am On 2022.10.02
premium essay writing service <a href=https://firstessayservice.net>essay writing website reviews</a> customer service essay.
John Doe
03:53:24am On 2022.10.03
essayhelp <a href=https://geniusessaywriters.net>write my essay help</a> best paper writing site.
John Doe
01:38:54am On 2022.10.07
best online essay editing service <a href=https://lawessayhelpinlondon.com>college essay writing help</a> urgent essay help.
John Doe
01:42:14pm On 2022.10.09
civil service essay <a href=https://lawessayhelpinlondon.com>essay marking service</a> custom essay writing services reviews.
John Doe
08:03:34pm On 2022.10.11
write my essay generator <a href=https://ukessayservice.net>what are good essay writing services</a> help 123 essay.
John Doe
11:00:09am On 2022.10.13
need help writing a essay <a href=https://writemyessaycheap24h.com>buy an essay cheap</a> custom admission essay.
John Doe
07:25:05am On 2022.11.19
help 123 essay <a href=https://bestcampusessays.com>help write my essay</a> professional college application essay writers.
John Doe
02:26:36pm On 2022.11.20
urgent custom essays <a href=https://besteasyessays.org>graduate school essay writing service</a> best essay help.
John Doe
10:24:54pm On 2022.11.21
essay proofreading services <a href=https://bestessayreviews.net>best essay cheap</a> service learning reflection essay.
John Doe
07:12:56am On 2022.11.23
help with essay introduction <a href=https://bestessaysden.com>community service essay sample</a> cheapest custom essays.
John Doe
02:58:10pm On 2022.11.24
what is the best custom essay site <a href=https://bestsessays.org>professional essay writers</a> cheap essay online.
John Doe
12:10:00am On 2022.11.26
custom essay writing service org <a href=https://buyacademicessay.com>i need help writing a narrative essay</a> help write an essay online.
John Doe
09:24:42am On 2022.11.27
best custom essay writing <a href=https://buy-eessay-online.com>personal essay writers</a> help writing my college essay.
John Doe
06:36:25pm On 2022.11.28
help with writing an essay <a href=https://buytopessays.com>macbeth essay help</a> custom written essays.
John Doe
09:24:16pm On 2023.01.22
do my coursework <a href=https://brainycoursework.com>coursework plagiarism checker</a> custom coursework writing.