Lecture 11: Elliptic Curve Cryptography Wayne Patterson SYCS 653 Fall 2008.

Slides:



Advertisements
Similar presentations
Introduction to Elliptic Curves. What is an Elliptic Curve? An Elliptic Curve is a curve given by an equation E : y 2 = f(x) Where f(x) is a square-free.
Advertisements

Mathematics of Cryptography Part II: Algebraic Structures
Cryptography and Network Security
1 390-Elliptic Curves and Elliptic Curve Cryptography Michael Karls.
What is Elliptic Curve Cryptography?
Elliptic curve arithmetic and applications to cryptography By Uros Abaz Supervised by Dr. Shaun Cooper and Dr. Andre Barczak.
Efficient generation of cryptographically strong elliptic curves Shahar Papini Michael Krel Instructor : Barukh Ziv 1.
YSLInformation Security -- Public-Key Cryptography1 Elliptic Curve Cryptography (ECC) For the same length of keys, faster than RSA For the same degree.
CNS2010handout 8 :: introduction to number theory1 computer and network security matt barrie.
Elliptic Curve Cryptography (ECC) Mustafa Demirhan Bhaskar Anepu Ajit Kunjal.
1 Efficient Algorithms for Elliptic Curve Cryptosystems Original article by Jorge Guajardo and Christof Paar Of WPI ECE Department Presentation by Curtis.
Elliptic Curve Cryptography Shane Almeida Saqib Awan Dan Palacio.
Windows Core Security1© 2006 Microsoft Corp Cryptography: Helping Number Theorists Bring Home the Bacon Since 1977 Dan Shumow SDE Windows Core Security.
Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann.
Dr. Lo’ai Tawalbeh Fall 2005 Chapter 10 – Key Management; Other Public Key Cryptosystems Dr. Lo’ai Tawalbeh Computer Engineering Department Jordan University.
Electronic Payment Systems Lecture 5: ePayment Security II
Mathematics of Cryptography Part I: Modular Arithmetic, Congruence,
ELECTRONIC PAYMENT SYSTEMSFALL 2001COPYRIGHT © 2001 MICHAEL I. SHAMOS Electronic Payment Systems Lecture 6 Epayment Security II.
CPE5021 Advanced Network Security --- Advanced Cryptography: Elliptic Curve Cryptography --- Lecture 3 CPE5021 Advanced Network Security --- Advanced Cryptography:
Peter Lam Discrete Math CS.  Sometimes Referred to Clock Arithmetic  Remainder is Used as Part of Value ◦ i.e Clocks  24 Hours in a Day However, Time.
By Abhijith Chandrashekar and Dushyant Maheshwary.
Mathematics of Cryptography Part I: Modular Arithmetic, Congruence,
Preview of Calculus.
Copyright © Cengage Learning. All rights reserved. CHAPTER 11 ANALYSIS OF ALGORITHM EFFICIENCY ANALYSIS OF ALGORITHM EFFICIENCY.
Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations Copyright © The McGraw-Hill Companies, Inc. Permission required.
Lecture 10: Elliptic Curve Cryptography Wayne Patterson SYCS 653 Fall 2009.
FINITE FIELDS 7/30 陳柏誠.
CPSC 3730 Cryptography and Network Security
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Application of Elliptic Curves to Cryptography
 Let A and B be any sets A binary relation R from A to B is a subset of AxB Given an ordered pair (x, y), x is related to y by R iff (x, y) is in R. This.
