CPE5021 Advanced Network Security --- Advanced Cryptography: Elliptic Curve Cryptography --- Lecture 3 CPE5021 Advanced Network Security --- Advanced Cryptography:

Slides:



Advertisements
Similar presentations
Diffie-Hellman Diffie-Hellman is a public key distribution scheme First public-key type scheme, proposed in 1976.
Advertisements

Key Management Nick Feamster CS 6262 Spring 2009.
1 390-Elliptic Curves and Elliptic Curve Cryptography Michael Karls.
Lecture 8: Lattices and Elliptic Curves
What is Elliptic Curve Cryptography?
7. Asymmetric encryption-
YSLInformation Security -- Public-Key Cryptography1 Elliptic Curve Cryptography (ECC) For the same length of keys, faster than RSA For the same degree.
Elliptic Curve Cryptography (ECC) Mustafa Demirhan Bhaskar Anepu Ajit Kunjal.
Windows Core Security1© 2006 Microsoft Corp Cryptography: Helping Number Theorists Bring Home the Bacon Since 1977 Dan Shumow SDE Windows Core Security.
Elliptic Curve. p2. Outline EC over Z p EC over GF(2 n )
The RSA Cryptosystem and Factoring Integers (II) Rong-Jaye Chen.
Elliptic Curve Cryptography Jen-Chang Liu, 2004 Adapted from lecture slides by Lawrie Brown Ref: RSA Security ’ s Official Guide to Cryptography.
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
Cryptography and Network Security Chapter 10 Fourth Edition by William Stallings.
Fall 2010/Lecture 311 CS 426 (Fall 2010) Public Key Encryption and Digital Signatures.
Public Key Algorithms 4/17/2017 M. Chatterjee.
CSCI 172/283 Fall 2010 Public Key Cryptography. New paradigm introduced by Diffie and Hellman The mailbox analogy: Bob has a locked mailbox Alice can.
C HAPTER 13 Asymmetric Key Cryptography Slides adapted from "Foundations of Security: What Every Programmer Needs To Know" by Neil Daswani, Christoph Kern,
ASYMMETRIC CIPHERS.
Public Key Model 8. Cryptography part 2.
1 CIS 5371 Cryptography 8. Asymmetric encryption-.
Andreas Steffen, , 4-PublicKey.pptx 1 Internet Security 1 (IntSi1) Prof. Dr. Andreas Steffen Institute for Internet Technologies and Applications.
By Abhijith Chandrashekar and Dushyant Maheshwary.
Lecture 10: Elliptic Curve Cryptography Wayne Patterson SYCS 653 Fall 2009.
Problems with symmetric (private-key) encryption 1) secure distribution of keys 2) large number of keys Solution to both problems: Public-key (asymmetric)
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Application of Elliptic Curves to Cryptography
1 Lecture 9 Public Key Cryptography Public Key Algorithms CIS CIS 5357 Network Security.
Computer Science CSC 774 Advanced Network Security Topic 2.6 ID Based Cryptography #2 Slides by An Liu.
Elliptic Curve Cryptography Implementation & PKI Adoption Brian Saville Jonathan Mitchell.
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.
Public Key Cryptography. symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if.
Basic Elliptic Curve Cryptography 1Lt Peter Hefley 90 OSS Instructor Fall ‘06.
1 Security and Cryptography: basic aspects Ortal Arazi College of Engineering Dept. of Electrical & Computer Engineering The University of Tennessee.
PUBLIC-KEY CRYPTOGRAPH IT 352 : Lecture 2- part3 Najwa AlGhamdi, MSc – 2012 /1433.
Chapter 3 (B) – Key Management; Other Public Key Cryptosystems.
Cryptography and Network Security Key Management and Other Public Key Cryptosystems.
Understanding Cryptography by Christof Paar and Jan Pelzl These slides were prepared by Tim Güneysu, Christof Paar and Jan Pelzl.
Public Key Algorithms Lesson Introduction ●Modular arithmetic ●RSA ●Diffie-Hellman.
Public Key Cryptosystem Introduced in 1976 by Diffie and Hellman [2] In PKC different keys are used for encryption and decryption 1978: First Two Implementations.
Elliptic Curves Number Theory and Cryptography. A Pile of Cannonballs A Square of Cannonballs.
Elliptic Curve Cryptography Celia Li Computer Science and Engineering November 10, 2005.
11 RSA Variants.  Scheme ◦ Select s.t. p and q = 3 mod 4 ◦ n=pq, public key =n, private key =p,q ◦ y= e k (x)=x (x+b) mod n ◦ x=d k (y)=  y mod n.
1 Network Security Dr. Syed Ismail Shah
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Great Theoretical Ideas in Computer Science.
Introduction to Pubic Key Encryption CSCI 5857: Encoding and Encryption.
Diffie-Hellman Key Exchange first public-key type scheme proposed by Diffie & Hellman in 1976 along with the exposition of public key concepts – note:
1 Cryptanalysis Lab Elliptic Curves. Cryptanalysis Lab Elliptic Curves 2 Outline [1] Elliptic Curves over R [2] Elliptic Curves over GF(p) [3] Properties.
Introduction to Elliptic Curve Cryptography CSCI 5857: Encoding and Encryption.
Cryptography and Network Security Chapter 10 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Cryptography services Lecturer: Dr. Peter Soreanu Students: Raed Awad Ahmad Abdalhalim
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.
Key Exchange in Systems VPN usually has two phases –Handshake protocol: key exchange between parties sets symmetric keys –Traffic protocol: communication.
Public Key Cryptography. Asymmetric encryption is a form of cryptosystem in which Encryption and decryption are performed using the different keys—one.
Information Security Lab. Dept. of Computer Engineering 251/ 278 PART II Asymmetric Ciphers Key Management; Other CHAPTER 10 Key Management; Other Public.
Chapter 9 – Elliptic Curve Cryptography ver. November 3rd, 2009
Network Security Design Fundamentals Lecture-13
Elliptic Curve Cryptography (ECC)
Elliptic Curve Cryptography (ECC)
Diffie-Hellman Key Exchange
Practical Aspects of Modern Cryptography
Introduction to Elliptic Curve Cryptography
CSCE 715: Network Systems Security
Computer Security Elliptic Curve Cryptosystems
Network Security Design Fundamentals Lecture-13
Presentation transcript:

