1 2. Endomorphisms for Elliptic Curves 3 3. Torsion Points 7 4
Total Page:16
File Type:pdf, Size:1020Kb
ELLIPTIC CURVES AND CRYPTOGRAPHY MICHAEL CALDERBANK Abstract. We begin with the basics of elliptic curves, assuming some knowl- edge of group theory and number theory. We shall first build up some general theorems of endomorphisms and torsion points, which will be necessary when we provide Hasse's Theorem about the order of a group of points on an elliptic curve. This will allow us to provide an example of how elliptic curves can be used in cryptography. Contents 1. What is an Elliptic Curve? 1 2. Endomorphisms for Elliptic Curves 3 3. Torsion Points 7 4. Elliptic Curves over Finite Fields 10 5. Discrete Logarithm Problem 13 6. Conclusion 15 Acknowledgments 15 References 15 1. What is an Elliptic Curve? An elliptic curve E is the graph of an equation of the form: y2 = x3 + Ax + B where A and B are constants. This equation is called the Weierstrass equation for an elliptic curve. We will need to specify which field A; B; x; and y belong to, for now we will deal with R, since it is easy to visualize, but for our cryptographic applications, it will make sense to deal with finite fields Fq, where q is a prime power. When working over fields of characteristic 2 or 3, it is more useful to deal with the generalized Weierstrass equation: 2 3 2 y + a1xy + a3y = x + a2x + a4x + a6 With a little algebraic manipulation, an equation of this form can be reduced to a Weirstrass equation if the characteristic of the field is not equal to 2 or 3. We want to look at points on the elliptic curve, so if we have an elliptic curve E over a field K, then for any field L such that L ⊇ K we can consider the set: E(L) = f1g [ f(x; y) 2 L × Ljy2 = x3 + Ax + Bg Date: August 21, 2009. 1 2 MICHAEL CALDERBANK Note that we have added the point at infinity to our curve. This concept can be made rigorous using projective space, but it is easiest to regard it as the point (1; 1). For computational purposes, it will be a formal symbol satisfying certain rules. At this point, we'll define addition for points. Start with 2 points: M1 = (x1; y1);M2 = (x1; y1) on an elliptic curve E given by the equation y2 = x3 + Ax + B. We define a new point M3 as follows: Draw the line D through M1 and M2. We'll see below that D intersects E in a third point P . Reflect P across the x-axis to obtain M3. We define M1 + M2 = M3 When E is defined over the reals, then we have the figure below: For other fields, there is no intuitive picture, so we will need a formal set of rules for addition. Using a bit of basic algebra, we can calculate the coordinates of the ELLIPTIC CURVES AND CRYPTOGRAPHY 3 third point given the coordinates of the first two points. Note that if M1 = M2, then we can use implicit differentiation to find the slope of the line. To summarize: Definition 1.1. Let E be an elliptic curve defined by y2 = x3 + Ax + B. Let P1 = (x1; y1) and P2 = (x2; y2) be points on E with P1;P2 6= 1. Define P1 + P2 = P3 = (x3; y3) as follows: (1) If x1 6= x2, then 2 y2 − y1 x3 = m − x1 − x2; y3 = m(x1 − x3) − y1; where m = x2 − x1 (2) If x1 = x2 but y1 6= y2, then P1 + P2 = 1 (3) If P1 = P2 and y1 6= 0, then 2 2 3x1 + A x3 = m − 2x1; y3 = m(x1 − x3) − y1; where m = 2y1 (4) If P1 = P2 and y1 = 0, then P1 + P2 = 1 Also, define P + 1 = P for all points P on E. With addition defined, it is only a small step to our first theorem: Theorem 1.2. The addition of points on an elliptic curve E form an additive abelian group with 1 as the identity element. Proof. From the formulas, commutativity is obvious, since the line passing through the points is the same, and if we want to find the inverse of P , then if we reflect P across the x-axis to get P 0, then P + P 0 = 1. The only tricky part is associativity, and this is a messy calculation involving the formulas above, so we leave it as an exercise. We will want to study the order of specific points and the order of the group in general, but first we have to make rigorous endomorphisms on an elliptic curve 2. Endomorphisms for Elliptic Curves Definition 2.1. An endomorphism of E is a homomorphism α : E(K) −! E(K) that is given by rational functions. So α(P1 + P2) = α(P1) + α(P2), and there are rational functions R1(x; y);R2(x; y) with coefficients in K such that α(x; y) = (R1(x; y);R2(x; y)) for all (x; y) 2 E(K). Naturally, α(1) = 1, and we will also assume that any endomorphism is nontrivial, so there exists some (x; y) such that α(x; y) 6= 1. Using the fact that y2 = x3 + Ax + B for all (x; y) 2 E(K), we can show that any endomorphism defined as above can be written as: α(x; y) = (r1(x); r2(x)y) with rational functions r1(x); r2(x). 4 MICHAEL CALDERBANK p(x) Definition 2.2. Let α be as above and write r1(x) = q(x) . We define the degree of α to be deg(α) = Maxfdeg p(x); deg q(x)g 0 Also, we define α to be a separable endomorphism if the derivative r1(x) is not identically zero. This is equivalent to saying that at least one of p0(x) and q0(x) is not identically zero. Of particular importance to our study is the Frobenius map. Suppose E is defined over the finite field Fq. Let q q φq(x; y) = (x ; y ) . Lemma 2.3. Let E be defined over Fq. Then φq is an endomorphism of E of degree q, and φq is not separable. q q Proof. Since φq(x; y) = (x ; y ) is given by rational functions, it is clear that the q degree is q. Also, since q = 0 in Fq, the derivative of x is indentically zero, so φq is not separable. The main thing to be proven is that φq : E(Fq) ! E(Fq) is a homomorphism. Let (x1; y1); (x2; y2) 2 E(Fq) with x1 6= x2. According to Definition 1.1(1) The sum is (x3; y3) with 2 y2 − y1 x3 = m − x1 − x2; y3 = m(x1 − x3) − y1; where m = x2 − x1 Raise everything to the qth power: q q q 02 q q q 0 q q q 0 y2 − y1 x3 = m − x1 − x2; y3 = m (x1 − x3) − y1; where m = q q x2 − x1 So if x1 6= x2, then we see that φq(x3; y3) = φq(x1; y1) + φq(x2; y2) There is a bit more subtlety when we add a point to itself. According to Definition 1.1(1), we have 2(x1; y1) = (x3; y3), with 2 2 3x1 + A x3 = m − 2x1; y3 = m(x1 − x3) − y1; where m = 2y1 When we raise everything to the qth power, we will need to use the fact that q q q 2 = 2; 3 = 3;A = A, since 2; 3;A 2 Fq. This is only true if the characteristic of Fq is not 2 or 3, but if that were the case, then we would have a different addition formula since we would need to use the generalized Weirstrass form. The calculation for that form is essentially the same. We will return to the Frobenius map, but now we need a few general results about endomorphisms. Proposition 2.4. Let α 6= 0 be a separable endomorphism of an elliptic curve E. Then deg α = #Ker(α) If α 6= 0 is not separable, then deg α > #Ker(α) ELLIPTIC CURVES AND CRYPTOGRAPHY 5 Proof. Assume first that α is separable. Write α(x; y) = (r1(x); r2(x)y) with 0 0 0 r1(x) = p(x)=q(x), as above. Then r1 6= 0, so p q − pq is not the zero polyno- mial. Let S be the set of x 2 K such that (pq0 − p0q)(x)q(x) = 0. Let (a; b) 2 E(K) be such that (1) a 6= 0; b 6= 0; (a; b) 6= 1, (2) deg(p(x) − aq(x)) = Maxfdeg(p); deg(q)g = deg(α) (3) a2 = r1(S), and (4) (a; b) 2 α(E(K)) Since pq0 − p0q is not the zero polynomial, S is a finite set, hence its image under α is finite. The function r1(x) takes on infinitely many distinct values as x runs through K. Since for each x there is a point (x; y) 2 E(K), we see that α(E(K)) is an infinite set. Therefore, we know such an (a; b) exists. We claim that there are exactly deg(α) points (x1; y1) 2 E(K) such that α(x1; y1) = (a; b). For such a point, we have p(x1) = a; y1r2(x1) = b: q(x1) Since (a; b) 6= 1, we must have q(x1) 6= 0. Since b 6= 0 and y1r2(x1) = b, we must have y1 = b=r2(x1). Therefore, x1 determines y1 in this case, so we only need to count values of x1.