Mathematical Cryptography Diffie Hellman, Discrete Log Problem, - - PowerPoint PPT Presentation

mathematical cryptography
SMART_READER_LITE
LIVE PREVIEW

Mathematical Cryptography Diffie Hellman, Discrete Log Problem, - - PowerPoint PPT Presentation

Mathematical Cryptography Diffie Hellman, Discrete Log Problem, Collision Algorithms Mentor: Tao Song , Mentee: Lisette del Pino University of Pennsylvania Directed Reading Program May 16, 2020 Mentor: Tao Song , Mentee: Lisette del Pino


slide-1
SLIDE 1

Mathematical Cryptography

Diffie Hellman, Discrete Log Problem, Collision Algorithms Mentor: Tao Song , Mentee: Lisette del Pino

University of Pennsylvania Directed Reading Program

May 16, 2020

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-2
SLIDE 2

Diffie Hellman Public Key Exchange

A Privacy Dillema

You and your friend want to exchange secret messages, in this case, these numbers translate to words. You and your friend live very far away from each other and can’t meet up to share secrets. What do you do?

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-3
SLIDE 3

Diffie Hellman Public Key Exchange

A Privacy Dillema

You and your friend want to exchange secret messages, in this case, these numbers translate to words. You and your friend live very far away from each other and can’t meet up to share secrets. What do you do?

1 First, pick prime p, and a nonzero integer g mod p. Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-4
SLIDE 4

Diffie Hellman Public Key Exchange

A Privacy Dillema

You and your friend want to exchange secret messages, in this case, these numbers translate to words. You and your friend live very far away from each other and can’t meet up to share secrets. What do you do?

1 First, pick prime p, and a nonzero integer g mod p. 2 You: pick a secret integer a. Compute A ≡ ga mod p Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-5
SLIDE 5

Diffie Hellman Public Key Exchange

A Privacy Dillema

You and your friend want to exchange secret messages, in this case, these numbers translate to words. You and your friend live very far away from each other and can’t meet up to share secrets. What do you do?

1 First, pick prime p, and a nonzero integer g mod p. 2 You: pick a secret integer a. Compute A ≡ ga mod p 3 Your friend: pick a secret integer b, Compute B ≡ gb mod p Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-6
SLIDE 6

Diffie Hellman Public Key Exchange

A Privacy Dillema

You and your friend want to exchange secret messages, in this case, these numbers translate to words. You and your friend live very far away from each other and can’t meet up to share secrets. What do you do?

1 First, pick prime p, and a nonzero integer g mod p. 2 You: pick a secret integer a. Compute A ≡ ga mod p 3 Your friend: pick a secret integer b, Compute B ≡ gb mod p 4 Send A to your friend. Your friend sends B to you. Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-7
SLIDE 7

Diffie Hellman Public Key Exchange

A Privacy Dillema

You and your friend want to exchange secret messages, in this case, these numbers translate to words. You and your friend live very far away from each other and can’t meet up to share secrets. What do you do?

1 First, pick prime p, and a nonzero integer g mod p. 2 You: pick a secret integer a. Compute A ≡ ga mod p 3 Your friend: pick a secret integer b, Compute B ≡ gb mod p 4 Send A to your friend. Your friend sends B to you. 5 In private, you compute B′ ≡ Ba mod p Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-8
SLIDE 8

Diffie Hellman Public Key Exchange

A Privacy Dillema

You and your friend want to exchange secret messages, in this case, these numbers translate to words. You and your friend live very far away from each other and can’t meet up to share secrets. What do you do?

1 First, pick prime p, and a nonzero integer g mod p. 2 You: pick a secret integer a. Compute A ≡ ga mod p 3 Your friend: pick a secret integer b, Compute B ≡ gb mod p 4 Send A to your friend. Your friend sends B to you. 5 In private, you compute B′ ≡ Ba mod p 6 In private, your friend computes A′ ≡ Ab mod p Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-9
SLIDE 9

Diffie Hellman Public Key Exchange

A Privacy Dillema

You and your friend want to exchange secret messages, in this case, these numbers translate to words. You and your friend live very far away from each other and can’t meet up to share secrets. What do you do?