CPE5021 Advanced Network Security --- Advanced Cryptography: Elliptic Curve Cryptography --- Lecture 3 CPE5021 Advanced Network Security --- Advanced Cryptography: Elliptic Curve Cryptography --- Lecture 3

CPE Advanced Network Security2 Outline n Principle of public key systems çDiscrete Logarithm Problem (DLP) n Introduction to Elliptic Curve Cryptography ç EC with real numbers ç EC with finite groups n ECC in practice

CPE Advanced Network Security3 Acknowledment n Acknowledgement: çSome of the figures in the lecture are borrowed from certicom. çSome diagrams are borrowed from other universities.

CPE Advanced Network Security4 Some references n res,ecc_faq (good introduction papers) res,ecc_faq res,ecc_faq n m/ecc.html (more materials) m/ecc.html m/ecc.html n g/link/ecc_simple.pdf (good introduction for students with strong maths background) g/link/ecc_simple.pdf g/link/ecc_simple.pdf (You can find many more from the Web)

CPE Advanced Network Security5 Elliptic curve cryptosystem (ECC) Extract from my student’s Thesis – Markku N.M. Pekkarinen Key Size Equivalence Against Best Known Attacks (Based on López and Dahab, 2000 and Fibíková, 2002) 30: AES : AES : AES : Triple DES112 6: SKIPJACK2280 5: Key size ratio of RSA to ECC (approx) ECC key size for equivalent security (n in bits) RSA key size for equivalent security (n in bits) DLP key size for equivalent security (p in bits) Example algorithm Symmetric key size (in bits)

CPE Advanced Network Security6 YearNumber of decimal digits Numb er of bits MIPS Years Calendar Time to Solution Method (year method developed) months, using 1600 computers Quadratic Sieve (1984) General Number Field Sieve (1989) monthsGeneral Number Field Sieve (1989) RSA and ECC challenges Progress in Integer Factorisation(Certicom 1997)

