Lecture 05
Lecture 05
Symmetric Encryption
Encryption
– ciphertext only
– known plaintext
– chosen plaintext
– chosen ciphertext
• In this lecture, we
2
CPA
CPA Security
Security
1
Pr[PrivKcpa
A ,E(n) = 1] ≤ 2 + negl(n)
3
CPA
CPA Security
Security
• How come adversary is allowed to query Enck on a message and later use
that message for the challenge?
4
Towards
Towards CPA-Secure
CPA-Secure Encryption
Encryption
• f is one of all possible functions that map n-bit inputs to n-bit outputs
6
Towards
Towards CPA-Secure
CPA-Secure Encryption
Encryption
7
CPA-Secure
CPA-Secure Encryption
Encryption
8
CPA-Secure
CPA-Secure Encryption
Encryption
• Proof idea:
– shorter messages
• Short messages
m1 m2
k Fk k Fk ...
c1 c2
Encryption
Encryption Modes
Modes
• Is it secure?
Encryption
Encryption Modes
Modes
– encryption: for i = 1, . . ., ℓ, c i =
– F decryption: for i = 1, . . ., ℓ, m i = c i − 1 ⊕ Fk
k (m i ⊕ c i − 1 )
− 1 (c )
i m1
m2
IV
k Fk k Fk
c0 c1 c2
Encryption
Encryption Modes
Modes
– the message is XORed with the encryption of the feedback from the
previous block
– encryption: ci = F k (I i ) ⊕ m i ; I i + 1 = ci
– decryption: m i = ci ⊕ F k (I i )
– if our application requires that plaintext units shorter than the block
are transmitted without delay, we can use this mode
– the message is transmitted in r-bit units (r is often 8 or 1)
Encryption
Encryption Modes
Modes
k Fk k Fk
n n
Select Discard Select Discard
r bits n − r bits r bits n − r bits
r r
r r r r
m1 c1 m2 c2
Encryption
Encryption Modes
Modes
k Fk k Fk
n n
Select Discard Select Discard
r bits n − r bits r bits n − r bits
r r
r r
r r
m1 c1 m2 c2
Encryption
Encryption Modes
Modes
– using fewer bits for the feedback reduces the size of the cycle
• Properties of OFB:
– similar to CFB, throughput is decreased for r < n, but the key stream
can be precomputed
Encryption
Encryption Modes
Modes
k Fk k Fk ...
m1 m2
c0 c1 c2
Encryption
Encryption Modes
Modes
• Properties:
• Both the size of the key and block size must be sufficiently large
Message
Message Integrity
Integrity
• What is next?