1 First, pick prime p, and a nonzero integer g mod p. 2 You: pick a secret integer a. Compute A ≡ ga mod p 3 Your friend: pick a secret integer b, Compute B ≡ gb mod p 4 Send A to your friend. Your friend sends B to you. 5 In private, you compute B′ ≡ Ba mod p 6 In private, your friend computes A′ ≡ Ab mod p 7 This is the shared value. B′ and A′ are the same. Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-10
SLIDE 10

Diffie Hellman Public Key Exchange

A Privacy Dillema

You and your friend want to exchange secret messages, in this case, these numbers translate to words. You and your friend live very far away from each other and can’t meet up to share secrets. What do you do?

1 First, pick prime p, and a nonzero integer g mod p. 2 You: pick a secret integer a. Compute A ≡ ga mod p 3 Your friend: pick a secret integer b, Compute B ≡ gb mod p 4 Send A to your friend. Your friend sends B to you. 5 In private, you compute B′ ≡ Ba mod p 6 In private, your friend computes A′ ≡ Ab mod p 7 This is the shared value. B′ and A′ are the same. 8 Proof: A′ ≡ Ba ≡ gba ≡ Ab ≡ B′ mod p Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-11
SLIDE 11

A Numerical Example of the DHKE

Let’s try an explicit example with relatively small numbers. In practice, you should pick primes about 4000 bits long.

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-12
SLIDE 12

A Numerical Example of the DHKE

Let’s try an explicit example with relatively small numbers. In practice, you should pick primes about 4000 bits long.

1 First, pick prime p = 941, and a nonzero integer g = 627 mod

941. Recall eavesdroppers know these values : A, B, ga, gb, g, p And they need to find: gab This problem is no harder than the Discrete Logarithm Problem

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-13
SLIDE 13

A Numerical Example of the DHKE

Let’s try an explicit example with relatively small numbers. In practice, you should pick primes about 4000 bits long.

1 First, pick prime p = 941, and a nonzero integer g = 627 mod

941.

2 You: pick a secret integer a = 347. Compute A = 390

Recall eavesdroppers know these values : A, B, ga, gb, g, p And they need to find: gab This problem is no harder than the Discrete Logarithm Problem

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-14
SLIDE 14

A Numerical Example of the DHKE

Let’s try an explicit example with relatively small numbers. In practice, you should pick primes about 4000 bits long.

1 First, pick prime p = 941, and a nonzero integer g = 627 mod

941.

2 You: pick a secret integer a = 347. Compute A = 390 3 Your friend: pick a secret integer b = 781, Compute B = 691

Recall eavesdroppers know these values : A, B, ga, gb, g, p And they need to find: gab This problem is no harder than the Discrete Logarithm Problem

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-15
SLIDE 15

A Numerical Example of the DHKE

Let’s try an explicit example with relatively small numbers. In practice, you should pick primes about 4000 bits long.

1 First, pick prime p = 941, and a nonzero integer g = 627 mod

941.

2 You: pick a secret integer a = 347. Compute A = 390 3 Your friend: pick a secret integer b = 781, Compute B = 691 4 Send A to your friend. Your friend sends B to you.

Recall eavesdroppers know these values : A, B, ga, gb, g, p And they need to find: gab This problem is no harder than the Discrete Logarithm Problem

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-16
SLIDE 16

A Numerical Example of the DHKE

Let’s try an explicit example with relatively small numbers. In practice, you should pick primes about 4000 bits long.

1 First, pick prime p = 941, and a nonzero integer g = 627 mod

941.

2 You: pick a secret integer a = 347. Compute A = 390 3 Your friend: pick a secret integer b = 781, Compute B = 691 4 Send A to your friend. Your friend sends B to you. 5 The shared value is 470 ≡ 627347∗781 mod 941

Recall eavesdroppers know these values : A, B, ga, gb, g, p And they need to find: gab This problem is no harder than the Discrete Logarithm Problem

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-17
SLIDE 17

Discrete Logarithm Problem

Recall that computing the shared value gab is no harder than solving the Discrete Log Problem.

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-18
SLIDE 18

Discrete Logarithm Problem

