250+ TOP MCQs on Number Theory and Answers

Cryptography Multiple Choice Questions on “Number Theory”.

1. If a|b and b|c, then a|c.
a) True
b) False

Answer: a
Clarification: The statement is true. For ex, 11|66 and 66|198 = 11|198.

2. GCD(a,b) is the same as GCD(|a|,|b|).
a) True
b) False

Answer: a
Clarification:This is true. gcd(60,24) = gcd(60,-24) = 12.

3. Calculate the GCD of 1160718174 and 316258250 using Euclidean algorithm.
a) 882
b) 770
c) 1078
d) 1225

Answer: c
Clarification: GCD(1160718174, 316258250) = 1078.

4. Calculate the GCD of 102947526 and 239821932 using Euclidean algorithm.
a) 11
b) 12
c) 8
d) 6

Answer: d
Clarification: GCD(102947526, 239821932) = 6.

5. Calculate the GCD of 8376238 and 1921023 using Euclidean algorithm.
a) 13
b) 12
c) 17
d) 7

Answer: a
Clarification: GCD(8376238, 1921023) = 13.

6. What is 11 mod 7 and -11 mod 7?
a) 4 and 5
b) 4 and 4
c) 5 and 3
d) 4 and -4

Answer: d
Clarification:11 mod 7 = 4 ; -11 mod 7 = -4 mod 7 = 3 mod 7.

7. Which of the following is a valid property for concurrency?
a) a = b (mod n) if n|(a-b)
b) a = b (mod n) implies b = a (mod n)
c) a = b (mod n) and b = c (mod n) implies a = c (mod n)
d) All of the mentioned

Answer: d
Clarification: All are valid properties of congruences and can be checked by using substituting values.

8. [(a mod n) + (b mod n)] mod n = (a+b) mod n
a) True
b) False

Answer: a
Clarification: The equivalence is true and can be checked by substituting values.

9. [(a mod n) – (b mod n)] mod n = (b – a) mod n
a) True
b) False

Answer:b
Clarification:The equivalence is false and can be checked by substituting values. The correct equivalence would be [(a mod n) – (b mod n)] mod n = (a – b) mod n.

10. 117 mod 13 =
a) 3
b) 7
c) 5
d) 15

Answer: d
Clarification: The correct answer is 2. Or in this case 15 mod 13 = 2.

11. The multiplicative Inverse of 1234 mod 4321 is
a) 3239
b) 3213
c) 3242
d) Does not exist

Answer: a
Clarification: The multiplicative Inverse of 1234 mod 4321 is 3239.

12. The multiplicative Inverse of 550 mod 1769 is
a) 434
b) 224
c) 550
d) Does not exist

Answer: a
Clarification: The multiplicative Inverse of 550 mod 1769 is 550.

13. The multiplicative Inverse of 24140 mod 40902 is
a) 2355
b) 5343
c) 3534
d) Does not exist

Answer: d
Clarification: The multiplicative Inverse does not exist as GCD (24140, 40902) = 34.

250+ TOP MCQs on Pseudorandom Number Generators and Stream Ciphers

Cryptography Multiple Choice Questions on “Pseudorandom Number Generators and Stream Ciphers”.

1. Which mode is recommend for the NIST SP 800-90 Random number generator?
a) OFB
b) CBC
c) CFB
d) CTR

Answer: d
Clarification: OFB is the recommended mode for the NIST SP 800-90 Random number generator.

2. ANSI X9.17 uses which cryptographic algorithm?
a) DES
b) AES
c) RC5
d) 3DES

Answer: d
Clarification: ANSI X9.17 uses the Triple DES (3DES) algorithm.

3. Pretty Good Privacy(PGP) uses which PRNG?
a) ANSI X9.82
b) RFC 4086
c) NIST SP 800-90
d) ANSI X9.17

Answer: d
Clarification: Pretty Good Privacy(PGP) uses ANSI X9.17 as its PRNG.

4. Which of the following statements are true?
i) Stream Ciphers are fasters than Block Ciphers
ii) Block Ciphers can reuse keys
iii) Block ciphers use lesser code than stream ciphers

a) 1st and 2nd
b) 1st only
c) 2nd and 3rd
d) All are true

Answer: a
Clarification: Block ciphers use more code than stream ciphers.

5. Which of the following statements are true?
i) RC4 is used in SSL/TLS
ii) File transfer, e-mail use stream ciphers
iii) Browser/Web Links use stream ciphers

a) 1st and 2nd
b) 1st only
c) 1st and 3rd
d) All are true

Answer: c
Clarification: File transfer, e-mail use block ciphers.

6. Which of the following statements are true?
i) PRNGs are slower than TRNGs
ii) PRNGs are periodic
iii) TRNGs are nondeterministic

a) 1st and 2nd
b) 1st only
c) 2nd and 3rd
d) All are true

Answer: c
Clarification: PRNGs are faster than TRNGs.