CPE Advanced Network Security7 Discrete Logarithm Problem (DLP) n For a group G, Given group elements, find an integer x such that x is called the discrete log of to the base. - It is easy to compute - It is hard to find x, knowing and

CPE Advanced Network Security8 DLP - Example n If a b = c, then log a c = b n Example: ç2 3 = 8  log 2 8 = 3 ç10 3 = 100  log = 3 n Computing a b and log a c are both easy for real numbers. n However, when working with field such as (Zp,mod), it is easy to calculate c = a b mod p, but given c, a and p it is very difficult to find b. n Given an integer n it is hard to find two integers p, q such that n = pq (factorisation problem as in RSA)

CPE Advanced Network Security9 Real Elliptic Curves n An elliptic curve is defined by an equation in two variables x & y, with coefficients: çy 2 + axy + by = x 3 + cx 2 + dx + e (general form) n Consider a cubic elliptic curve of form çy 2 = x 3 + ax + b; where x,y,a,b are all real numbers. Eg. ly 2 = x 3 + x + 1. ly 2 = x 3 + 2x + 6.

CPE Advanced Network Security10 Example of EC

CPE Advanced Network Security11 Elliptic curve over real number n Let’s consider the equation: y 2 = x 3 + ax + b, where x, y, a and b are real numbers, where 4a b 2 0 – condition for distinct single roots (smooth curve). y 2 = x 3 + ax + b, where x, y, a and b are real numbers, where 4a b 2 0 – condition for distinct single roots (smooth curve). n All (x,y) points satisfying above equation along with a infinite point O and addition operation (+), form a group. O and (+) are defined in the next slide. O is the identity of the group.

CPE Advanced Network Security12 An EC over a group (G,+) is defined with the following: 1. Addition: If P and Q are distinct, and P  - Q, define P+Q as follows: çDraw a line through P and Q, then the line will intersect with the curve, the intersected point is denoted as –R, and define P+Q=R. 2. For every P, define P + (-P) = O 3. If P=(x,0), then P+P = O, (a vertical line) Otherwise, draw a tangent line through P, the intersected point is defined as –R, then P+P =2P =R. Otherwise, draw a tangent line through P, the intersected point is defined as –R, then P+P =2P =R. EC over a group (G,+) – E(G,+)

CPE Advanced Network Security13 Definition of P+Q = R

CPE Advanced Network Security14 Definition of P+(-P)

CPE Advanced Network Security15 Definition of P+P (where y!=0)

CPE Advanced Network Security16 Definition of P+P (where y=0)

CPE Advanced Network Security17 Elliptic Curve : An Algebraic Approach 1. Adding distinct points P and Q (1) When P = (x P,y P ) and Q = (x Q,y Q ) and P  Q, P  -Q, P + Q = R(x R, y R ) with x R = s 2 - x P - x Q and y R = s(x P - x R ) - y P where s = (y P - y Q ) / (x P - x Q ) 2. Doubling the point P (2) When y P is not O, 2P = R(x R, y R ) with x R = s 2 - 2x P and y R = s(x P - x R ) -y P where s = (3x P 2 + a) / (2y P ) where s = (3x P 2 + a) / (2y P ) 3. P + (-P) =O (3) 4. If P = (x P,y P ) and y P =0, then P + P = 2P = O (4)

CPE Advanced Network Security18 Finite Elliptic Curves on discrete Fields n Cryptography works with finite field and Elliptic curve cryptography uses curves whose variables and coefficients are finite n There are two commonly used ECC families:  prime curves E p (a,b) defined over Z p l use modulo with a prime number p lefficient in software  binary curves E 2 m (a,b) defined over GF(2 n ) luse polynomials with binary coefficients lefficient in hardware

CPE Advanced Network Security19 Elliptic Curve Groups over Z p n (Zp, mod) = {0,1,…,p-1} is a group çWhere p is a prime number n Define the elliptic curve çy 2 = x 3 + ax + b mod p çWhere a and b are in Zp, and x, y are also in Zp. ç(4a b 2 (mod p))  0.