Computer Science CSC 774 Advanced Network Security Topic 2.6 ID Based Cryptography #2 Slides by An Liu.
Scott CH Huang COM5336 Cryptography Lecture 10 Elliptic Curve Cryptography Scott CH Huang COM 5336 Cryptography Lecture 10.
Cryptography and Network Security (CS435) Part Eight (Key Management)
Cryptography and Network Security Chapter 10 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Elliptical Curve Cryptography Manish Kumar Roll No - 43 CS-A, S-7 SOE, CUSAT.
Data Security and Encryption (CSE348) 1. Lecture # 12 2.
Chapter 3 (B) – Key Management; Other Public Key Cryptosystems.
Cryptography and Network Security Key Management and Other Public Key Cryptosystems.
Numerical Methods.
Understanding Cryptography by Christof Paar and Jan Pelzl These slides were prepared by Tim Güneysu, Christof Paar and Jan Pelzl.
An Introduction to Elliptic Curve Cryptography
Elliptic Curves Number Theory and Cryptography. A Pile of Cannonballs A Square of Cannonballs.
3 DIFFERENTIATION RULES. We have:  Seen how to interpret derivatives as slopes and rates of change  Seen how to estimate derivatives of functions given.
Fundamental Concepts of Algebra
Rational Functions Rational functions are quotients of polynomial functions. This means that rational functions can be expressed as where p(x) and q(x)
Elliptic Curve Cryptography Celia Li Computer Science and Engineering November 10, 2005.
Cryptography issues – elliptic curves Presented by Tom Nykiel.
Lecture 9 Elliptic Curves. In 1984, Hendrik Lenstra described an ingenious algorithm for factoring integers that relies on properties of elliptic curves.
Elliptic Curve Crypto & ECC Diffie-Hellman Presenter: Le Thanh Binh.
Security of Using Special Integers in Elliptic Scalar Multiplication Mun-Kyu Lee o Jin Wook Kim Kunsoo Park School of CSE, Seoul National University.
1 Network Security Dr. Syed Ismail Shah
9.1 Primes and Related Congruence Equations 23 Sep 2013.
FUNCTIONS AND MODELS Exponential Functions FUNCTIONS AND MODELS In this section, we will learn about: Exponential functions and their applications.
Great Theoretical Ideas in Computer Science.
Introduction to Elliptic Curve Cryptography CSCI 5857: Encoding and Encryption.
Cryptography Hyunsung Kim, PhD University of Malawi, Chancellor College Kyungil University February, 2016.
Motivation Basis of modern cryptosystems
Key Management public-key encryption helps address key distribution problems have two aspects of this: – distribution of public keys – use of public-key.
Information Security Lab. Dept. of Computer Engineering 251/ 278 PART II Asymmetric Ciphers Key Management; Other CHAPTER 10 Key Management; Other Public.
Elliptic Curve Public Key Cryptography
Network Security Design Fundamentals Lecture-13
D. Cheung – IQC/UWaterloo, Canada D. K. Pradhan – UBristol, UK
Practical Aspects of Modern Cryptography
Introduction to Elliptic Curve Cryptography
Arab Open University Faculty of Computer Studies Dr
Cryptology Design Fundamentals
Computer Security Elliptic Curve Cryptosystems
Network Security Design Fundamentals Lecture-13
Presentation transcript:

Lecture 11: Elliptic Curve Cryptography Wayne Patterson SYCS 653 Fall 2008

Elliptic Curve Crypto (ECC) “Elliptic curve” is not a cryptosystem Elliptic curves are a different way to do the math in public key system Elliptic curve versions of DH, RSA, etc. Elliptic curves may be more efficient –Fewer bits needed for same security –But the operations are more complex

What is an Elliptic Curve? An elliptic curve E is the graph of an equation of the form y 2 = x 3 + ax + b Also includes a “point at infinity” What do elliptic curves look like? We’ll see..

Elliptic Curves Elliptic curves as algebraic/geometric entities have been studied extensively for the past 150 years, and from these studies has emerged a rich and deep theory. Elliptic curve systems as applied to cryptography were first proposed in 1985 independently by Neal Koblitz from the University of Washington, and Victor Miller, who was then at IBM, Yorktown Heights.

Many cryptosystems often require the use of algebraic groups. Elliptic curves may be used to form elliptic curve groups. A group is a set of elements with custom-defined arithmetic operations on those elements. For elliptic curve groups, these specific operations are defined geometrically. Introducing more stringent properties to the elements of a group, such as limiting the number of points on such a curve, creates an underlying field for an elliptic curve group. Elliptic curves are first examined over real numbers in order to illustrate the geometrical properties of elliptic curve groups. Thereafter, elliptic curves groups are examined with the underlying fields of F p (where p is a prime) and F 2 m (a binary representation with 2 m elements).