7. Deskewing is a method to modify bit stream to reduce bais that has been developed.
a) True
b) False

Answer: a
Clarification: The statement is true.

8. Intel digital random number generator uses which among the following methods to generate random bits?
a) pulse detectors of ionizing radiating events
b) gas discharge tubes
c) wind resistance
d) thermal noise

Answer: d
Clarification: Intel DRNGs use thermal noise for generation of the random bits.

9. Which of the following AES modes is used in the Intel DRNG?
i) AES CFB
ii) AES CTR
iii) AES CBC
iv) AEC OFB

a) 2nd and 3rd
b) 3rd and 4th
c) 1st and 2nd
d) All of the mentioned

Answer: a
Clarification: AES CTR and AES CBC are the 2 modes used in the INTEL DRNGs.

10. The number of transistors used in the INTEL DRNG
a) 8
b) 2
c) 4
d) 5

Answer: b
Clarification: 2 transistors are used which toggle the randomly generated bit from the thermal source.

250+ TOP MCQs on Hash Functions Based on Cipher Block Chaining

Cryptography Multiple Choice Questions on “Hash Functions Based on Cipher Block Chaining”.

1. What is the effectiveness of an n-bit hash value?
a) 2n
b) 2-n
c) 22n
d) 2-2n

Answer: b
Clarification: When an n-bit hash value is used its effectiveness is 2^-n, that is, the probability that a data error will result in an unchanged hash value is 2-n.

2. What is the effectiveness of a 128 bit hash value?
a) 2-64
b) 264
c) 2-112
d) 2-128

Answer: c
Clarification: In most normal text files, the high order bit of each octet is always zero. So if a 128 bit hash value is used, instead of an effectiveness of 2-128, the hash function will have an effectiveness of 2-112.

3. We define collision as: A collision occurs if we have x=y and H(x) = H(y).
a) True
b) False

Answer: b
Clarification: A collision occurs if we have x not equal to y and H(x) = H(y).

4. Consider the following properties
Variable Input size
Fixed Output size
Efficiency
Pre image resistant
Second Pre image Resistant
Collision resistant
Pseudo randomness

A has function that satisfies the first _______ properties in the above table is referred to as a weak hash function.
a) 5
b) 4
c) 3
d) 2

Answer: a
Clarification: If the sixth property is also satisfied it is referred to as a strong hash function.

5. The second pre-image resistant property is
a) It is computationally infeasible to find any pair (x, y) such that H(x) = H(y)
b) For any given block x, it is computationally infeasible to find y not equal to x, with H(y) = H(x)
c) For any given hash value h it is computationally infeasible to find y such that H(y) = h
d) None of the mentioned

Answer: b
Clarification: The second pre-image property is defined by: For any given block x, it is computationally infeasible to find y not equal to x, with H(y) = H(x).

6. A function that is second pre-image resistant is also collision resistant.
a) True
b) False

Answer: b
Clarification:The statement is false. A function that is collision resistant is also second image resistant.

7. For an m-bit value, the adversary would have to try ____________ values to generates a given hash value h.
a) 2m
b) 2(m-1)
c) 2(m/2)
d) (2m) – 1

Answer: b
Clarification: The adversary would have to try 2(m-1) values to generates a given hash value h.

8. For an m bit hash value, if we pick data blocks at random we can expect to find two data blocks with the same hash value within ____ attempts.
a) 2m
b) 2(m-1)
c) 2(m/2)
d) (2m) – 1

Answer: c
Clarification: This is known as the birthday paradox. If we choose random variables from a uniform distribution in the range 0 through N-1, then the probability that a repeated element is encountered exceeds 0.5 after root (N) choices have been made.

9. Which attack requires the least effort/computations?
a) Pre-image
b) Second Pre-image
c) Collision
d) All required the same effort

Answer: c
Clarification: Due to the birthday paradox it requires 2(m/2) computations only.

250+ TOP MCQs on Public Keys and X.509 Certificates and Answers

Cryptography Problems on “Public Keys and X.509 Certificates”.

1. How many handshake rounds are required in the Public-Key Distribution Scenario?
a) 7
b) 5
c) 3
d) 4

Answer: a
Clarification: A total of seven messages are required in the Public-Key distribution scenario.

2. A total of seven messages are required in the Public-Key distribution scenario. However, the initial five messages need to be used only infrequently because both A and B can save the other’s public key for future – a technique known as ____
a) time stamping
b) polling
c) caching
d) squeezing

Answer: c
Clarification: This technique is known as caching.

3. X.509 certificate recommends which cryptographic algorithm?
a) RSA
b) DES
c) AES
d) Rabin

Answer: a
Clarification: RSA is the recommended cryptographic algorithm for X.509 certificates.

4. The issuer unique identifier of the X.509 certificates was added in which version?
a) 1
b) 2
c) 3
d) 4

Answer: b
Clarification: The issuer unique identifier was added in the 2nd version.

