Presentation is loading. Please wait.

Presentation is loading. Please wait.

Practical Aspects of Modern Cryptography

Similar presentations


Presentation on theme: "Practical Aspects of Modern Cryptography"β€” Presentation transcript:

1 Practical Aspects of Modern Cryptography
Fall 2016 Tolga Acar Josh Benaloh

2 Diffie-Hellman Key Exchange
Alice Randomly select a large integer π‘Ž and send 𝐴= π‘Œ π‘Ž mod 𝑁. Compute the key 𝐾= 𝐡 π‘Ž mod 𝑁. Bob Randomly select a large integer 𝑏 and send 𝐡= π‘Œ 𝑏 mod 𝑁. Compute the key 𝐾= 𝐴 𝑏 mod 𝑁. 𝐡 π‘Ž = π‘Œ π‘π‘Ž = π‘Œ π‘Žπ‘ = 𝐴 𝑏 October 11, 2016 Practical Aspects of Modern Cryptography

3 The Fundamental Equation
𝑍= π‘Œ 𝑋 mod 𝑁 October 11, 2016 Practical Aspects of Modern Cryptography

4 𝑍= π‘Œ 𝑋 mod 𝑁 One-Way Functions October 11, 2016
Practical Aspects of Modern Cryptography

5 𝑍= π‘Œ 𝑋 mod 𝑁 One-Way Functions
When 𝑋 is unknown, the problem is known as the discrete logarithm and is generally believed to be hard to solve. October 11, 2016 Practical Aspects of Modern Cryptography

6 One-Way Trap-Door Functions
𝑍= π‘Œ 𝑋 mod 𝑁 October 11, 2016 Practical Aspects of Modern Cryptography

7 One-Way Trap-Door Functions
𝑍= π‘Œ 𝑋 mod 𝑁 Recall that this equation is solvable for π‘Œ if the factorization of 𝑁 is known, but is believed to be hard otherwise. October 11, 2016 Practical Aspects of Modern Cryptography

8 RSA Public-Key Cryptosystem
Alice Anyone October 11, 2016 Practical Aspects of Modern Cryptography

9 RSA Public-Key Cryptosystem
Alice Select two large random primes 𝑃 & 𝑄. Anyone October 11, 2016 Practical Aspects of Modern Cryptography

10 RSA Public-Key Cryptosystem
Alice Select two large random primes 𝑃 & 𝑄. Publish the product 𝑁=𝑃𝑄. Anyone October 11, 2016 Practical Aspects of Modern Cryptography

11 RSA Public-Key Cryptosystem
Alice Select two large random primes 𝑃 & 𝑄. Publish the product 𝑁=𝑃𝑄. Anyone To send message π‘Œ to Alice, compute 𝑍= π‘Œ 𝑋 mod 𝑁. October 11, 2016 Practical Aspects of Modern Cryptography

12 RSA Public-Key Cryptosystem
Alice Select two large random primes 𝑃 & 𝑄. Publish the product 𝑁=𝑃𝑄. Anyone To send message π‘Œ to Alice, compute 𝑍= π‘Œ 𝑋 mod 𝑁. Send 𝑍 and 𝑋 to Alice. October 11, 2016 Practical Aspects of Modern Cryptography

13 RSA Public-Key Cryptosystem
Alice Select two large random primes 𝑃 & 𝑄. Publish the product 𝑁=𝑃𝑄. Use knowledge of 𝑃 & 𝑄 to compute π‘Œ. Anyone To send message π‘Œ to Alice, compute 𝑍= π‘Œ 𝑋 mod 𝑁. Send 𝑍 and 𝑋 to Alice. October 11, 2016 Practical Aspects of Modern Cryptography

14 𝑋 mod (π‘ƒβˆ’1)(π‘„βˆ’1)=1 and 0β‰€π‘Œ<𝑁.
Some RSA Details When 𝑁=𝑃𝑄 is the product of distinct primes, π‘Œ 𝑋 mod 𝑁=π‘Œ whenever 𝑋 mod (π‘ƒβˆ’1)(π‘„βˆ’1)=1 and 0β‰€π‘Œ<𝑁. October 11, 2016 Practical Aspects of Modern Cryptography

15 𝑋 mod (π‘ƒβˆ’1)(π‘„βˆ’1)=1 and 0β‰€π‘Œ<𝑁.
Some RSA Details When 𝑁=𝑃𝑄 is the product of distinct primes, π‘Œ 𝑋 mod 𝑁=π‘Œ whenever 𝑋 mod (π‘ƒβˆ’1)(π‘„βˆ’1)=1 and 0β‰€π‘Œ<𝑁. Alice can easily select integers 𝐸 and 𝐷 such that 𝐸×𝐷 mod (π‘ƒβˆ’1)(π‘„βˆ’1)=1. October 11, 2016 Practical Aspects of Modern Cryptography

16 Some RSA Details Encryption: 𝐸(π‘Œ) = π‘Œ 𝐸 mod 𝑁.
Decryption: 𝐷 π‘Œ = π‘Œ 𝐷 mod 𝑁. 𝐷(𝐸(π‘Œ)) = π‘Œ 𝐸 mod 𝑁 𝐷 mod 𝑁 = π‘Œ 𝐸𝐷 mod 𝑁 = π‘Œ October 11, 2016 Practical Aspects of Modern Cryptography

17 Some RSA Details In practice, the encryption exponent 𝐸 is almost always fixed to be 𝐸=65537= October 11, 2016 Practical Aspects of Modern Cryptography

18 Some RSA Details In practice, the encryption exponent 𝐸 is almost always fixed to be 𝐸=65537= The decryption exponent 𝐷 is then computed as 𝐷=(1÷𝐸) mod π‘ƒβˆ’1 (π‘„βˆ’1). October 11, 2016 Practical Aspects of Modern Cryptography

19 Public-Key Directory October 11, 2016
Practical Aspects of Modern Cryptography

20 Public-Key Directory (Recall that 𝐸 is commonly fixed to be 𝐸=65537.)
October 11, 2016 Practical Aspects of Modern Cryptography

21 RSA Signatures October 11, 2016
Practical Aspects of Modern Cryptography

22 RSA Signatures An additional property October 11, 2016
Practical Aspects of Modern Cryptography

23 RSA Signatures An additional property 𝐷(𝐸(π‘Œ))= π‘Œ 𝐸𝐷 mod 𝑁=π‘Œ
October 11, 2016 Practical Aspects of Modern Cryptography

24 RSA Signatures An additional property 𝐷(𝐸(π‘Œ))= π‘Œ 𝐸𝐷 mod 𝑁=π‘Œ
October 11, 2016 Practical Aspects of Modern Cryptography

25 RSA Signatures An additional property 𝐷(𝐸(π‘Œ))= π‘Œ 𝐸𝐷 mod 𝑁=π‘Œ
Only Alice (knowing the factorization of 𝑁) knows 𝐷. Hence only Alice can compute 𝐷(π‘Œ)= π‘Œ 𝐷 mod 𝑁. October 11, 2016 Practical Aspects of Modern Cryptography

26 RSA Signatures An additional property 𝐷(𝐸(π‘Œ))= π‘Œ 𝐸𝐷 mod 𝑁=π‘Œ
Only Alice (knowing the factorization of 𝑁) knows 𝐷. Hence only Alice can compute 𝐷(π‘Œ)= π‘Œ 𝐷 mod 𝑁. This 𝐷(π‘Œ) serves as Alice’s signature on π‘Œ. October 11, 2016 Practical Aspects of Modern Cryptography

27 Certificate Authority
β€œAlice’s public modulus is 𝑁𝐴= …” -- signed CA. October 11, 2016 Practical Aspects of Modern Cryptography

28 Trust Chains Alice certifies Bob’s key. Bob certifies Carol’s key.
If I trust Alice should I accept Carol’s key? October 11, 2016 Practical Aspects of Modern Cryptography

29 Basic Authentication October 11, 2016
Practical Aspects of Modern Cryptography

30 Basic Authentication How can I use RSA to authenticate someone’s identity? October 11, 2016 Practical Aspects of Modern Cryptography

31 Basic Authentication How can I use RSA to authenticate someone’s identity? If Alice’s public key 𝐸 𝐴 , just pick a random message π‘š and send 𝐸 𝐴 (π‘š). October 11, 2016 Practical Aspects of Modern Cryptography

