🎓 BookMCQ
← Back to 31. Cryptography and Network Security

📝 Key management in cryptography (18 MCQs)

📖 From Data Communication and Networks • 31. Cryptography and Network Security • 18 questions available

What is Key management in cryptography?

Key management in cryptography involves the secure generation, distribution, storage, rotation, and destruction of cryptographic keys throughout their lifecycle to maintain the effectiveness and security of encryption and authentication systems.

6
Easy
7
Medium
5
Hard

📝 All Key management in cryptography MCQs

Q1. In the example, what probability is assigned to the terminating symbol *?

A.0.2
B.0.1 ✅
C.0.3
D.0.4
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The example explicitly states that the terminating symbol * has probability 0.1. This value defines the size of the final sub‑interval and tells the decoder when the encoded message has ended, making it essential for correct termination.

Q2. What is the initial current interval before any symbols are processed?

A.[0,0.5)
B.[0,1) ✅
C.[0.5,1)
D.[0,0.2)
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The algorithm begins with the full unit interval [0,1). This interval is progressively narrowed as each symbol is processed, so the initial state before any input is exactly the range from zero to one, representing the entire probability space.

Q3. If the probability of symbol A is increased from 0.4 to 0.5 while keeping total probability 1, which of the following must be true about the length of A’s subinterval in each iteration?

A.It becomes shorter
B.It becomes longer ✅
C.It stays the same
D.It becomes zero
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Increasing a symbol’s probability expands the portion of the current interval allocated to it, because subinterval lengths are directly proportional to symbol probabilities. Therefore, A’s subinterval will occupy a larger fraction of the interval, making it longer than before.

Q4. During encoding of the message 'BBAB*', after processing the first two symbols 'B' and 'B', the current interval lies entirely within which of the following ranges?

A.[0.5,0.75)
B.[0.6,0.85) ✅
C.[0.4,0.6)
D.[0.2,0.4)
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: The first B narrows the interval to [0.4,0.9). Dividing this interval again for a second B yields subintervals proportional to the original probabilities, placing the new interval at [0.6,0.85). Hence the interval after two Bs is completely contained within the range [0.6,0.85).

Q5. Assume a three‑symbol alphabet with probabilities PA=0.3P_A=0.3, PB=0.5P_B=0.5, P=0.2P_*=0.2. If after processing some prefix the current interval is [0.2,0.5)[0.2,0.5), which symbol must be the next one in the message?

A.A
B.B
C.*
D.Insufficient information ✅
💡 Difficulty: hard | ✅ Correct: D

📖 Explanation: The interval length is 0.3, and splitting it proportionally gives three sub‑intervals that together reconstitute the original range. Since any point inside [0.2,0.5)[0.2,0.5) could belong to any of those sub‑intervals, we cannot deduce a unique next symbol; more information is required.

Q6. In arithmetic coding, why is a terminating symbol required for decoding?

A.To reset the interval
B.To signal end of message ✅
C.To increase probability of other symbols
D.To compress the message further
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The terminating symbol provides a unique marker that indicates the end of the encoded sequence. Without it, the decoder cannot know where the message stops, leading to ambiguity. Its presence guarantees that the decoder can reliably detect completion of the transmission.

Q7. If during encoding the current interval becomes [0.75,0.80)[0.75,0.80) and the next symbol probabilities are unchanged, which of the following statements about the bits that will be output next is most accurate?

A.The next bit will be 0
B.The next bit will be 1
C.The next bits depend on implementation ✅
D.No bits are output until interval shrinks below 0.5
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: Different implementations choose different strategies: some emit bits from the fractional part of the lower bound, while others emit the common prefix of the bounds. Because the interval lies entirely above 0.5, the exact bits to output are not fixed by the algorithm alone, making the implementation‑dependent answer correct.

Q8. Consider two implementations: one outputs bits from the fractional part of the lower bound, the other from the most significant bits common to both bounds. Which implementation guarantees the shortest possible code for a given message?

A.Fractional‑part implementation
B.Common‑prefix implementation ✅
C.Both equally short
D.Neither; length depends on symbol probabilities
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: The common‑prefix method emits only bits that are guaranteed to be identical for both the lower and upper bounds, discarding any uncertain bits. This yields the minimal representation because any additional bits would be redundant, ensuring the shortest possible code for the same message.

Q9. Suppose the probability of * is reduced to 0.05 while other probabilities are scaled proportionally. How does this affect the expected number of bits needed to encode a message of length nn?

A.Increases ✅
B.Decreases
C.Remains unchanged
D.Becomes unpredictable
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Reducing the terminating symbol’s probability makes its sub‑interval smaller, which generally requires more bits to distinguish it from other symbols. Since the average code length is inversely related to symbol probabilities, a lower probability for * leads to a higher expected bit count for each encoded message.

Q10. Compare arithmetic coding to Huffman coding in terms of handling fractional probabilities. Which statement is correct?

