Recap Definition (Encryption: Caesar Cipher) +3=⇥ mod 26 Recap Definition (Encryption: Caesar Cipher) +3=⇥ mod 26 Definition (Encryption: Shift Cipher) +d =⇥ mod 26, d a number Recap Definition (Encryption: Caesar Cipher) +3=⇥ mod 26 Definition (Encryption: Shift Cipher) +d =⇥ mod 26, d a number Definition (Decryption: Caeser Cipher) + 23 = ⇥ mod 26 Recap Definition (Encryption: Caesar Cipher) +3=⇥ mod 26 Definition (Encryption: Shift Cipher) +d =⇥ mod 26, d a number Definition (Decryption: Caeser Cipher) + 23 = ⇥ mod 26 Definition (Decryption: Shift Cipher) ⇥ + d mod 26 = , d is the additive inverse of d Code Summary: Caesar Cipher We will talk about several di↵erent types of codes during the next few weeks and it will be good to keep a summary for each. Code Summary: Caesar Cipher We will talk about several di↵erent types of codes during the next few weeks and it will be good to keep a summary for each. • Encryption/Decryption Key Code Summary: Caesar Cipher We will talk about several di↵erent types of codes during the next few weeks and it will be good to keep a summary for each. • Encryption/Decryption Key • Key Secrecy is the idea of how secret the decryption key must be. There are codes where anyone can have access to the key! Code Summary: Caesar Cipher We will talk about several di↵erent types of codes during the next few weeks and it will be good to keep a summary for each. • Encryption/Decryption Key • Key Secrecy is the idea of how secret the decryption key must be. There are codes where anyone can have access to the key! • Letter Frequency, or how much a cipher changes the nature of how often letters appear, will become increasingly important. Code Summary: Caesar Cipher We will talk about several di↵erent types of codes during the next few weeks and it will be good to keep a summary for each. • Encryption/Decryption Key • Key Secrecy is the idea of how secret the decryption key must be. There are codes where anyone can have access to the key! • Letter Frequency, or how much a cipher changes the nature of how often letters appear, will become increasingly important. Cipher Caesar Shift Encrypt Key(s) 3 d Decrypt Key(s) 23 d Key Secrecy Private Private Letter Frequency Normal Normal Related Idea: Frequency Analysis Anyone who has watched Wheel of Fortune or played Scrabble knows that the English language uses some letters more frequently than others. E T A NO I CD B H F G R S L M J K U P Q V W Some codes do not hide the natural frequency of letters. Y X Z Related Idea: Frequency Analysis The Caesar Cipher disguises letters, but does not disguise the natural frequency of letters! H W D F G B A C QR L E K I J UV O P MN X S T Y Z The most frequent symbol used in the ciphertext will correspond to the letter “E” in the plaintext. For the Caesar Cipher, this corresponds to the numeric 5 + 3 and is the ciphertext letter “H”. Recap Recall that by simplifying the statement a mod n we mean to find a number b between 0 and n 1 such that a = b mod n. Example 1. Simplify 14 mod 3. 2. Simplify 78 mod 25. 3. Simplify 29 mod 26. Related Idea: Additive Inverse Definition (Related Idea: Additive Inverse) The additive inverse for a mod n is a value a so that a + a = 0 mod n Related Idea: Additive Inverse Definition (Related Idea: Additive Inverse) The additive inverse for a mod n is a value a so that a + a = 0 mod n From working with codes, we can understand that using the additive inverse d “really” works by moving all letters to the left d places. Related Idea: Additive Inverse Definition (Related Idea: Additive Inverse) The additive inverse for a mod n is a value a so that a + a = 0 mod n From working with codes, we can understand that using the additive inverse d “really” works by moving all letters to the left d places. Example 1. Find the additive inverse of 8 mod 10. Related Idea: Additive Inverse Definition (Related Idea: Additive Inverse) The additive inverse for a mod n is a value a so that a + a = 0 mod n From working with codes, we can understand that using the additive inverse d “really” works by moving all letters to the left d places. Example 1. Find the additive inverse of 8 mod 10. 2. Find the additive inverse of 5 mod 12. Related Idea: Additive Inverse Definition (Related Idea: Additive Inverse) The additive inverse for a mod n is a value a so that a + a = 0 mod n From working with codes, we can understand that using the additive inverse d “really” works by moving all letters to the left d places. Example 1. Find the additive inverse of 8 mod 10. 2. Find the additive inverse of 5 mod 12. 3. Find the additive inverse of 7 mod 14. Related Idea: Simplifying Negative Mods, Method 1 Recall that by simplifying the statement a mod n we mean to find a number b between 0 and n 1 such that a = b mod n. Related Idea: Simplifying Negative Mods, Method 1 Recall that by simplifying the statement a mod n we mean to find a number b between 0 and n 1 such that a = b mod n. Simplifying the statement “ a mod n” for a > 0 means do the following: 1. First simplify a mod n, say a = b mod n. Related Idea: Simplifying Negative Mods, Method 1 Recall that by simplifying the statement a mod n we mean to find a number b between 0 and n 1 such that a = b mod n. Simplifying the statement “ a mod n” for a > 0 means do the following: 1. First simplify a mod n, say a = b mod n. 2. Determine the additive inverse of b mod n. Related Idea: Simplifying Negative Mods, Method 1 Recall that by simplifying the statement a mod n we mean to find a number b between 0 and n 1 such that a = b mod n. Simplifying the statement “ a mod n” for a > 0 means do the following: 1. First simplify a mod n, say a = b mod n. 2. Determine the additive inverse of b mod n. Example (Additive Inverses and Negatives) Simplify 4 mod 10 . Related Idea: Simplifying Negative Mods, Method 1 Recall that by simplifying the statement a mod n we mean to find a number b between 0 and n 1 such that a = b mod n. Simplifying the statement “ a mod n” for a > 0 means do the following: 1. First simplify a mod n, say a = b mod n. 2. Determine the additive inverse of b mod n. Example (Additive Inverses and Negatives) Simplify 4 mod 10 . Simplify 20 mod 16 . Related Idea: Simplifying Negative Mods, Method 1 Recall that by simplifying the statement a mod n we mean to find a number b between 0 and n 1 such that a = b mod n. Simplifying the statement “ a mod n” for a > 0 means do the following: 1. First simplify a mod n, say a = b mod n. 2. Determine the additive inverse of b mod n. Example (Additive Inverses and Negatives) Simplify 4 mod 10 . Simplify 20 mod 16 . Simplify 14 mod 5 . SIDE A Introduction to Vigenere Ciphers Example Enemy agents have started to make their codes more sophisticated. They now use multiple shifts at once! You intercept a message and learn that the shifts being used correspond to d1 = 4, d2 = 15, d3 = 7. How would you encrypt the plaintext “ATE”? How would you encrypt the plaintext “TEA”? Encryption Method: Vigenère Cipher Definition An English Language Vigenère Cipher uses a di↵erent shift for each letter, depending on the position of the letter in the message. Encryption uses the rule 1 +d1 mod 26 = ⇥1 2 +d2 mod 26 = ⇥2 3 +d3 mod 26 = ⇥3 .. . where 1 is the first plaintext letter and d1 is the first shift, the second plaintext letter and d2 is the second shift, etc... 2 is Example Example Suppose you use a Vigenère Cipher with the following shifts. d1 = 4, d2 = 15, d3 = 7. Example Example Suppose you use a Vigenère Cipher with the following shifts. d1 = 4, d2 = 15, d3 = 7. Encrypt the plaintext “ATE”. Example Example Suppose you use a Vigenère Cipher with the following shifts. d1 = 4, d2 = 15, d3 = 7. Encrypt the plaintext “ATE”. Encrypt the plaintext “TEA”. Example Example Suppose you use a Vigenère Cipher with the following shifts. d1 = 4, d2 = 15, d3 = 7. Encrypt the plaintext “ATE”. Encrypt the plaintext “TEA”. Encrypt these two words using the Caeser Cipher and compare the encrypted words to the ones you got above. Related Idea: Keyword Definition We use a Keyword to represent all of the di↵erent shifts (and the order) to be used with a Vigenère Cipher. Related Idea: Keyword Definition We use a Keyword to represent all of the di↵erent shifts (and the order) to be used with a Vigenère Cipher. Example The keyword ENEMY gives the following shifts: d1 = 5 d2 = 14 d3 = 5 d4 = 13 d5 = 25 So the first letter in our message will get shifted 5 places to the right, the second letter will get shifted 14 places to the right, and so on. One more example! Example Encode the word DUMPLING using the keyword ARENA. One more example! Example Encode the word DUMPLING using the keyword ARENA. A=1 R=18 E=5 N=14 A=1 One more example! Example Encode the word DUMPLING using the keyword ARENA. A=1 R=18 E=5 N=14 DUMPLING 7! EMRDMJFL A=1 One more example! Example Encode the word DUMPLING using the keyword ARENA. A=1 R=18 E=5 N=14 DUMPLING 7! EMRDMJFL What if we used the keyword GOB? A=1 One more example! Example Encode the word DUMPLING using the keyword ARENA. A=1 R=18 E=5 N=14 DUMPLING 7! EMRDMJFL What if we used the keyword GOB? G=7 O=15 B=2 A=1 One more example! Example Encode the word DUMPLING using the keyword ARENA. A=1 R=18 E=5 N=14 DUMPLING 7! EMRDMJFL What if we used the keyword GOB? G=7 O=15 B=2 DUMPLING 7! KJOWAKUV A=1 SIDE B (Part 1) Decryption Method: Vigenère Cipher Definition A Vigenère Cipher can be decrypted as follows: (i) Identify d1 ,d2 , d3 , etc . . . corresponding to the letters of the Keyword. (ii) Find the additive inverse d 1 to d1 . Next find the additive inverse d 2 to d2 . Continue for all values dk . Together, the numbers d 1 , d 2 , d 3 , . . . are called the Decryption Sequence. To decrypt a Vigenère Cipher, we use the rule ⇥k + d k mod 26 = k. Example Example ( Example ) The enemy agent starts using a new keyword. You MUST break this new code! You figure out the shifts being used are d1 = 1, d2 = 16, d3 = 16 d4 = 12, d5 = 5. What Keyword is being used for this Vigenère Cipher? Example Example ( Example ) The enemy agent starts using a new keyword. You MUST break this new code! You figure out the shifts being used are d1 = 1, d2 = 16, d3 = 16 d4 = 12, d5 = 5. What Keyword is being used for this Vigenère Cipher? What is the decryption sequence? Example Example ( Example ) The enemy agent starts using a new keyword. You MUST break this new code! You figure out the shifts being used are d1 = 1, d2 = 16, d3 = 16 d4 = 12, d5 = 5. What Keyword is being used for this Vigenère Cipher? What is the decryption sequence? Decrypt the ciphertext message “FDUYD”. Related Idea: Advantages of the Vigenère Cipher The Vigenère Cipher is a HUGE improvement over Shift Ciphers because any single letter can be encrypted in many di↵erent ways. Related Idea: Advantages of the Vigenère Cipher The Vigenère Cipher is a HUGE improvement over Shift Ciphers because any single letter can be encrypted in many di↵erent ways. Theorem (Counting Possibilities for the Vigenère Cipher) The number of di↵erent ways a letter can be encrypted using the Vigenère Cipher is at most the length of the keyword being used. Related Idea: Advantages of the Vigenère Cipher The Vigenère Cipher is a HUGE improvement over Shift Ciphers because any single letter can be encrypted in many di↵erent ways. Theorem (Counting Possibilities for the Vigenère Cipher) The number of di↵erent ways a letter can be encrypted using the Vigenère Cipher is at most the length of the keyword being used. If the keyword has no repeats in letters then this number is exactly the length of the keyword. Related Idea: Advantages of the Vigenère Cipher The Vigenère Cipher is a HUGE improvement over Shift Ciphers because any single letter can be encrypted in many di↵erent ways. Theorem (Counting Possibilities for the Vigenère Cipher) The number of di↵erent ways a letter can be encrypted using the Vigenère Cipher is at most the length of the keyword being used. If the keyword has no repeats in letters then this number is exactly the length of the keyword. Example For a Vigenère Cipher that uses the keyword “TWIN”, the letter “E” could be encrypted using “T”, “W”, “I”, or “N”. This means that “E” could be encrypted as Plaintext Numeric Keyword Numeric Ciphertext ⇥ 5 20 Y 5 23 B 5 9 N 5 14 S
© Copyright 2026 Paperzz