32 Basic Authentication How can I use RSA to authenticate someone’s identity? If Alice’s public key 𝐸 𝐴 , just pick a random message π‘š and send 𝐸 𝐴 (π‘š). If π‘š comes back, I must be talking to Alice. October 11, 2016 Practical Aspects of Modern Cryptography

33 Basic Authentication Should Alice be happy with this method of authentication? October 11, 2016 Practical Aspects of Modern Cryptography

34 Basic Authentication Should Alice be happy with this method of authentication? Bob sends Alice the authentication string 𝑦= β€œI owe Bob $1 million - signed Alice.” October 11, 2016 Practical Aspects of Modern Cryptography

35 Basic Authentication Should Alice be happy with this method of authentication? Bob sends Alice the authentication string 𝑦= β€œI owe Bob $1 million - signed Alice.” Alice dutifully authenticates herself by decrypting (putting her signature on) 𝑦. October 11, 2016 Practical Aspects of Modern Cryptography

36 Basic Authentication What if Alice only returns authentication queries when the decryption has a certain format? October 11, 2016 Practical Aspects of Modern Cryptography

37 RSA Cautions Is it reasonable to sign/decrypt something given to you by someone else? Note that RSA is multiplicative. Can this property be used/abused? October 11, 2016 Practical Aspects of Modern Cryptography

38 RSA Cautions 𝐷 π‘Œ 1 ×𝐷( π‘Œ 2 )=𝐷( π‘Œ 1 Γ— π‘Œ 2 )
𝐷 π‘Œ 1 ×𝐷( π‘Œ 2 )=𝐷( π‘Œ 1 Γ— π‘Œ 2 ) Thus, if I’ve decrypted (or signed) π‘Œ 1 and π‘Œ 2 , I’ve also decrypted (or signed) π‘Œ 1 Γ— π‘Œ 2 . October 11, 2016 Practical Aspects of Modern Cryptography

39 The Hastad Attack Given 𝐸 1 (π‘₯) = π‘₯ 3 mod 𝑛 1 𝐸 2 (π‘₯) = π‘₯ 3 mod 𝑛 2
one can easily compute π‘₯. October 11, 2016 Practical Aspects of Modern Cryptography

40 The Bleichenbacher Attack
PKCS#1 Message Format: 00 01 XX XX ... XX 00 YY YY ... YY random non-zero bytes message October 11, 2016 Practical Aspects of Modern Cryptography

41 β€œMan-in-the-Middle” Attacks
October 11, 2016 Practical Aspects of Modern Cryptography

42 The Practical Side October 11, 2016
Practical Aspects of Modern Cryptography

43 The Practical Side RSA can be used to encrypt any data.
October 11, 2016 Practical Aspects of Modern Cryptography

44 The Practical Side RSA can be used to encrypt any data.
Public-key (asymmetric) cryptography is very inefficient when compared to traditional private-key (symmetric) cryptography. October 11, 2016 Practical Aspects of Modern Cryptography

45 The Practical Side October 11, 2016
Practical Aspects of Modern Cryptography

46 The Practical Side For efficiency, one generally uses RSA or DH to transmit a private (symmetric) key. October 11, 2016 Practical Aspects of Modern Cryptography

47 The Practical Side For efficiency, one generally uses RSA or DH to transmit a private (symmetric) key. The private session key is used to encrypt any subsequent data. October 11, 2016 Practical Aspects of Modern Cryptography

48 The Practical Side For efficiency, one generally uses RSA or DH to transmit a private (symmetric) key. The private session key is used to encrypt any subsequent data. Digital signatures are only used to sign a digest of the message. October 11, 2016 Practical Aspects of Modern Cryptography

49 Public-Key History Whit Diffie and Marty Hellman
1976 New Directions in Cryptography Whit Diffie and Marty Hellman One-Way functions Diffie-Hellman Key Exchange 1978 RSA paper Ron Rivest, Adi Shamir, and Len Adleman RSA Encryption System RSA Digital Signature Mechanism October 11, 2016 Practical Aspects of Modern Cryptography

50 Authenticated Channels
October 11, 2016 Practical Aspects of Modern Cryptography

51 Authenticated Channels
If Alice send a key or other data to Bob using Bob’s certified RSA key, then they have one-sided authentication. October 11, 2016 Practical Aspects of Modern Cryptography

52 Authenticated Channels
If Alice send a key or other data to Bob using Bob’s certified RSA key, then they have one-sided authentication. One-sided authentication is good enough for many applications, but not all. October 11, 2016 Practical Aspects of Modern Cryptography

53 Authenticated Channels
If Alice send a key or other data to Bob using Bob’s certified RSA key, then they have one-sided authentication. One-sided authentication is good enough for many applications, but not all. Alice can take an additional step to authenticate herself to Bob October 11, 2016 Practical Aspects of Modern Cryptography

54 Authenticated Diffie-Hellman
October 11, 2016 Practical Aspects of Modern Cryptography

55 Authenticated Diffie-Hellman
Raw Diffie-Hellman is unauthenticated. October 11, 2016 Practical Aspects of Modern Cryptography

56 Authenticated Diffie-Hellman
Raw Diffie-Hellman is unauthenticated. Several options are available to add one-sided of full authentication. October 11, 2016 Practical Aspects of Modern Cryptography

57 Authenticated Diffie-Hellman
Raw Diffie-Hellman is unauthenticated. Several options are available to add one-sided of full authentication. One or both parties can sign the (unauthenticated) exchanged key. October 11, 2016 Practical Aspects of Modern Cryptography

58 Authenticated Diffie-Hellman
Raw Diffie-Hellman is unauthenticated. Several options are available to add one-sided of full authentication. One or both parties can sign the (unauthenticated) exchanged key. One or both parties can include an authenticate public key in the exchange. October 11, 2016 Practical Aspects of Modern Cryptography

59 Forward Secrecy October 11, 2016
Practical Aspects of Modern Cryptography

60 Forward Secrecy Stuff happens October 11, 2016
Practical Aspects of Modern Cryptography

61 Forward Secrecy Stuff happens … keys get compromised. October 11, 2016
Practical Aspects of Modern Cryptography

62 Forward Secrecy Stuff happens … keys get compromised.
Best practices suggest mitigating damage. October 11, 2016 Practical Aspects of Modern Cryptography

63 Forward Secrecy Stuff happens … keys get compromised.
Best practices suggest mitigating damage. If an RSA decryption key is leaked, … October 11, 2016 Practical Aspects of Modern Cryptography

64 Forward Secrecy Stuff happens … keys get compromised.
Best practices suggest mitigating damage. If an RSA decryption key is leaked, … everything it was ever used for is at risk. October 11, 2016 Practical Aspects of Modern Cryptography

65 Forward Secrecy Stuff happens … keys get compromised.
Best practices suggest mitigating damage. If an RSA decryption key is leaked, … everything it was ever used for is at risk. With DH, a fresh exchange key is generated with each session. October 11, 2016 Practical Aspects of Modern Cryptography

66 Forward Secrecy The principle of forward secrecy is that while a compromised key will reveal all messages from the time of compromise until the key’s replacement, … October 11, 2016 Practical Aspects of Modern Cryptography

67 Forward Secrecy The principle of forward secrecy is that while a compromised key will reveal all messages from the time of compromise until the key’s replacement, … it should not reveal data exchanged prior to the key’s compromise. October 11, 2016 Practical Aspects of Modern Cryptography

68 𝑋 mod (π‘ƒβˆ’1)(π‘„βˆ’1)=1 and 0β‰€π‘Œ<𝑁.
Why Does RSA Work? Fact When 𝑁=𝑃𝑄 is the product of distinct primes, π‘Œπ‘‹ mod 𝑁=π‘Œ whenever 𝑋 mod (π‘ƒβˆ’1)(π‘„βˆ’1)=1 and 0β‰€π‘Œ<𝑁. October 11, 2016 Practical Aspects of Modern Cryptography

69 Fermat’s Little Theorem
If 𝑝 is prime, then π‘₯ π‘βˆ’1 mod 𝑝=1 for all 0<π‘₯<𝑝. Equivalently … If 𝑝 is prime, then π‘₯𝑝 mod 𝑝 = π‘₯ mod 𝑝 for all integers π‘₯. October 11, 2016 Practical Aspects of Modern Cryptography

