Modes of operation and random numbers Flashcards
What is the purpose of having multiple modes of operation for block ciphers?
The different modes can provide different things. Some modes can be designed to provide confidentiality for data, authentication (and integrity) or both.
What is one thing that confidentiality modes normally must include?
Randomisation
What does randomised encryption schemes want to prevent?
The same plaintext block being encrypted to the same ciphertext block every time
How can randomisation be achieved in block ciphers?
Using an initialisation vector. This needs to be unique or random.
Can be achieved by including a variable state which is updated with each block.
What are some other features of modes?
Can allow parallel processing, enc and/or dec in parallel.
Error propagation: error in C result in multiple bit-errors in P after decryption
Why is padding used in some modes?
Some modes require plaintext to consist of complete blocks
What is ciphertext stealing?
An alternative to padding.
What is the ECB mode?
Enc:
Ct = E(Pt, K), plaintext block Pt
Dec:
Pt = D(Ct, K)
Blocks are appended to each other to make the message.
Why is ECB mode normally not used for bulk encryption?
Because it is deterministic
What are the properties of ECB?
Randomised: No
Padding: Required
Error propagation: Within block
IV: Not used
Parallel encryption: Yes
Parallel decryption: Yes
Describe the CBC mode
Random IV, sent together with the ciphertext
Enc:
Ct = E(Pt XOR Ct-1, K)
C0 = IV
Dec:
Pf = D(Ct, K) XOR Ct-1
C0 = IV
How does error propagate through CBC?
An bit error in block n result in a plaintext error for the block n, and a flipped bit in block n + 1,
What are the properties of CBC?
Randomised: Yes
Padding: Required
Error propagation: Within block, and into specific bits of next block
IV: Must be random
Parallel Enc: No
Parallel Dec: Yes
Describe CTR mode
Synchronous stream cipher.
Keystream generated by enc successive values of a ‘counter’ initialised using a nonce N.
The nonce and C-blocks are sent
Ot = E(Tt, K)
Tt: Concatination of nonce and block number t
Enc:
Ct = Ot XOR Pt
Dec:
Pt = Ot XOR Ct
What is a nonce in CTR mode?
A randomly chosen value
How is error propagated in CTR mode?
A one-bit change in C block n, produces a one-bit error in the plaintext at the same location