250+ TOP MCQs on RC4 and RC5 and Answers

Cryptography Multiple Choice Questions & Answers on “RC4 and RC5”.

1. RC5 encryption uses Right shift and decryption uses Left shift.
a) True
b) False

Answer: b
Clarification: RC5 encryption rounds use left shift operations and the decryption uses right shift operations.

2. Till when was the RC4 algorithm kept a secret?
a) 1990
b) 1992
c) 1996
d) 1994

Answer: d
Clarification: In September 1994, the RC4 algorithm was anonymously posted on the Internet on the Cypherpunks anonymous remailers list.

3. The code bellow is the RC5 encryption pseudo code in C language.
What is the error?
LE0 = A + S[0];
RE0 = B + S [1];
for i = 1 to r do
LEi = ((LEi-1 ⊕ REi-1) >>> REi-1) + S [2xi];
REi = ((REi-1 ⊕ LEi) <<< LEi) + S [2xi+1];

a) The left shift operation (should be right shift)
b) The right shift operation (should be left shift)
c) LEi-1 and REi-1 should be LEi and REi
d) The for loop runs from 1 to r-1 ( not 1 to r)

Answer: b
Clarification:
Correct code –
LE0 = A + S[0];
RE0 = B + S [1];
for i = 1 to r do
LEi = ((LEi-1 ⊕ REi-1) <<<REi-1) + S [2xi];
REi = ((REi-1 ⊕ LEi) <<< LEi) + S [2xi+1];

4. “RC5 uses the Feistel Structure.”
a) True
b) False

Answer: b
Clarification: RC5 does not use the classic Feistel structure.

5. Find the error in the Decryption pseudo code for RC5 –
for i = 1 to r do
RDi-1 = ((RDi – S [2xi+1] >>> LDi ) ⊕ LDi);
LDi-1 = ((LDi – S [2xi] >>> RDi-1) ⊕ RDi-1);
B= RD0 + S [1];
A = LD0 – S [0];

a) B= RD0 + S [1];
b) for i = 1 to r do
c) LDi-1 = ((LDi – S [2xi] >>> RDi-1) ⊕ RDi-1);
d) A = LD0 – S [0];

Answer: a
Clarification: B= RD0 + S [1]; is incorrect as there should be a ‘-’ instead.

6. Which one of the following is not a RC5 mode of operation?
a) RC5 block cipher
b) RC5-Cipher Block Chaining
c) RC5-Cipher Padding
d) RC5-CipherText Stealing

Answer: c
Clarification: RFC 2040 [BALD96] defines four different modes of operation:
1. RC5 block cipher
2. RC5-CBC
3. RC5-CBC-Pad
4. RC5-CTS.

7. Which RC5 mode will have the ciphertext longer than the plaintext by at most the size of a single RC5 block?
a) RC5 block cipher
b) RC5-Cipher Block Chaining
c) RC5-Cipher Block Chaining Pad
d) RC5-CipherText Stealing

Answer: c
Clarification: The Cipher Block Chaining Pad mode produces a ciphertext output as such.

8. RC4 algorithm uses the concept of Block Cipher System.
a) True
b) False

Answer: b
Clarification: RC4 algorithm uses the concept of Stream Cipher and uses a “stream key”.

9. Which of these is not a characteristic of block ciphers?
a) Variable key length / block size / number of rounds
b) Mixed operators, data/key dependent rotation
c) Key independent S-boxes
d) More complex key scheduling

Answer: c
Clarification:
Features seen in modern block ciphers are:
– Variable key length / block size / number of rounds
– Mixed operators, data/key dependent rotation
– Key dependent S-boxes
– More complex key scheduling
– Operation of full data in each round
– Varying non-linear functions.

10. Which one of the following RC4 algorithm not used in?
a) SSL
b) TLS
c) FTP
d) WEP

Answer: c
Clarification: RC4 is used in Secure Socket Layer, Transport Layer Security and Wired Equivalency Privacy. Not used in File Transfer Protocol.

250+ TOP MCQs on Secure Hash Algorithms (SHA) and Answers

Cryptography question bank on “Secure Hash Algorithms (SHA)”.