70 Proof of Fermat’s Little Theorem
The Binomial Theorem π‘₯+𝑦 𝑝 = 𝑖=0 𝑝 𝑝 𝑖 π‘₯ 𝑖 𝑦 π‘βˆ’π‘– where 𝑝 𝑖 = 𝑝! 𝑖! π‘βˆ’π‘– ! October 11, 2016 Practical Aspects of Modern Cryptography

71 Proof of Fermat’s Little Theorem
The Binomial Theorem π‘₯+𝑦 𝑝 = 𝑖=0 𝑝 𝑝 𝑖 π‘₯ 𝑖 𝑦 π‘βˆ’π‘– where 𝑝 𝑖 = 𝑝! 𝑖! π‘βˆ’π‘– ! If 𝑝 is prime, then 𝑝 𝑖 =0 for 0<𝑖<𝑝. October 11, 2016 Practical Aspects of Modern Cryptography

72 Proof of Fermat’s Little Theorem
The Binomial Theorem π‘₯+𝑦 𝑝 = 𝑖=0 𝑝 𝑝 𝑖 π‘₯ 𝑖 𝑦 π‘βˆ’π‘– where 𝑝 𝑖 = 𝑝! 𝑖! π‘βˆ’π‘– ! If 𝑝 is prime, then 𝑝 𝑖 =0 for 0<𝑖<𝑝. Thus, π‘₯+𝑦 𝑝 mod 𝑝=( π‘₯ 𝑝 + 𝑦 𝑝 ) mod 𝑝. October 11, 2016 Practical Aspects of Modern Cryptography

73 Proof of Fermat’s Little Theorem
π‘₯ 𝑝 mod 𝑝=π‘₯ mod 𝑝 October 11, 2016 Practical Aspects of Modern Cryptography

74 Proof of Fermat’s Little Theorem
π‘₯ 𝑝 mod 𝑝=π‘₯ mod 𝑝 By induction on π‘₯… October 11, 2016 Practical Aspects of Modern Cryptography

75 Proof of Fermat’s Little Theorem
π‘₯ 𝑝 mod 𝑝=π‘₯ mod 𝑝 By induction on π‘₯… Basis October 11, 2016 Practical Aspects of Modern Cryptography

76 Proof of Fermat’s Little Theorem
π‘₯ 𝑝 mod 𝑝=π‘₯ mod 𝑝 By induction on π‘₯… Basis If π‘₯=0, then π‘₯𝑝 mod 𝑝=0=π‘₯ mod 𝑝. October 11, 2016 Practical Aspects of Modern Cryptography

77 Proof of Fermat’s Little Theorem
π‘₯ 𝑝 mod 𝑝=π‘₯ mod 𝑝 By induction on π‘₯… Basis If π‘₯=0, then π‘₯𝑝 mod 𝑝=0=π‘₯ mod 𝑝. If π‘₯=1, then π‘₯𝑝 mod 𝑝=1=π‘₯ mod 𝑝. October 11, 2016 Practical Aspects of Modern Cryptography

78 Proof of Fermat’s Little Theorem
Inductive Step October 11, 2016 Practical Aspects of Modern Cryptography

79 Proof of Fermat’s Little Theorem
Inductive Step Assume that π‘₯𝑝 mod 𝑝 = π‘₯ mod 𝑝. October 11, 2016 Practical Aspects of Modern Cryptography

80 Proof of Fermat’s Little Theorem
Inductive Step Assume that π‘₯𝑝 mod 𝑝 = π‘₯ mod 𝑝. Then (π‘₯+1)𝑝 mod 𝑝=(π‘₯𝑝+1𝑝) mod 𝑝 (by the binomial theorem) October 11, 2016 Practical Aspects of Modern Cryptography

81 Proof of Fermat’s Little Theorem
Inductive Step Assume that π‘₯𝑝 mod 𝑝 = π‘₯ mod 𝑝. Then (π‘₯+1)𝑝 mod 𝑝=(π‘₯𝑝+1𝑝) mod 𝑝 =(π‘₯+1) mod 𝑝 (by inductive hypothesis). October 11, 2016 Practical Aspects of Modern Cryptography

82 Proof of Fermat’s Little Theorem
Inductive Step Assume that π‘₯𝑝 mod 𝑝 = π‘₯ mod 𝑝. Then (π‘₯+1)𝑝 mod 𝑝=(π‘₯𝑝+1𝑝) mod 𝑝 =(π‘₯+1) mod 𝑝 (by inductive hypothesis). Hence, π‘₯𝑝 mod 𝑝=π‘₯ mod 𝑝 for integers π‘₯β‰₯0. October 11, 2016 Practical Aspects of Modern Cryptography

83 Proof of Fermat’s Little Theorem
Inductive Step Assume that π‘₯𝑝 mod 𝑝 = π‘₯ mod 𝑝. Then (π‘₯+1)𝑝 mod 𝑝=(π‘₯𝑝+1𝑝) mod 𝑝 =(π‘₯+1) mod 𝑝 (by inductive hypothesis). Hence, π‘₯𝑝 mod 𝑝=π‘₯ mod 𝑝 for integers π‘₯β‰₯0. Also true for negative π‘₯, since (βˆ’π‘₯)𝑝=(βˆ’1)𝑝π‘₯𝑝. October 11, 2016 Practical Aspects of Modern Cryptography

84 Proof of RSA October 11, 2016 Practical Aspects of Modern Cryptography

85 π‘Œ 𝑃 mod 𝑃=π‘Œ whenever 0β‰€π‘Œ<𝑃
Proof of RSA We have shown … π‘Œ 𝑃 mod 𝑃=π‘Œ whenever 0β‰€π‘Œ<𝑃 and 𝑃 is prime. October 11, 2016 Practical Aspects of Modern Cryptography

86 Proof of RSA We have shown … π‘Œ 𝑃 mod 𝑃=π‘Œ whenever 0β‰€π‘Œ<𝑃
and 𝑃 is prime. This can be generalized to show … π‘Œ 𝐾 π‘ƒβˆ’1 π‘„βˆ’1 +1 mod 𝑃𝑄=π‘Œ when 0β‰€π‘Œ<𝑃𝑄 𝑃 and 𝑄 are distinct primes and 𝐾β‰₯0. October 11, 2016 Practical Aspects of Modern Cryptography

87 Corollary of Fermat π‘₯𝑝 mod 𝑝 = π‘₯ mod 𝑝 ⇓ π‘₯ π‘˜ π‘βˆ’1 +1 mod 𝑝 = π‘₯ mod 𝑝 For all prime 𝑝 and π‘˜β‰₯0. October 11, 2016 Practical Aspects of Modern Cryptography

88 Finding Primes October 11, 2016
Practical Aspects of Modern Cryptography

89 Finding Primes Euclid’s proof of the infinity of primes
October 11, 2016 Practical Aspects of Modern Cryptography

90 Finding Primes Euclid’s proof of the infinity of primes
Suppose that the set of all primes were finite. October 11, 2016 Practical Aspects of Modern Cryptography

91 Finding Primes Euclid’s proof of the infinity of primes
Suppose that the set of all primes were finite. Let 𝑁 be the product of all of the primes. October 11, 2016 Practical Aspects of Modern Cryptography

92 Finding Primes Euclid’s proof of the infinity of primes
Suppose that the set of all primes were finite. Let 𝑁 be the product of all of the primes. Consider 𝑁+1. October 11, 2016 Practical Aspects of Modern Cryptography

93 Finding Primes Euclid’s proof of the infinity of primes
Suppose that the set of all primes were finite. Let 𝑁 be the product of all of the primes. Consider 𝑁+1. Is 𝑁+1 prime or composite? October 11, 2016 Practical Aspects of Modern Cryptography

94 Finding Primes Euclid’s proof of the infinity of primes
Suppose that the set of all primes were finite. Let 𝑁 be the product of all of the primes. Consider 𝑁+1. Is 𝑁+1 prime or composite? The prime factors of 𝑁+1 are not among the finite set of primes multiplied to form 𝑁. October 11, 2016 Practical Aspects of Modern Cryptography

