mat 140 cryptology day 2 presentation

18
Cryptology Day 2: Codemaking as mathematics MAT 140: Introduction to the Mathematical Sciences 17 September 2008 Robert Talbert, PhD Associate Professor of Mathematics and Computing Science [email protected] 1

Upload: guestbc46fa

Post on 18-Dec-2014

507 views

Category:

Education


0 download

DESCRIPTION

Day 2 of minicourse on cryptology for MAT 140: Introduction to the Mathematical Sciences at Franklin College. Subjects: integer congruence, modular arithmetic, using modular arithmetic with spreadsheets to do shift ciphers.

TRANSCRIPT

Page 1: Mat 140 Cryptology Day 2 Presentation

CryptologyDay 2: Codemaking as mathematics

MAT 140: Introduction to the Mathematical Sciences17 September 2008

Robert Talbert, PhDAssociate Professor of Mathematics and Computing Science [email protected]

1

Page 2: Mat 140 Cryptology Day 2 Presentation

Recap of Day 1

•Cryptology

•Shift cipher; plaintext; ciphertext; the encryption process

•Key; keyspace; brute force attack and exhaustive keyspace search

•Monoalphabetic substitution; statistical attacks

2

Page 3: Mat 140 Cryptology Day 2 Presentation

Shift cipher keys

0 = 26 = 52 = 78 = -26 = ...

1 = 27 = 53 = 79 = -25 = ...

2 = 28 = 54 = 80 = -24 = ...

24 = 50 = 76 = 102 = -2 = ...

25 = 51 = 77 = 103 = -1 = ...

...

3

Page 4: Mat 140 Cryptology Day 2 Presentation

Integer congruence modulo 26

Two integers (whole numbers) a and b are congruent modulo 26 if (a-b) is a multiple of 26.

a = b mod26

Congruent mod 26?1 and 121

43 and 1239-4 and 22

4

Page 5: Mat 140 Cryptology Day 2 Presentation

Integer congruence modulo anything

Two integers (whole numbers) a and b are congruent modulo n if (a-b) is a multiple of n.

a = b modn88 = 0 mod 488 = 3 mod 588 = (?) mod 1088 = (?) mod 12

5

Page 6: Mat 140 Cryptology Day 2 Presentation

Integer congruence modulo anything

Two integers (whole numbers) a and b are congruent modulo n if (a-b) is a multiple of n.

a = b modn88 = 0 mod 488 = 3 mod 588 = (?) mod 1088 = (?) mod 12

5

Page 7: Mat 140 Cryptology Day 2 Presentation

Integer congruence modulo anything

Two integers (whole numbers) a and b are congruent modulo n if (a-b) is a multiple of n.

a = b modn88 = 0 mod 488 = 3 mod 588 = (?) mod 1088 = (?) mod 12

a = b mod n ifa/n has remainder b.

5

Page 8: Mat 140 Cryptology Day 2 Presentation

Integer congruence modulo anything

Two integers (whole numbers) a and b are congruent modulo n if (a-b) is a multiple of n.

a = b modn88 = 0 mod 488 = 3 mod 588 = (?) mod 1088 = (?) mod 12

a = b mod n ifa/n has remainder b.

Given n, every integer is congruent to a unique integer between 0 and n-1 (inclusive).

5

Page 9: Mat 140 Cryptology Day 2 Presentation

Applications

It’s 11:00 AM now. What time will it be 23,980,293 hours from now?

Alice used a shift cipher and a key of 99999. Find the key between 0 and 25 that produces the same

ciphertext.

6

Page 10: Mat 140 Cryptology Day 2 Presentation

Using this idea to do shift ciphers

S P A M

Choose k = 22

18 15 0 12

40 37 22 34

14 11 22 8

O L W I

7

Page 11: Mat 140 Cryptology Day 2 Presentation

Using this idea to do shift ciphers

S P A M

Choose k = 22

18 15 0 12

40 37 22 34

14 11 22 8

O L W I

Plaintext

7

Page 12: Mat 140 Cryptology Day 2 Presentation

Using this idea to do shift ciphers

S P A M

Choose k = 22

18 15 0 12

40 37 22 34

14 11 22 8

O L W I

Plaintext

Convert to alphabet position

7

Page 13: Mat 140 Cryptology Day 2 Presentation

Using this idea to do shift ciphers

S P A M

Choose k = 22

18 15 0 12

40 37 22 34

14 11 22 8

O L W I

Plaintext

Convert to alphabet position

Add key

7

Page 14: Mat 140 Cryptology Day 2 Presentation

Using this idea to do shift ciphers

S P A M

Choose k = 22

18 15 0 12

40 37 22 34

14 11 22 8

O L W I

Plaintext

Convert to alphabet position

Add key

7

Page 15: Mat 140 Cryptology Day 2 Presentation

Using this idea to do shift ciphers

S P A M

Choose k = 22

18 15 0 12

40 37 22 34

14 11 22 8

O L W I

Plaintext

Convert to alphabet position

Add key

“Reduce” mod 26

7

Page 16: Mat 140 Cryptology Day 2 Presentation

Using this idea to do shift ciphers

S P A M

Choose k = 22

18 15 0 12

40 37 22 34

14 11 22 8

O L W I

Plaintext

Convert to alphabet position

Add key

“Reduce” mod 26

Convert back to letters

7

Page 17: Mat 140 Cryptology Day 2 Presentation

Activity: Shift ciphers + spreadsheets

8

Page 18: Mat 140 Cryptology Day 2 Presentation

Next time

• Binary numbers and ASCII; how computers store information

• Using binary representations of text to encrypt

• The XOR operation

• One-time pads and perfect security

9