Unit3 1
Unit3 1
Symmetric Encryption
Requirement: ∀k ∀m [ Deck(Enck(m)) = m ]
CS526 Topic 3: Ciphers and Cipher 3
Security
Stream Ciphers (An Approximation
of One-Time Pad)
• In One-Time Pad, a key is a random string of
length at least the same as the message
• Stream ciphers:
– Idea: replace “rand” by “pseudo rand”
– Use Pseudo Random Number Generator
– PRNG: {0,1}s → {0,1}n
• expand a short (e.g., 128-bit) random seed into a long
(typically unbounded) string that “looks random”
– Secret key is the seed
– Basic encryption method: Ekey[M] = M ⊕ PRNG(key)
• Encryption: ci = Ek(xi)
• Decrytion: xi = Dk(ci)
IV ⊕ ⊕ ⊕
Ek Ek Ek
C0 C1 C2 C3
M1 M2 M3
IV IV+1 IV+2 IV+3
Ek ⊕ Ek ⊕ Ek ⊕
C0 C1 C2 C3
CS526 Topic 3: Ciphers and Cipher 18
Security
Properties of CTR
• Gives a stream cipher from a block cipher
• Randomized encryption:
– when starting counter is chosen randomly
Corollary
X and Y are independent random variables iff
P[x|y] = P[x], for all x ∈ X and all y ∈ Y.
Cipherttext space
Plaintext space
• IND-CPA means
– With bounded computational resources, the adversary cannot tell
which of M0 and M1 is encrypted in C
• Cryptography: Message
Authentication Code and
Cryptographic Hash Functions