Data Structures & Algorithms Multiple Choice Questions on “Affine Cipher”.
1. Which of the following cipher makes use of linear algebra for encrypting data? Answer: b 2. Which of the following cipher requires only one key for decoding the ciphered text? Answer: a 3. Choose the weakest cipher from the following? Answer: c 4. What is the formula used for encryption of data using affine cipher(a,b are constants and x is the numerical equivalent of a letter to be encrypted)? Answer: b 5. What is the formula used for decoding the ciphered text using affine cipher(a,b are constants and x is the numerical equivalent of a letter to be encrypted)? Answer: a 6. Affine cipher is an example of? Answer: a 7. Affine cipher is less secure than caesar cipher. 8. Affine cipher is not susceptible to frequency analysis. Answer: b 9. What will be the ciphered text corresponding to plain text “” if an affine cipher is used with key values as a=5, b=10? 10. What will be the plain text corresponding to ciphered text “rmw ” if an affine cipher is used with key values as a=5, b=10? Answer: c 11. While choosing the value of a and m (m is the no. of alphabets) in affine cipher it must be ensured that? Answer: c
a) polybius square cipher
b) affine cipher
c) caesar cipher
d) rail fence cipher
Clarification: Affine cipher is the only cipher out of the given options that make use of linear algebra for the purpose of encryption. It is a type of mono alphabetic cipher.
a) Affine cipher
b) RSA
c) DSA
d) PKCS
Clarification: Asymmetric cipher makes use of 2 keys for the purpose of encryption. As affine cipher is the only symmetric cipher out of the given options so it requires only one key.
a) Vigenere cipher
b) Autokey cipher
c) Affine cipher
d) Hill cipher
Clarification: Affine cipher is the weakest cipher out of the given options as it is a mono alphabetic cipher and other options are poly alphabetic ciphers. So it is quite vulnerable to frequency analysis.
a) ax+b
b) (ax+b)%26
c) ax2+bx
d) (ax2+bx)%26
View Answer
Clarification: Affine cipher uses linear algebra for the purpose of encryption. It uses the formula (ax+b)%26 for this purpose.
a) a-1(x-b)%26
b) (ax+b)%26
c) b-1(x-a)%26
d) b-1(x-a)
Clarification: Affine cipher uses linear algebra for the purpose of encryption. It uses the formula a-1(x-b)%26 for decryption of ciphered text.
a) Mono alphabetic cipher
b) Poly alphabetic cipher
c) Transposition cipher
d) Asymmetric cipher
Clarification: Affine cipher falls in the category of mono alphabetic substitution cipher. It uses linear algebra for encrypting the plain text.
a) true
b) false
Answer: b
Clarification: Affine cipher is more secure as compared to caesar cipher. But affine cipher is a very weak cipher as it can be easily broken using frequency analysis.
a) true
b) false
Clarification: Affine cipher is a very weak cipher as it can be easily broken using frequency analysis. It can be easily cracked even if 2 characters are known.
a) wkxjcgxzra
b) gkxteuxfzw
c) ukxhmyxdfg
d) rfsexbsumv
Answer: a
Clarification: Affine cipher uses linear algebra for the purpose of encryption. It uses the formula (ax+b)%26 for this purpose. So the ciphered text will be “wkxjcgxzra”.
a) csk
b) kkr
c) srt
d) msd
Clarification: Affine cipher uses linear algebra for the purpose of encryption It uses the formula a-1(x-b)%26 for decryption of ciphered text. So the plain text will be “srt”.
a) a and m are prime numbers
b) a and m are odd numbers
c) a and m are coprime
d) a and m are even numbers
Clarification: While choosing the values of a and m it should be ensured that a and m are coprime. Otherwise decoding the ciphered text would be difficult.