1. In the Theta step function, which is a substitution step, each bit value changes. Each bit is dependent on _________ other bits for its new value.
a) 13
b) 4
c) 7
d) 11

Answer: d
Clarification: In the theta function each bit is dependent on 11 other bits.

2. Which step function provides most amount of diffusion for the Keccak iteration step?
a) Theta
b) Rho
c) Pi
d) Chi

Answer: a
Clarification: The Theta step function provides the most significant amount of diffusion for the SHA-3.

3. The Pi step function can be written as-
a) (x, y) × (y, (x + y))
b) (x, y) × (y, (2x + 3y))
c) (x, 2y) × (y, (2x + 3y))
d) (x, 2y) × (y, (x + y))

Answer: b
Clarification: The Pi function is represented as (x, y) × (y, (2x + 3y)) in terms of matrix multiplication.

4. The CHI step involves which of the following gate operations?
a) AND and NAND
b) AND and XOR
c) XOR and NAND
d) XOR and XNOR

Answer: b
Clarification: The CHI step uses the AND and XOR operation.

5. Which matrix is used in the Rho/ Pi steps?
a) [(1 2 | 3 4)]t
b) [(0 2 | 1 4)]t
c) [(0 1 | 2 3)]t
d) [(1 3 | 2 4)]t

Answer: c
Clarification: [(0 1 | 2 3)]t is used to find the new (x, y) co-ordinates in the Rho/Pi function.

6. What are the new co-ordinates for (x, y) in the Rho step for t =3?
a) (1, 7)
b) (1, 4)
c) (3, 2)
d) none of the mentioned

Answer: d
Clarification: The correct answer is (1, 7) mod 5 which is (1, 2).
[(0 1 | 2 3)]3 + (1 , 0 ) gives the answer.

7. The Rho function is defined as : a[x, y, z] ← a[x, y, z-g(t)], where g(t) is defined as
a) (t+1)(t+2)/2
b) (t+1)(t-2)/2
c) (t-1)(t-2)/2
d) (t-1)(t+2)/2

Answer: a
Clarification: g(t) is defined as (t+1)(t+2)/2.

8. The Chi function is defined as
a) a[x] ← a[x] XOR ( a[x + 1]XOR 1) AND a[x+2])
b) a[x] ← a[x] AND ( a[x + 1]XOR 1) AND a[x+2])
c) a[x] ← a[x] AND ( a[x + 1] XOR a[x+2])
d) a[x] ← a[x] XOR ( a[x + 1] AND a[x+2])

Answer: a
Clarification: The Chi function is defined as a[x] ← a[x] XOR ( a[x + 1]XOR 1) AND a[x+2]).

9. In SHA-3, the Iota step function has a round constant which only works on the last lane.
a) True
b) False

Answer: b
Clarification: The Iota step function has a round constant which works on the first lane of the internal state array.

10. Which is the only step function that provides non-linear mapping?
a) Theta
b) Rho
c) Pi
d) Chi

Answer: d
Clarification: The Chi function provides non-linear mapping. Without it SHA-3 would be linear.

11. How many bit positions are active and can affect L[0, 0] in the Iota step function?
a) 8
b) 12
c) 6
d) 7

Answer: d
Clarification: 7 bit positions are active and can affect L[0, 0] in the Iota step function.

250+ TOP MCQs on Cryptography Overview and Answers

Basic Cryptography questions and answers on “Overview”.

1. In AES, to make the s-box, we apply the transformation –
b’i = bi XOR b(i+4) XOR b(i+5) XOR b(i+6) XOR b(i+7) XOR ci
What is ci in this transformation?
a) ci is the ith bit of byte c with value 0x63
b) ci is the ith bit of byte c with value 0x25
c) ci is the ith bit of byte c with value 0x8F
d) ci is the ith bit of byte c with value 0x8A

Answer: a
Clarification: ci is the ith bit of byte c with value 0x63 i.e,
c = 01100011

