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. • 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 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. 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. 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. A=1 R=18 E=5 N=14 DUMPLING 7! EMRDMJFL What is we used the keyword GOB? G=7 O=15 B=2 DUMPLING 7! KJOWAKUV A=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? What is the decryption sequence? Decrypt the ciphertext message “FDUYD”.
© Copyright 2026 Paperzz