mat 140 cryptology day 2 presentation
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Activity: Shift ciphers + spreadsheets
8
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