Recall that computing the shared value gab is no harder than solving the Discrete Log Problem. Fermat’s Little Theorem: if p is prime, any integer g gives us gp−1 ≡ 1 mod p

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-19
SLIDE 19

Discrete Logarithm Problem

Recall that computing the shared value gab is no harder than solving the Discrete Log Problem. Fermat’s Little Theorem: if p is prime, any integer g gives us gp−1 ≡ 1 mod p recall elements of a finite multiplicative group F∗

p with a generator

g are: 1, g1, g2, ..., gp−2

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-20
SLIDE 20

Discrete Logarithm Problem

Recall that computing the shared value gab is no harder than solving the Discrete Log Problem. Fermat’s Little Theorem: if p is prime, any integer g gives us gp−1 ≡ 1 mod p recall elements of a finite multiplicative group F∗

p with a generator

g are: 1, g1, g2, ..., gp−2 where gp−1 ≡ 1 mod p by Fermat’s Little Theorem.

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-21
SLIDE 21

Discrete Logarithm Problem

Recall that computing the shared value gab is no harder than solving the Discrete Log Problem.

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-22
SLIDE 22

Discrete Logarithm Problem

Recall that computing the shared value gab is no harder than solving the Discrete Log Problem. Discrete Log Problem: Given a primitive root (generator) g of a finite group G = F∗

p

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-23
SLIDE 23

Discrete Logarithm Problem

Recall that computing the shared value gab is no harder than solving the Discrete Log Problem. Discrete Log Problem: Given a primitive root (generator) g of a finite group G = F∗

p and h = 0 ∈ G = F∗

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-24
SLIDE 24

Discrete Logarithm Problem

Recall that computing the shared value gab is no harder than solving the Discrete Log Problem. Discrete Log Problem: Given a primitive root (generator) g of a finite group G = F∗

p and h = 0 ∈ G = F∗

find an x such that gx ≡ h mod p

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-25
SLIDE 25

Discrete Logarithm Problem

Discrete Log Problem: find an x such that gx ≡ h mod p

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-26
SLIDE 26

Discrete Logarithm Problem

Discrete Log Problem: find an x such that gx ≡ h mod p Notice that if there is one such x, there are many. The solution is not unique!

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-27
SLIDE 27

Discrete Logarithm Problem

Discrete Log Problem: find an x such that gx ≡ h mod p Notice that if there is one such x, there are many. The solution is not unique! Proof: if x solves gx ≡ h mod p, then so does x + k(p − 1)∀k

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-28
SLIDE 28

Discrete Logarithm Problem

Discrete Log Problem: find an x such that gx ≡ h mod p Notice that if there is one such x, there are many. The solution is not unique! Proof: if x solves gx ≡ h mod p, then so does x + k(p − 1)∀k we have: gx+k(p−1) = gxgp−1k = h ∗ 1k ≡ h mod p

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-29
SLIDE 29

Discrete Logarithm Problem

Discrete Log Problem: find an x such that gx ≡ h mod p

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-30
SLIDE 30

Discrete Logarithm Problem

Discrete Log Problem: find an x such that gx ≡ h mod p We can also restate the D.L.P in terms of Group Theory:

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-31
SLIDE 31

Discrete Logarithm Problem

Discrete Log Problem: find an x such that gx ≡ h mod p We can also restate the D.L.P in terms of Group Theory: Let g ∈ G, G is a finite group. x is a positive integer and star is the group operation. gx = g ∗ g ∗ g ∗ ... ∗ g

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-32
SLIDE 32

Order of a Group, Order of an Element

The order of a group is its cardinality.

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-33
SLIDE 33

Order of a Group, Order of an Element

The order of a group is its cardinality. The order of an element a of that group is:

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-34
SLIDE 34

Order of a Group, Order of an Element

The order of a group is its cardinality. The order of an element a of that group is: a postive integer d s.t ad = e, where e is the identity element.

  • therwise, infinite order.

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-35
SLIDE 35

Big O

We need to quantify difficulty of the Discrete Logarithm Problem

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-36
SLIDE 36

Big O

We need to quantify difficulty of the Discrete Logarithm Problem Big O: f (x) = O(g(x)) if there exist positive constants c and C s.t. f (x) ≤ cg(x), ∀x ≥ C

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-37
SLIDE 37

