Multiple Choice Questions
Discrete Mathematics: Cryptography and Coding Theory
Topic: Cryptography and Coding Theory
Grade: 12
Question 1:
Which of the following encryption algorithms is NOT a symmetric key encryption algorithm?
A) AES
B) DES
C) RSA
D) Blowfish
Answer: C) RSA
Explanation: RSA is an asymmetric encryption algorithm, not a symmetric key encryption algorithm. It uses a pair of public and private keys for encryption and decryption. An example of a symmetric key encryption algorithm is AES, which uses the same key for both encryption and decryption.
Question 2:
In a public key encryption system, which key is used for encryption?
A) Public key
B) Private key
C) Session key
D) Symmetric key
Answer: A) Public key
Explanation: In a public key encryption system, the public key is used for encryption. The corresponding private key is used for decryption. This allows anyone to encrypt a message using the recipient\’s public key, but only the recipient with the private key can decrypt and read the message.
Question 3:
What is the purpose of a digital signature in cryptography?
A) Authentication
B) Encryption
C) Compression
D) Key exchange
Answer: A) Authentication
Explanation: A digital signature is used to authenticate the integrity and origin of a message. It provides proof that the message has not been tampered with during transmission and that it was indeed sent by the claimed sender. This is achieved by using the sender\’s private key to encrypt a hash of the message, which can then be decrypted using the sender\’s public key to verify the signature.
Question 4:
Which of the following is NOT a secure hash function?
A) MD5
B) SHA-1
C) SHA-256
D) HMAC
Answer: A) MD5
Explanation: MD5 is a cryptographic hash function, but it is considered insecure for most purposes due to its vulnerabilities. It is susceptible to collision attacks, where two different inputs produce the same hash output. SHA-1, SHA-256, and HMAC are all considered secure hash functions.
Question 5:
What is the purpose of a nonce in cryptography?
A) Key exchange
B) Message integrity
C) Authentication
D) Randomness generation
Answer: D) Randomness generation
Explanation: A nonce is a number that is used only once in a cryptographic communication. It is typically used to add randomness to encryption algorithms or to prevent replay attacks. For example, in a cryptographic protocol, a nonce can be used to ensure that each session key is unique and not reused.
Question 6:
Which of the following is an example of a block cipher mode of operation?
A) ECB
B) CBC
C) RSA
D) Diffie-Hellman
Answer: B) CBC (Cipher Block Chaining)
Explanation: ECB (Electronic Codebook) and CBC (Cipher Block Chaining) are both modes of operation for block ciphers. ECB encrypts each block of data independently, while CBC uses the output of the previous block to encrypt the current block, creating a chain. This provides better security as it introduces an element of feedback and makes the encryption more resistant to certain attacks.
Question 7:
Which of the following is a type of attack that aims to discover the secret key used in an encryption algorithm?
A) Brute-force attack
B) Man-in-the-middle attack
C) Denial-of-service attack
D) SQL injection attack
Answer: A) Brute-force attack
Explanation: A brute-force attack involves systematically trying all possible combinations of keys until the correct one is found. It is a time-consuming process, especially for longer and more complex keys. This type of attack is often used when the encryption algorithm is strong, but the key is weak or has a limited key space.
Question 8:
What is the maximum number of keys required for secure communication between n parties using symmetric key encryption?
A) n
B) n^2
C) 2n
D) n!
Answer: B) n^2
Explanation: In a symmetric key encryption system, each pair of parties requires a unique key for secure communication. Since there are n(n-1)/2 possible pairs of parties, the maximum number of keys required is n(n-1)/2, which can be simplified to n^2 – n.
Question 9:
Which of the following is a common error-detection code used in digital communication?
A) Hamming code
B) Huffman code
C) Gray code
D) Reed-Solomon code
Answer: A) Hamming code
Explanation: Hamming code is a common error-detection code used in digital communication. It is capable of detecting and correcting single-bit errors in transmitted data. It works by adding redundant parity bits to the original data bits, allowing the receiver to detect and correct any errors that may have occurred during transmission.
Question 10:
Which of the following is NOT a property of a secure encryption algorithm?
A) Confusion
B) Diffusion
C) Avalanche effect
D) Linearity
Answer: D) Linearity
Explanation: Linearity is not a property of a secure encryption algorithm. Secure encryption algorithms should have properties such as confusion, which makes the relationship between the key and the ciphertext complex, and diffusion, which spreads the influence of the plaintext throughout the ciphertext. The avalanche effect refers to the drastic change in the output when a small change is made to the input, and it is desirable in secure encryption algorithms.
Question 11:
Which of the following is a technique used in steganography to hide secret information within an image?
A) LSB substitution
B) Diffie-Hellman key exchange
C) RSA encryption
D) HMAC authentication
Answer: A) LSB substitution
Explanation: LSB (Least Significant Bit) substitution is a technique used in steganography to hide secret information within an image. It involves replacing the least significant bits of pixel values with the secret data. Since the changes are minimal, they are often imperceptible to the human eye, allowing the secret information to be hidden within the image.
Question 12:
Which of the following is a technique used in public key cryptography to ensure the authenticity and integrity of a message?
A) Digital signature
B) Hash function
C) One-time pad
D) Substitution cipher
Answer: A) Digital signature
Explanation: A digital signature is a technique used in public key cryptography to ensure the authenticity and integrity of a message. It involves using the sender\’s private key to encrypt a hash of the message, which can then be decrypted using the sender\’s public key to verify the signature. This provides proof that the message has not been tampered with during transmission and that it was indeed sent by the claimed sender.
Question 13:
Which of the following is a technique used in error correction codes to recover lost or corrupted data?
A) Forward error correction
B) Backward error correction
C) Error detection
D) Error propagation
Answer: A) Forward error correction
Explanation: Forward error correction is a technique used in error correction codes to recover lost or corrupted data. It involves adding redundant information to the transmitted data in such a way that the receiver can use it to correct errors without the need for retransmission. This is particularly useful in situations where retransmission is not possible or would introduce unacceptable delays.
Question 14:
Which of the following is a type of attack that attempts to obtain sensitive information by intercepting and altering communication between two parties?
A) Man-in-the-middle attack
B) Brute-force attack
C) Denial-of-service attack
D) SQL injection attack
Answer: A) Man-in-the-middle attack
Explanation: A man-in-the-middle attack involves intercepting and altering communication between two parties without their knowledge. The attacker can eavesdrop on the communication, modify the data being transmitted, or even impersonate one or both parties. This allows the attacker to obtain sensitive information or manipulate the communication for malicious purposes.
Question 15:
Which of the following is NOT a property of a secure hash function?
A) Pre-image resistance
B) Collision resistance
C) Second pre-image resistance
D) Linearity
Answer: D) Linearity
Explanation: Linearity is not a property of a secure hash function. Secure hash functions should have properties such as pre-image resistance, which means it is computationally infeasible to determine the original input from the hash value, collision resistance, which means it is unlikely to find two different inputs that produce the same hash value, and second pre-image resistance, which means it is difficult to find a second input that produces the same hash value as a given input.