Rail Fence Cipher Multiple Choice Questions and Answers (MCQs)

«
»

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
View Answer

Answer: c
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.
advertisement

2. Rail fence cipher is an example of ___________
a) mono-alphabetic cipher
b) poly-alphabetic cipher
c) transposition cipher
d) additive cipher
View Answer

Answer: c
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
View Answer

Answer: a
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
View Answer

Answer: b
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
View Answer

Answer:d
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.
advertisement

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
View Answer

Answer: b
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.
a) True
b) False
View Answer

Answer: b
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?
a) MSGSEC
b) SECMSG
c) GSMSEC
d) SECGSM
View Answer

Answer: b
Explanation: For decryption we reverse the process used in encryption.

S C S
E M G

So the resulting plain text is “SECMSG”.

advertisement

9. Rail fence cipher is more secure than one time pad cipher.
a) True
b) False
View Answer

Answer: b
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
View Answer

Answer: b
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?
a) SNONRAFUDY
b) SORAFUDYNN
c) SNAUDNORFY
d) SANFOUNDRY
View Answer

Answer: a
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.

S N O N R
A F U D Y

So the ciphered text becomes “SNONRAFUDY”.

advertisement

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.

advertisement
advertisement
advertisement
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage, Advanced C Programming, SAN Storage Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him @ LinkedIn