Cryptography
MELISSA CHASE, MSR
Cryptography MELISSA CHASE, MSR Modern Cryptography the scientific - - PowerPoint PPT Presentation
Cryptography MELISSA CHASE, MSR Modern Cryptography the scientific study of techniques for securing digital information, transactions, and distributed computations Katz and Lindell 07 Authentication Verifiable elections
MELISSA CHASE, MSR
“…the scientific study of techniques for securing digital information, transactions, and distributed computations” – Katz and Lindell ’07
Today: Secure Communication
Used for transmitting secret information: Ceasar cipher:
Vignere cipher
repeat
catc at ca tcatcat catc
*Example from [Daswani]
Kerckhoff’s rule: Cryptographic algorithms should be public
Clearly define assumptions and security guarantees
An adversary with unbounded power can break (essentially) all crypto
messages, this allows adversary to rule out some messages
Estimate reasonable bounds on power of adversary – crypto should be unbreakable for any adversary within those limits
crypto scales exponentially
Cryptographic algorithms are parameterized by security levels
Eve can see what passes over the network Alice wants to guarantee:
Alice Bank “My password is 485853.” “Transfer $100 to Carol” Eve
Correctness: 𝐸𝑓𝑑𝑙 𝐹𝑜𝑑𝑙 𝑁 = 𝑁 for all valid keys 𝑙, messages 𝑁 How to define confidentiality?
Alice 𝒍 Bank 𝒍 C ← 𝐹𝑜𝑑𝑙(“My password…”) Eve 𝐸𝑓𝑑𝑙(𝐷) 𝐷 “My password…”
How to define confidentiality? IND-CPA (chosen-plaintext attack): Eve can’t distinguish an encryption of 𝑛0 from an encryption
Alice 𝒍 Bank 𝒍 C ← 𝐹𝑜𝑑𝑙(“My password…”) Eve 𝐸𝑓𝑑𝑙(𝐷) 𝐷 “My password…”
In real protocols, Eve may be able to:
In real protocols, Eve may be able to:
In real protocols, Eve may be able to:
A keyed permutation 𝐺𝑙 that works on blocks of bits.
−1
Most common block cipher: AES
𝐺 𝑁 𝐿 𝐺(𝑁) 𝐺−1 𝐺(𝑁) 𝐿 𝑁
A keyed permutation 𝐺𝑙 that works on blocks of bits.
−1
How to build secure encryption? How about:
−1(𝐷)
Problem: Adversary can tell if same message is encrypted twice!
𝐺 𝑁 𝐿 𝐺(𝑁) 𝐺−1 𝐺(𝑁) 𝐿 𝑁 Is this a real problem?
[Wikipedia]
A keyed permutation 𝐺𝑙 that works on blocks of bits.
−1
How to build secure encryption? Try 2:
What if I want to encrypt a longer message?
𝐺 𝑁 𝐿 𝐺(𝑁) 𝐺−1 𝐺(𝑁) 𝐿 𝑁
Can prove that this gives CPA security!
(if F has above property)
What if Eve tries to change “Transfer $100…” to “Transfer $900…”?
resulting M Alice Bank “My password is 485853.” “Transfer $100 to Carol” Eve
Correctness: 𝑊𝑓𝑠𝑗𝑔𝑧𝑙 𝑁𝐵𝐷𝑙 𝑁 = Valid for all 𝑁, 𝐿 Security: Eve cannot generate a tag for a message Alice didn’t send
Alice 𝒍 Bank 𝒍 𝑈, “Transfer $100 to Carol” Eve
Use a message authentication code (MAC):
𝑈 ← 𝑁𝐵𝐷𝑙(“Transfer $100…”) 𝑊𝑓𝑠𝑗𝑔𝑧𝑙 (𝑈, “Transfer $100…”) Valid or Forgery
In real protocols, Eve may be able to:
Given a block cipher:
Alternative: Cryptographic hash functions
𝑁𝐵𝐷𝑙 𝑁 : 𝐺𝑙(𝐼 𝑁 ) is a secure MAC
Never use same k for Enc and MAC
What if we want both confidentiality and integrity at once? Combine Encryption and MACs to get Authenticated Encryption
How do we combine the two?
Alice 𝒍 Bank 𝒍 C ← 𝐹𝑜𝑑𝑙(“My password…”) Eve 𝐸𝑓𝑑𝑙(𝐷) 𝐷 “My password…”
Tag may reveal info about M Eve could try to modify C and see if T still verifies
Where do keys come from?
Public Key Crypto (aka Asymmetric-Key Crypto)
Caveat: How does Alice know public key belongs to Bob? (Need public key infrastructure)
Alice 𝒍 Bank 𝒍 C, 𝑈
Security guarantee: Eve can’t learn anything about 𝑁 from 𝐷, even given 𝑞𝑙𝐶
Alice 𝒒𝒍𝑪 Bank 𝐭𝒍𝑪 C ← 𝐹𝑜𝑑𝑞𝑙𝐶(“My password…”) Eve 𝑞𝑙𝐶 𝐸𝑓𝑑𝑡𝑙𝐶(𝐷) 𝐷 “My password…”
Tool: RSA function N = product of 2 large primes Basic equation: 𝑍 = 𝑌𝑓mod N
Roughly, 𝑂, 𝑓 will be the public key, and its factorization will be the secret key How do we encrypt?
RSA Assumption
Tradeoffs:
Hybrid Approach
E.g. Hybrid encryption: To encrypt long messages to 𝑞𝑙𝐶
Other issues we didn’t have time for
Other resources: Bellare-Rogaway lecture notes: http://cseweb.ucsd.edu/~mihir/cse207/classnotes.html Coursera classes on cryptography