Symbolic Encryption with Pseudorandom Keys Daniele Micciancio - - PowerPoint PPT Presentation
Symbolic Encryption with Pseudorandom Keys Daniele Micciancio - - PowerPoint PPT Presentation
Symbolic Encryption with Pseudorandom Keys Daniele Micciancio (UCSD) Cryptographic Protocols Often make use of several basic crypto ops: (Enc) Encryption: E(k,m) (PRG) Pseudorandom generators: G(k) Protocol should be secure for
Cryptographic Protocols
- Often make use of several basic crypto ops:
– (Enc) Encryption: E(k,m) – (PRG) Pseudorandom generators: G(k)
- Protocol should be secure for any instantiation
- f Enc, PRG, satisfying standard properties, eg.
– Enc: Indistinguishability under chosen message
attack
– PRG: Indistinguishability from uniform
Example: Secure key distribution
Authenticated broadcast channel, Dynamically changing group of users
u
1
u
2
u
5
u
4
u
3
u
6
1 1 1 1 1 1 1 1 1 1 1 1 1 = G r
- u
p m e m b e r = N
- n
- m
e m b e r
u
2
u
4
k
1
k
1
k
1
r e m ( u
2
) a d d ( u
4
) k
2
k
2
k
2
k
2
Center
Cryptographic Definitions: Example
- Security definitions are usually given by
computational games
- Example: IND-CPA security of encryption
– no adversary can guess b with prob. >> ½ – requires |m0| = |m1|
Adversary
m0 m1 b Enc mb b?
Protocol Security
- Computational security games for protocols
– Possible, offer strong security guarantees – Can be cumbersome and error prone
- Symbolic Security
– Treat Enc, PRG, etc. as abstract operations – High level, easier to automate/verify
- Computational Soundness
– Symbolic Security → Computational Security
Background
- Dolev-Yao (1983)
– Symbolic model for the analysis of crypto protocols – Used to find many bugs, often automatically – Weak security guarantees
- Abadi-Rogaway (2002)
– Simple symbolic model for passive attacks – Computational Soundness Theorem
- Much follow up work ...
Symbolic Cryptography
- Model cryptographic messages syntactically
– Data := 0 | 1 | ... – Key := k0 | k1 | … – Exp : = Data | Key | (Exp,Exp) | Enc(Key,Exp)
- Complex cryptographic expressions
– M = Enc(k1,(Enc(k2,0),Enc(k1,k2)))
- Given crypto algorithms, expressions maps to
probability distributions over bitstings
– |[ M ]| : choose keys at random, and evaluate Enc
Symbolic Security Analysis
- Goal: analyze complex expressions/protocols
independently of crypto algorithms
- Map expressions to symbolic patterns
– P = (k1, Enc(k1,(Enc(k2,[?]),Enc(k1,0)), Enc(k2,[?]))) – [?]: unknown message, may leak size/shape info
- Mapping function
– Determine set K of recoverable keys – Replace Enc(k,Exp) with Enc(k,[?]) for all k
Key\K ∈
Symbolic Security Analysis
- Patterns capture information available to
adversary
– Specification: what can adversary legitimately learn – Analysis: what adversary learns from protocol
- Expressions with same pattern are considered
equivalent
- Protocol is (symbolically) secure if patterns of
messages observed by adversary match specification
Symbolic vs Computational Security
- Computational Soundness:
– If two expressions M1, M2 have the same
pattern(M1) = pattern(M2), then |[M1]|≈|[M2]| are computationally indistinguishable (for any secure crypto primitive)
- Trivial Solution: pattern(M) = M, not interesting
- Completeness:
– If |[M1]|≈|[M2]| (for any secure crypto primitive),
then pattern(M1) = pattern(M2)
This work
- Symbolic Expressions with pseurorandom keys
- Length doubling PRG: G(k)=[G0(k),G1(k)]
– Rand := r0 | r1 | r2 – Keys := Rand | G0(Keys) | G1(Keys)
- Notation: Gw[1..n](k) = Gw[1](Gw[2](...Gw[n](k)))
- Used in many protocols
– Key distribution [Micciancio, Panjwani ‘05, ‘06, ’08] – XML security [Abadi, Warinschi ‘05] – Yao Garbled Circuits [Li, Micciancio ‘18]
Symbolic Pseudorandomness
- Warm up:
– expressions using only PRG: G(k)=[G0(k),G1(k)] – no encryption, only keys
- Notation: Gw[1..n](k) = Gw[1](Gw[2](...Gw[n](k)))
- Definitions:
– Two keys {k,k’} are symbolically dependent if k =
Gw(k’) for some w
– K
Keys ⊂ is an independent set if no two keys k,k’ K are symbolically dependent ∈
- Theorem: for any set K
Keys, ⊂
– K={k1,…,kn} is independent if and only if – |[
|[{r {r1
1,…,r
,…,rn
n}
}]| ~ ]| ~ |[ |[K K]| ]|
- Proof:
– generalized hybrid argument – repeatedly replace [G0(r),G1(r)] with [r0,r1]
Computational Soundness
≈
Symbolic evaluation for Enc + PRG
- Patterns are defined as usual
– Determine set K of recoverable keys – Replace Enc(k,Exp) with Enc(k,[?]) for all k
Key\K ∈
- Key recovery:
– Given k and Enc(k,M) can recover M – Given k, can recover G0(k) and G1(k) – Given Enc(k,M) and Gw(k), can recover k – Given Enc(k,M) and Enc(k’,M’), if k and k’ are
symbolically dependent then can recover k and k’
Rest of the talk: If pattern(M0)≠pattern(M1) then |[M0]| and |[M1]| can be distinguished for some Enc,PRG
Main Result
- Symbolic semantics for Enc+PRG expressions
is both sound and complete
- Soundness:
– similar to previous work – not surprising, given strong key recovery adversary
- Completeness:
– we show that this is the best possible
- Details about encryption cycles, etc.: see paper
Key Recovery Problem
- Given two ciphertexts E(k0,m0), E(k1,m1) under
related keys k0 →w k1 for any known w {0,1}* ∈
- Goal: Recover k0 and k1
- Remarks:
– Attacks should work for some secure Enc and PRG – If keys are unrelated, then ciphertexts are secure – Enough to recover k0 , then k1 = Gw(k0)
Modified Enc and PRG: first attempt
- E’(k[0],k[1], m) = (k[0], E(k[1], m))
- G’(k[0],k[1]) = G(k[0]) + [0,k[1],0,k[1]]
E’: E: k[0] k[0] k[1] k[1] k[0] k[1] G’: + +
A simple attack
E’: E: k[0] k[0] k[1] k[1] k[0] k[1] G’: + + k[0] k[0] k[1]
- Let k=k[0,1] and assume we are given
– A ciphertext E(k,m) and a related key G’b(k)
- Can recover k=k[0,1] !!!
k[1] k[1] k[0] k[0]
Arbitrary key relations
- Given E(k,m) and Gw(k) for any w
- Attack still works
E’: k[0] k[1] k[1] k[0] + + k[0] + + + +
But we are given only ciphertexts!
E’: E: k[0] k[0] k[1] k[1] k[0] k[1] G’: + + k[0] k[0]
- Let k=k[0,1] and assume we are given
– E(k,m) and a related key E(Gb(k),m’)
- We cannot recover k[1]
E: k[0] k[1] k[0]
A simple fix
- This can be fixed by changing the PRG
- But does not work when |w|>1
k[0] k[0] E’: k[0] k[1] k[1] k[0] k[1] + + k[0] + + + + + + + + + +
Key recovery with two ciphertexts
- E’(k[0,1,2], m) = (k[0],k[1], E(k[2], m))
- G’(k[0,1,2]) = G(k[0]) +[0,k[2],k[2],0,k[2],k[2]]
E’: k[0] k[0] k[1] k[0] k[1] G’: + + k[2] E: k[2] k[1] k[2] + +
k[2] k[2] k[0] k[1] G’: + + + + k[0] k[1] G’: + + + +
Key recovery with two ciphertexts
k[0] k[1] G’: + + k[2] + + G1 G1 G0 k[0] k[2]
Conclusion
- Computationally sound and complete
symbolic semantics for encrypted expressions with pseudorandom keys
- Conveniently used in a number of protocols
– Key distribution, XML, Garbled Circuits, etc.