190 likes | 554 Views
Cryptology with Spreadsheets. A Computer Course for Everyone. Jim Belk Texas A&M University. The Course. MATH 135: The Art of Secret Writing Cornell University, Spring 2005 Humanities students fulfilling a math/computer science requirement. No prerequisites
E N D
Cryptology with Spreadsheets A Computer Course for Everyone Jim Belk Texas A&M University
The Course • MATH 135: The Art of Secret Writing Cornell University, Spring 2005 • Humanities students fulfilling a math/computer science requirement. • No prerequisites • Invitation to Cryptologyby Thomas H. Barr
The Book Chapter 1: History and Examples Chapter 2: Classical Ciphers • Shift Ciphers, Affine Ciphers • Substitution Ciphers • Transposition Ciphers • Vigenère Ciphers • Hill Ciphers
The Book Chapter 1: History and Examples Chapter 2: Classical Ciphers Chapter 3: Computer Cryptology Chapter 4: Public-Key Cryptography(RSA, Diffie-Hellman, zero-knowledge proofs) Chapter 5: Additional Topics
Why Spreadsheets? • Goals: Emphasize numeracy and computer literacy. • Similar to programming, but easier to work with and debug. • Useful—spreadsheets are the primary mathematical software available on most PC’s.
Example: Shift Cipher Simple alphabetic shift: y = x+c (mod 26) Useful Commands: MOD(A1, B1): computes the remainder when A1 is divided by B1 CODE(A1): returns the ASCII code for the character in cell A1 CHAR(A1): returns the character whose ASCII code is the value in cell A1
Example: Shift Cipher Shift by 5: CHAR( MOD( CODE(A1) – CODE(“A”) + 5 , 26) + CODE(“A”) ) MOD(A1, B1): computes the remainder when A1 is divided by B1 CODE(A1): returns the ASCII code for the character in cell A1 CHAR(A1): returns the character whose ASCII code is the value in cell A1
Homework 1 Problem 1: The ciphertext: ZSZKV DPKYL DSRKP FLJZI was obtained using a shift cipher. Use a spreadsheet to try all possible keys and decipher the message.
Homework 1 Problem 2: Similar, but the students must decode an affine cipher, i.e. y = ax+b (mod 26)
Later Projects • Decode a Substitution Cipher • Determine the letter frequencies for a 993-character ciphertext.
Later Projects • Decode a Substitution Cipher • Determine the letter frequencies for a 993-character ciphertext. • Find common digraphs and trigraphs.
Later Projects • Decode a Substitution Cipher • Determine the letter frequencies for a 993-character ciphertext. • Find common digraphs and trigraphs. • Decode the message.
Later Projects • Decode a Substitution Cipher 2. Decode a Vigenère Cipher • Figure out how to import a 6,351-character ciphertext into Excel. • Use the Friedman test to estimate the length of the keyword. • Use the Kasiski test to find the keyword length. • Determine the key.
Later Projects • Decode a Substitution Cipher 2. Decode a Vigenère Cipher • Statistical analysis of the English language. • Copy 100,000 characters from the internet. • Figure out how to remove spaces and punctuation. • Count the letter frequencies and digraph frequencies.
Later Projects • Decode a Substitution Cipher 2. Decode a Vigenère Cipher • Statistical analysis of the English language. • RSA-related: • Find the prime factorization of 43,428,539,417. • Compute 12813645 MOD 4703. • Use the Fermat primality test. • Implement the Euclidean algorithm. • Break RSA.