A.Huffman can represent any fractional probability exactly
B.Arithmetic coding can ✅
C.Both cannot
D.Both can
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: Arithmetic coding works with real‑valued probabilities, allowing sub‑intervals whose lengths are fractional and precisely matched to symbol frequencies. Huffman coding, by contrast, assigns integer‑length codewords, which can only approximate fractional probabilities, making arithmetic coding the method that can handle them exactly.

Q11. Evaluate which of the following would most likely increase the compression efficiency of arithmetic coding for English text.

A.Using uniform probabilities for all letters
B.Using actual letter frequencies ✅
C.Ignoring the terminating symbol
D.Doubling the alphabet size arbitrarily
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: Real‑world English exhibits non‑uniform letter frequencies; modeling these actual probabilities lets arithmetic coding allocate smaller intervals to frequent symbols and larger ones to rare symbols, reducing the overall code length. Uniform or arbitrary changes ignore the statistical structure and typically degrade compression performance.

Q12. Given two symbols with probabilities 0.6 and 0.4, what is the difference in expected code length per symbol between arithmetic coding and an optimal binary Huffman code?

A.0 bits
B.0.02 bits ✅
C.0.05 bits
D.0.1 bits
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: The entropy for the distribution is 0.6log20.60.4log20.40.97-0.6\log_2 0.6-0.4\log_2 0.4\approx0.97 bits per symbol. An optimal Huffman code assigns one bit to each symbol, giving an average of 1 bit. The difference is roughly 0.03 bits, which is closest to the 0.02‑bit option provided.

Q13. Analyze the impact on decoding complexity if the encoder outputs bits only after the interval width falls below 2k2^{-k} for a fixed kk. Which outcome is most accurate?

A.Decoding becomes O(k) per symbol ✅
B.Decoding becomes O(1) per symbol
C.Decoding time grows linearly with message length
D.Decoding requires back‑tracking and may be exponential
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: When the encoder postpones output until the interval is very small, the decoder must wait until enough bits accumulate to resolve the interval. This forces the decoder to process at most kk bits for each symbol, giving a bounded O(k)O(k) per‑symbol complexity regardless of message length.

Q14. Which of the following best differentiates arithmetic coding from block coding schemes like LZW?

A.Arithmetic coding operates on single symbols
B.LZW uses probability models
C.Arithmetic coding produces a single fractional number ✅
D.LZW produces variable‑length codes per block
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: Arithmetic coding continuously narrows a single interval based on successive symbols, ultimately representing the entire message as one fractional number. Block schemes such as LZW build a dictionary of recurring patterns and output variable‑length codes for each block, contrasting fundamentally with the interval‑based approach.

Q15. Suppose an arithmetic encoder uses a cumulative distribution function (CDF) that is not monotonic due to rounding errors. What is the most likely consequence?

A.Decoder will still work
B.Encoder will produce longer codes
C.Decoder may select wrong subintervals leading to decoding errors ✅
D.Compression ratio improves
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: A non‑monotonic CDF breaks the guarantee that each symbol maps to a contiguous, ordered sub‑interval. During decoding, the algorithm relies on this ordering to locate the correct symbol; if the order is corrupted, the decoder can choose an incorrect sub‑interval, causing decoding errors and loss of data integrity.

Q16. In the encoding algorithm, what role does the 'divide currentInterval into subintervals' step serve?

A.It randomizes the output
B.It maps each symbol to a proportional range ✅
C.It encrypts the message
D.It terminates the process
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: Dividing the current interval creates sub‑intervals whose lengths are proportional to each symbol’s probability. This step directly links the statistical model to the numeric representation, ensuring that more probable symbols occupy larger portions of the interval, which is the core mechanism of arithmetic coding.

Q17. If the alphabet size doubles while keeping each symbol's probability equal, how does the length of the final interval after encoding a fixed‑length message change?

A.It halves ✅
B.It quarters
C.It remains the same
D.It doubles
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: When each symbol’s probability is halved due to doubling the alphabet, each encoding step reduces the interval by a factor of 1/2. After a fixed number of symbols, the overall interval length is therefore (1/2)message length(1/2)^{\text{message length}}, which is half of what it would have been with the original alphabet size.

Q18. Consider an implementation that delays output until the interval is completely contained within a dyadic fraction of the form [k/2m,(k+1)/2m)[k/2^m, (k+1)/2^m). How does this affect the worst‑case number of bits generated per symbol compared to immediate output?

A.Increases by at most 1 bit ✅
B.Decreases by at least 1 bit
C.No change
D.May increase unboundedly
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Delaying emission forces the encoder to wait until the interval aligns with a dyadic boundary, which can require at most one additional bit of precision per symbol. Consequently, the worst‑case bit count grows by no more than a single bit relative to schemes that output bits as soon as they become deterministic.

🔗 Related Topics (MCQs)