Elliptic Curve Groups over Real Numbers An elliptic curve over real numbers may be defined as the set of points (x,y) which satisfy an elliptic curve equation of the form: y 2 = x 3 + ax + b, where x, y, a and b are real numbers. Each choice of the numbers a and b yields a different elliptic curve. For example, a = -4 and b = 0.67 gives the elliptic curve with equation y 2 = x 3 - 4x ; the graph of this curve is shown below: If x 3 + ax + b contains no repeated factors, or equivalently if 4a b 2 is not 0, then the elliptic curve y 2 = x 3 + ax + b can be used to form a group. An elliptic curve group over real numbers consists of the points on the corresponding elliptic curve, together with a special point O called the point at infinity.

P + Q = R is the additive property defined geometrically.

Elliptic Curve Addition: A Geometric Approach Elliptic curve groups are additive groups; that is, their basic function is addition. The addition of two points in an elliptic curve is defined geometrically. The negative of a point P = (xP,yP) is its reflection in the x-axis: the point -P is (xP,-yP). Notice that for each point P on an elliptic curve, the point -P is also on the curve.

Adding distinct points P and Q Suppose that P and Q are two distinct points on an elliptic curve, and the P is not -Q. To add the points P and Q, a line is drawn through the two points. This line will intersect the elliptic curve in exactly one more point, call -R. The point -R is reflected in the x-axis to the point R. The law for addition in an elliptic curve group is P + Q = R. For example:

Adding the points P and -P The line through P and -P is a vertical line which does not intersect the elliptic curve at a third point; thus the points P and -P cannot be added as previously. It is for this reason that the elliptic curve group includes the point at infinity O. By definition, P + (-P) = O. As a result of this equation, P + O = P in the elliptic curve group. O is called the additive identity of the elliptic curve group; all elliptic curves have an additive identity.

Doubling the point P To add a point P to itself, a tangent line to the curve is drawn at the point P. If yP is not 0, then the tangent line intersects the elliptic curve at exactly one other point, -R. -R is reflected in the x-axis to R. This operation is called doubling the point P; the law for doubling a point on an elliptic curve group is defined by: P + P = 2P = R.

The tangent from P is always vertical if yP = 0.

Doubling the point P if yP = 0 If a point P is such that yP = 0, then the tangent line to the elliptic curve at P is vertical and does not intersect the elliptic curve at any other point. By definition, 2P = O for such a point P. If one wanted to find 3P in this situation, one can add 2P + P. This becomes P + O = P Thus 3P = P. 3P = P, 4P = O, 5P = P, 6P = O, 7P = P, etc.

Elliptic Curve Addition: An Algebraic Approach Although the previous geometric descriptions of elliptic curves provides an excellent method of illustrating elliptic curve arithmetic, it is not a practical way to implement arithmetic computations. Algebraic formulae are constructed to efficiently compute the geometric arithmetic.

Adding distinct points P and Q When P = (xP,yP) and Q = (xQ,yQ) are not negative of each other, P + Q = R where s = (yP - yQ) / (xP - xQ) xR = s 2 - xP - xQ and yR = -yP + s(xP - xR) Note that s is the slope of the line through P and Q.

Doubling the point P When yP is not 0, 2P = R where s = (3xP 2 + a) / (2yP ) xR = s 2 - 2xP and yR = -yP + s(xP - xR) Recall that a is one of the parameters chosen with the elliptic curve and that s is the tangent on the point P.

Elliptic Curve Groups over F p Calculations over the real numbers are slow and inaccurate due to round-off error. Cryptographic applications require fast and precise arithmetic; thus elliptic curve groups over the finite fields of F p and F 2 m are used in practice. Recall that the field F p uses the numbers from 0 to p - 1, and computations end by taking the remainder on division by p. For example, in F 23 the field is composed of integers from 0 to 22, and any operation within this field will result in an integer also between 0 and 22. An elliptic curve with the underlying field of F p can formed by choosing the variables a and b within the field of F p. The elliptic curve includes all points (x,y) which satisfy the elliptic curve equation modulo p (where x and y are numbers in F p ).