95 Finding Primes Euclid’s proof of the infinity of primes
Suppose that the set of all primes were finite. Let 𝑁 be the product of all of the primes. Consider 𝑁+1. Is 𝑁+1 prime or composite? The prime factors of 𝑁+1 are not among the finite set of primes multiplied to form 𝑁. So 𝑁 must be a prime not in the set. October 11, 2016 Practical Aspects of Modern Cryptography

96 Finding Primes Euclid’s proof of the infinity of primes
Suppose that the set of all primes were finite. Let 𝑁 be the product of all of the primes. Consider 𝑁+1. Is 𝑁+1 prime or composite? The prime factors of 𝑁+1 are not among the finite set of primes multiplied to form 𝑁. So 𝑁 must be a prime not in the set. This contradicts the assumption that the set of all primes is finite. October 11, 2016 Practical Aspects of Modern Cryptography

97 The Prime Number Theorem
October 11, 2016 Practical Aspects of Modern Cryptography

98 The Prime Number Theorem
The number of primes less than 𝑁 is approximately 𝑁 ( ln 𝑁 ) . October 11, 2016 Practical Aspects of Modern Cryptography

99 The Prime Number Theorem
The number of primes less than 𝑁 is approximately 𝑁 ( ln 𝑁 ) . Thus, approximately 1 out of every 𝑛 randomly selected 𝑛-bit integers will be prime. October 11, 2016 Practical Aspects of Modern Cryptography

100 But How Do We Find Primes?
October 11, 2016 Practical Aspects of Modern Cryptography

101 Testing Primality October 11, 2016
Practical Aspects of Modern Cryptography

102 Testing Primality Recall Fermat’s Little Theorem
If 𝑝 is prime, then π‘Ž π‘βˆ’1 mod 𝑝=1 for all π‘Ž in the range 0<π‘Ž<𝑝. October 11, 2016 Practical Aspects of Modern Cryptography

103 Testing Primality Recall Fermat’s Little Theorem
If 𝑝 is prime, then π‘Ž π‘βˆ’1 mod 𝑝=1 for all π‘Ž in the range 0<π‘Ž<𝑝. Fact For almost all composite 𝑝 and π‘Ž>1, π‘Ž π‘βˆ’1 mod 𝑝≠1. October 11, 2016 Practical Aspects of Modern Cryptography

104 The Miller-Rabin Primality Test
October 11, 2016 Practical Aspects of Modern Cryptography

105 The Miller-Rabin Primality Test
To test an integer 𝑁 for primality, write 𝑁–1 as 𝑁–1=π‘š2π‘˜ where π‘š is odd. October 11, 2016 Practical Aspects of Modern Cryptography

106 The Miller-Rabin Primality Test
To test an integer 𝑁 for primality, write 𝑁–1 as 𝑁–1=π‘š2π‘˜ where π‘š is odd. Repeat several (many) times October 11, 2016 Practical Aspects of Modern Cryptography

107 The Miller-Rabin Primality Test
To test an integer 𝑁 for primality, write 𝑁–1 as 𝑁–1=π‘š2π‘˜ where π‘š is odd. Repeat several (many) times Select a random π‘Ž in 1<π‘Ž<𝑁–1 October 11, 2016 Practical Aspects of Modern Cryptography

108 The Miller-Rabin Primality Test
To test an integer 𝑁 for primality, write 𝑁–1 as 𝑁–1=π‘š2π‘˜ where π‘š is odd. Repeat several (many) times Select a random π‘Ž in 1<π‘Ž<𝑁–1 Compute π‘Ž π‘š , π‘Ž 2π‘š , π‘Ž 4π‘š , …, π‘Ž (π‘βˆ’1) 2 all mod 𝑁. October 11, 2016 Practical Aspects of Modern Cryptography

109 The Miller-Rabin Primality Test
To test an integer 𝑁 for primality, write 𝑁–1 as 𝑁–1=π‘š2π‘˜ where π‘š is odd. Repeat several (many) times Select a random π‘Ž in 1<π‘Ž<𝑁–1 Compute π‘Ž π‘š , π‘Ž 2π‘š , π‘Ž 4π‘š , …, π‘Ž (π‘βˆ’1) 2 all mod 𝑁. If π‘Ž π‘š =Β±1 or if some π‘Ž 2 𝑖 π‘š =βˆ’1, then 𝑁 is probably prime – continue. October 11, 2016 Practical Aspects of Modern Cryptography

110 The Miller-Rabin Primality Test
To test an integer 𝑁 for primality, write 𝑁–1 as 𝑁–1=π‘š2π‘˜ where π‘š is odd. Repeat several (many) times Select a random π‘Ž in 1<π‘Ž<𝑁–1 Compute π‘Ž π‘š , π‘Ž 2π‘š , π‘Ž 4π‘š , …, π‘Ž (π‘βˆ’1) 2 all mod 𝑁. If π‘Ž π‘š =Β±1 or if some π‘Ž 2 𝑖 π‘š =βˆ’1, then 𝑁 is probably prime – continue. Otherwise, 𝑁 is composite – stop. October 11, 2016 Practical Aspects of Modern Cryptography

111 Sieving for Primes Sieving out multiples of 2
Pick a random starting point 𝑁. N N+1 N+2 N+3 N+4 N+5 N+6 N+7 N+8 N+9 N+10 N+11 Sieving out multiples of 2 October 11, 2016 Practical Aspects of Modern Cryptography

112 Sieving for Primes Sieving out multiples of 2
Pick a random starting point 𝑁. N N+1 N+2 N+3 N+4 N+5 N+6 N+7 N+8 N+9 N+10 N+11 Sieving out multiples of 2 October 11, 2016 Practical Aspects of Modern Cryptography

113 Sieving for Primes Sieving out multiples of 2
Pick a random starting point 𝑁. N N+1 N+2 N+3 N+4 N+5 N+6 N+7 N+8 N+9 N+10 N+11 Sieving out multiples of 2 October 11, 2016 Practical Aspects of Modern Cryptography

114 Sieving for Primes Sieving out multiples of 2
Pick a random starting point 𝑁. N N+1 N+2 N+3 N+4 N+5 N+6 N+7 N+8 N+9 N+10 N+11 Sieving out multiples of 2 October 11, 2016 Practical Aspects of Modern Cryptography

115 Sieving for Primes Sieving out multiples of 2
Pick a random starting point 𝑁. N N+1 N+2 N+3 N+4 N+5 N+6 N+7 N+8 N+9 N+10 N+11 Sieving out multiples of 2 October 11, 2016 Practical Aspects of Modern Cryptography

116 Sieving for Primes Sieving out multiples of 2
Pick a random starting point 𝑁. N N+1 N+2 N+3 N+4 N+5 N+6 N+7 N+8 N+9 N+10 N+11 Sieving out multiples of 2 October 11, 2016 Practical Aspects of Modern Cryptography

117 Sieving for Primes Sieving out multiples of 2
Pick a random starting point 𝑁. N N+1 N+2 N+3 N+4 N+5 N+6 N+7 N+8 N+9 N+10 N+11 Sieving out multiples of 2 October 11, 2016 Practical Aspects of Modern Cryptography

118 Sieving for Primes Sieving out multiples of 3
Pick a random starting point 𝑁. N N+1 N+2 N+3 N+4 N+5 N+6 N+7 N+8 N+9 N+10 N+11 Sieving out multiples of 3 October 11, 2016 Practical Aspects of Modern Cryptography

119 Sieving for Primes Sieving out multiples of 3
Pick a random starting point 𝑁. N N+1 N+2 N+3 N+4 N+5 N+6 N+7 N+8 N+9 N+10 N+11 Sieving out multiples of 3 October 11, 2016 Practical Aspects of Modern Cryptography

120 Sieving for Primes Sieving out multiples of 3
Pick a random starting point 𝑁. N N+1 N+2 N+3 N+4 N+5 N+6 N+7 N+8 N+9 N+10 N+11 Sieving out multiples of 3 October 11, 2016 Practical Aspects of Modern Cryptography

121 Sieving for Primes Sieving out multiples of 3
Pick a random starting point 𝑁. N N+1 N+2 N+3 N+4 N+5 N+6 N+7 N+8 N+9 N+10 N+11 Sieving out multiples of 3 October 11, 2016 Practical Aspects of Modern Cryptography

