Module 2 Symmetric Encryption Algorithms
Module 2 Symmetric Encryption Algorithms
1
Modes of Operation
2
Modes of Operation
3
Electronic Codebook Book (ECB)
4
ECB Scheme
5
Remarks on ECB
Strength: it’s simple.
Weakness:
Repetitive information contained in the plaintext may show in the
ciphertext, if aligned with blocks.
If the same message is encrypted (with the same key) and sent
twice, their ciphertext are the same.
Typical application:
secure transmission of short pieces of information (e.g. a
temporary encryption key)
6
Cipher Block Chaining (CBC)
Solve security deficiencies in ECB
Repeated same plaintext block result different ciphertext block
7
Cipher Block Chaining (CBC)
8
Remarks on CBC
9
Cipher FeedBack (CFB)
10
Cipher FeedBack (CFB)
11
Cipher FeedBack (CFB)
CFB as a Stream Cipher
Cipher Feedback
Output Feedback
16
OFB Scheme
17
OFB Encryption and Decryption
OFB as a Stream Cipher
In OFB mode, encipherment and decipherment use the encryption
function of the underlying block cipher.
Remarks on OFB
Each bit in the ciphertext is independent of the previous bit or
bits. This avoids error propagation
Security issue
when jth plaintext is known, the jth output of the forward
cipher function will be known
Easily cover jth plaintext block of other message with the
same IV
20
Counter (CTR)
Encrypts counter value with the key rather than any feedback value
(no feedback)
Relation
Ci = Pi XOR Oi
Oi = EK (i)
Strengthes:
Needs only the encryption algorithm
Random access to encrypted data blocks
blocks can be processed (encrypted or decrypted) in parallel
Simple; fast encryption/decryption
Counter must be
Must be unknown and unpredictable
pseudo-randomness in the key stream is a goal
25
Remark on each mode
Basically two types:
Block cipher
Stream cipher
27
CBC and CTR comparison
CBC CTR
Padding needed No padding
29
Comparison of Modes
30
Comparison of Modes
31