For example: y 2 mod p = x 3 + ax + b mod p has an underlying field of Fp if a and b are in Fp. If x 3 + ax + b contains no repeating factors (or, equivalently, if 4a b 2 mod p is not 0), then the elliptic curve can be used to form a group. An elliptic curve group over F p consists of the points on the corresponding elliptic curve, together with a special point O called the point at infinity. There are finitely many points on such an elliptic curve.

Elliptic Curve Picture Consider elliptic curve E: y 2 = x 3 - x + 1 If P 1 and P 2 are on E, we can define P 3 = P 1 + P 2 as shown in picture Addition is all we need P1P1 P2P2 P3P3 x y

Points on Elliptic Curve Consider y 2 = x 3 + 2x + 3 (mod 5) x = 0  y 2 = 3  no solution (mod 5) x = 1  y 2 = 6 = 1  y = 1,4 (mod 5) x = 2  y 2 = 15 = 0  y = 0 (mod 5) x = 3  y 2 = 36 = 1  y = 1,4 (mod 5) x = 4  y 2 = 75 = 0  y = 0 (mod 5) Then points on the elliptic curve are (1,1) (1,4) (2,0) (3,1) (3,4) (4,0) and the point at infinity: 

Elliptic Curve Math Addition on: y 2 = x 3 + ax + b (mod p) P 1 =(x 1,y 1 ), P 2 =(x 2,y 2 ) P 1 + P 2 = P 3 = (x 3,y 3 ) where x 3 = m 2 - x 1 - x 2 (mod p) y 3 = m(x 1 - x 3 ) - y 1 (mod p) And m = (y 2 -y 1 )  (x 2 -x 1 ) -1 mod p, if P 1  P 2 m = (3x 1 2 +a)  (2y 1 ) -1 mod p, if P 1 = P 2 Special cases: If m is infinite, P 3 = , and  + P = P for all P

Elliptic Curve Addition Consider y 2 = x 3 + 2x + 3 (mod 5). Points on the curve are (1,1) (1,4) (2,0) (3,1) (3,4) (4,0) and  What is (1,4) + (3,1) = P 3 = (x 3,y 3 ) ? m = (1-4)  (3-1) -1 = -3  2 -1 = 2(3) = 6 = 1 (mod 5) x 3 = = 2 (mod 5) y 3 = 1(1-2) - 4 = 0 (mod 5) On this curve, (1,4) + (3,1) = (2,0)

Example of an Elliptic Curve Group over F p As a very small example, consider an elliptic curve over the field F23. With a = 1 and b = 0, the elliptic curve equation is y2 = x3 + x. The point (9,5) satisfies this equation since: y 2 mod p = x 3 + x mod p 25 mod 23 = mod mod 23 = 738 mod 23 2 = 2 The 23 points which satisfy this equation are: (0,0) (1,5) (1,18) (9,5) (9,18) (11,10) (11,13) (13,5) (13,18) (15,3) (15,20) (16,8) (16,15) (17,10) (17,13) (18,10) (18,13) (19,1) (19,22) (20,4) (20,19) (21,6) (21,17) These points may be graphed as below:

Note that there are two points for every x value. Even though the graph seems random, there is still symmetry about y = Recall that elliptic curves over real numbers, there exists a negative point for each point which is reflected through the x-axis. Over the field of F 23, the negative components in the y-values are taken modulo 23, resulting in a positive number as a difference from 23. Here -P = (xP, (-yP mod 23)) Note that these rules are exactly the same as those for elliptic curve groups over real numbers, with the exception that computations are performed modulo p.

Arithmetic in an Elliptic Curve Group over F p There are several major differences between elliptic curve groups over F p and over real numbers. Elliptic curve groups over F p have a finite number of points, which is a desirable property for cryptographic purposes. Since these curves consist of a few discrete points, it is not clear how to "connect the dots" to make their graph look like a curve. It is not clear how geometric relationships can be applied. As a result, the geometry used in elliptic curve groups over real numbers cannot be used for elliptic curve groups over F p. However, the algebraic rules for the arithmetic can be adapted for elliptic curves over F p. Unlike elliptic curves over real numbers, computations over the field of F p involve no round off error - an essential property required for a cryptosystem.