CPE Advanced Network Security20 EC over (Zp, mod)- examples p=11, Zp=Z 11. y 2 = x 3 + x + 6 (mod 11) p=11, Zp=Z 11. y 2 = x 3 + x + 6 (mod 11)  E(Z 11, mod) = {(2,4),(2,7), (3,5),(3,6), (5,2),(5,9), (7,2),(7,9), (8,3),(8,8), (10,2),(10,9)} p=23, Zp=Z 23. y 2 = x 3 + x (mod 23) p=23, Zp=Z 23. y 2 = x 3 + x (mod 23)  E(Z 23, mod) = {(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)} p=23, Zp=Z 23. y 2 = x 3 + x + 1 (mod 23) p=23, Zp=Z 23. y 2 = x 3 + x + 1 (mod 23)  E(Z 23,mod) = { (0,1), (0,22), (1,7), (1,16), (3,10), (3,13), (4,0), (5,4), (5,19), (6,4), (6,19), (7,11), (7,12), (9,7), (9,16), (11,3), (11,20), (12,4), (12,19), (13,7), (13,16), (17,3), (17,20), (18,3), (18,20), (19,5), (19,18)}

CPE Advanced Network Security21 y 2 = x 3 + x mod 23

CPE Advanced Network Security22 Operations on E(Z 11,mod) n Consider the E(Z 11,mod): Let P and Q on E(Z 11,mod) 1.P = (10,2) and Q= (5,2) then P + Q = (10,2) + (5,2) = (7,9). 2.P = (2,7); P + P = (5,2). 3.P = (2,7); -P = (2,-7); P + -P =?

CPE Advanced Network Security23 Elliptic Curve Cryptography (ECDLP) n Assume that we are working with E(Z p, mod) çLet Q and P be on E(Z p, mod); and 1 < k < p-1 Define a hard problem which is equivalent to the DLP: Q=kP Define a hard problem which is equivalent to the DLP: Q=kP çIt is “easy” to compute Q given k and P çbut it is “hard” to find k given Q,P çknown as the elliptic curve logarithm problem (ECDLP)

CPE Advanced Network Security24 ECC in Practice – simple method Suppose A wants to send a message m to B using EC over group (G,+) = {0,..n-1} with generator g Suppose A wants to send a message m to B using EC over group (G,+) = {0,..n-1} with generator g çKey generation: B selects a random integer B s from the interval [1, n-1] as private key and publish B p = B s g as B’s public key çEncryption: A selects a random integer A s as A’s secrete key and send to B: (A s g, A s B p + m) to B as ciphertext (A s g = A p is A’s public key). çB decrypts the message by computing m + A s B p - B s (A s g) = m + A s B s g - B s A s g = m

CPE Advanced Network Security25 E(Z 11,mod) with generator n y 2 = x3 +x+6 mod 11. çE(Z 11,mod) = { (2,4),(2,7), (3,5),(3,6), (5,2),(5,9), (7,2),(7,9), (8,3),(8,8), (10,2),(10,9)}

CPE Advanced Network Security26 E(Z 11,mod) with generator n Let’s select g =(2,7) as a generator. n Compute 2g, 3g, … as using the following: ç2P = R(x R, y R ) with x R = s 2 - 2x P and y R = s(x P - x R ) -y P where s = (3x P 2 + a) / (2y P ) { g=(2,7), 2g=(5,2), 3g=(8,3), 4g=(10,2) 5g=(3,6), 6g=(7,9), 7g=(7,2), 8g=(3,5) 5g=(3,6), 6g=(7,9), 7g=(7,2), 8g=(3,5) 9g=(10,9), 10g=(8,8),11g=(5,9),12g=(2,4) } 9g=(10,9), 10g=(8,8),11g=(5,9),12g=(2,4) }