Big O

We need to quantify difficulty of the Discrete Logarithm Problem Big O: f (x) = O(g(x)) if there exist positive constants c and C s.t. f (x) ≤ cg(x), ∀x ≥ C also, lim

x→+∞

f (x) g(x) exists and is finite

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-38
SLIDE 38

Brute Force the Discrete Log

We need to quantify difficulty of the Discrete Logarithm Problem

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-39
SLIDE 39

Brute Force the Discrete Log

We need to quantify difficulty of the Discrete Logarithm Problem Since our group has order p and we are applying group operations at most p times, D.L.P runtime is O(p)

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-40
SLIDE 40

Brute Force the Discrete Log

We need to quantify difficulty of the Discrete Logarithm Problem Since our group has order p and we are applying group operations at most p times, D.L.P runtime is O(p) we chose our prime p to be a k-bit number (so a binary number), so it’s approximately 2k

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-41
SLIDE 41

Brute Force the Discrete Log

We need to quantify difficulty of the Discrete Logarithm Problem Since our group has order p and we are applying group operations at most p times, D.L.P runtime is O(p) we chose our prime p to be a k-bit number (so a binary number), so it’s approximately 2k For our computer then, the runtime is O(2k) for the trial and error method. Pretty awful.

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-42
SLIDE 42

Fast Exponentiation

Computers brute forcing the D.L.P use the Fast Exponentiation Method

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-43
SLIDE 43

Fast Exponentiation

