Applied Cryptography

Which of the following correctly describes the difference between block ciphers and stream ciphers among symmetric-key ciphers?

  1. AA block cipher is a kind of public-key cipher using a pair of public and private keys, and only stream ciphers are classed as symmetric-key ciphers
  2. BA block cipher transforms data in blocks of a fixed length, while a stream cipher XORs a keystream with the plaintext bit by bit or byte by byte
  3. CA stream cipher only rearranges the data without using a key, so anyone can recover the plaintext from the ciphertext
Show answer and explanation

Answer: B. A block cipher transforms data in blocks of a fixed length, while a stream cipher XORs a keystream with the plaintext bit by bit or byte by byte

A block cipher such as AES transforms a block of fixed length (128 bits for AES) into another block depending on the key. Longer data are encrypted by combining block transformations with a mode of operation. A stream cipher generates a pseudorandom keystream from the key and a nonce and XORs it with the plaintext one bit or one byte at a time. ChaCha20 is a typical example, and a block cipher used in CTR mode works in the same way as a stream cipher.

  • A. Both are symmetric-key ciphers, using the same key for encryption and decryption.
  • B. Correct. They differ in the unit of transformation and in the mechanism of XORing with a keystream.
  • C. A stream cipher also cannot produce the keystream without the key, so the plaintext cannot be recovered without it.
Practice this topic Back to topic

Books on Applied Cryptography Ad

As an Amazon Associate I earn from qualifying purchases.

More Applied Cryptography questions

  1. Which of the following is the correct combination of block length and key length for AES, the block cipher widely used today?
  2. Image data were encrypted with AES in ECB mode, and the outline of the original picture could still be recognized in the encrypted image. Which of the following is the cause?
  3. Which of the following is an appropriate way to handle the initialization vector (IV) when using AES in CBC mode?
  4. AES (block length 16 bytes) is used in CBC mode with PKCS#7 padding. In PKCS#7, if n bytes are missing, n bytes of value n are added, and even when the plaintext length is exactly a multiple of 16, 16 bytes of value 16 are added. Which of the following is the length of the ciphertext (not including the IV) when a 96-byte plaintext is encrypted?
  5. A server receiving data encrypted in CBC mode returned different errors when the padding after decryption was incorrect and when the padding was correct but the check of the contents failed. Which of the following correctly describes this situation?

Comparisons in this topic