CPE Advanced Network Security27 ECC example on E(Z 11,mod) y 2 = x3 +x+6 mod 11 n Suppose message is m =(3,6) (a point on E). n B selects a random B s =3, then send B p to A; n B p = B s g = 3g = g+g+g = (8,3); where g =(2,7) n A selects a random number and generates A’s public key, let’s say 2. A s = 2; A p = A s g = 2g = g+g = (5,2). çA encrypts the message: (A s g, A s B p + m) = ((5,2), 2(8,3) + (3,6)) = ((5,2), (7,9) + (3,6)) = ((5,2), (5,9)). n B decrypts the cipher by first computing A s gB s çA s gB s = 3(5,2) = (5,2) + (5,2) + (5,2) = (10,2) + (5,2) = (7,9); çA s B p + m – A s gB s = (5,9) – (7,9) = (5,9) + (7,-9) = (5,9) + (7,2) = (3,6)

CPE Advanced Network Security28 ECC system (general approach) n General steps to construct an EC cryptosystem 1.Selects an underlying field F 2.Selects a representation for the elements of F 3.Implementing arithmetic operations in F 4.Selecting an appropriate EC over F to form E(F) 5.Implementing EC operations in group E(F) 6.Choose a protocol 7.Implement ECC based on the chosen protocol.

Diffie-Hellman Key Exchange Protocol Both know G

CPE Advanced Network Security30 Diffie Hellman over ECC n Alice chooses a random a and compute aP  E n Bob chooses a random b and compute bP  E n Alice and Bob exchange the computed values n Alice, from bP and a can compute S = abP n Bob, from aP and b can compute S = abP

CPE Advanced Network Security31 Simple implementation of ECC n Simple steps to construct an EC cryptosystem 1.Select an underlying field F and generate a random curve (e.g: y 2 = x 3 + ax + b ) – store values of a and b (should declare data structures to store curve and point parameters prior this) (should declare data structures to store curve and point parameters prior this) 1.Find the base point g (generator) as public point (Every one knows this point) 2.Compute share secret key using Diffie Hellman over ECC 3.Compute public keys: 1.Alice chooses a random as her secret key A s and computes her public key A p = A s g 2.Bob chooses a random B s and computes his public key B p = B s g (Both Alice and Bob can now compute shared key B s A s g) çEmbed message m onto a point, M(x,y), of the curve using Koblitz’s method (see next slide) çEncrypt and decrypt 1.Alice encrypts the message M(x,y): (A p, A s B p + M) and sends it to Bob. 2.Bob decrypts the message by computing A p B s and then M + A s B p - A p B s = M + A s B s g - A s gB s = M M + A s B p - A p B s = M + A s B s g - A s gB s = M

CPE Advanced Network Security32 Embedding plaintext messages as points on an Elliptic Curve n In order to build an ECC, there must be an accurate and efficient way for embedding a ciphertext message on an EC. çThere is no known deterministic algorithm for embedding message units as points on an elliptic curve. çHowever, there is a probabilistic method that can be used for embedding message units as points on an elliptic curve. çSee Koblitz’s proposal of representing a message unit as a point on an EC.

CPE Advanced Network Security33 Embed a message m n Suppose p is prime with p mod 4 = 3 Pick k so that 1/2 k is small Pick k so that 1/2 k is small n Let m be the message and allows m < (p-k)/k n For j=0, …, k-1 Set x j = m*k + j ; w j = x j 3 + a x j + b; z j = w j ((p+1)/4) Set x j = m*k + j ; w j = x j 3 + a x j + b; z j = w j ((p+1)/4) If (z j 2 = w j ) then (x j, z j ) is the point to encode m If (z j 2 = w j ) then (x j, z j ) is the point to encode m If no j works then FAIL with Prob. <= 1/2 k If no j works then FAIL with Prob. <= 1/2 k If m is embedded as M(x,y) then m = [x/k] If m is embedded as M(x,y) then m = [x/k]

CPE Advanced Network Security34 Remarks n The efficiency of any ECC depends on how efficient the EC is represented and computations on points. n There are may classes of curves that can be efficiently implemented n There are still may opportunities to improve the current ECCs. ECC implementation is more efficient with finite fields of E(Z p ); where p is a prime number or p = 2 n. ECC implementation is more efficient with finite fields of E(Z p ); where p is a prime number or p = 2 n. n There are many versions that make it hard to agree with a proposed standard one n ECC can be implemented using other protocols. (refer to papers).