Applied Cryptography
Which of the following correctly describes the difference between block ciphers and stream ciphers among symmetric-key ciphers?
- 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
- 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
- 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.