122 Sieving for Primes Sieving out multiples of 3
Pick a random starting point 𝑁. N N+1 N+2 N+3 N+4 N+5 N+6 N+7 N+8 N+9 N+10 N+11 Sieving out multiples of 3 October 11, 2016 Practical Aspects of Modern Cryptography

123 Sieving for Primes Sieving out multiples of 5
Pick a random starting point 𝑁. N N+1 N+2 N+3 N+4 N+5 N+6 N+7 N+8 N+9 N+10 N+11 Sieving out multiples of 5 October 11, 2016 Practical Aspects of Modern Cryptography

124 Sieving for Primes Sieving out multiples of 5
Pick a random starting point 𝑁. N N+1 N+2 N+3 N+4 N+5 N+6 N+7 N+8 N+9 N+10 N+11 Sieving out multiples of 5 October 11, 2016 Practical Aspects of Modern Cryptography

125 Sieving for Primes Sieving out multiples of 5
Pick a random starting point 𝑁. N N+1 N+2 N+3 N+4 N+5 N+6 N+7 N+8 N+9 N+10 N+11 Sieving out multiples of 5 October 11, 2016 Practical Aspects of Modern Cryptography

126 Sieving for Primes Sieving out multiples of 5
Pick a random starting point 𝑁. N N+1 N+2 N+3 N+4 N+5 N+6 N+7 N+8 N+9 N+10 N+11 Sieving out multiples of 5 October 11, 2016 Practical Aspects of Modern Cryptography

127 Sieving for Primes Sieving out multiples of 5
Pick a random starting point 𝑁. N N+1 N+2 N+3 N+4 N+5 N+6 N+7 N+8 N+9 N+10 N+11 Sieving out multiples of 5 Only a few β€œgood” candidate primes will survive. October 11, 2016 Practical Aspects of Modern Cryptography

128 Reprise of RSA Set-Up October 11, 2016
Practical Aspects of Modern Cryptography

129 Reprise of RSA Set-Up Use sieving to find large candidate primes.
October 11, 2016 Practical Aspects of Modern Cryptography

130 Reprise of RSA Set-Up Use sieving to find large candidate primes.
Use Miller-Rabin on candidate primes to find two almost certainly prime integers 𝑃 and 𝑄. October 11, 2016 Practical Aspects of Modern Cryptography

131 Reprise of RSA Set-Up Use sieving to find large candidate primes.
Use Miller-Rabin on candidate primes to find two almost certainly prime integers 𝑃 and 𝑄. Form public modulus 𝑁=𝑃𝑄. October 11, 2016 Practical Aspects of Modern Cryptography

132 Reprise of RSA Set-Up Use sieving to find large candidate primes.
Use Miller-Rabin on candidate primes to find two almost certainly prime integers 𝑃 and 𝑄. Form public modulus 𝑁=𝑃𝑄. Select public exponent 𝑒 (usually 𝑒=65537). October 11, 2016 Practical Aspects of Modern Cryptography

133 Reprise of RSA Set-Up Use sieving to find large candidate primes.
Use Miller-Rabin on candidate primes to find two almost certainly prime integers 𝑃 and 𝑄. Form public modulus 𝑁=𝑃𝑄. Select public exponent 𝑒 (usually 𝑒=65537). Use extended Euclidean algorithm to compute private exponent 𝑑= 𝑒 βˆ’1 mod (π‘ƒβˆ’1)(π‘„βˆ’1). October 11, 2016 Practical Aspects of Modern Cryptography

134 Reprise of RSA Set-Up Use sieving to find large candidate primes.
Use Miller-Rabin on candidate primes to find two almost certainly prime integers 𝑃 and 𝑄. Form public modulus 𝑁=𝑃𝑄. Select public exponent 𝑒 (usually 𝑒=65537). Use extended Euclidean algorithm to compute private exponent 𝑑= 𝑒 βˆ’1 mod (π‘ƒβˆ’1)(π‘„βˆ’1). Publish public key 𝑁 (and 𝑒). October 11, 2016 Practical Aspects of Modern Cryptography

135 Reprise of RSA Encryption
October 11, 2016 Practical Aspects of Modern Cryptography

136 Reprise of RSA Encryption
Use public key to encrypt message 0β‰€π‘š<𝑁 as October 11, 2016 Practical Aspects of Modern Cryptography

137 Reprise of RSA Encryption
Use public key to encrypt message 0β‰€π‘š<𝑁 as 𝐸 π‘š = π‘š 𝑒 mod 𝑁. October 11, 2016 Practical Aspects of Modern Cryptography

138 Reprise of RSA Encryption
Use public key to encrypt message 0β‰€π‘š<𝑁 as 𝐸 π‘š = π‘š 𝑒 mod 𝑁. Use private decryption exponent 𝑑 to decrypt October 11, 2016 Practical Aspects of Modern Cryptography

139 Reprise of RSA Encryption
Use public key to encrypt message 0β‰€π‘š<𝑁 as 𝐸 π‘š = π‘š 𝑒 mod 𝑁. Use private decryption exponent 𝑑 to decrypt 𝐷 𝐸 π‘š = (π‘š 𝑒 mod 𝑁 ) 𝑑 mod 𝑁 October 11, 2016 Practical Aspects of Modern Cryptography

140 Reprise of RSA Encryption
Use public key to encrypt message 0β‰€π‘š<𝑁 as 𝐸 π‘š = π‘š 𝑒 mod 𝑁. Use private decryption exponent 𝑑 to decrypt 𝐷 𝐸 π‘š = (π‘š 𝑒 mod 𝑁 ) 𝑑 mod 𝑁 = π‘š 𝑒𝑑 mod 𝑁 October 11, 2016 Practical Aspects of Modern Cryptography

141 Reprise of RSA Encryption
Use public key to encrypt message 0β‰€π‘š<𝑁 as 𝐸 π‘š = π‘š 𝑒 mod 𝑁. Use private decryption exponent 𝑑 to decrypt 𝐷 𝐸 π‘š = (π‘š 𝑒 mod 𝑁 ) 𝑑 mod 𝑁 = π‘š 𝑒𝑑 mod 𝑁 =π‘š October 11, 2016 Practical Aspects of Modern Cryptography

142 Reprise of RSA Signatures
October 11, 2016 Practical Aspects of Modern Cryptography

143 Reprise of RSA Signatures
Use private decryption exponent 𝑑 to sign message 0β‰€π‘š<𝑁 as October 11, 2016 Practical Aspects of Modern Cryptography

144 Reprise of RSA Signatures
Use private decryption exponent 𝑑 to sign message 0β‰€π‘š<𝑁 as 𝐷 π‘š = π‘š 𝑑 mod 𝑁. October 11, 2016 Practical Aspects of Modern Cryptography

145 Reprise of RSA Signatures
Use private decryption exponent 𝑑 to sign message 0β‰€π‘š<𝑁 as 𝐷 π‘š = π‘š 𝑑 mod 𝑁. Verify signature by using public key to compute October 11, 2016 Practical Aspects of Modern Cryptography

146 Reprise of RSA Signatures
Use private decryption exponent 𝑑 to sign message 0β‰€π‘š<𝑁 as 𝐷 π‘š = π‘š 𝑑 mod 𝑁. Verify signature by using public key to compute 𝐸 𝐷 π‘š = (π‘š 𝑑 mod 𝑁 ) 𝑒 mod 𝑁 October 11, 2016 Practical Aspects of Modern Cryptography

147 Reprise of RSA Signatures
Use private decryption exponent 𝑑 to sign message 0β‰€π‘š<𝑁 as 𝐷 π‘š = π‘š 𝑑 mod 𝑁. Verify signature by using public key to compute 𝐸 𝐷 π‘š = (π‘š 𝑑 mod 𝑁 ) 𝑒 mod 𝑁 = π‘š 𝑑𝑒 mod 𝑁 October 11, 2016 Practical Aspects of Modern Cryptography

148 Reprise of RSA Signatures
Use private decryption exponent 𝑑 to sign message 0β‰€π‘š<𝑁 as 𝐷 π‘š = π‘š 𝑑 mod 𝑁. Verify signature by using public key to compute 𝐸 𝐷 π‘š = (π‘š 𝑑 mod 𝑁 ) 𝑒 mod 𝑁 = π‘š 𝑑𝑒 mod 𝑁 =π‘š October 11, 2016 Practical Aspects of Modern Cryptography

