This set of Data Structures & Algorithms Multiple Choice Questions & Answers (MCQs) focuses on “Rail Fence”.
1. What is the alternative name given to Rail fence cipher?
a) random cipher
b) matrix cipher
c) zig zag cipher
d) columnar cipher
Explanation: Rail fence cipher is also known as zig zag cipher. It is so because the plain text gets ciphered by arranging the letters in a zig zag fashion.
2. Rail fence cipher is an example of ___________
a) mono-alphabetic cipher
b) poly-alphabetic cipher
c) transposition cipher
d) additive cipher
Explanation: Rail fence cipher is a transposition cipher. It falls under the category of transposition cipher as it encrypts the plain text by rearranging its letters.
3. Encryption in Rail fence cipher is done using _____________
a) by arranging the letters in a zig zag fashion in a table
b) by randomly arranging letters
c) by arranging letters in vigenere table
d) by swapping adjacent letters
Explanation: Rail fence cipher is a transposition cipher. It encrypts a given plain text by arranging the letters in a zig zag fashion in a table.
4. Which of the following ciphers are created by shuffling the letters of a word?
a) substitution cipher
b) transposition cipher
c) vigenere cipher
d) hill cipher
Explanation: There are two types of traditional ciphers- Transposition and substitution cipher. In transposition cipher the letters of the given data are shuffled in a particular order, fixed by a given rule.
5. Which of the following is not a type of poly alphabetic cipher?
a) Autokey cipher
b) Hill cipher
c) One time pad cipher
d) Additive cipher
Explanation: 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 additive cipher is not a poly alphabetic cipher.
6. Which of the following is are two types of traditional cipher?
a) transposition cipher and replacement cipher
b) transposition cipher and substitution cipher
c) transforming cipher and substitution cipher
d) transforming cipher and replacement cipher
Explanation: There are two types of a traditional cipher. First is transposition cipher and the second is substitution cipher.
7. The number of columns in the table used for encryption in rail fence cipher depends upon the given key value.
Explanation: The number of columns in the table of rail fence cipher is always equal to the number of letters in the plain text. It is independent of the given key value.
8. What will be the plain text corresponding to cipher text “SCSEMG” if rail fence cipher is used with key value 2?
Explanation: For decryption we reverse the process used in encryption.
So the resulting plain text is “SECMSG”.
9. Rail fence cipher is more secure than one time pad cipher.
Explanation: One time pad cipher is one of the most secure traditional cipher as it is almost impossible to crack. Rail fence cipher is not very hard to crack. Thus rail fence cipher is less secure than one time pad cipher.
10. In which of the following cipher the plain text and the ciphered text have same letters?
a) autokey cipher
b) rail fence cipher
c) vigenere cipher
d) additive cipher
Explanation: In transposition cipher the letters remain the same in ciphered and plain text. Their position is only changed whereas in substitution cipher the letters become different in encrypted text. So rail fence cipher will be the correct option.
11. What will be the ciphered text if rail fence cipher is used for encrypting the plain text “SANFOUNDRY” with the key value given to be 2?
Explanation: For encrypting a plain text using rail fence cipher we use a table having the number of rows equal to key value as shown below. Then we read along the rows to get the ciphered text.
So the ciphered text becomes “SNONRAFUDY”.
Sanfoundry Global Education & Learning Series – Data Structures & Algorithms.
To practice all areas of Data Structures & Algorithms, here is complete set of 1000+ Multiple Choice Questions and Answers.