Adding distinct points P and Q The negative of the point P = (xP, yP) is the point -P = (xP, -yP mod p). If P and Q are distinct points such that P is not -Q, then P + Q = R where s = (yP - yQ) / (xP - xQ) mod p xR = s 2 - xP - xQ mod p and yR = -yP + s(xP - xR) mod p Note that s is the slope of the line through P and Q.

Doubling the point P Provided that yP is not 0, 2P = R where s = (3xP 2 + a) / (2yP ) mod p xR = s 2 - 2xP mod p and yR = -yP + s(xP - xR) mod p Recall that a is one of the parameters chosen with the elliptic curve and that s is the slope of the line through P and Q.

Elliptic Curve Groups over F 2 m Elements of the field F 2 m are m-bit strings. The rules for arithmetic in F2m can be defined by either polynomial representation or by optimal normal basis representation. Since F2m operates on bit strings, computers can perform arithmetic in this field very efficiently. An elliptic curve with the underlying field F 2 m is formed by choosing the elements a and b within F2m (the only condition is that b is not 0). As a result of the field F 2 m having a characteristic 2, the elliptic curve equation is slightly adjusted for binary representation: y 2 + xy = x 3 + ax 2 + b The elliptic curve includes all points (x,y) which satisfy the elliptic curve equation over F 2 m (where x and y are elements of F 2 m ). An elliptic curve group over F 2 m consists of the points on the corresponding elliptic curve, together with a point at infinity, O. There are finitely many points on such an elliptic curve.polynomial representationoptimal normal basis representation

An Example of an Elliptic Curve Group over F 2 m As a very small example, consider the field F 2 4, defined by using polynomial representation with the irreducible polynomial f(x) = x4 + x + 1. The element g = (0010) is a generator for the field. The powers of g are: g 0 = (0001) g 1 = (0010) g 2 = (0100) g 3 = (1000) g 4 = (0011) g 5 = (0110) g 6 = (1100) g 7 = (1011) g 8 = (0101) g 9 = (1010) g 10 = (0111) g 11 = (1110) g 12 = (1111) g 13 = (1101) g 14 = (1001) g 15 = (0001) In a true cryptographic application, the parameter m must be large enough to preclude the efficient generation of such a table otherwise the cryptosystem can be broken. In today's practice, m = 160 is a suitable choice. The table allows the use of generator notation (ge) rather than bit string notation, as used in the following example. Also, using generator notation allows multiplication without reference to the irreducible polynomial f(x) = x 4 + x + 1.

Consider the elliptic curve y2 + xy = x3 + g4x Here a = g4 and b = g0 =1. The point (g 5, g 3 ) satisfies this equation over F2m : y 2 + xy = x 3 + g 4 x (g 3 ) 2 + g 5 g 3 = (g 5 ) 3 + g 4 g g 6 + g 8 = g 15 + g (1100) + (0101) = (0001) + (1001) + (0001) (1001) = (1001) The fifteen points which satisfy this equation are: (1, g 13 ) (g 3, g 13 ) (g 5, g 11 ) (g 6, g 14 ) (g 9, g 13 ) (g 10, g 8 ) (g 12, g 12 ) (1, g 6 ) (g 3, g 8 ) (g 5, g 3 ) (g 6, g 8 ) (g 9, g 10 ) (g 10, g) (g 12, 0) (0, 1) These points are graphed below:

Arithmetic in an Elliptic Curve Group over F 2 m Elliptic curve groups over F 2 m have a finite number of points, and their arithmetic involves no round off error. This combined with the binary nature of the field, F 2 m arithmetic can be performed very efficiently by a computer. The following algebraic rules are applied for arithmetic over F 2 m :

Adding distinct points P and Q The negative of the point P = (xP, yP) is the point -P = (xP, xP + yP). If P and Q are distinct points such that P is not -Q, then P + Q = R where s = (yP - yQ) / (xP + xQ) xR = s 2 + s + xP + xQ + a and yR = s(xP + xR) + xR + yP As with elliptic curve groups over real numbers, P + (-P) = O, the point at infinity. Furthermore, P + O = P for all points P in the elliptic curve group.

