📝 Symmetric key encryption DES AES (51 MCQs)
📖 From Data Communication and Networks • 31. Cryptography and Network Security • 51 questions available
What is Symmetric key encryption DES AES?
Symmetric key encryption uses the same secret key for both encryption and decryption, with DES being an older, now-insecure standard and AES being the modern, widely trusted algorithm that efficiently protects data through strong mathematical transformations.
📝 All Symmetric key encryption DES AES MCQs
Q1. If a symmetric cipher uses a 128‑bit key and a related‑key attack reduces the effective key space by half, what is the new key space size?
📖 Explanation: A related‑key attack that halves the key space leaves possible keys. This reduction directly impacts brute‑force effort, making the cipher easier to break. The other options either leave the space unchanged or increase it, which is inconsistent with the attack description.
Q2. Why does Electronic Codebook (ECB) mode produce identical ciphertext blocks for identical plaintext blocks?
📖 Explanation: ECB encrypts each block separately using the same secret key and no chaining or randomization. Consequently, identical plaintext blocks undergo the same transformation, yielding identical ciphertext blocks. The other options describe mechanisms (IV, chaining, counters) that introduce variability, which ECB lacks.
Q3. A stream cipher repeats its keystream after 2^20 bits. What is the primary security risk when encrypting messages longer than this period?
📖 Explanation: When the keystream repeats, XORing two ciphertexts encrypted with the same keystream yields the XOR of the two plaintexts. This leakage allows an attacker to recover information about both messages, a classic vulnerability of reused keystreams. The other options are not direct consequences of keystream repetition.
Q4. If a block cipher in CBC mode uses an all‑zero IV, what effect does this have on the security of the first block compared to a random IV?
📖 Explanation: Using an all‑zero IV makes the first ciphertext block a deterministic function of the plaintext and key, revealing patterns if the same plaintext is encrypted multiple times. A random IV would randomize the first block, preventing such leakage. The other choices misstate the role of the IV.
Q5. Suppose a designer replaces the S‑box in AES with a linear transformation. How does this modification affect the cipher's resistance to differential cryptanalysis?
📖 Explanation: Differential cryptanalysis exploits non‑linear relationships. Replacing the non‑linear S‑box with a linear mapping removes the primary source of confusion, making the cipher highly vulnerable to differential attacks. Hence resistance is dramatically lowered, while speed may increase but at the cost of security.
Q6. A designer argues that increasing the block size from 64 bits to 128 bits automatically doubles security. Which logical flaw does this statement contain?
📖 Explanation: Security depends on the entire algorithm, not merely block size. While a larger block can reduce collision probability, the cipher's internal structure, round functions, and key schedule still determine resistance to attacks. Therefore assuming doubled security solely from block size is a flawed inference.
Q7. In a Feistel network, why does swapping the left and right halves after each round contribute to diffusion?
📖 Explanation: The swap operation ensures that the output of the round function applied to one half becomes input to the other half in the next round, allowing every bit to eventually affect all other bits. This interleaving creates diffusion. The other options misrepresent the purpose of the swap.
Q8. Consider a block cipher that uses a key schedule producing identical round keys. What is the most likely impact on the cipher's security?
📖 Explanation: Identical round keys eliminate the variability between rounds, making the cipher susceptible to slide attacks where an attacker exploits the self‑similarity of rounds. Performance may improve, but security is compromised. The other options either incorrectly assume benefits or unrelated effects.
Q9. If a symmetric algorithm employs a weak key that results in all sub‑keys being zero, how does this affect confidentiality?
📖 Explanation: When sub‑keys are zero, the round transformations become identity operations or simple XORs, effectively exposing the plaintext. This defeats confidentiality. The other statements either contradict the effect of zero sub‑keys or incorrectly claim improvements.
Q10. A new mode called X‑CBC combines CBC with a secret counter. Which analytical advantage does this hybrid provide over plain CBC?
📖 Explanation: Adding a secret counter (akin to a nonce) to CBC mitigates replay attacks because each encryption instance incorporates unpredictable data. While padding and expansion remain unchanged, forward secrecy is not guaranteed by this mode alone.
Q11. Why does using a hash of the key as an IV in CBC mode generally weaken security compared to a random IV?
📖 Explanation: Deriving the IV from the key makes it deterministic and thus predictable to an attacker who may know or guess the key. A random IV provides unpredictability, essential for CBC security. The other options misinterpret the effect of hashing the key.
Q12. In a substitution‑permutation network (SPN), what is the primary purpose of the permutation layer?
📖 Explanation: The permutation layer rearranges bits so that the output of each S‑box influences multiple S‑boxes in the next round, providing diffusion. It does not affect key size, generation, or compression.
Q13. A cryptographer replaces the round constants in a block cipher with zeros. Which type of attack becomes more feasible as a result?
📖 Explanation: Round constants break symmetry between rounds. Removing them (setting to zero) creates identical round structures, enabling related‑key attacks where the attacker exploits predictable relationships between keys. The other attacks are unrelated to the presence of round constants.
Q14. If a symmetric cipher’s key schedule is linear, how does this affect resistance to meet‑in‑the‑middle attacks?
📖 Explanation: Linear key schedules allow an attacker to predict sub‑keys and combine two‑half encryptions efficiently, facilitating meet‑in‑the‑middle attacks. Non‑linear schedules disrupt such predictability. Hence resistance is lowered.
Q15. Which of the following best defines a one‑time pad in the context of symmetric‑key cryptography?
📖 Explanation: A one‑time pad uses a secret key that is as long as the plaintext and is never reused, providing information‑theoretic security. Reuse destroys its security guarantees. The other definitions describe unrelated concepts.
Q16. What is the main advantage of using a block cipher in Counter (CTR) mode over CBC mode for high‑throughput applications?
📖 Explanation: CTR mode generates a keystream by encrypting successive counter values, enabling each block to be encrypted independently and thus processed in parallel, which boosts throughput. Authentication, key size, and padding are not directly addressed by the mode choice.
Q17. In the context of symmetric encryption, what does the term ‘key entropy’ refer to?
📖 Explanation: Key entropy measures the amount of unpredictability (randomness) in a key. High entropy keys are harder to guess. Length, speed, and round count are separate attributes.
Q18. Why is it insecure to derive encryption keys directly from user passwords without a proper key‑derivation function (KDF)?
📖 Explanation: A KDF applies a salt and computationally intensive operations, making dictionary attacks slower. Directly using passwords leaves keys vulnerable to guessing because passwords often have low entropy. The other options misstate the role of KDFs.
Q19. A block cipher with a 64‑bit block size is used in a large database. What is the primary risk associated with this block size over long‑term use?
📖 Explanation: With a 64‑bit block, the birthday bound suggests collisions after roughly blocks, potentially leaking information. Larger block sizes mitigate this risk. The other issues are not directly caused by block size.
Q20. If a symmetric algorithm’s diffusion layer mixes each input bit into exactly two output bits, how would you classify its diffusion strength?
📖 Explanation: Effective diffusion spreads each input bit across many output bits. Mixing into only two outputs provides limited spreading, thus considered weak diffusion. Strong diffusion would involve many more output bits per input.
Q21. Consider two block ciphers: Cipher X uses 12 rounds, Cipher Y uses 8 rounds but with more complex S‑boxes. Which analytical factor is more likely to determine overall security?
📖 Explanation: Security is a function of both the number of rounds and the non‑linearity of S‑boxes. More rounds increase resistance to attacks, but stronger S‑boxes can compensate for fewer rounds. Hence the combination is decisive.
Q22. Why does encrypt‑then‑MAC (EtM) generally provide stronger security guarantees than MAC‑then‑encrypt (MtE)?
📖 Explanation: In EtM, the MAC is computed over the ciphertext, ensuring integrity before decryption and mitigating padding oracle attacks that exploit MtE’s ordering. The other statements do not capture the primary security benefit.
Q23. A designer proposes using a 256‑bit key for a block cipher that only supports 128‑bit keys, by truncating the key. What conceptual error does this represent?
📖 Explanation: Truncating a longer key to fit a fixed‑size key schedule discards entropy and may not preserve intended security properties. The algorithm’s security assumptions are based on a specific key size, so altering it without analysis is a conceptual mistake.
Q24. In a hypothetical cipher, each round key is generated by rotating the master key left by one bit. Which type of cryptanalysis becomes more feasible?
📖 Explanation: Rotating the master key yields predictable relationships between round keys, enabling related‑key attacks where the attacker exploits known transformations. Differential and linear attacks target S‑box properties, not key schedule predictability.
Q25. If a symmetric cipher’s encryption and decryption functions are identical (i.e., it is involutory), what implication does this have for implementation security?
📖 Explanation: An involutory cipher often has symmetrical structure, which can be exploited by attackers to find algebraic weaknesses. While implementation may be simpler, the symmetry can aid cryptanalysis. It does not automatically confer universal security.
Q26. Which of the following best explains the term ‘avalanche effect’ in symmetric encryption?
📖 Explanation: The avalanche effect states that flipping a single input bit (plaintext or key) should cause about half of the output bits to change, ensuring diffusion. The other options misinterpret the concept.
Q27. Why is a fixed IV insecure for encrypting multiple messages with CBC mode?
📖 Explanation: A fixed IV makes the first ciphertext block a deterministic function of the first plaintext block, enabling attackers to detect repeated plaintexts across messages. Random IVs prevent this leakage. The other options are unrelated to security.
Q28. A block cipher’s S‑box is designed to be bijective. What cryptographic property does bijectivity primarily support?
📖 Explanation: A bijective (one‑to‑one and onto) S‑box guarantees that each output value maps uniquely to an input, allowing the inverse S‑box to be computed for decryption. Diffusion is achieved by mixing, not by bijectivity.
Q29. If a cipher’s key schedule is linear, what can be inferred about the relationship between master keys and round keys?
📖 Explanation: A linear key schedule means each round key can be expressed as a linear combination of master‑key bits, creating predictable relationships that attackers can exploit. Independence or randomness would require a non‑linear schedule.
Q30. Compare the security implications of using a 64‑bit block size versus a 128‑bit block size in a high‑volume network. Which statement is most accurate?
📖 Explanation: Increasing block size from 64 to 128 bits exponentially reduces the chance of block collisions (birthday bound), enhancing security for large data volumes. It does not inherently affect performance or guarantee absolute security.
Q31. How does the use of a nonce in GCM mode contribute to both confidentiality and integrity?
📖 Explanation: In GCM, the nonce (combined with the key) guarantees that each encryption operation generates a distinct authentication tag, preventing tag reuse and ensuring both confidentiality (via CTR encryption) and integrity (via GHASH). The nonce is not secret but must be unique.
Q32. If a block cipher’s round function is XOR‑only, what is the likely effect on its resistance to linear cryptanalysis?
📖 Explanation: An XOR‑only round function provides no non‑linear mixing, making the cipher highly vulnerable to linear cryptanalysis, which exploits linear approximations. Non‑linear components like S‑boxes are essential for resistance.
Q33. Evaluate the trade‑off between increasing the number of rounds and computational overhead in a symmetric cipher. Which outcome best reflects this balance?
📖 Explanation: Adding rounds enhances diffusion and confusion, but beyond a point the marginal security gain diminishes while computational cost rises. Designers aim for an optimal round count that provides strong security without excessive overhead.
Q34. Apply the principle of Kerckhoffs’s law to symmetric‑key algorithm design. Which practice aligns with this principle?
📖 Explanation: Kerckhoffs’s law states that a system should remain secure even if everything about it except the key is public. Therefore, algorithms are openly documented, and only the key remains secret. Keeping the algorithm secret contradicts the principle.
Q35. If two parties share a 256‑bit key but use only the first 128 bits for encryption, what is the effect on security?
📖 Explanation: Using only half of the key discards the remaining entropy, reducing the effective key length to 128 bits, which may lower resistance to brute‑force attacks. The other options are inaccurate.
Q36. Contrast the error propagation characteristics of CBC versus OFB mode. Which statement accurately describes the difference?
📖 Explanation: In CBC, a corrupted ciphertext block affects the decryption of that block and the next one due to chaining. In OFB, the keystream is independent of ciphertext, so a bit error only corrupts the corresponding plaintext bit, not subsequent blocks.
Q37. How does the principle of confidentiality differ from integrity in the context of symmetric encryption?
📖 Explanation: Confidentiality prevents unauthorized reading of data, while integrity guarantees that data has not been modified. They address distinct security goals; confidentiality uses encryption, integrity often uses MACs or authentication tags.
Q38. If a cipher’s key schedule repeats every 4 rounds, what vulnerability does this introduce?
📖 Explanation: A repeating key schedule creates identical round structures, enabling slide attacks where an attacker aligns portions of encryption to exploit the repetition. The other options do not reflect the security impact.
Q39. Compare the security of a stream cipher that re‑uses a keystream for two messages versus one that never repeats its keystream. Which is more secure and why?
📖 Explanation: When the same keystream encrypts two messages, XORing the ciphertexts reveals the XOR of the plaintexts, compromising confidentiality. A never‑repeating keystream eliminates this vulnerability, making it more secure.
Q40. Synthesize a secure key‑exchange procedure for symmetric keys using asymmetric cryptography. Which step is essential?
📖 Explanation: Encrypting the symmetric key with the recipient’s public key ensures only the holder of the corresponding private key can recover it, providing confidentiality. Hashing or signing alone does not protect the key during transmission.
Q41. A cipher uses a 12‑byte IV that is incremented by one for each block. What is the main risk if the IV is predictable?
📖 Explanation: Predictable IVs allow an attacker to anticipate the keystream values, leading to keystream reuse across messages, which compromises confidentiality. Random or unpredictable IVs mitigate this risk.
Q42. Evaluate why increasing the number of S‑boxes in a block cipher does not linearly increase its security.
📖 Explanation: The strength of a cipher relies on the non‑linearity and resistance properties of each S‑box. Adding poorly designed S‑boxes may not improve, and could even weaken, security. Hence quality, not quantity, determines impact.
Q43. Explain how a key‑wrapping algorithm differs from simple encryption of a key.
📖 Explanation: Key‑wrapping algorithms not only encrypt the key but also incorporate integrity checks and specific padding rules to ensure the wrapped key is authentic and unaltered, unlike naive encryption which may lack these safeguards.
Q44. If an attacker can observe the ciphertext length, what information might they infer about the plaintext in a block cipher using PKCS#7 padding?
📖 Explanation: PKCS#7 padding adds between 1 and block‑size bytes. By measuring ciphertext length, an attacker can deduce how many blocks were needed and thus infer the approximate size of the plaintext, though not its content.
Q45. Contrast the impact of using a fixed versus a random nonce in ChaCha20‑Poly1305. Which outcome is correct?
📖 Explanation: ChaCha20‑Poly1305 requires a unique, unpredictable nonce for each encryption. Reusing a fixed nonce with the same key enables keystream reuse attacks, compromising confidentiality. Random nonces avoid this issue. Performance differences are negligible.
Q46. Apply the principle of diffusion to explain why the MixColumns step in AES spreads plaintext influence across the state.
📖 Explanation: MixColumns treats each column as a four‑byte vector and multiplies it by a constant matrix, causing each output byte to depend on all input bytes of the column. This linear mixing achieves diffusion, spreading influence throughout the state.
Q47. If a symmetric algorithm’s key schedule leaks the master key after 5 rounds, what is the consequence for security?
📖 Explanation: Once the master key is exposed, an attacker can compute all subsequent round keys, rendering the remaining encryption steps ineffective. The security of the entire cipher collapses.
Q48. Evaluate why a block cipher with a high degree of algebraic completeness may be vulnerable to algebraic attacks.
📖 Explanation: High algebraic completeness means the cipher can be expressed with many low‑degree equations, allowing attackers to solve for the key using algebraic techniques. This does not directly affect diffusion or key length.
Q49. Synthesize a secure protocol for transmitting a symmetric key over an insecure channel using Diffie‑Hellman. Which step is essential?
📖 Explanation: Diffie‑Hellman enables two parties to exchange public values and independently compute the same shared secret, which can then be used as a symmetric key. This avoids transmitting the key directly. The other options either expose the key or lack the necessary exchange.
Q50. A cipher uses a 96‑bit block size. After encrypting blocks, what phenomenon becomes likely?
📖 Explanation: The birthday paradox predicts that after roughly blocks (here for a 96‑bit block), collisions become probable, potentially leaking information. This is a known risk with smaller block sizes.
Q51. Compare the security of using a single key for both encryption and MAC versus using separate keys. Which statement is most accurate?
📖 Explanation: Employing distinct keys for encryption and authentication isolates the two operations, preventing attacks where compromise of one function affects the other. While using a single key simplifies key management, it can introduce vulnerabilities.