# George Plotnikov

Personal site and blog. Please feel free to contact me via the social networks below.

# Elliptic curves smalltalk #1

Factorization on the elliptic curves was my diploma subject, so I decided to write some short note simply describes that the elliptic curves idea. If I had this note at the beginning of my research, I would save a lot of time 😃

Elliptic curves uses are:

• Bitcoin
• SSH
• TLS
• Citizen Card (Austria)

What the elliptic curves are? Simply talk - that is the set of solutions of an equation of the form $\inline&space;Y^{2}=X^{3}+AX+B$

Why they are interesting and why are they use in cryptography? The first fascinating fact is that we are able to summarize two points on a curve: if we have two points on a curve (P and Q), we may associate them to the third point and to call it as their sum. To do that we should intersect P and Q. That line will cross a curve at the only one point R, which then we will reflect R from X-axis[1]. That’s it.

The problem might be if we would try to summarize a point with itself. It’s not a problem, actually: that means the line becomes the tangent curve[2].

The second problem if we will try to summarize two symmetric points. In that case we assumes the solution is a point somewhere in infinity $\inline&space;\varnothing$[3].

Basically we can easily sum a points programmatically with the following steps:

• $\inline&space;P_{1}=(x_{1},y_{1})&space;P_{2}=(x_{2},&space;y_{2})$
• suppose both points are not a $\inline&space;\varnothing$
• $\inline&space;L:Y=\lambda&space;X+\nu$ - line, intersected $\inline&space;P_{1}$, $\inline&space;P_{2}$
• $\inline&space;\lambda&space;=(y_{2}-y_{1})/(x_{2}-x_{1})$ or
• $\lambda&space;=(3x_{1}^{2}+A)/(2y_{1})$
• $\nu&space;=&space;y_{1}&space;-&space;\lambda&space;x_{1}$
• substitute $Y&space;=&space;\lambda&space;X&space;+&space;\nu$ into line equtation
• $P_{1}&space;\oplus&space;P_{2}&space;=&space;(x_{3},y_{3})$
• $x_{3}=&space;\lambda&space;^{2}&space;-&space;x_{1}&space;-&space;x_{2},&space;y_{3}&space;=&space;\lambda&space;(x_{1}&space;-&space;x_{3})-y_{1}$

as you see, we event don’t need to resolve cubic equitation 😃 Now, lets clarify the definition of the elliptic curves: $Y^{2}=X^{3}+AX+B,&space;3A^{3}+27B^{2}\neq&space;\varnothing$, plus the addition point $\inline&space;\varnothing$

This kind of summarizing is very useful and looks similar to sum the numbers:

• $(P\oplus&space;Q)\oplus&space;R=P&space;\oplus&space;(Q&space;\oplus&space;R)$
• $P&space;\oplus&space;\varnothing&space;=&space;\varnothing&space;\oplus&space;P$
• $P&space;\oplus&space;-P&space;=&space;\varnothing$
• $P&space;\oplus&space;Q&space;=&space;Q&space;\oplus&space;P$

p.s. other words it means this is an Abelian group over sum.

On practice, coordinates of a point are in Finite field. for example:

important note: A finite field of order q exists if and only if the order q is a prime power $p^{k}$ , basically a fields of order 17 or 239 contains just of excees of division by modulus prime number.

Example $F_{p}$:

• $Y^{2}=X^{3}+AX+B$
• replace R with $F_{p}$, $p=q^{t}$, $q&space;\neq&space;2,3$
• $E:Y^{2}-X^{3}-3X+3$ over $F_{5}$
• $(1,1)&space;\in&space;E,&space;(4,1)&space;\notin&space;E$
• use the previous algotithm

note: if p is 2 or 3

• $p=2^{t}$

• $Y^{2}+CY=X^{3}+AX+B$ or
• $Y^{2}+CXY=X^{3}+AX^{2}+B$
• $p=3^{t}$

• $Y^{2}=X^{3}+AX^{2}+BX+C$

In the real task it uses in DL suppose we have:

• $G=\{g,g^{2},...,g^{n-1},g^{n}=e\}$ - circle group (all elements are the power one of the element in this group)
• $h&space;\in&space;G$

need to find $x,&space;g^{x}=h$ this is the Diffie-Hellman DL base.

DL task separates to the two:

• p - Prime
• $g,h&space;\in&space;Z$

need to find $g^{x}&space;\equiv&space;\mod&space;p$ (not nulls excees of Finite field)

• E - elliptic curve
• $P,Q&space;\in&space;E(F_{p})$

need to find $n,nP=Q$ this is $n&space;=&space;log_{P}&space;Q$

The complexity in this case - is that the group of the point on an elliptic curve might be not cyclic. There is no generatrix point there. But we can select a point on the elliptic curve use of which we are able to generate Many points on the elliptic curve. If in the cyclic group we can power the generatrix number to get others non zero elements of the field, in elliptic curve case - we cannot multiple points, but can only sum them.

$nP=mP$ $\varnothing&space;=&space;(m-n)P&space;=&space;P+...m...+P-P...n...P$ count of pointer restricted by square field size plus one. As Hasse’s theorem on elliptic curves tells us - the amount of pointers is about an order of field. Consequently - if the pointer generated big enough field, need to find what P was multiplied on to get Q.

important: if P and n is known - the calculation of Q might be done quickly $O(\sqrt&space;p)$: $5P=(P+P)+(P+P)+P$

to be continued…