2. The inverse s-box permutation follows,
b’i = b(i+2) XOR b(i+5) XOR b(i+7) XOR di
Here di is –
a) di is the ith bit of a byte ‘d’ whose hex value is 0x15
b) di is the ith bit of a byte ‘d’ whose hex value is 0x05
c) di is the ith bit of a byte ‘d’ whose hex value is 0x25
d) di is the ith bit of a byte ‘d’ whose hex value is 0x51

Answer: b
Clarification: The value of ‘d’ is 0x05.

3. What is the block size in the Simplified AES algorithm?
a) 8 bits
b) 40 bits
c) 16 bits
d) 36 bits

Answer: b
Clarification: The block size for the AES algorithm is 16 bits.

4. Which function can be used in AES multiplication –
a) m(x)=x7+x4+x3
b) m(x)=x8+x4+x3+x+1
c) m(x)=x8+x3+x2+x+1
d) m(x)=x8+x5+x3+x

Answer: b
Clarification: m(x)=x8+x4+x3+x+1 stands for 100011011 which is an irreducible polynomial. Others are not irreducible polynomials.

5. In the DES algorithm the Round Input is 32 bits, which is expanded to 48 bits via ______________
a) Scaling of the existing bits
b) Duplication of the existing bits
c) Addition of zeros
d) Addition of ones

Answer: a
Clarification: The round key is 48 bits. The input is 32 bits. This input is first expanded to 48 bits (permutation plus an expansion), that involves duplication of 16 of the bits.

6. Using Differential Crypt-analysis, the minimum computations required to decipher the DES algorithm is-
a) 256
b) 243
c) 255
d) 247

Answer: d
Clarification: Differential Crypt-analysis requires only 247 computations to decipher the DES algorithm.

7. Using SDES, the Plaintext for the Ciphertext 00001111, given that the key is 1111111111 is,
a) 01100111
b) 00001010
c) 11111111
d) 01101101

Answer: c
Clarification: Perform the SDES Decryption algorithm and compute the cipher text.

8. 12. For p = 11 and q = 17 and choose e=7. Apply RSA algorithm where Cipher message=11 and thus find the plain text.
a) 88
b) 122
c) 143
d) 111

Answer: a
Clarification: n = pq = 11 × 19 = 187.
C=M^e mod n ; C=11^23 mod 187 ; C = 88 mod 187.

9. Reduce the following Big-O notation. O[ ax7 + 3 x3 + sin(x)] =
a) O[ax7].
b) O[sin(x)].
c) O[x7].
d) O[x7 + x3].

Answer: c
Clarification: O[ ax7 + 3 x3 + sin(x)] = O(ax7) = O(x7).

10. Reduce the following Big-O notation. O[ en + an10] =
a) O[ an10].
b) O[ n10 ].
c) O[ en ].
d) O[ en+ n10 ].

Answer: c
Clarification: O[ en + an10 ] = O[ en ].

250+ TOP MCQs on Transport Layer Security and HTTPS and Answers

Network Security Multiple Choice Questions & Answers on “Transport Layer Security and HTTPS”.

1. In the SSLv3 the padding bits are ____________ with the secret key.
a) Padded
b) XORed
c) Concatenated
d) ANDed

Answer: c
Clarification: The padding bits are concatenated with the secret key.

2. Which of the following is not a valid input to the PRF in SSLv3?
a) secret value
b) identifying label
c) initialization vector
d) secret value

Answer: c
Clarification: The PRF does not require an initialization vector.

3. Which of the following alert codes is not supported by SSLv3?
a) record_overflow
b) no_certificate
c) internal_error
d) decode_error

Answer: b
Clarification: no_certificate is not supported by the SSLv3.

4. We encounter the record_overflow error when the payload length exceeds –
a) 214 + 1024
b) 216 + 1024
c) 214 + 2048
d) 216 + 2048

Answer: c
Clarification: The overflow error is encountered when the length exceeds 214 + 2048.

5. Which key exchange technique is not supported by SSLv3?
a) Anonymous Diffie-Hellman
b) Fixed Diffie-Hellman
c) RSA
d) Fortezza

Answer: d
Clarification: Fortezza is not supported in SSLv3.

6. Calculation of the certificate_verify in TLS involves the use of a finished_label. The finished_label is the string-
a) client finished for the client
b) client finished for the client, server finished for the server
c) server finished for the server
d) client finished for the server, server finished for the client

