π IPSec transport and tunnel modes: Two Modes (15 MCQs)
π From Data Communication and Networks β’ 32. Internet Security β’ 15 questions available
What is IPSec transport and tunnel modes: Two Modes?
Transport mode encrypts only the payload of the original IP packet for end-to-end host communication, while tunnel mode encrypts the entire original IP packet and wraps it in a new IP header for secure gateway-to-gateway transmission.
π All IPSec transport and tunnel modes: Two Modes MCQs
Q1. What is another term for static arithmetic coding?
π Explanation: Static arithmetic coding is often called pure coding because it uses a fixed probability model that does not change during encoding. The term emphasizes that the coding process is βpureβ in the sense that the probabilities are predetermined and remain unchanged throughout the message.
Q2. In arithmetic decoding, what does the variable 'num' represent?
π Explanation: The variable βnumβ stores the real value that was produced by the encoder and lies in the unit interval [0,1). During decoding the algorithm repeatedly compares this value against the subβintervals of the current interval to determine which symbol was encoded.
Q3. If the current interval is [0,1) and the probability model assigns symbol A to subinterval [0,0.3) and symbol B to [0.3,0.7), which symbol will be output when the encoded number is 0.45?
π Explanation: The encoded number 0.45 falls inside the subinterval [0.3,0.7) that corresponds to symbol B. The decoder therefore selects B as the next output symbol, because the number lies within Bβs allocated range according to the probability model.
Q4. During decoding, after processing the first two symbols, the interval becomes [0.4,0.6). If the next encoded number is 0.55, which symbol's subinterval must contain 0.55 for the decoder to output the third symbol?
π Explanation: When the current interval is narrowed to [0.4,0.6), the decoder divides this range according to the probability model. For the encoded number 0.55 to be interpreted as the third symbol, the subinterval assigned to the correct symbol must enclose 0.55. In the given model, that symbol is X.
Q5. Given the decoding loop stops when the terminating symbol '*' is encountered, and the current interval after processing symbol 'B' is [0.64,0.69), which of the following encoded numbers will cause the loop to terminate at the next iteration?
π Explanation: The terminating symbol '*' is mapped to a subinterval that lies at the upper end of the current interval, for example [0.68,0.70). An encoded number of 0.68 falls inside this subinterval, so the decoder will identify '*' and exit the loop immediately.
Q6. Which statement correctly contrasts static and dynamic arithmetic coding regarding probability model updates?
π Explanation: In static (or pure) arithmetic coding, the probability distribution is established before encoding begins and remains unchanged. Dynamic (or interval) coding, on the other hand, revises the symbol probabilities after each encoded symbol, allowing the model to adapt to the actual data stream.
Q7. For a highly skewed symbol distribution, which coding mode typically yields a smaller average code length?
π Explanation: When one symbol dominates the distribution, dynamic coding can quickly assign it a large probability, shrinking its subinterval and reducing the number of bits needed. Consequently, dynamic coding generally achieves a shorter average code length than static coding for skewed sources.
Q8. If an error corrupts a bit in the middle of an arithmetic coded stream, how does the impact differ between static and dynamic coding on decoder synchronization?
π Explanation: An error changes the numeric value used by the decoder, causing the interval boundaries to diverge from the encoderβs. Because both static and dynamic coding rely on the same interval calculations, a single error typically desynchronizes the decoder for the remainder of the message, making recovery impossible without external errorβcorrection.
Q9. What is the computational complexity per symbol for static and dynamic arithmetic coding?
π Explanation: Both static and dynamic arithmetic coding perform a constant number of arithmetic operations for each symbol: scaling the interval and updating bounds. Even though dynamic coding also updates the probability model, this update can be done in constant time, so the perβsymbol complexity remains O(1) for both.
Q10. When encoding a large alphabet such as Unicode, which tradeβoff is most accurate between memory usage and compression efficiency for the two modes?
π Explanation: Static coding must store a full probability table for the entire alphabet, which can be memoryβintensive for Unicode. Dynamic coding builds and updates probabilities on the fly, reducing memory demands. However, because the model adapts incrementally, the compression ratio may be marginally lower than a perfectly tuned static model.
Q11. Given the interval [0,1) and encoded number 0.68, after the first division the subinterval for symbol 'B' is [0.64,0.69). What will be the new current interval?
π Explanation: When the decoder identifies that the encoded number 0.68 lies inside the subinterval assigned to symbol 'B' ([0.64,0.69)), it sets this subinterval as the new current interval for subsequent decoding steps. Hence the interval becomes exactly [0.64,0.69).}
Q12. If during arithmetic decoding the pointer moves from interval [0.4,0.6) to [0.5,0.55) after processing symbol 'A', what can be inferred about the relative probability of 'A' versus other symbols?
π Explanation: A narrower interval after processing a symbol indicates that the symbol occupied a larger portion of the previous interval, which corresponds to a higher probability. The reduction from a width of 0.2 to 0.05 suggests that 'A' was assigned a comparatively high probability by the model.
Q13. In dynamic arithmetic coding, after processing three symbols the interval is [0.825,0.845) and the next encoded number is 0.83. Which statement is necessarily true?
π Explanation: The encoded number always lies within the current interval. Therefore, if the interval is [0.825,0.845) and the number is 0.83, the decoder will subdivide this interval according to the probability model, and the subinterval that contains 0.83 will correspond to the next decoded symbol.
Q14. How does the terminating symbol '*' affect the termination condition in the decoding loop?
π Explanation: When the decoder encounters the terminating symbol '*', it interprets this as a command to stop processing further symbols. In many implementations the loop exits immediately, and the current interval is often reset to its initial state [0,1) for any subsequent decoding tasks.
Q15. Suppose a static coder uses a probability model where symbol 'C' has probability 0.0. What consequence does this have for encoding a message that contains 'C'?
π Explanation: A probability of zero creates a subinterval of zero length, which cannot contain any real number. Consequently, the arithmetic encoder cannot assign a valid code to symbol 'C', making it impossible to encode any message that includes that symbol without altering the model.