5. The period of validity consists of the date on which the certificate expires.
a) True
b) False

Answer: b
Clarification: The Period of validity consists of 2 dates: the first and last date on which the certificate is valid.

6. Certificate extensions fall into 3 categories. Which one of the following is not a Certificate extensions category?
a) Subject and Issuer attributes
b) Key and Policy information
c) Certification path constraints
d) All of the above are Certificate extensions categories

Answer: d
Clarification: Subject and Issuer attributes, Key and Policy information and Certification path constraints are the three categories of Certificate extensions.

7. How many functions are involved in the PKIX architectural model?
a) 3
b) 5
c) 6
d) 7

Answer: d
Clarification: The 7 functions are: Registration, Initialization, Certification, Key pair recovery, Key pair update, Revocation request and Cross certification.

8. CMP stands for
a) cipher message protocol
b) cipher management protocol
c) certificate message protocol
d) none of the mentioned

Answer: d
Clarification: CMP stands for certificate management protocol.

9. CMS stands for
a) cipher message syntax
b) certificate message session
c) cryptographic message syntax
d) none of the mentioned

Answer: c
Clarification: CMS stands for cryptographic message syntax.

250+ TOP MCQs on Designing Subnets and Answers

Network Security Multiple Choice Questions on “Designing Subnets”.

1. N_sub = n + log_2(N/N_sub) is used to find the suffix length.
a) True
b) False

Answer: b
Clarification: N_sub = n + log_2(N/N_sub) is used to find the prefix length.

2. An organization is granted the block 130.34.12.64/26. Find the number of addresses for the whole network.
a) 128
b) 32
c) 256
d) None of the mentioned

Answer: d
Clarification: N = 2(32-36) = 64.

3. An organization is granted the block 130.34.12.64/26. What is the last address of the network?
a) 130.34.12.63/26
b) 130.34.12.64/26
c) 130.34.12.127/26
d) 130.34.12.128/28

Answer: c
Clarification: Last address = 130.34.12.127/26.
This can be found via: Last address = (any address) OR [NOT (network mask)].

4. An organization is granted the block 130.34.12.64/26. The organization needs four subnetworks, each with an equal number of hosts. What is the number of addresses to each subnetwork?
a) 4
b) 16
c) 8
d) 32

Answer: b
Clarification: N = 2^(32-36) = 64.
Nsub= N/No. of subnetworks = 64/4 = 16.

5. In the above question, what is the subnetwork mask for each network?
a) 27
b) 29
c) 28
d) 26

Answer: c
Clarification: nsub1 = nsub2 = nsub3 = nsub4 = n + log2(N/Nsub) =26+ log2(64/16)= 28.

6. An organization is granted the block 130.34.12.64/26. The organization needs four subnetworks, each with an equal number of hosts. What is the first address for the 3rd subnetwork?
a) 130.34.12.64/28
b) 130.34.12.96/28
c) 130.34.12.96/26
d) 130.34.12.80/27

Answer: b
Clarification: Each subnetwork has 16 addresses. 64+32 = 96. This is the starting address of the 3rd block.

An organization is granted a block of addresses with the beginning address 14.24.74.0/24. The organization needs to have 3 subblocks of addresses to use in its three subnets as shown below:
One subblock of 120 addresses
One subblock of 60 addresses
One subblock of 10 addresses
Answer the following questions based on the above information –

7. Number of addresses :
a) 64
b) 128
c) 256
d) 512

Answer: c
Clarification: N = 2^(32-24) = 256.

8. Last Address –
a) 14.24.74.64/24
b) 14.24.74.127/24
c) 14.24.74.255/24
d) 14.24.74.256/24

Answer: c
Clarification: Last Address = 14.24.74.255/24
Last address = (any address) OR [NOT (network mask)].

9. The subnet mask nsub1=
a) 23
b) 25
c) 26
d) 27

Answer: b
Clarification: nsub1= n+log2(N/Nsub1) = 25.

10. First address of the second subblock –
a) 14.24.74.192/26
b) 14.24.74.128/26
c) 14.24.74.127/28
d) 14.24.74.67/27

Answer: b
Clarification: First address = 14.24.74.128/26
First address = (any address) AND (network mask).

11. Nsub3 =
a) 16
b) 14
c) 12
d) 10

Answer: a
Clarification: The number of addresses in the third subblock (10) is not a power of 2.
Thus, we allocate Nsub3 = 16 addresses.

12. First Address of the third subblock –
a) 14.24.74.128/28
b) 14.24.74.127 /28
c) 14.24.74.192/27
d) 14.24.74.192/28

Answer: d
Clarification: First address = 14.24.74.192/28
First address = (any address) AND (network mask).

13. The subnet mask nsub3=
a) 28
b) 27
c) 26
d) 24

Answer: a
Clarification: The subnet mask nsub3= n+log2(N/Nsub3) = 28.