Answer: b
Clarification: The finished_label is the string client finished for the client, server finished for the server.

7. In TLS padding cann be upto a maximum of –
a) 79 bytes
b) 127 bytes
c) 255 bytes
d) none of the mentioned

Answer: c
Clarification: Padding can be upto a maximum of 255 bytes.

8. URL stands for –
a) Universal Remote Locator
b) Universal Resource Language
c) Uniform Resource Locator
d) Uniform Resource Language

Answer: c
Clarification: URL stands for Uniform Resource Locator.

9. HTTPS stands for Hypertext Transfer Protocol over TLS.
a) True
b) False

Answer: a
Clarification: The statement is true. HTTPS is HTTP invoked over SSL/TLS.

10. An HTTP connection uses port _________ whereas HTTPS uses port ____________ and invokes SSL.
a) 40; 80
b) 60; 620
c) 80; 443
d) 620; 80

Answer: c
Clarification: HTTP uses 80 ports, whereas HTTPS uses 443 ports.

250+ TOP MCQs on Polynomial and Modular Arithmetic

tricky Cryptography questions and answers on “Polynomial and Modular Arithmetic”.

1. (6x2 + x + 3)x(5x2 + 2) in Z_10 =
a) x3 + 2x + 6
b) 5x3 + 7x2 + 2x + 6
c) x3 + 7x2 + 2x + 6
d) None of the mentioned

Answer: b
Clarification:(6x2 + x + 3)x(5x2 + 2) in Z_10 = 5x3 + 7x2 + 2x + 6. We can find this via basic polynomial arithmetic in Z_10.

2. Is x3 + 1 reducible over GF(2)
a) Yes
b) No
c) Can’t Say
d) Insufficient Data

Answer: a
Clarification: Reducible: (x + 1)(x2 + x + 1).

3. Is x3 + x2 + 1 reducible over GF(2)
a) Yes
b) No
c) Can’t Say
d) Insufficient Data

Answer: b
Clarification: Irreducible. On factoring this polynomial, one factor is x and the other is (x + 1), which gives us the roots x = 0 or x = 1 respectively. By substitution of 0 and 1 into this polynomial, it clearly has no roots.

4. Is x4 + 1 reducible over GF(2)
a) Yes
b) No
c) Can’t Say
d) Insufficient Data

Answer: a
Clarification: Reducible: (x + 1)4.

5. The result of (x2 ⊗ P), and the result of (x ⊗ (x ⊗ P)) are the same, where P is a polynomial.
a) True
b) False

Answer: a
Clarification: The statement is true and this is the logic used behind the multiplication of polynomials on a computer. This reduces computation time.

6. The GCD of x3+ x + 1 and x2 + x + 1 over GF(2) is
a) 1
b) x + 1
c) x2
d) x2 + 1

Answer: a
Clarification: The GCD of x3 + x + 1 and x2 + x + 1 over GF(2) is 1.

7. The GCD of x5+x4+x3 – x2 – x + 1 and x3 + x2 + x + 1 over GF(3) is
a) 1
b) x
c) x + 1
d) x2 + 1

Answer: c
Clarification: The GCD of x5+x4+x3 – x2 – x + 1 and x3 + x2 + x + 1 over GF(3) is x + 1.

8. The GCD of x3 – x + 1 and x2 + 1 over GF(3) is
a) 1
b) x
c) x + 1
d) x2 + 1

Answer: a
Clarification: The GCD of x3 – x + 1 and x2 + 1 over GF(3) is 1.

9. Find the 8-bit word related to the polynomial x6 + x + 1
a) 01000011
b) 01000110
c) 10100110
d) 11001010

Answer: a
Clarification: The respective 8-bit word is 01000011.

10. If f(x)=x7+x5+x4+x3+x+1 and g(x)=x3+x+1, find f(x) + g(x).
a) x7+x5+x4
b) x7+x5+x4+x3+x
c) x4+x2+x+1
d) x6+x4+x2+x+1

Answer: a
Clarification: Perform Modular addition.