Computers brute forcing the D.L.P use the Fast Exponentiation Method (A2 mod C = A∗A mod C = A mod C∗A mod C( mod C)

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-44
SLIDE 44

Fast Exponentiation

Computers brute forcing the D.L.P use the Fast Exponentiation Method (A2 mod C = A∗A mod C = A mod C∗A mod C( mod C) For our computer then, the runtime is O(2k ∗ k) for the trial and error method. Still exponential time.

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-45
SLIDE 45

Shanks Baby-Step Giant-Step Algorithm

SBSGS runtime: O(

  • (N))

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-46
SLIDE 46

Shanks Baby-Step Giant-Step Algorithm

SBSGS runtime: O(

  • (N))

Let G be a finite group.

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-47
SLIDE 47

Shanks Baby-Step Giant-Step Algorithm

SBSGS runtime: O(

  • (N))

Let G be a finite group. Let g ∈ G is an element with order N ≥ 2.

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-48
SLIDE 48

Shanks Baby-Step Giant-Step Algorithm

SBSGS runtime: O(

  • (N))

Let G be a finite group. Let g ∈ G is an element with order N ≥ 2. Then we can find x, where gx ≡ h mod p, in at most O( √ NlogN) steps

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-49
SLIDE 49

Shanks Baby-Step Giant-Step Algorithm

SBSGS runtime: O(

  • (N))

Let G be a finite group. Let g ∈ G is an element with order N ≥ 2. Then we can find x, where gx ≡ h mod p, in at most O( √ NlogN) steps

1 Let n = 1 + floor(

√ N), so that n ≥ √ N

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-50
SLIDE 50

Shanks Baby-Step Giant-Step Algorithm

SBSGS runtime: O(

  • (N))

Let G be a finite group. Let g ∈ G is an element with order N ≥ 2. Then we can find x, where gx ≡ h mod p, in at most O( √ NlogN) steps

1 Let n = 1 + floor(

√ N), so that n ≥ √ N

2 Create two lists (use a hash table for efficient lookup!) Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-51
SLIDE 51

Shanks Baby-Step Giant-Step Algorithm

SBSGS runtime: O(

  • (N))

Let G be a finite group. Let g ∈ G is an element with order N ≥ 2. Then we can find x, where gx ≡ h mod p, in at most O( √ NlogN) steps

1 Let n = 1 + floor(

√ N), so that n ≥ √ N

2 Create two lists (use a hash table for efficient lookup!) 3 List 1: e, g, g2, ...gn (recall n ≥

√ N)

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-52
SLIDE 52

Shanks Baby-Step Giant-Step Algorithm

SBSGS runtime: O(

  • (N))

Let G be a finite group. Let g ∈ G is an element with order N ≥ 2. Then we can find x, where gx ≡ h mod p, in at most O( √ NlogN) steps

1 Let n = 1 + floor(

√ N), so that n ≥ √ N

2 Create two lists (use a hash table for efficient lookup!) 3 List 1: e, g, g2, ...gn (recall n ≥

√ N)

4 List 2: h, h ∗ g−n, h ∗ g−2n, ..., h ∗ gn2 Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-53
SLIDE 53

Shanks Baby-Step Giant-Step Algorithm

SBSGS runtime: O(

  • (N))

Let G be a finite group. Let g ∈ G is an element with order N ≥ 2. Then we can find x, where gx ≡ h mod p, in at most O( √ NlogN) steps

1 Let n = 1 + floor(

√ N), so that n ≥ √ N

2 Create two lists (use a hash table for efficient lookup!) 3 List 1: e, g, g2, ...gn (recall n ≥

√ N)

4 List 2: h, h ∗ g−n, h ∗ g−2n, ..., h ∗ gn2 5 Find a match between your two lists. If it exists, it’s

gi = hg−jn, i, j indices

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-54
SLIDE 54

Shanks Baby-Step Giant-Step Algorithm

SBSGS runtime: O(

  • (N))

Let G be a finite group. Let g ∈ G is an element with order N ≥ 2. Then we can find x, where gx ≡ h mod p, in at most O( √ NlogN) steps

1 Let n = 1 + floor(

√ N), so that n ≥ √ N

2 Create two lists (use a hash table for efficient lookup!) 3 List 1: e, g, g2, ...gn (recall n ≥

√ N)

4 List 2: h, h ∗ g−n, h ∗ g−2n, ..., h ∗ gn2 5 Find a match between your two lists. If it exists, it’s

gi = hg−jn, i, j indices

6 Then x = i + jn is a solution to gx ≡ h mod p Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-55
SLIDE 55

Shanks Baby-Step Giant-Step Algorithm Example

1 Use order of the group as estimate. Solve 3x ≡ 19mod59 Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-56
SLIDE 56

Shanks Baby-Step Giant-Step Algorithm Example

1 Use order of the group as estimate. Solve 3x ≡ 19mod59 2 Set n = 8, so n ≥ √p − 1 Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-57
SLIDE 57

Shanks Baby-Step Giant-Step Algorithm Example

1 Use order of the group as estimate. Solve 3x ≡ 19mod59 2 Set n = 8, so n ≥ √p − 1

31 ≡ 3 mod 59 3−1 ≡ 20 mod 59 32 ≡ 9 mod 59 3−8 ≡ 208 mod 59 ≡ 5 mod 59 33 ≡ 27 mod 59 19(3−8) ≡ 19(208) ≡ 19(5) ≡ 36 mod 59 34 ≡ 22 mod 59 19(3−16) ≡ 19(2016) ≡ 19(25) ≡ 3 mod 59 35 ≡ 7 mod 59 36 ≡ 21 mod 59 37 ≡ 4 mod 59 38 ≡ 12 mod 59

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-58
SLIDE 58

Shanks Baby-Step Giant-Step Algorithm Example

1 Use order of the group as estimate. Solve 3x ≡ 19mod59 2 Set n = 8, so n ≥ √p − 1

31 ≡ 3 mod 59 3−1 ≡ 20 mod 59 32 ≡ 9 mod 59 3−8 ≡ 208 mod 59 ≡ 5 mod 59 33 ≡ 27 mod 59 19(3−8) ≡ 19(208) ≡ 19(5) ≡ 36 mod 59 34 ≡ 22 mod 59 19(3−16) ≡ 19(2016) ≡ 19(25) ≡ 3 mod 59 35 ≡ 7 mod 59 36 ≡ 21 mod 59 37 ≡ 4 mod 59 38 ≡ 12 mod 59

3 We’re done! We found a match! Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-59
SLIDE 59

Shanks Baby-Step Giant-Step Algorithm Example

1 Use order of the group as estimate. Solve 3x ≡ 19mod59 2 Set n = 8, so n ≥ √p − 1

31 ≡ 3 mod 59 3−1 ≡ 20 mod 59 32 ≡ 9 mod 59 3−8 ≡ 208 mod 59 ≡ 5 mod 59 33 ≡ 27 mod 59 19(3−8) ≡ 19(208) ≡ 19(5) ≡ 36 mod 59 34 ≡ 22 mod 59 19(3−16) ≡ 19(2016) ≡ 19(25) ≡ 3 mod 59 35 ≡ 7 mod 59 36 ≡ 21 mod 59 37 ≡ 4 mod 59 38 ≡ 12 mod 59

3 We’re done! We found a match! 4 then, 31 ≡ 19(2016) mod 59 Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-60
SLIDE 60

Shanks Baby-Step Giant-Step Algorithm Example

1 Use order of the group as estimate. Solve 3x ≡ 19mod59 2 Set n = 8, so n ≥ √p − 1

31 ≡ 3 mod 59 3−1 ≡ 20 mod 59 32 ≡ 9 mod 59 3−8 ≡ 208 mod 59 ≡ 5 mod 59 33 ≡ 27 mod 59 19(3−8) ≡ 19(208) ≡ 19(5) ≡ 36 mod 59 34 ≡ 22 mod 59 19(3−16) ≡ 19(2016) ≡ 19(25) ≡ 3 mod 59 35 ≡ 7 mod 59 36 ≡ 21 mod 59 37 ≡ 4 mod 59 38 ≡ 12 mod 59

3 We’re done! We found a match! 4 then, 31 ≡ 19(2016) mod 59 5 and according to our algorithm, x = 1 + 16 = 17 Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-61
SLIDE 61

Shanks Baby-Step Giant-Step Algorithm Example

1 Use order of the group as estimate. Solve 3x ≡ 19mod59 2 Set n = 8, so n ≥ √p − 1

31 ≡ 3 mod 59 3−1 ≡ 20 mod 59 32 ≡ 9 mod 59 3−8 ≡ 208 mod 59 ≡ 5 mod 59 33 ≡ 27 mod 59 19(3−8) ≡ 19(208) ≡ 19(5) ≡ 36 mod 59 34 ≡ 22 mod 59 19(3−16) ≡ 19(2016) ≡ 19(25) ≡ 3 mod 59 35 ≡ 7 mod 59 36 ≡ 21 mod 59 37 ≡ 4 mod 59 38 ≡ 12 mod 59

3 We’re done! We found a match! 4 then, 31 ≡ 19(2016) mod 59 5 and according to our algorithm, x = 1 + 16 = 17 6 Thus, 317 ≡ 19 mod 59 Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-62
SLIDE 62

Chinese Remainder Theorem

Let m1, m2, ...mk be a collection of pairwise relatively prime

  • integers. Just means:

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-63
SLIDE 63

Chinese Remainder Theorem

Let m1, m2, ...mk be a collection of pairwise relatively prime

  • integers. Just means:

gcd(mi, mj) = 1, ∀i = j

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-64
SLIDE 64

Chinese Remainder Theorem

Let m1, m2, ...mk be a collection of pairwise relatively prime

  • integers. Just means:

gcd(mi, mj) = 1, ∀i = j Let a1, ..., ak be arbritary integers

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-65
SLIDE 65

Chinese Remainder Theorem

Let m1, m2, ...mk be a collection of pairwise relatively prime

  • integers. Just means:

gcd(mi, mj) = 1, ∀i = j Let a1, ..., ak be arbritary integers Then the system of congruences: x ≡ a1 mod m1, x ≡ a2 mod m2, ..., x ≡ ak mod mk has a solution x = c mod m1 ∗ ... ∗ mk that is unique.

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-66
SLIDE 66

Chinese Remainder Theorem

Let m1, m2, ...mk be a collection of pairwise relatively prime

  • integers. Just means:

gcd(mi, mj) = 1, ∀i = j Let a1, ..., ak be arbritary integers Then the system of congruences: x ≡ a1 mod m1, x ≡ a2 mod m2, ..., x ≡ ak mod mk has a solution x = c mod m1 ∗ ... ∗ mk that is unique. The C.R.T allows us to solve systems of modular congruences.

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-67
SLIDE 67

Pohlig Hellman Algorithm Procedure

G = F ∗

p , g ∈ G has a prime power order.

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-68
SLIDE 68

Pohlig Hellman Algorithm Procedure

G = F ∗

p , g ∈ G has a prime power order.

g ∈ G has order qe, so gqe ≡ e mod p

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-69
SLIDE 69

Pohlig Hellman Algorithm Procedure

G = F ∗

p , g ∈ G has a prime power order.

g ∈ G has order qe, so gqe ≡ e mod p Then this algorithm lets us solve D.L.P in O(Sqe) steps.

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-70
SLIDE 70

Pohlig Hellman Algorithm Procedure

G = F ∗

p , g ∈ G has a prime power order.

g ∈ G has order qe, so gqe ≡ e mod p Then this algorithm lets us solve D.L.P in O(Sqe) steps. In our worst case, where we can’t decompose p into small primes, we use Shanks instead, so qe = ge1/2 = √ N

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-71
SLIDE 71

Pohlig Hellman Algorithm Procedure

if our order factors into primes, then: N = qe2

2 , qe2 2 , ..., qet t

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-72
SLIDE 72

Pohlig Hellman Algorithm Procedure

if our order factors into primes, then: N = qe2

2 , qe2 2 , ..., qet t

Then we solve D.L.P in O(t

i=1 Sqiei + logN)

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-73
SLIDE 73

Pohlig Hellman Algorithm Procedure

if our order factors into primes, then: N = qe2

2 , qe2 2 , ..., qet t

Then we solve D.L.P in O(t

i=1 Sqiei + logN)

Let’s look at the procedure

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-74
SLIDE 74

Pohlig Hellman Algorithm Procedure

1 ∀1 ≤ i ≤ t, let gi = gN/q ei i

and let hi = hN/q

ei i Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-75
SLIDE 75

Pohlig Hellman Algorithm Procedure

1 ∀1 ≤ i ≤ t, let gi = gN/q ei i

and let hi = hN/q

ei i 2 since gi has prime power order qeis

i , we meed to solve each

Discrete Log Problem gy

i = hi

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-76
SLIDE 76

Pohlig Hellman Algorithm Procedure

1 ∀1 ≤ i ≤ t, let gi = gN/q ei i

and let hi = hN/q

ei i 2 since gi has prime power order qeis

i , we meed to solve each

Discrete Log Problem gy

i = hi

3 Use the Chinese Remainder Theorem to solve each modular

congruence x1 ≡ y1 mod qe1

1 , ..., xt ≡ yt

mod qet

t

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-77
SLIDE 77

Pohlig Hellman Algorithm Runtime

Why that runtime?

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-78
SLIDE 78

Pohlig Hellman Algorithm Runtime

Why that runtime? Step 1, solving each Discrete Log, takes at most as long as it takes to solve that Discrete Log using Shanks, but it’s a very small finite group, since our order factored into small primes.

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-79
SLIDE 79

Pohlig Hellman Algorithm Runtime

Why that runtime? Step 1, solving each Discrete Log, takes at most as long as it takes to solve that Discrete Log using Shanks, but it’s a very small finite group, since our order factored into small primes. In reality, we might be able to get a much smaller runtime than Shanks, which is why we write that step 1 takes: O(Sqie1 + ... + Sqe

t t)

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-80
SLIDE 80

Pohlig Hellman Algorithm Runtime

Why that runtime? Step 1, solving each Discrete Log, takes at most as long as it takes to solve that Discrete Log using Shanks, but it’s a very small finite group, since our order factored into small primes. In reality, we might be able to get a much smaller runtime than Shanks, which is why we write that step 1 takes: O(Sqie1 + ... + Sqe

t t)

And Step 2 has a neglifible computation time. Solving modular congrunces using C.R.T tajes only O(logN) steps

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-81
SLIDE 81

Pohlig Hellman Algorithm Example

1 Solve 3x ≡ 22 mod 31 Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-82
SLIDE 82

Pohlig Hellman Algorithm Example

1 Solve 3x ≡ 22 mod 31 2 Find relatively prime factors of 30, 5 ∗ 6 Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-83
SLIDE 83

Pohlig Hellman Algorithm Example

1 Solve 3x ≡ 22 mod 31 2 Find relatively prime factors of 30, 5 ∗ 6 3 set first equation using first factor

x = 50a0 + 51a1 = a0 + 5a1

4 raise to second factor

(3a0+5a1)6 ≡ 226 mod 31

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-84
SLIDE 84

Pohlig Hellman Algorithm Example

1 Then,

36a0+30a1 ≡ 226 mod 31

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-85
SLIDE 85

Pohlig Hellman Algorithm Example

1 Then,

36a0+30a1 ≡ 226 mod 31 36a0(3a1)30 ≡ 36a0 ∗ 1 ≡ 8 mod 31 by F.L.T

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-86
SLIDE 86

Pohlig Hellman Algorithm Example

1 Then,

36a0+30a1 ≡ 226 mod 31 36a0(3a1)30 ≡ 36a0 ∗ 1 ≡ 8 mod 31 by F.L.T (36)a0 = 229a0 = 16a0 ≡ 8 mod 31

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-87
SLIDE 87

Pohlig Hellman Algorithm Example

1 Then,

36a0+30a1 ≡ 226 mod 31 36a0(3a1)30 ≡ 36a0 ∗ 1 ≡ 8 mod 31 by F.L.T (36)a0 = 229a0 = 16a0 ≡ 8 mod 31

2 Trial and error/ Shanks gives 162 ≡ 8 mod 31, so a0 = 2, our

first equation is then x = 2 + 5a1

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-88
SLIDE 88

Pohlig Hellman Algorithm Example

1 set second equation using second factor

x = 60b0 + 61b1 = b0 + 6b1

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-89
SLIDE 89

Pohlig Hellman Algorithm Example

1 set second equation using second factor

x = 60b0 + 61b1 = b0 + 6b1

2 raise to first factor

(3b0+6b1)5 ≡ 225 mod 31

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-90
SLIDE 90

Pohlig Hellman Algorithm Example

1 Then,

35b0+30b1 ≡ 225 mod 31

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-91
SLIDE 91

Pohlig Hellman Algorithm Example

1 Then,

35b0+30b1 ≡ 225 mod 31 35b0(3b1)30 ≡ 35b0 ∗ 1 ≡ 6 mod 31 by F.L.T

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-92
SLIDE 92

Pohlig Hellman Algorithm Example

1 Then,

35b0+30b1 ≡ 225 mod 31 35b0(3b1)30 ≡ 35b0 ∗ 1 ≡ 6 mod 31 by F.L.T (35)b0 = 243b0 = 26b0 ≡ 6 mod 31

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-93
SLIDE 93

Pohlig Hellman Algorithm Example

1 Then,

35b0+30b1 ≡ 225 mod 31 35b0(3b1)30 ≡ 35b0 ∗ 1 ≡ 6 mod 31 by F.L.T (35)b0 = 243b0 = 26b0 ≡ 6 mod 31

2 Trial and error/ Shanks gives 265 ≡ 6 mod 31, so b0 = 5, our

second equation is then x = 5 + 6b1

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-94
SLIDE 94

Pohlig Hellman Algorithm Example

1 Then, our two moduar congrunces are

x ≡ 2 mod 5, x ≡ 5 mod 6

3 So 317 ≡ 22 mod 31 Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-95
SLIDE 95

Pohlig Hellman Algorithm Example

1 Then, our two moduar congrunces are

x ≡ 2 mod 5, x ≡ 5 mod 6

2 so now just use C.R.T to solve :

x = 17 solves both.

3 So 317 ≡ 22 mod 31 Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-96
SLIDE 96

Conclusion

Use multiplicative groups of large (at least 4000 bit) prime order to encrypt information!

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-97
SLIDE 97

Conclusion

Use multiplicative groups of large (at least 4000 bit) prime order to encrypt information! In cryptography, you’re always designing against the best known decryption algorithm and its runtime

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography

slide-98
SLIDE 98

Conclusion

Use multiplicative groups of large (at least 4000 bit) prime order to encrypt information! In cryptography, you’re always designing against the best known decryption algorithm and its runtime Longer decryption times with groups defined on elliptic curves

Mentor: Tao Song , Mentee: Lisette del Pino Mathematical Cryptography