CS FundamentalsHardGATE CS (PYQ pattern)

1000 bytes of plaintext are encrypted with AES in CBC mode (16-byte blocks) using PKCS#7 padding, and a random 16-byte IV is sent in front of the ciphertext. How many bytes are transmitted for the payload (IV plus ciphertext)?

  1. A. 1008
  2. B. 1024
  3. C. 1016
  4. D. 1000

Correct answer: B. 1024

PKCS#7 pads 1000 up to the next multiple of 16 = 1008 (8 padding bytes of value 8). Add the 16-byte IV: 1024 bytes.

More Computer Networks questions

Exams that ask this topic