250+ TOP MCQs on Number Theory and Answers

Cryptography Multiple Choice Questions on “Number Theory”.

1. Equations have either no solution or exactly three incongruent solutions
a) True
b) False

Answer: b
Clarification: Equations has either no solution or exactly two incongruent solutions.

2. Find the solution of x2≡ 3 mod 11
a) x ≡ -9 mod 11 and x≡ 9 mod 11
b) x ≡ 9 mod 11
c) No Solution
d) x ≡ 5 mod 11 and x ≡ 6 mod 11

Answer: d
Clarification: On finding the quadratic congruencies we get x ≡ 5 mod 11 and x ≡ -5 mod 11.

3. Find the solution of x2≡ 2 mod 11
a) No Solution
b) x ≡ 9 mod 11
c) x ≡ 4 mod 11
d) x ≡ 4 mod 11 and x ≡ 7 mod 11

Answer: a
Clarification: There is no solution possible on solving the congruency.

4. Find the set of quadratic residues in the set –
Z11* = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
a) QR set = {1, 2, 4, 5, 9} of Z11*
b) QR set = {1, 3, 6, 5, 9} of Z11*
c) QR set = {1, 3, 4, 9,10} of Z11*
d) QR set = {1, 3, 4, 5, 9} of Z11*

Answer: d
Clarification: QR set = {1, 3, 4, 5, 9} of Z11* is the set of quadratic residues. The values which have solutions fall under the QR set.

5. In Zp* with (p-1) elements exactly:
(p – 1)/2 elements are QR and
(p – 1)/2 elements are QNR.
a) True
b) False

Answer: a
Clarification: The statement is true concerning elements of Zp* with (p-1) elements.

6. Find the set of quadratic residues in the set –
Z13* = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12}
a) QR { 1, 2, 4,5, 10, 12}
b) QR { 2, 4, 5, 9, 11, 12}
c) QR { 1, 2, 4,5,10, 11}
d) QR { 1, 3, 4, 9, 10, 12}

Answer: d
Clarification: QR { 1, 3, 4, 9, 10, 12}of Z13* is the set of quadratic residues. The values which have solutions fall under the QR set.

7. Euler’s Criterion can find the solution to x2 ≡ a (mod n).
a) True
b) False

Answer: b
Clarification: Euler’s Criterion cannot find the solution to x2 ≡ a (mod n).

8. Find the solution of x2≡ 15 mod 23 has a solution.
a) True
b) False

Answer: b
Clarification: a=15 (15)((23-1)/2)≡(15)11≡-1 (QNR and no solution).

9. Find the solution of x2≡ 16 mod 23
a) x = 6 and 17
b) x = 4 and 19
c) x = 11 and 12
d) x = 7 and 16

Answer: b
Clarification: a=16 (16)((23+1)/4) ≡ (16)6≡1 (QR and there is solution).
x ≡ ±16(23 + 1)/4 (mod 23) ≡±4 i.e. x = 4 and 19.

10. Find the solution of x^2≡3 mod 23
a) x≡±16 mod 23
b) x≡±13 mod 23
c) x≡±22 mod 23
d) x≡±7 mod 23

Answer: a
Clarification: a=3 3((23+1)/4)≡36≡1 (QR and there is solution).
x ≡ ±3(23 + 1)/4 (mod 23) ≡±16 i.e. x = 7 and 16.

11. Find the solution of x2≡ 2 mod 11 has a solution.
a) True
b) False

Answer: b
Clarification: 2 is a QNR.

12. Find the solution of x2≡7 mod 19
a) x≡±16 mod 23
b) x≡±11 mod 23
c) x≡±14 mod 23
d) x≡±7 mod 23

Answer: b
Clarification: a=7 7((19+1)/4)≡75≡1 (QR and there is solution)
x ≡ ±7(19 + 1)/4 (mod 19) ≡±11 i.e. x = 11 and 12.

13. If we use exponentiation to encrypt/decrypt, the adversary can use logarithm to attack and this method is very efficient.
a) True
b) False

Answer: b
Clarification: The first part of the statement is true. But this method is very inefficient as it uses the exhaustive search method.