Doubling the point P If xP = 0, then 2P = O Provided that xP is not 0, 2P = R where s = xP + yP / xP xR = s 2 + s + a and yR = xP 2 + (s + 1) * xR Recall that a is one of the parameters chosen with the elliptic curve and that s is the slope of the line through P and Q

Elliptic Curve groups and the Discrete Logarithm Problem At the foundation of every cryptosystem is a hard mathematical problem that is computationally infeasible to solve. The discrete logarithm problem is the basis for the security of many cryptosystems including the Elliptic Curve Cryptosystem. More specifically, the ECC relies upon the difficulty of the Elliptic Curve Discrete Logarithm Problem (ECDLP). Recall that we examined two geometrically defined operations over certain elliptic curve groups. These two operations were point addition and point doubling. By selecting a point in a elliptic curve group, one can double it to obtain the point 2P. After that, one can add the point P to the point 2P to obtain the point 3P. The determination of a point nP in this manner is referred to as Scalar Multiplication of a point. The ECDLP is based upon the intractability of scalar multiplication products.

Scalar Multiplication The following animation demonstrates scalar multiplication through the combination of point doubling and point addition. While it is customary to use additive notation to describe an elliptic curve group (as has been done previously in this classroom), some insight is provided by using multiplicative notation. Specifically, consider the operation called "scalar multiplication" under additive notation: that is, computing kP by adding together k copies of the point P. Using multiplicative notation, this operation consists of multiplying together k copies of the point P, yielding the point P*P*P*P*…*P = Pk.

The Elliptic Curve Discrete Logarithm Problem In the multiplicative group Z p *, the discrete logarithm problem is: given elements r and q of the group, and a prime p, find a number k such that r = qk mod p. If the elliptic curve groups is described using multiplicative notation, then the elliptic curve discrete logarithm problem is: given points P and Q in the group, find a number that Pk = Q; k is called the discrete logarithm of Q to the base P. When the elliptic curve group is described using additive notation, the elliptic curve discrete logarithm problem is: given points P and Q in the group, find a number k such that Pk = Q Example: In the elliptic curve group defined by y 2 = x 3 + 9x + 17 over F 23, What is the discrete logarithm k of Q = (4,5) to the base P = (16,5)?

One (naïve) way to find k is to compute multiples of P until Q is found. The first few multiples of P are: P = (16,5) 2P = (20,20) 3P = (14,14) 4P = (19,20) 5P = (13,10) 6P = (7,3) 7P = (8,7) 8P = (12,17) 9P = (4,5) Since 9P = (4,5) = Q, the discrete logarithm of Q to the base P is k = 9. In a real application, k would be large enough such that it would be infeasible to determine k in this manner.

An Example of the Elliptic Curve Discrete Logarithm Problem What is the discrete logarithm of Q(- 0.35,2.39) to the base P(-1.65,- 2.79) in the elliptic curve group y 2 = x 3 - 5x + 4 over real numbers?

ECC Diffie-Hellman Public: Elliptic curve and point (x,y) on curve Secret: Alice’s A and Bob’s B Alice, A Bob, B A(x,y) B(x,y) Alice computes A(B(x,y)) Bob computes B(A(x,y)) These are the same since AB = BA

ECC Diffie-Hellman Public: Curve y 2 = x 3 + 7x + b (mod 37) and point (2,5)  b = 3 Alice’s secret: A = 4 Bob’s secret: B = 7 Alice sends Bob: 4(2,5) = (7,32) Bob sends Alice: 7(2,5) = (18,35) Alice computes: 4(18,35) = (22,1) Bob computes: 7(7,32) = (22,1)

ECC Diffie-Hellman Public: Elliptic curve and point (x,y) on curve Secret: Alice’s A and Bob’s B Alice, A Bob, B A(x,y) B(x,y) Alice computes A(B(x,y)) Bob computes B(A(x,y)) These are the same since AB = BA

ECC Diffie-Hellman Public: Curve y 2 = x 3 + 7x + b (mod 37) and point (2,5)  b = 3 Alice’s secret: A = 4 Bob’s secret: B = 7 Alice sends Bob: 4(2,5) = (7,32) Bob sends Alice: 7(2,5) = (18,35) Alice computes: 4(18,35) = (22,1) Bob computes: 7(7,32) = (22,1)