Question

In: Computer Science

I want to compare between breaking the shift (Caesar Cipher), substitution, and Vigenere cipher by using...

I want to compare between breaking the shift (Caesar Cipher), substitution, and Vigenere cipher by using a chosen-plaintext attack or by known-plaintext attack. How much plaintext must be encrypted in order for the adversary to completely recover the key for those ciphers in chosen-plaintext attack and in known-plaintext attack? is there difference in each attack?

Solutions

Expert Solution

Solution

Shift cipher

For the shift cipher given a single plain text character p and ciphertext character c, the key is simply k = (c − p) mod 26. The encryption of only a single plain text character thus suffices to recover the key.

Substitution cipher

In case of substitution cipher, given a plain text character pi and corresponding cipher text character ci , we can conclude that π(pi) = ci (where π is the permutation determining the key). In order to fully determine the key, it therefore suffices to be given the encryption of a plain text containing 25 distinct letters of the alphabet. (Since is a permutation, knowing the value of on 25 inputs fully determines the value of on the last remaining input.) Note that if normal English text is encrypted, however, much more than 25 letters will be needed before 25 distinct letters occur.

Vigenere cipher

Now we consider the case of Vigenere cipher. Suppose the period t is known. Then, each part of the key can be recovered as in the shift cipher. Thus the encryption of t (consecutive) characters of plain text suffices for recovering the entire key. However, if the period is not known, enough known plain text is needed to verify that the key is repeating. For example, if we ask for 5 characters and obtain shifts of ‘cafec’ then we could conclude that the 5th is repeating. However, the key may be ‘cafecorner’ and so the repetition of c is not sufficient.

Comparison

Now come to the main part of the question for comparison

The attacks on the shift and Vigenere ciphers remain the same

However, for the substitution cipher, it is now possible to use a chosen plain text attack to ask for an encryption of a carefully chosen plain text that contains 25 distinct letters of the alphabet. Given the resulting cipher text, it is then possible to fully recover the key. Thus, less plain text is required as compared to the previously described one

---

Answered completely

if you have any doubt, please mention it, love to help

all the best

please upvote


Related Solutions

!) Vigenere cipher Encode the text manybooksoninformationsecurity using the Vigenere cipher with the keyword fun
!) Vigenere cipher Encode the text manybooksoninformationsecurity using the Vigenere cipher with the keyword fun
In cryptography, a Caesar cipher, also known as Caesar's cipher, the shift cipher, Caesar's code or...
In cryptography, a Caesar cipher, also known as Caesar's cipher, the shift cipher, Caesar's code or Caesar shift, is one of the simplest and most widely known encryption techniques. It is a type of substitution cipher in which each letter in the plaintext is replaced by a letter some fixed number of positions down the alphabet. Given an arbitrary cipher text file, you need to write a C++ program to find out the value of the shift going down the...
A Caesar cipher encrypts a message by shifting letters in the alphabet. For example, a shift...
A Caesar cipher encrypts a message by shifting letters in the alphabet. For example, a shift of 4 maps 'a' to 'e' and maps 'p' to 't' Here is a famous line from Shakespeare encrypted with a shift of 4: 'vq dg qt pqv vq dg: vjcv ku vjg swguvkqp.' (a) Write a program that takes as input a string to be encrypted and an integer encrpytion shift (such as 4 mentioned earlier), and prints the encrypted string. [Hint: zip()...
1. Monoalphabetic substitution (using the Caesar Cipher tool right) Encipher (convert plaintext into ciphertext): meal times...
1. Monoalphabetic substitution (using the Caesar Cipher tool right) Encipher (convert plaintext into ciphertext): meal times  Decipher (convert ciphertext in to plaintext):  JR PHDQ JUHHQ 2. Polyalphabetic substitution (using the Vigenere Square in the lecture slide) Encipher: fall  Decipher:  VPX TWOKM
COP2271 MATLAB HW9 Homework: Modified Vigenere Cipher Implement a decryption cipher to decode messages using a...
COP2271 MATLAB HW9 Homework: Modified Vigenere Cipher Implement a decryption cipher to decode messages using a secret key. You are required to submit the solution and screenshots for this question. Key programming concepts: if statements, loops, strings Approximate lines of code: 27 (does not include comments or white space) Commands you can’t use: None... Program Inputs • Enter message to decrypt: • Enter secret key: – The user will always enter text for all prompts, no error checking needed. The...
Using CrypTool2, display the results of encrypting the following plain text using the Caesar Cipher method...
Using CrypTool2, display the results of encrypting the following plain text using the Caesar Cipher method and a left shift value of 3. MEET YOU AT THE FOOTBALL MATCH
(a) Use Vigenere cipher to encrypt the message “United States Constitution” using the keyword      “covid” Given...
(a) Use Vigenere cipher to encrypt the message “United States Constitution” using the keyword      “covid” Given that the Vigenere cipher of part (a) with the same keyword was used to produce the ciphertext: VFPUSVSNBVRCNQW Find the plaintext message.        
Programming Language C++ Encrypt a text file using Caesar Cipher. Perform the following operations: Read the...
Programming Language C++ Encrypt a text file using Caesar Cipher. Perform the following operations: Read the console input and create a file. ['$' character denotes end of content in file.] Close the file after creation. Now encrypt the text file using Caesar Cipher (Use key value as 5). Display the contents of the updated file. #include <iostream> using namespace std; int main() { // write code here }
Binary file IO Suppose a file has been encrypted using the Caesar cipher as described above,...
Binary file IO Suppose a file has been encrypted using the Caesar cipher as described above, and you know the secret key. Write a program to decrypt (or decode) the file. Your program will prompt the user to enter an input file name for the encrypted file, an output file name for the unencrypted version of the input file, and the secret key. Create a DataInputStream for the input file and a DataOutputStreams for the output file. Next, read the...
You are writing a program that encrypts or decrypts messages using a simple substitution cipher. Your...
You are writing a program that encrypts or decrypts messages using a simple substitution cipher. Your program will use two constant strings. One will represent the code for encryption: going from the original message (called the plaintext) to the encrypted version of the message. The other will be “abcdefghijklmnopqrstuvwxyz” (the lowercase alphabet. Your program will ask the user whether they want to 1) encrypt a message, 2) decrypt a message, or 3) quit. If they choose encrypt or decrypt, you...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT