Download presentation
Presentation is loading. Please wait.
1
Block cipher and modes of encryptions
2
Block cipher Other name for fixed-length encryption scheme
3
Problem with just encrypting each block of the message using a randomized encryption scheme
Each block uses k bits of randomness If we have 𝑑 blocks, it requires 𝑑𝑘 bits of randomness. Randomness is expensive
4
Solution to minimize randomness
Create an initial state May use some randomness (called Nonce or IV). Encrypt the current block using the current state Update the state after each use of the block cipher
5
Goals (block cipher) Security
Is it secure? What level of security does it have? Parallelizable: Can we encrypt/decrypt each block in parallel We don’t need to wait for the previous part to encrypt the next part. Forward: Do we need to use decryption operation Better if we don’t Error-resilient: If one block of the ciphertext becomes corrupted
6
ECB mode 𝐼𝑛𝑖𝑡() 𝑂𝑢𝑡𝑝𝑢𝑡 𝑚 𝑖 , 𝑆 𝑖 𝑈𝑝𝑑𝑎𝑡𝑒( 𝑚 𝑖 , 𝑠 𝑖 ) 𝑆 1 ←0
𝑂𝑢𝑡𝑝𝑢𝑡 𝑚 𝑖 , 𝑆 𝑖 𝑐 𝑖 ←𝐸𝑛 𝑐 𝑘 ( 𝑚 𝑖 ) 𝑈𝑝𝑑𝑎𝑡𝑒( 𝑚 𝑖 , 𝑠 𝑖 ) 𝑆 𝑖+1 ← 𝑆 𝑖
7
Electronic codebook mode (ECB)
8
Electronic codebook mode (ECB)
Secure? Parallelizable Forward Error-resilient No yes no Unless the plaintext has high entropy.
9
Problem with ECB mode
10
Counter mode (CM) 𝐼𝑛𝑖𝑡() 𝑂𝑢𝑡𝑝𝑢𝑡 𝑚 𝑖 , 𝑆 𝑖 𝑈𝑝𝑑𝑎𝑡𝑒 𝑚 𝑖 , 𝑠 𝑖
𝑛𝑜𝑛𝑐𝑒 ∈ 𝑅 0,1 𝑠/2 𝑆 1 ←(𝑛𝑜𝑛𝑐𝑒, 0 𝑠/2 ) 𝑂𝑢𝑡𝑝𝑢𝑡 𝑚 𝑖 , 𝑆 𝑖 𝑐 𝑖 ←𝐸𝑛 𝑐 𝑘 𝑆 𝑖 ⊕ 𝑚 𝑖 𝑈𝑝𝑑𝑎𝑡𝑒 𝑚 𝑖 , 𝑠 𝑖 𝑠 𝑖+1 ← 𝑠 𝑖 +1
11
Counter mode (CM)
12
IV security reduced by half
Counter mode Secure? Parallelizable Forward Error-resilient Yes but yes IV security reduced by half
13
Cipher block chaining 𝐼𝑛𝑖𝑡() 𝑂𝑢𝑡𝑝𝑢𝑡 𝑚 𝑖 , 𝑆 𝑖 𝑈𝑝𝑑𝑎𝑡𝑒 𝑚 𝑖 , 𝑠 𝑖
𝐼𝑉 ∈ 𝑅 0,1 𝑠 𝑆 1 ←𝐼𝑉 𝑂𝑢𝑡𝑝𝑢𝑡 𝑚 𝑖 , 𝑆 𝑖 𝑐 𝑖 ←𝐸𝑛 𝑐 𝑘 𝑚 𝑖 ⊕ 𝑆 𝑖 𝑈𝑝𝑑𝑎𝑡𝑒 𝑚 𝑖 , 𝑠 𝑖 𝑠 𝑖+1 ← 𝑐 𝑖
14
Cipher block chaining (CBC)
15
Cipher block chaining Secure? Parallelizable Forward Error-resilient
Yes no
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.