Modes of operation
ECB, CBC, CTR and GCM: how to encrypt a message longer than one block, the role of the initialisation vector, nonce and padding, error propagation and authenticated encryption.
- 27 cards
- 6 topics
- Free
The outline, topic by topic
Each topic is weighted the way the exam weighs it.
- Concepts
- Questions
- Sort and link
- The numbers
- Scenarios
- Understand
A few cards from the deck
ECB mode: what is it?
Show the answer
A mode where each plaintext block is encrypted separately with the same key, with no link to the other blocks.
Two identical plaintext blocks give two identical ciphertext blocks: the patterns of the message stay visible. It must not be used for data longer than one block.
An image encrypted in ECB lets its outlines show through. Why?
- Two identical plaintext blocks give two identical ciphertext blocks under the same key
- ECB only uses half of the encryption key, which lets some of the information through
- The padding added by ECB reveals the size of the image and its exact dimensions
- ECB encrypts the image bit by bit, never mixing neighbouring bytes with one another
Show the answer
Two identical plaintext blocks give two identical ciphertext blocks under the same key
Uniform areas form long runs of identical blocks, hence identical ciphertexts. The block cipher is sound: it is the lack of link between blocks that leaks.
In CBC, each plaintext block is combined with the … block; the first block is combined with the ….
Show the answer
In CBC, each plaintext block is combined with the previous ciphertext block; the first block is combined with the initialisation vector.
The initialisation vector plays the part of a fictitious ciphertext block number 0; it is sent in the clear along with the message.
CBC mode: what is it?
Show the answer
A block chaining mode in which each ciphertext block depends on its plaintext block and on all those before it.
Chaining makes two identical blocks differ after encryption. Encryption is sequential; decryption can run in parallel.