Mat 140 Cryptology Day 3 Presentation
-
Upload
robert-talbert -
Category
Education
-
view
804 -
download
2
description
Transcript of Mat 140 Cryptology Day 3 Presentation
![Page 1: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/1.jpg)
CryptologyDay 3: First look at computer ciphers
MAT 140: Introduction to the Mathematical Sciences19 September 2008
Robert Talbert, PhDAssociate Professor of Mathematics and Computing Science [email protected]
![Page 2: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/2.jpg)
Recap of Day 2
• Integer congruence modulo n
•Using integer congruence to make and break shift ciphers
• Idea: Representing text characters as numbers and then using math to manipulate them
![Page 3: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/3.jpg)
Unicode
Worldwide standard for representing characters from the keyboard and various languages
in numerical form
![Page 4: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/4.jpg)
Bits and bytes
Computers store and process information in binary states,
represented by 0 (off) or 1 (on).
Bit = Binary Digit = 0 or 1.Byte = 8 bits, e.g. 01101110
Every positive integer can be represented as a string of bits...
![Page 5: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/5.jpg)
Decimal representation
Base 10 or “decimal” representation
461 = 400 + 30 + 1= 4! 102 + 3! 101 + 1! 100
![Page 6: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/6.jpg)
Binary representation
461 = 256 + 128 + 64 + 8 + 4 + 1= 1! 28 + 1! 27 + 1! 26 + 0! 25 + 0! 24
+1! 23 + 1! 22 + 0! 21 + 1! 20
![Page 7: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/7.jpg)
Binary representation
461 = 256 + 128 + 64 + 8 + 4 + 1= 1! 28 + 1! 27 + 1! 26 + 0! 25 + 0! 24
+1! 23 + 1! 22 + 0! 21 + 1! 20
![Page 8: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/8.jpg)
Binary representation
461 = 256 + 128 + 64 + 8 + 4 + 1= 1! 28 + 1! 27 + 1! 26 + 0! 25 + 0! 24
+1! 23 + 1! 22 + 0! 21 + 1! 20
461 in base 10 = 111001101 in base 2Binary representation
![Page 9: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/9.jpg)
Binary representation
461 = 256 + 128 + 64 + 8 + 4 + 1= 1! 28 + 1! 27 + 1! 26 + 0! 25 + 0! 24
+1! 23 + 1! 22 + 0! 21 + 1! 20
461 in base 10 = 111001101 in base 2Binary representation
The number 461 is a 9-bit integer.Number of bits in an integer n:
!log2 n" + 1
![Page 11: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/11.jpg)
Binary representation of text
B
![Page 12: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/12.jpg)
Binary representation of text
B 66Unicode
![Page 13: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/13.jpg)
Binary representation of text
B 66Unicode
1000010Convert decimal
to binary
![Page 14: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/14.jpg)
Binary representation of text
B 66Unicode
1000010Convert decimal
to binary01000010
Pad with extra 0
![Page 15: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/15.jpg)
Binary representation of text
B 66Unicode
1000010Convert decimal
to binary01000010
Pad with extra 0
8-bit ASCII representation of “B”
![Page 16: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/16.jpg)
Adding bits and bitstrings
“XOR”
![Page 17: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/17.jpg)
Adding bits and bitstrings
0 ⊕ 0 = 0
“XOR”
![Page 18: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/18.jpg)
Adding bits and bitstrings
0 ⊕ 0 = 0
1 ⊕ 0 = 1
“XOR”
![Page 19: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/19.jpg)
Adding bits and bitstrings
0 ⊕ 0 = 0
1 ⊕ 0 = 1
0 ⊕ 1 = 1
“XOR”
![Page 20: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/20.jpg)
Adding bits and bitstrings
0 ⊕ 0 = 0
1 ⊕ 0 = 1
0 ⊕ 1 = 1
1 ⊕ 1 = 0
“XOR”
![Page 21: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/21.jpg)
Adding bits and bitstrings
0 ⊕ 0 = 0
1 ⊕ 0 = 1
0 ⊕ 1 = 1
1 ⊕ 1 = 0
“XOR”
110011 ⊕ 101010 110011⊕ 101010
011001
Any bit XOR-ed to itself = 0
![Page 22: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/22.jpg)
Simple XOR cipher
[Choose bitstring for key]
11011010
11011010
![Page 23: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/23.jpg)
Simple XOR cipher
[Choose bitstring for key]
11011010
11011010
DOG
![Page 24: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/24.jpg)
Simple XOR cipher
[Choose bitstring for key]
11011010
11011010
DOG 01000100 01001111 01000111
![Page 25: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/25.jpg)
Simple XOR cipher
[Choose bitstring for key]
11011010
11011010
DOG 01000100 01001111 01000111 ⊕11011010 11011010 11011010
![Page 26: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/26.jpg)
Simple XOR cipher
[Choose bitstring for key]
11011010
11011010
DOG 01000100 01001111 01000111 ⊕11011010 11011010 11011010
10011110 10010101 10011101
![Page 27: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/27.jpg)
Simple XOR cipher
[Choose bitstring for key]
11011010
11011010
DOG 01000100 01001111 01000111 ⊕11011010 11011010 11011010
10011110 10010101 10011101
쇦뷵쇝10011110 10010101 10011101
![Page 28: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/28.jpg)
Simple XOR cipher
[Choose bitstring for key]
11011010
11011010
DOG 01000100 01001111 01000111 ⊕11011010 11011010 11011010
10011110 10010101 10011101
쇦뷵쇝10011110 10010101 10011101
⊕11011010 11011010 11011010
![Page 29: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/29.jpg)
Simple XOR cipher
[Choose bitstring for key]
11011010
11011010
DOG 01000100 01001111 01000111 ⊕11011010 11011010 11011010
10011110 10010101 10011101
01000100 01001111 01000111
쇦뷵쇝10011110 10010101 10011101
⊕11011010 11011010 11011010
![Page 30: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/30.jpg)
Simple XOR cipher
[Choose bitstring for key]
11011010
11011010
DOG 01000100 01001111 01000111 ⊕11011010 11011010 11011010
10011110 10010101 10011101
01000100 01001111 01000111 DOG
쇦뷵쇝10011110 10010101 10011101
⊕11011010 11011010 11011010
![Page 31: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/31.jpg)
Activity: Experiments with the XOR cipher
![Page 32: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/32.jpg)
When key length ≥ message length
Plaintext ⊕ key = ciphertextPlaintext ⊕ key ⊕ Plaintext = ciphertext ⊕ Plaintext
key = ciphertext ⊕ plaintext
![Page 33: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/33.jpg)
When key length ≥ message length
11001100 01010011 11111111Ciphertext
Plaintext ⊕ key = ciphertextPlaintext ⊕ key ⊕ Plaintext = ciphertext ⊕ Plaintext
key = ciphertext ⊕ plaintext
![Page 34: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/34.jpg)
When key length ≥ message length
11001100 01010011 11111111Ciphertext
Plaintext ⊕ key = ciphertextPlaintext ⊕ key ⊕ Plaintext = ciphertext ⊕ Plaintext
key = ciphertext ⊕ plaintext
01000011 01000001 01010100Plaintext (CAT)
![Page 35: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/35.jpg)
When key length ≥ message length
11001100 01010011 11111111Ciphertext
Plaintext ⊕ key = ciphertextPlaintext ⊕ key ⊕ Plaintext = ciphertext ⊕ Plaintext
key = ciphertext ⊕ plaintext
10001111 00010010 1010101101000011 01000001 01010100Plaintext (CAT)
![Page 36: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/36.jpg)
When key length ≥ message length
11001100 01010011 11111111Ciphertext
Plaintext ⊕ key = ciphertextPlaintext ⊕ key ⊕ Plaintext = ciphertext ⊕ Plaintext
key = ciphertext ⊕ plaintext
10001111 00010010 10101011
11001100 01010011 11111111Ciphertext
01000011 01000001 01010100Plaintext (CAT)
![Page 37: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/37.jpg)
When key length ≥ message length
11001100 01010011 11111111Ciphertext
Plaintext ⊕ key = ciphertextPlaintext ⊕ key ⊕ Plaintext = ciphertext ⊕ Plaintext
key = ciphertext ⊕ plaintext
10001111 00010010 10101011
11001100 01010011 11111111Ciphertext
01000011 01000001 01010100Plaintext (CAT)
01000100 01001111 01000111Plaintext (DOG)
![Page 38: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/38.jpg)
When key length ≥ message length
11001100 01010011 11111111Ciphertext
Plaintext ⊕ key = ciphertextPlaintext ⊕ key ⊕ Plaintext = ciphertext ⊕ Plaintext
key = ciphertext ⊕ plaintext
10001111 00010010 10101011
11001100 01010011 11111111Ciphertext
10001000 00011100 10111000
01000011 01000001 01010100Plaintext (CAT)
01000100 01001111 01000111Plaintext (DOG)
![Page 39: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/39.jpg)
One-time pads and perfect security
When key length ≥ message length in the XOR cipher: No information about the real plaintext is given by the ciphertext.
= Perfect security
![Page 40: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/40.jpg)
One-time pads and perfect security
When key length ≥ message length in the XOR cipher: No information about the real plaintext is given by the ciphertext.
= Perfect security
Given a plaintext ASCII message: Alice and Bob choose a random
string of bits at least as long as the message.
Encrypt using XOR. Burn the key.
= One-time pad
![Page 41: Mat 140 Cryptology Day 3 Presentation](https://reader035.fdocuments.net/reader035/viewer/2022081400/5556487cd8b42a8d0f8b4ca3/html5/thumbnails/41.jpg)
Next time
•The key distribution problem
•Public-key cryptography and RSA
•Wrapping up: Current cutting edge of cryptology; careers in cryptology and information security; cryptology at Franklin College