fully homomorphic encryption from the ground up
play

Fully Homomorphic Encryption from the ground up Daniele Micciancio - PowerPoint PPT Presentation

Fully Homomorphic Encryption from the ground up Daniele Micciancio (UC San Diego) Eurocrypt 2019 (Fully Homomorphic) Encryption Encryption: used to protect data at rest or in transit Enc( m ) Enc( m ) Enc( m ) Fully Homomorphic


  1. Fully Homomorphic Encryption from the ground up Daniele Micciancio (UC San Diego) Eurocrypt 2019

  2. (Fully Homomorphic) Encryption ● Encryption: used to protect data at rest or in transit Enc( m ) Enc( m ) Enc( m ) ● Fully Homomorphic Encryption: supports arbitrary computations on encrypted data Enc( m ) Enc( F(m) )

  3. FHE Timeline ● Concept originally proposed by Rivest, Adleman, Dertouzos (1978) ● Gentry’s breakthrough (2009) – First candidate solution – Bootstrapping technique ● Much subsequent work (2010-2019 ...) – Basing security on standard (lattice) assumptions [BV11,B12,AP13,GSW13,BV14,...] – Effjciency improvements [GHS12,BGH13,AP13/14,DM15,CP16,CGGI16/17,CKKS17,MS18,...] – Implementations: HElib, SEAL, PALISADE, FHEW, TFHE, HeaAn, Λoλ, NFLlib, …

  4. Outline ● FHE: background and sample applications ● Lattice Cryptography – Key properties of lattice cryptography that make it so useful to build FHE and other applications ● Generic FHE construction – Symmetric Encryption – Public Key Encryption – Linearly Homomorphic Encryption – Fully Homomorphic Encryption

  5. FHE applications ● Direct applications: – Secure outsourcing of computation ● Powerful tool: “Cryptographic Pantograph” FHE FHE for PTIME for NC1 – FHE [Gentry09] – (Indistinguishability) Obfuscation [GGHRSW13] – Functional Encryption [GKPVZ13] – Correlation Intractable Hash Functions [PS19], [CCHLRRW19] – ….

  6. Sample Application 1 ● (Indistinguishability) Obfuscation (Indistinguishability) Obfuscation – Obf: Program → Program – Correctness: Obf[P] (x) = P(x) – Security: P 0 (x)=P 1 (x) → Obf[P 0 ] ~ Obf[P 1 ] x P 0 ,P 1 P 0 (x)=P 1 (x) Adv b←{0,1} Obf[P] Obf[P b ] P(x) b?

  7. Bootstrap Obfuscation ● Bootstrapping Obfuscation using FHE x – Obf’: obfuscation scheme for simple/small P’ ● Obf[P] = (Enc(P),Obf’[Dec(.)]) Enc(P) – (Enc,Dec,Eval)←FHE.KeyGen ● Obf[P](x) = Dec(e) Eval – Obf’[Dec(.)] (Eval(Enc(P),x)) Enc(P(x)) = Dec(Enc(P(x))) = P(x) Obf’(Dec(.)) ● Actual scheme is a bit more complex: P(x) – encrypt/evaluate P twice, under two difgerent FHE keys – check consistency before decryption

  8. Sample Application 2 ● Correlation Intractable Hash Functions Correlation Intractable Hash Functions – Hash function H(x), Relation R={(x,f(x)) : x} – Security: Hard to fjnd x such that R(x,H(x)) ● H=“Random oracle” is “trivially” secure ● Applications: – Fiat-Shamir Signatures in the Standard Model – Remove interaction in public coin protocols – Non-Interactive Zero-Knowledge

  9. Bootstrapping Correlation Intractability ● H’: CI Hash function for simple relation R(x,y) = “y=Dec(x)”, for some Dec←FHE.KeyGen ● H: CI Hash function for arbitrary P – (Enc,Dec,Eval)←FHE.KeyGen x – C=Enc(P) – H(x)=H’(Eval(C,x)) Enc(P) ● Security: – Assume H(x)=P(x) Eval – Let c=Eval(C,x)=Enc(P(x)) Enc(P(x)) – Then H’(c)=H(x)=P(x)=Dec(c) H’(.) H(x)

  10. Lattice cryptography ● Lattices: regular sets of vectors in n-dim space ● Many attractive features: 4 8 12 – Post-Quantum secure candidate 1 1 2 6 7 13 – Simple, fast and easy to parallelize 2 3 5 3 3 6 – Versatile (FHE and much more)

  11. Why Lattice Cryptography? ● Lattices → Encryption – weak linear homomorphic properties – simple (linear) decryption algorithm – circular secure: Enc s (s) does not leak s ● This is enough to obtain – multiplication by arbitrary constants – multiplications between ciphertexts – fully homomorphic encryption

  12. Learning With Errors (LWE) n ● LWE function family: s – Key: A ∈ Z q [nxm] – LWE A (s,e)= As + e (mod q) A e b + = m – Small |e| max < β = O(√n) – q,m=poly(n) – Injective version of Ajtai’s SIS function ● Regev (2005): assuming quantum hard lattice problems – LWE A is one-way: Hard to recover (s,e) from [A,b] – b=LWE A (s,e) is indistinguishable from uniform over Z q [m] – [BLPRS13] hard under classical reductions

  13. Encrypting with LWE ● Idea: Use b=LWE A (s,e) as a one-time pad ● Private key encryption scheme: n – secret key: s ∈ Z q n , s – message: m ∈ Z m – encryption randomness: [A,e] A e b + = m – E s (m; [A,e]) = [A,b+m] ● [BFKL93],[GRS08] – Learning Parity with Noise (LPN): q=2 – If LWE A is one-way, then b=As+e is pseudo-random ● Regev LWE: q → poly(n)

  14. Noisy Decryption ● E s (m;[A,e]) = [A,b+m] where b = As+e ● Decryption: – D s ([A,b+m]) = (b+m) - As = m+e mod q 0 q +e – Low order bits of m are corrupted by e q/4 ● Fix: scale m, and round: q/8 0 q/4 q/2 3q/4

  15. Weak Linear Homomorphism ● [A 1 ,A 1 s+e 1 +m 1 ] + [A 2 ,A 2 s+e 2 +m 2 ] = [(A 1 +A 2 ),(A 1 +A 2 )s+(e 1 +e 2 )+ (m 1 +m 2 )] E s (m;β): encryption of m with error |e| < β ● E s (m₁;β₁)+E s (m₂;β₂) ⊂ E s (m₁+m₂;β₁+β₂)

  16. Circular Security ● E s (m; [A,e]) = [A,b+m], where b=As+e ● D s ([A,b+m]) = (b+m) - As = m+e ● D s ([-A,0]) = 0+As = As ● Easy to compute encryptions of (linear functions of) the secret key s! ● Random encryptions: [-A,0]+E s (0;β)=E s (As;β)

  17. Decryption is also linear ● D s (A,b) =b – As = m+e ● Linear in the ciphertext (A,b) ● Linear in the secret key s’=(-s,1) – D s’ (A,b) = [A,b]s’=m+e – D cs’ (A,b) = [A,b](cs’)=cm+ce ● Remark: – Only approx. decryption is linear – Exact decryption involves non-linear rounding

  18. Operations on Ciphertexts ● Add: E(m₁;β₁)+E(m₂;β₂)⊂E(m₁+m₂;β₁+β₂) ● Neg: -E(m;β) = E(-m;β) ● Mul: c*E(m;β) = E(c*m; c*β) ● Const: [O,m] ∈ E(m;0) ● Key: [-A,0] ∈ E(As;0) Weak linear homomorphic properties: – can perform a limited number of additions and multiplications by small constants – decryption is linear in the secret key s’=(-s,1) – circular security: E(As) does not leak s

  19. Public Key Encryption ● Public Key: [a 1 ,b 1 ] = E s (0), …, [a n ,b n ]=E s (0) ● Encrypt(m): (Σ i r i * [a i ,b i ]) + (0,m) – E s (0)+...+E s (0)+E s (m;0) = E s (m) ● Decrypt normally using secret key ● [Regev05] LWE Public Key Encryption ● [Rothblum11]: any weakly linear homomorphic encryption implies public key encryption

  20. Multiplication by any constant ● E’[m] = (E[m],E[2m],E[4m],…,E[2 log(q) m]) ● Multiplication by c ∈ Z q : – Write c = Σ i c i 2 i , where c i ∈ {0,1} – Compute Σ i c i E[2 i m] = E[Σ i c i 2 i m] = E[cm] ● cE’[m] = E[cm] ● We can also compute E’[cm]: log q c)E’[m]) c*E’[m]=(cE’[m], (2c)E’[m], .., (2 log q c)m]) = E’[cm] =(E[cm], E[(2c)m], .., E[(2

  21. Multiplication via Homomorphic Decryption ● Idea: – Encryption E(m) = (a,as+e+m) is linearly homomorphic – Decryption D(a,b) = b – as = m+e is linear in s’=(-s,1) – We can decrypt homomorphically using an encryption of s’ ● Details – Given: E(m)=(a,b) and E’(s’)=(E’(-s),E’(1)) – Compute E(m)*E’(s’) = a*E’(-s)+b*E’(1)=E(m) ● More interesting: – Given E(m) and E’(cs’) – Compute E(m)*E’(cs’) = E(cm)

  22. Homomorphic “decrypt and multiply” ● E’’(c) = E’(cs’) = E’(“E(m)→c*m”) ● E’’(c) = {E(α i c)} i for some α i (s) ● Homomorphic Properties: – E’’(m 1 ) + E’’(m 2 ) = E’’(m 1 +m 2 ) – E’’(m 1 )*E’’(m 2 ) ={E(α i m 1 )*E’’(m 2 )} i ={E(α i m 1 *m 2 )} = E’’(m 1 *m 2 )

  23. FHE ● E’’ encryption scheme supporting – E’’(m 0 )+E’’(m 1 ) = E’’(m 0 +m 1 ) – E’’(m 0 )*E’’(m 1 ) = E’’(m 0 *m 1 +e) ● Not quite a FHE yet: – E’’ can evaluate any arithmetic circuit – But noise grows with computation ● Efgectively: – can only evaluate small circuits / branching programs ● Bootstrapping: FHE(NC1) → FHE(PTIME)

  24. most signifjcant bit (msb) x = (q/2)m + e (mod q) Bootstrapping FHE |e|<q/4, m∈{0,1} msb(x+q/4) = b ● Let c= Enc s (m*(q/2)+e) ● f c (s)=msb(Dec s (c))*(q/2)=m*(q/2) ● Eval f c homomorphically on {s}=Enc s (s) c=Enc(m) ● f c ({s})= {f c (s)} = {msb(Dec s (c))} Enc(s) = {m*(q/2)} =Enc s (m*(q/2)) ● Output noise depends on Eval(Dec (.) (c)) msb°Dec {s} , but not on e Enc(m)

  25. Composing FHE computations ● Output noise depends on Dec [s] , but not c. ● Enc(m*(q/2); q/4) → Enc(m*(q/2); β ≪ q/4) ● Can compose arbitrarily many gates, while keeping noise small E(x 1 ) E(x 2 ) E(x 3 ) + * E’’(s) E’’(s) Eval(D (.) (c)) Eval(D (.) (c)) * E’’(s) Eval(D (.) (c)) +

  26. Requirements ● Correctness: – Need “exact” decryption Dec(Enc(m))=m – Achieved by scaling and rounding round((q/2)m+e) = msb((q/2)m + e) c=Enc(m) ● Circular security: – Need to encrypt s under E’’ s E’’ s (s) – Circular security of E’’ s (s) still an open problem Eval(Dec (.) (c)) – Not needed for Leveled FHE Enc(m)

  27. Summary ● Lattice (LWE) encryption E – Circular secure: E s (s) – Linear approx. decryption D(s) – Transform E → E’’ (provably secure encryption) E’’ can evaluate arbitrary (low depth) function ● Bootstrapping – Nonlinear (but still low depth) rounding function – Can be computed by E’’ – Open problem: circular security of E’’ s (s)

Recommend


More recommend