Data Structures & Algorithms Multiple Choice Questions on “Vigenère Cipher”.
1. What is the meaning of cipher in cryptography? Answer: c 2. Vigenere cipher is an example of ______________ 3. Encryption in Vigenere cipher is done using _________ Answer: c 4. Which of the following correctly defines poly alphabetic cipher? Answer: a 5. Which of the following is not a type of poly alphabetic cipher? Answer:d 6. Vigenere table consists of _________ Answer: a 7. Vigenere cipher is harder to decipher than keyword cipher. Answer: a 8. What will be the plain text corresponding to cipher text “PROTO” if vigenere cipher is used with keyword as “HELLO”? 9. Which cipher is represented by the following function? a) vigenere cipher 10. In which of the following cipher the plain text and the ciphered text does not have a same number of letters? Answer: b 11. What will be the ciphered text if the string “” is given as input to the code of vigenere cipher with keyword as “HELLO”? Answer: c & Algorithms. here is
a) an algorithm that performs encryption
b) an algorithm that generates a secret code
c) an algorithm that performs encryption or decryption
d) a secret code
Clarification: Cipher is an algorithm for performing encryption or decryption. In cryptography, a set of defined steps are followed to generate ciphers. These are necessary to prevent data breach.
a) mono-alphabetic cipher
b) poly-alphabetic cipher
c) transposition cipher
d) additive cipher
Answer: b
Clarification: Vigenere cipher is a substitution cipher. It falls under the category of poly alphabetic cipher as it uses multiple substitution at different positions in order to cipher the plain text.
a) vigenere formula
b) vigenere cycle
c) vigenere square
d) vigenere addition
Clarification: Encryption of plain text using vigenre cipher is done by making use of vigenere table. It is also known as vigenere square.
a) a substitution based cipher which uses multiple substitution at different positions
b) a substitution based cipher which uses fixed substitution over entire message
c) a transposition based cipher which uses multiple substitution at different positions
d) a transposition based cipher which uses fixed substitution over entire message
Clarification: Poly alphabetic cipher is a type of substitution cipher. It uses multiple substitution at different positions in order to cipher the plain text.
a) Rotor cipher
b) Hill cipher
c) One time pad cipher
d) Multiplicative cipher
Clarification: In poly alphabetic cipher each symbol of plain text is replaced by a different cipher text regardless of its occurrence. Out of the given options only multiplicative cipher is not a poly alphabetic cipher.
a) 26 rows and 26 columns
b) 26 rows and 1 column
c) 1 row and 26 columns
d) 27 rows and 27 columns
Clarification: Encryption of plain text using vigenre cipher is done by making use of vigenere table. It consists of 26 rows and 26 columns which have alphabets written 26 times. These are shifted towards left after each row.
a) true
b) false
Clarification: Keyword cipher is less secure than vigenere cipher. It is due to the fact that keyword cipher is mono alphabetic and thus can be cracked using frequency analysis. But vigenere cipher being a poly alphabetic cipher cannot be deciphered using this method.
a)
b) WORLD
c) INDIA
d) AMERICA
Answer: c
Clarification: Vigenere cipher is a type of poly alphabetic substitution which uses vigenere table for making substitutions in the plain text. Using the table we find the plain text to be “INDIA”.public class Cipher
{
public static String encrypt(String text, final String key)
{
String res = "";
text = text.toUpperCase();
for (int i = 0, j = 0; i < text.length(); i++)
{
char c = text.charAt(i);
if (c < 'A' || c > 'Z')
continue;
res += (char) ((c + key.charAt(j) - 2 * 'A') % 26 + 'A');
j = ++j % key.length();
}
return res;
}
b) hill cipher
c) keyword cipher
d) rotor cipher
Answer: a
Clarification: The given function represents the function of hill cipher. It is a type of poly alphabetic substitution which makes use of the vigenere table for making substitutions in the plain text.
a) affine cipher
b) vigenere cipher
c) columnar cipher
d) additive cipher
Clarification: In transposition cipher and mono alphabetic cipher the number of letters remain same in ciphered and deciphered text. But in poly alphabetic cipher the number of letters are different. So here as vigenere cipher is the only poly alphabetic cipher so it will be the answer.
a) UEWIIDKLL
b) ZEYQCOCM
c) ZEYQCBROCM
d) ZEYQCBROCMJDH
Clarification: Vigenere cipher is a type of poly alphabetic substitution which uses vigenere table for making substitutions in the plain text. Using the table we find the solution to be ZEYQCBROCM.