149 The Digital Signature Algorithm
In 1991, the National Institute of Standards and Technology published a Digital Signature Standard that was intended as an option free of intellectual property constraints. October 11, 2016 Practical Aspects of Modern Cryptography

150 The Digital Signature Algorithm
DSA uses the following parameters Prime 𝑝 – anywhere from 512 to 1024 bits Prime π‘ž – 160 bits such that π‘ž divides π‘βˆ’1 Integer β„Ž in the range 1<β„Ž<π‘βˆ’1 Integer 𝑔= β„Ž (π‘βˆ’1) π‘ž mod 𝑝 Secret integer π‘₯ in the range 1<π‘₯<π‘ž Integer 𝑦= 𝑔 π‘₯ mod 𝑝 October 11, 2016 Practical Aspects of Modern Cryptography

151 The Digital Signature Algorithm
October 11, 2016 Practical Aspects of Modern Cryptography

152 The Digital Signature Algorithm
To sign a 160-bit message 𝑀, October 11, 2016 Practical Aspects of Modern Cryptography

153 The Digital Signature Algorithm
To sign a 160-bit message 𝑀, Generate a random integer π‘˜ with 0<π‘˜<π‘ž, October 11, 2016 Practical Aspects of Modern Cryptography

154 The Digital Signature Algorithm
To sign a 160-bit message 𝑀, Generate a random integer π‘˜ with 0<π‘˜<π‘ž, Compute π‘Ÿ = ( 𝑔 π‘˜ mod 𝑝) mod π‘ž, October 11, 2016 Practical Aspects of Modern Cryptography

155 The Digital Signature Algorithm
To sign a 160-bit message 𝑀, Generate a random integer π‘˜ with 0<π‘˜<π‘ž, Compute π‘Ÿ = ( 𝑔 π‘˜ mod 𝑝) mod π‘ž, Compute 𝑠 = ((𝑀+π‘₯π‘Ÿ)/π‘˜) mod π‘ž. October 11, 2016 Practical Aspects of Modern Cryptography

156 The Digital Signature Algorithm
To sign a 160-bit message 𝑀, Generate a random integer π‘˜ with 0<π‘˜<π‘ž, Compute π‘Ÿ = ( 𝑔 π‘˜ mod 𝑝) mod π‘ž, Compute 𝑠 = ((𝑀+π‘₯π‘Ÿ)/π‘˜) mod π‘ž. The pair (π‘Ÿ,𝑠) is the signature on 𝑀. October 11, 2016 Practical Aspects of Modern Cryptography

157 The Digital Signature Algorithm
October 11, 2016 Practical Aspects of Modern Cryptography

158 The Digital Signature Algorithm
A signature (π‘Ÿ,𝑠) on 𝑀 is verified as follows: October 11, 2016 Practical Aspects of Modern Cryptography

159 The Digital Signature Algorithm
A signature (π‘Ÿ,𝑠) on 𝑀 is verified as follows: Compute 𝑀 = 1/𝑠 π‘šπ‘œπ‘‘ π‘ž, October 11, 2016 Practical Aspects of Modern Cryptography

160 The Digital Signature Algorithm
A signature (π‘Ÿ,𝑠) on 𝑀 is verified as follows: Compute 𝑀 = 1/𝑠 π‘šπ‘œπ‘‘ π‘ž, Compute π‘Ž = 𝑀𝑀 π‘šπ‘œπ‘‘ π‘ž, October 11, 2016 Practical Aspects of Modern Cryptography

161 The Digital Signature Algorithm
A signature (π‘Ÿ,𝑠) on 𝑀 is verified as follows: Compute 𝑀 = 1/𝑠 π‘šπ‘œπ‘‘ π‘ž, Compute π‘Ž = 𝑀𝑀 π‘šπ‘œπ‘‘ π‘ž, Compute 𝑏 = π‘€π‘Ÿ π‘šπ‘œπ‘‘ π‘ž, October 11, 2016 Practical Aspects of Modern Cryptography

162 The Digital Signature Algorithm
A signature (π‘Ÿ,𝑠) on 𝑀 is verified as follows: Compute 𝑀 = 1/𝑠 π‘šπ‘œπ‘‘ π‘ž, Compute π‘Ž = 𝑀𝑀 π‘šπ‘œπ‘‘ π‘ž, Compute 𝑏 = π‘€π‘Ÿ π‘šπ‘œπ‘‘ π‘ž, Compute 𝑣 = ( 𝑔 π‘Ž 𝑦 𝑏 mod 𝑝) mod π‘ž. October 11, 2016 Practical Aspects of Modern Cryptography

163 The Digital Signature Algorithm
A signature (π‘Ÿ,𝑠) on 𝑀 is verified as follows: Compute 𝑀 = 1/𝑠 π‘šπ‘œπ‘‘ π‘ž, Compute π‘Ž = 𝑀𝑀 π‘šπ‘œπ‘‘ π‘ž, Compute 𝑏 = π‘€π‘Ÿ π‘šπ‘œπ‘‘ π‘ž, Compute 𝑣 = ( 𝑔 π‘Ž 𝑦 𝑏 mod 𝑝) mod π‘ž. Accept the signature only if 𝑣 = π‘Ÿ. October 11, 2016 Practical Aspects of Modern Cryptography

164 Elliptic Curve Cryptosystems
October 11, 2016 Practical Aspects of Modern Cryptography

165 Elliptic Curve Cryptosystems
An elliptic curve October 11, 2016 Practical Aspects of Modern Cryptography

166 Elliptic Curve Cryptosystems
An elliptic curve 𝑦 2 = π‘₯ 3 +𝐴π‘₯+𝐡 October 11, 2016 Practical Aspects of Modern Cryptography

167 𝑦 2 = π‘₯ 3 +𝐴π‘₯+𝐡 Elliptic Curves October 11, 2016
Practical Aspects of Modern Cryptography

168 𝑦 2 = π‘₯ 3 +𝐴π‘₯+𝐡 Elliptic Curves October 11, 2016
Practical Aspects of Modern Cryptography

169 𝑦 2 = π‘₯ 3 +𝐴π‘₯+𝐡 Elliptic Curves y x October 11, 2016
Practical Aspects of Modern Cryptography

170 𝑦 2 = π‘₯ 3 +𝐴π‘₯+𝐡 Elliptic Curves y x October 11, 2016
Practical Aspects of Modern Cryptography

171 𝑦 2 = π‘₯ 3 +𝐴π‘₯+𝐡 Elliptic Curves y x October 11, 2016
Practical Aspects of Modern Cryptography

172 𝑦 2 = π‘₯ 3 +𝐴π‘₯+𝐡 Elliptic Curves y x October 11, 2016
Practical Aspects of Modern Cryptography

173 𝑦 2 = π‘₯ 3 +𝐴π‘₯+𝐡 Elliptic Curves y x October 11, 2016
Practical Aspects of Modern Cryptography

174 𝑦 2 = π‘₯ 3 +𝐴π‘₯+𝐡 Elliptic Curves y x October 11, 2016
Practical Aspects of Modern Cryptography

175 𝑦 2 = π‘₯ 3 +𝐴π‘₯+𝐡 Elliptic Curves y x October 11, 2016
Practical Aspects of Modern Cryptography

176 𝑦 2 = π‘₯ 3 +𝐴π‘₯+𝐡 Elliptic Curves y x October 11, 2016
Practical Aspects of Modern Cryptography

177 𝑦 2 = π‘₯ 3 +𝐴π‘₯+𝐡 Elliptic Curves y x October 11, 2016
Practical Aspects of Modern Cryptography

178 Elliptic Curves Intersecting Lines
𝑦 2 = π‘₯ 3 +𝐴π‘₯+𝐡 y x 𝑦=π‘Žπ‘₯+𝑏 October 11, 2016 Practical Aspects of Modern Cryptography

179 Elliptic Curves Intersecting Lines
Non-vertical Lines 𝑦 2 = π‘₯ 3 +𝐴π‘₯+𝐡 𝑦=π‘Žπ‘₯+𝑏 π‘Žπ‘₯+𝑏 2 = π‘₯ 3 +𝐴π‘₯+𝐡 π‘₯ 3 + 𝐴 β€² π‘₯ 2 + 𝐡 β€² π‘₯+ 𝐢 β€² =0 October 11, 2016 Practical Aspects of Modern Cryptography

180 Elliptic Curves Intersecting Lines
π‘₯ 3 + 𝐴 β€² π‘₯ 2 + 𝐡 β€² π‘₯+ 𝐢 β€² =0 y x October 11, 2016 Practical Aspects of Modern Cryptography

181 Elliptic Curves Intersecting Lines
π‘₯ 3 + 𝐴 β€² π‘₯ 2 + 𝐡 β€² π‘₯+ 𝐢 β€² =0 y x 3 solutions October 11, 2016 Practical Aspects of Modern Cryptography

182 Elliptic Curves Intersecting Lines
π‘₯ 3 + 𝐴 β€² π‘₯ 2 + 𝐡 β€² π‘₯+ 𝐢 β€² =0 y x 1 solution October 11, 2016 Practical Aspects of Modern Cryptography

183 Elliptic Curves Intersecting Lines
π‘₯ 3 + 𝐴 β€² π‘₯ 2 + 𝐡 β€² π‘₯+ 𝐢 β€² =0 y x 1 solution October 11, 2016 Practical Aspects of Modern Cryptography

184 Elliptic Curves Intersecting Lines
π‘₯ 3 + 𝐴 β€² π‘₯ 2 + 𝐡 β€² π‘₯+ 𝐢 β€² =0 y x 2 solutions October 11, 2016 Practical Aspects of Modern Cryptography

185 Elliptic Curves Intersecting Lines
Non-vertical Lines 1 intersection point (typical case) 2 intersection points (tangent case) 3 intersection points (typical case) October 11, 2016 Practical Aspects of Modern Cryptography

186 Elliptic Curves Intersecting Lines
Vertical Lines 𝑦 2 = π‘₯ 3 +𝐴π‘₯+𝐡 π‘₯=𝑐 𝑦 2 = 𝑐 3 +𝐴𝑐+𝐡 𝑦 2 = 𝐢 β€² October 11, 2016 Practical Aspects of Modern Cryptography

187 Elliptic Curves Intersecting Lines
Vertical Lines 0 intersection point (typical case) 1 intersection points (tangent case) 2 intersection points (typical case) October 11, 2016 Practical Aspects of Modern Cryptography

188 𝑦 2 = π‘₯ 3 +𝐴π‘₯+𝐡 Elliptic Groups y x October 11, 2016
Practical Aspects of Modern Cryptography

189 𝑦 2 = π‘₯ 3 +𝐴π‘₯+𝐡 Elliptic Groups y x October 11, 2016
Practical Aspects of Modern Cryptography

190 𝑦 2 = π‘₯ 3 +𝐴π‘₯+𝐡 Elliptic Groups 𝑦=π‘Žπ‘₯+𝑏 y x October 11, 2016
Practical Aspects of Modern Cryptography

191 𝑦 2 = π‘₯ 3 +𝐴π‘₯+𝐡 Elliptic Groups 𝑦=π‘Žπ‘₯+𝑏 y x October 11, 2016
Practical Aspects of Modern Cryptography

192 𝑦 2 = π‘₯ 3 +𝐴π‘₯+𝐡 Elliptic Groups 𝑦=π‘Žπ‘₯+𝑏 y x October 11, 2016
Practical Aspects of Modern Cryptography

193 𝑦 2 = π‘₯ 3 +𝐴π‘₯+𝐡 Elliptic Groups 𝑦=π‘Žπ‘₯+𝑏 y x October 11, 2016
Practical Aspects of Modern Cryptography

194 𝑦 2 = π‘₯ 3 +𝐴π‘₯+𝐡 Elliptic Groups y x October 11, 2016
Practical Aspects of Modern Cryptography

195 𝑦 2 = π‘₯ 3 +𝐴π‘₯+𝐡 Elliptic Groups 𝑦=π‘Žπ‘₯+𝑏 y x October 11, 2016
Practical Aspects of Modern Cryptography

196 𝑦 2 = π‘₯ 3 +𝐴π‘₯+𝐡 Elliptic Groups 𝑦=π‘Žπ‘₯+𝑏 y x October 11, 2016
Practical Aspects of Modern Cryptography

197 𝑦 2 = π‘₯ 3 +𝐴π‘₯+𝐡 Elliptic Groups y x October 11, 2016
Practical Aspects of Modern Cryptography

198 𝑦 2 = π‘₯ 3 +𝐴π‘₯+𝐡 Elliptic Groups π‘₯=𝑐 y x October 11, 2016
Practical Aspects of Modern Cryptography

199 Elliptic Groups Add an β€œartificial” point 𝐼 to handle the vertical line case. This point 𝐼 also serves as the group identity value. October 11, 2016 Practical Aspects of Modern Cryptography

200 𝑦 2 = π‘₯ 3 +𝐴π‘₯+𝐡 Elliptic Groups π‘₯=𝑐 y x October 11, 2016
Practical Aspects of Modern Cryptography

201 Elliptic Groups π‘₯ 1 , 𝑦 1 Γ—( π‘₯ 2 , 𝑦 2 )=( π‘₯ 3 , 𝑦 3 )
π‘₯ 1 , 𝑦 1 Γ—( π‘₯ 2 , 𝑦 2 )=( π‘₯ 3 , 𝑦 3 ) π‘₯ 3 = 𝑦 2 – 𝑦 1 π‘₯ 2 – π‘₯ – π‘₯ 1 – π‘₯ 2 𝑦3= βˆ’π‘¦ 𝑦 2 – 𝑦 1 π‘₯ 2 – π‘₯ 1 ( π‘₯ 1 – π‘₯ 3 ) when π‘₯ 1 β‰  π‘₯ 2 October 11, 2016 Practical Aspects of Modern Cryptography

202 Elliptic Groups π‘₯ 1 , 𝑦 1 Γ—( π‘₯ 2 , 𝑦 2 )=( π‘₯ 3 , 𝑦 3 )
π‘₯ 1 , 𝑦 1 Γ—( π‘₯ 2 , 𝑦 2 )=( π‘₯ 3 , 𝑦 3 ) π‘₯ 3 = 3 π‘₯ 1 2 +𝐴 2𝑦1 2 –2 π‘₯ 1 𝑦3=βˆ’ 𝑦 π‘₯ 1 2 +𝐴 2 𝑦 1 ( π‘₯ 1 – π‘₯ 3 ) when π‘₯ 1 = π‘₯ 2 and 𝑦 1 = 𝑦 2 β‰ 0 October 11, 2016 Practical Aspects of Modern Cryptography

203 Elliptic Groups π‘₯ 1 , 𝑦 1 Γ—( π‘₯ 2 , 𝑦 2 )=𝐼 when π‘₯ 1 = π‘₯ 2
π‘₯ 1 , 𝑦 1 Γ—( π‘₯ 2 , 𝑦 2 )=𝐼 when π‘₯ 1 = π‘₯ 2 but 𝑦 1 ≠𝑦2 or 𝑦 1 = 𝑦 2 =0 π‘₯ 1 , 𝑦 1 ×𝐼= π‘₯ 1 , 𝑦 1 =𝐼×( π‘₯ 1 , 𝑦 1 ) 𝐼×𝐼=𝐼 October 11, 2016 Practical Aspects of Modern Cryptography

204 Finite Elliptic Groups
October 11, 2016 Practical Aspects of Modern Cryptography

205 Finite Elliptic Groups
The equations use basic arithmetic operations (addition, subtraction, multiplication, and division) on real values. October 11, 2016 Practical Aspects of Modern Cryptography

206 Finite Elliptic Groups
The equations use basic arithmetic operations (addition, subtraction, multiplication, and division) on real values. But we know how to do modular operations, so we can do the same computations modulo a prime 𝑝. October 11, 2016 Practical Aspects of Modern Cryptography

207 The Elliptic Group 𝐸 𝑝 (𝐴,𝐡)
π‘₯ 1 , 𝑦 1 Γ—( π‘₯ 2 , 𝑦 2 )=( π‘₯ 3 , 𝑦 3 ) π‘₯ 3 = 𝑦 2 – 𝑦 1 π‘₯ 2 – π‘₯ – π‘₯ 1 – π‘₯ 2 𝑦3= βˆ’π‘¦ 𝑦 2 – 𝑦 1 π‘₯ 2 – π‘₯ 1 ( π‘₯ 1 – π‘₯ 3 ) when π‘₯ 1 β‰  π‘₯ 2 October 11, 2016 Practical Aspects of Modern Cryptography

208 The Elliptic Group 𝐸 𝑝 (𝐴,𝐡)
π‘₯ 1 , 𝑦 1 Γ—( π‘₯ 2 , 𝑦 2 )=( π‘₯ 3 , 𝑦 3 ) π‘₯ 3 = 𝑦 2 – 𝑦 1 π‘₯ 2 – π‘₯ – π‘₯ 1 – π‘₯ 2 mod 𝑝 𝑦3= βˆ’π‘¦ 𝑦 2 – 𝑦 1 π‘₯ 2 – π‘₯ π‘₯ 1 – π‘₯ 3 mod 𝑝 when π‘₯ 1 β‰  π‘₯ 2 October 11, 2016 Practical Aspects of Modern Cryptography

209 The Elliptic Group 𝐸 𝑝 (𝐴,𝐡)
π‘₯ 1 , 𝑦 1 Γ—( π‘₯ 2 , 𝑦 2 )=( π‘₯ 3 , 𝑦 3 ) π‘₯ 3 = 3 π‘₯ 1 2 +𝐴 2𝑦1 2 –2 π‘₯ 1 𝑦3=βˆ’ 𝑦 π‘₯ 1 2 +𝐴 2 𝑦 1 ( π‘₯ 1 – π‘₯ 3 ) when π‘₯ 1 = π‘₯ 2 and 𝑦 1 = 𝑦 2 β‰ 0 October 11, 2016 Practical Aspects of Modern Cryptography

210 The Elliptic Group 𝐸 𝑝 (𝐴,𝐡)
π‘₯ 1 , 𝑦 1 Γ—( π‘₯ 2 , 𝑦 2 )=( π‘₯ 3 , 𝑦 3 ) π‘₯ 3 = 3 π‘₯ 1 2 +𝐴 2𝑦1 2 –2 π‘₯ 1 mod 𝑝 𝑦3=βˆ’ 𝑦 π‘₯ 1 2 +𝐴 2 𝑦 π‘₯ 1 – π‘₯ 3 mod 𝑝 when π‘₯ 1 = π‘₯ 2 and 𝑦 1 = 𝑦 2 β‰ 0 October 11, 2016 Practical Aspects of Modern Cryptography

211 The Elliptic Group 𝐸 𝑝 (𝐴,𝐡)
π‘₯ 1 , 𝑦 1 Γ—( π‘₯ 2 , 𝑦 2 )=𝐼 when π‘₯ 1 = π‘₯ 2 but 𝑦 1 ≠𝑦2 or 𝑦 1 = 𝑦 2 =0 π‘₯ 1 , 𝑦 1 ×𝐼= π‘₯ 1 , 𝑦 1 =𝐼×( π‘₯ 1 , 𝑦 1 ) 𝐼×𝐼=𝐼 October 11, 2016 Practical Aspects of Modern Cryptography

212 The Fundamental Equation
𝑍= π‘Œ 𝑋 mod 𝑁 𝑝 October 11, 2016 Practical Aspects of Modern Cryptography

213 The Fundamental Equation
𝑍= π‘Œ 𝑋 in 𝐸 𝑝 (𝐴,𝐡) October 11, 2016 Practical Aspects of Modern Cryptography

214 The Fundamental Equation
𝑍= π‘Œ 𝑋 in 𝐸 𝑝 (𝐴,𝐡) When 𝑍 is unknown, it can be efficiently computed by repeated squaring. October 11, 2016 Practical Aspects of Modern Cryptography

215 The Fundamental Equation
𝑍= π‘Œ 𝑋 in 𝐸 𝑝 (𝐴,𝐡) When 𝑋 is unknown, this version of the discrete logarithm is believed to be quite hard to solve. October 11, 2016 Practical Aspects of Modern Cryptography

216 The Fundamental Equation
𝑍= π‘Œ 𝑋 in 𝐸 𝑝 (𝐴,𝐡) When π‘Œ is unknown, it can be efficiently computed by β€œsophisticated” means. October 11, 2016 Practical Aspects of Modern Cryptography

217 Diffie-Hellman Key Exchange
Alice Randomly select a large integer π‘Ž. Send 𝐴= π‘Œ π‘Ž mod 𝑁. Compute the key 𝐾= 𝐡 π‘Ž mod 𝑁. Bob Randomly select a large integer 𝑏. Send 𝐡= π‘Œ 𝑏 mod 𝑁. Compute the key 𝐾= 𝐴 𝑏 mod 𝑁. 𝐡 π‘Ž = π‘Œ π‘π‘Ž = π‘Œ π‘Žπ‘ = 𝐴 𝑏 October 11, 2016 Practical Aspects of Modern Cryptography

218 Diffie-Hellman Key Exchange
Alice Randomly select a large integer π‘Ž. Send 𝐴= π‘Œ π‘Ž in 𝐸 𝑝 (𝐴,𝐡). Compute the key 𝐾= 𝐡 π‘Ž in 𝐸 𝑝 (𝐴,𝐡). Bob Randomly select a large integer 𝑏. Send 𝐡= π‘Œ 𝑏 in 𝐸 𝑝 (𝐴,𝐡). Compute the key 𝐾= 𝐴 𝑏 in 𝐸 𝑝 (𝐴,𝐡). 𝐡 π‘Ž = π‘Œ π‘π‘Ž = π‘Œ π‘Žπ‘ = 𝐴 𝑏 October 11, 2016 Practical Aspects of Modern Cryptography

219 DSA on Elliptic Curves October 11, 2016
Practical Aspects of Modern Cryptography

220 DSA on Elliptic Curves Almost identical to DSA over the integers.
October 11, 2016 Practical Aspects of Modern Cryptography

221 DSA on Elliptic Curves Almost identical to DSA over the integers.
Replace operations mod 𝑝 and π‘ž with operations in 𝐸 𝑝 (𝐴,𝐡) and 𝐸 π‘ž (𝐴,𝐡). October 11, 2016 Practical Aspects of Modern Cryptography

222 Why use Elliptic Curves?
October 11, 2016 Practical Aspects of Modern Cryptography

223 Why use Elliptic Curves?
The best currently known algorithm for EC discrete logarithms would take about as long to find a 256-bit EC discrete log as the best currently known algorithm for integer discrete logarithms would take to find a 3072-bit discrete log. October 11, 2016 Practical Aspects of Modern Cryptography

224 Why use Elliptic Curves?
The best currently known algorithm for EC discrete logarithms would take about as long to find a 256-bit EC discrete log as the best currently known algorithm for integer discrete logarithms would take to find a 3072-bit discrete log. 256-bit EC algorithms are somewhat faster and use shorter keys than 3072-bit β€œtraditional” algorithms. October 11, 2016 Practical Aspects of Modern Cryptography

225 Why not use Elliptic Curves?
October 11, 2016 Practical Aspects of Modern Cryptography

226 Why not use Elliptic Curves?
EC discrete logarithms have been studied far less than integer discrete logarithms. October 11, 2016 Practical Aspects of Modern Cryptography

227 Why not use Elliptic Curves?
EC discrete logarithms have been studied far less than integer discrete logarithms. It is likely that a fundamental break in integer discrete logs would also yield a fundamental break in EC discrete logs, although the reverse may not be true. October 11, 2016 Practical Aspects of Modern Cryptography

228 Why not use Elliptic Curves?
EC discrete logarithms have been studied far less than integer discrete logarithms. It is likely that a fundamental break in integer discrete logs would also yield a fundamental break in EC discrete logs, although the reverse may not be true. Basic EC operations are more cumbersome than integer operations, so EC is only faster if the keys are much smaller. October 11, 2016 Practical Aspects of Modern Cryptography


Download ppt "Practical Aspects of Modern Cryptography"

Similar presentations


Ads by Google