Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using...

37
Scale-Invariant Fully Homomorphic Encryption over the Integers J.-S. Coron T. Lepoint M. Tibouchi PKC 2014 Thursday, March 27th, 2014

Transcript of Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using...

Page 1: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

Scale-Invariant Fully HomomorphicEncryption over the Integers

J.-S. Coron T. Lepoint M. Tibouchi

PKC 2014Thursday, March 27th, 2014

Page 2: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

FHE

x1, . . . , xn f

Enc(x1), . . . ,Enc(xn)−−−−−−−−−−−−−−−−→←−−−−−−−−−−−−−−−−

Enc(f (x1, . . . , xn))

Homomorphic Encryption

f ,Enc(x1), . . . ,Enc(xn) −→ Enc(f (x1, . . . , xn))

We assume w.l.o.g that xi bits and f boolean circuit

2/17

Page 3: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

FHE Schemes

FHE

Perform operations on plaintexts by manipulating only ciphertexts,and without knowing the private-key.

� Too many schemes existing to do an exhaustive list now...

� Main families: [Gen09], [vDGHV10], [BV11], [LTV12],[GSW13]

3/17

Page 4: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

FHE Schemes

FHE

Perform operations on plaintexts by manipulating only ciphertexts,and without knowing the private-key.

� Too many schemes existing to do an exhaustive list now...

� Main families: [Gen09], [vDGHV10], [BV11], [LTV12],[GSW13] ⇓

improved in a series of works[CMNT11], [CNT12],

[CCKLLTY13]

3/17

Page 5: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

FHE Schemes

FHE

Perform operations on plaintexts by manipulating only ciphertexts,and without knowing the private-key.

� Too many schemes existing to do an exhaustive list now...

� Main families: [Gen09], [vDGHV10], [BV11], [LTV12],[GSW13] ⇓

improved in a series of works[CMNT11], [CNT12],

[CCKLLTY13] ⇒ Batch DGHV schemebased on the decisional

AGCD problem

3/17

Page 6: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

FHE Schemes

FHE

Perform operations on plaintexts by manipulating only ciphertexts,and without knowing the private-key.

� Too many schemes existing to do an exhaustive list now...

� Main families: [Gen09], [vDGHV10], [BV11], [LTV12],[GSW13] ⇓

improved in a series of works[CMNT11], [CNT12],

[CCKLLTY13] ⇒ Batch DGHV schemebased on the decisional

AGCD problem

3/17

Page 7: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

FHE Schemes

FHE

Perform operations on plaintexts by manipulating only ciphertexts,and without knowing the private-key.

� Too many schemes existing to do an exhaustive list now...

� Main families: [Gen09], [vDGHV10], [BV11], [LTV12],[GSW13] ⇓

improved in a series of works[CMNT11], [CNT12],

[CCKLLTY13] ⇒ Batch DGHV schemebased on the decisional

AGCD problem

3/17

Page 8: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

The DGHV Scheme [vDGHV10]

� Public xi = qi · p + 2ri and error-free modulus x0 = q0 · p� Public encryption of m ∈ {0, 1}:

c = m + 2r ′ +∑i∈S

xi mod x0

where p is the secret-key, S random subset and r ′ is a “big”random

� Decryption:(c mod p) mod 2 = m

4/17

Page 9: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

The DGHV Scheme [vDGHV10]

� Public xi = qi · p + 2ri and error-free modulus x0 = q0 · p� Public encryption of m ∈ {0, 1}:

c = m + 2(

r ′ +∑i∈S

ri

)+(∑

i∈Sqi

)· p mod x0

where p is the secret-key, S random subset and r ′ is a “big”random

� Decryption:(c mod p) mod 2 = m

4/17

Page 10: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

The DGHV Scheme [vDGHV10]

� Public xi = qi · p + 2ri and error-free modulus x0 = q0 · p� Public encryption of m ∈ {0, 1}:

c = m + 2(

r ′ +∑i∈S

ri

)+(∑

i∈Sqi

)· p mod x0 = q0 · p

where p is the secret-key, S random subset and r ′ is a “big”randomI LHL can be applied on the qi ’sI LHL cannot be applied on the ri ’s: so we use a drowning

factor r ′

� Decryption:(c mod p) mod 2 = m

4/17

Page 11: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

The DGHV Scheme [vDGHV10]

� Public xi = qi · p + 2ri and error-free modulus x0 = q0 · p� Public encryption of m ∈ {0, 1}:

c = m + 2r ′ +∑i∈S

xi mod x0

where p is the secret-key, S random subset and r ′ is a “big”randomI LHL can be applied on the qi ’sI LHL cannot be applied on the ri ’s: so we use a drowning

factor r ′

� This did not generalized easily to batch DGHV...� Either intricate proof [CLT13, eprint 2013/036] or decisionalAGCD problem (hard to distinguish xi = qip + ri from randommodulo x0) [CCKLLTY13]

� Decryption:(c mod p) mod 2 = m

4/17

Page 12: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

The DGHV Scheme [vDGHV10]

� Public xi = qi · p + 2ri and error-free modulus x0 = q0 · p� Public encryption of m ∈ {0, 1}:

c = m + 2r ′ +∑i∈S

xi mod x0

where p is the secret-key, S random subset and r ′ is a “big”random

c =

γ ' 2 · 107 bits

p : η ' 2700 bits

r′ : ρ ' 80 bits

� Decryption:(c mod p) mod 2 = m

4/17

Page 13: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

The DGHV Scheme [vDGHV10]

� Public xi = qi · p + 2ri and error-free modulus x0 = q0 · p� Public encryption of m ∈ {0, 1}:

c = m + 2r ′ +∑i∈S

xi mod x0

where p is the secret-key, S random subset and r ′ is a “big”random

c =

γ ' 2 · 107 bits

p : η ' 2700 bits

r′ : ρ ' 80 bits

� Decryption:(c mod p) mod 2 = m

4/17

Page 14: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

Homomorphic Properties

� Addition:

c1 = q1 · p + 2r1 + m1

c2 = q2 · p + 2r2 + m2⇒ c1 + c2 = q′ · p + 2r ′ + (m1 + m2)

� Multiplication:

c1 = q1 · p + 2r1 + m1

c2 = q2 · p + 2r2 + m2⇒ c1 · c2 = q′′ · p + 2r ′′ + (m1 ·m2)

withr ′′ = 2r1r2 + r1m2 + r2m1

p

×

ρ

×

p

×

p

5/17

Page 15: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

Homomorphic Properties

� Addition:

c1 = q1 · p + 2r1 + m1

c2 = q2 · p + 2r2 + m2⇒ c1 + c2 = q′ · p + 2r ′ + (m1 + m2)

� Multiplication:

c1 = q1 · p + 2r1 + m1

c2 = q2 · p + 2r2 + m2⇒ c1 · c2 = q′′ · p + 2r ′′ + (m1 ·m2)

withr ′′ = 2r1r2 + r1m2 + r2m1

p

×

ρ

×

p

×

p

5/17

Page 16: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

Scale Invariance

� How to avoid exponential growth?I Modulus Switching [BGV12]: multiply by q′/q and round;

the noise goes down by a factor ≈ q′/qSecret key s ∈ Zn, Ciphertext c ∈ Zn

q

~c ·~s = m + 2e + qI

I Scale-Invariance [Bra12]: do not need to change modulus,but noise growth still linearSecret key s ∈ Zn, Ciphertext c ∈ Rn

~c ·~s = m + ε+ 2I

� ⇒ Leveled FHE: noise growth linear in mult. depth instead ofexponential

6/17

Page 17: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

Scale Invariance

� How to avoid exponential growth?I Modulus Switching [BGV12]: multiply by q′/q and round;

the noise goes down by a factor ≈ q′/qSecret key s ∈ Zn, Ciphertext c ∈ Zn

q

~c ·~s = m + 2e + qI

I Scale-Invariance [Bra12]: do not need to change modulus,but noise growth still linearSecret key s ∈ Zn, Ciphertext c ∈ Rn

~c ·~s = m + ε+ 2I

� ⇒ Leveled FHE: noise growth linear in mult. depth instead ofexponential

6/17

Page 18: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

Scale Invariance

� How to avoid exponential growth?I Modulus Switching [BGV12]: multiply by q′/q and round;

the noise goes down by a factor ≈ q′/qSecret key s ∈ Zn, Ciphertext c ∈ Zn

q

~c ·~s = m + 2e + qI

I Scale-Invariance [Bra12]: do not need to change modulus,but noise growth still linearSecret key s ∈ Zn, Ciphertext c ∈ Rn

~c ·~s = m + ε+ 2I

� ⇒ Leveled FHE: noise growth linear in mult. depth instead ofexponential

6/17

Page 19: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

Our Contributions

� Equivalence between Error-Free Decisional AGCD andError-Free Computational AGCDI Automatically simplifies all previous DGHV schemes

[vDGHV10,CMNT11,CNT12,CLT13a]

� Variant of DGHV and batch DGHV that is scale invariantI Noise growth linear in the multiplicative depthI but only one modulus: p2 instead of p

� Homomorphic Evaluation of AES with a scale invariantscheme

7/17

Page 20: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

Computational/Decisional AGCD

Error-Free Settings: For efficiency reason for FHE schemes, wework with an exact multiple

x0 = q0 · pof the secret key p.

� Computational AGCDγ,η,ρ: given x0 and polynomially manyxi = qi · p + ri , recover p

� Decisional AGCDγ,η,ρ: given x0, polynomially manyxi = qi · p + ri and

z = qz · p + rz + b · u mod x0

where u ← [0, x0), recover b

The (Error-Free) Computational and Decisional AGCD problemsare equivalent

8/17

Page 21: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

New (Batch) DGHV Scheme

� One-Slot SchemeI Public xi = qi · p + 2ri and error-free modulus x0 = q0 · pI Public encryption of m ∈ {0, 1}:

c = m +∑i∈S

xi mod x0

I Decryption:(c mod p) mod 2 = m

� Multi-Slots SchemeI Encryption of ~m = (mi ) is qi · p1 × · · · × pn + CRTpi (2ri + mi )I Public xi = Enc(0), error-free modulus x0 = q0 · p1 × · · · × pn

and elements x ′i = Enc(~ei ) (where ~ei [j ] = δi,j)I Public encryption of ~m ∈ {0, 1}n:

c =n∑

i=1

mi · x ′i +∑i∈S

xi mod x0

9/17

Page 22: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

Scale Invariant DGHV

� Main Ideas: work with secret p2 and move bit message toMSB modulo p instead of LSB modulo p

� Type-I ciphertext:

c = q · p2 + (2r∗ + m) · p − 1

2+ r

� Type II ciphertext (after multiplication of Type-I):

c ′ = q′ · p2 + m · p2 − 1

2+ r ′

� Procedure convert: similar to modulus swiching [CNT12] fromp2 to p... but we somewhat remain with a secret p2

10/17

Page 23: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

Procedure Convert

(γ − 2η) bits 2η bits

m1r∗1

r1q1

ρ bitsρ∗ bits

(γ − 2η) bits 2η bits

m2r∗2

r2q2

ρ bitsρ∗ bits×

MSB

(2γ − 2η) bits 2η bits

m r′q′

(ρ + ρ∗ + η) bits

LSB

Convert(γ − 2η) bits 2η bits

mr∗ rq

ρ∗ bits (ρ + ρ∗) bits

Lemma

Let ρ′ be such that ρ′ ≥ η + ρ+ log2(ηΘ). There exists aprocedure Convert which converts a Type-II ciphertext with noisesize ρ′ into a Type-I ciphertext with noise (ρ′ − η + 5, log2 Θ).

� Easy generalization to batching [CCKLLTY13]11/17

Page 24: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

Description of the leveled FHE scheme

� Public xi = qi · p2 + ri , error-free modulus x0 = q0 · p2 and

y = qy · p2 + ry +p − 1

2� Public encryption of m ∈ {0, 1}:

c = m · y +∑i∈S

xi mod x0

� Decryption:(2 · c mod p) mod 2 = m

� Mult of c1 and c2:

c ′ = Convert(2c1c2)

12/17

Page 25: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

Homomorphic AES?

pkFHE

{EncFHE(mi)}i

EncFHE(f(m0, . . . ,mi))

(public homomorphic computations)

f

� Typical high-level FHE use-case

� ... wait a sec! The ciphertext expansion is huge (prohibitive)!

� What if we use hybrid encryption? [NLV11]

� Now we need to homomorphically evaluate AES−1

13/17

Page 26: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

Homomorphic AES?

pkFHE

{EncFHE(mi)}i

EncFHE(f(m0, . . . ,mi))

(public homomorphic computations)

f

� Typical high-level FHE use-case� ... wait a sec! The ciphertext expansion is huge (prohibitive)!

I If mi is a 4MB image, using [GHS12,CCKLLTY13], the userwould have to send around 200/300GB of encrypted data

� What if we use hybrid encryption? [NLV11]� Now we need to homomorphically evaluate AES−1

13/17

Page 27: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

Homomorphic AES?

pkFHE

{EncAES(mi)}i

EncFHE(f(m0, . . . ,mi))

(public homomorphic computations)

f

???

� Typical high-level FHE use-case� ... wait a sec! The ciphertext expansion is huge (prohibitive)!� What if we use hybrid encryption? [NLV11]

I AES does not have ciphertext expansion

� Now we need to homomorphically evaluate AES−1

13/17

Page 28: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

Homomorphic AES?

pkFHE,EncFHE(k)

{AESk(mi)}i

EncFHE(f(m0, . . . ,mi))

(public homomorphic computations)

EncFHE AES−1

f

{EncFHE(mi)}i

� Typical high-level FHE use-case� ... wait a sec! The ciphertext expansion is huge (prohibitive)!� What if we use hybrid encryption? [NLV11]� Now we need to homomorphically evaluate AES−1

I Network communication from user to cloud essentially optimalI But now we need to efficiently evaluate AES−1 before f !!

13/17

Page 29: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

Homomorphic AES using SIBDGHV� Use the same framework as in [CCKLLTY13]� State-wise AES implementation: 128 ciphertexts, one per bit

of the AES state� Batching used to perform several AES in parallel

� Compared to BDGHV ([CCKLLTY13])

14/17

Page 30: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

Homomorphic AES using SIBDGHV� Use the same framework as in [CCKLLTY13]� State-wise AES implementation: 128 ciphertexts, one per bit

of the AES state� Batching used to perform several AES in parallel

� Compared to BDGHV ([CCKLLTY13])

14/17

Page 31: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

Homomorphic AES using SIBDGHV� Use the same framework as in [CCKLLTY13]� State-wise AES implementation: 128 ciphertexts, one per bit

of the AES state� Batching used to perform several AES in parallel

� Compared to BDGHV ([CCKLLTY13])

14/17

Page 32: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

Thoughts about Hom. ComputationsPartly explicited in [LN14, eprint 2014/062]

pkFHE,EncFHE(k)

{AESk(mi)}i

EncFHE(f(m0, . . . ,mi))

(public homomorphic computations)

EncFHE AES−1

f

{EncFHE(mi)}i

� Parameter selection: either room for f or need to bootstrap :-(

� Latency vs. throughput

� Is AES such a good idea?

15/17

Page 33: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

Thoughts about Hom. ComputationsPartly explicited in [LN14, eprint 2014/062]

pkFHE,EncFHE(k)

{AESk(mi)}i

EncFHE(f(m0, . . . ,mi))

(public homomorphic computations)

EncFHE AES−1

f

{EncFHE(mi)}i

� Parameter selection: either room for f or need to bootstrap :-(

� Latency vs. throughput

� Is AES such a good idea?

15/17

Page 34: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

Thoughts about Hom. ComputationsPartly explicited in [LN14, eprint 2014/062]

pkFHE,EncFHE(k)

{AESk(mi)}i

EncFHE(f(m0, . . . ,mi))

(public homomorphic computations)

EncFHE AES−1

f

{EncFHE(mi)}i

� Parameter selection: either room for f or need to bootstrap :-(

� Latency vs. throughput

� Is AES such a good idea?

15/17

Page 35: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

Conclusion

Conclusion

� Equivalence between Error-Free Decisional and ComputationalAGCD: automatic simplification of previous FHE schemes overthe integers

� New leveled DGHV scheme that is scale invariant (nomodulus switching)

� Timings one order of magnitude faster than [CCKLLTY13]and comparable to [GHS12] for homomorphic AES evaluation

� AGCD also used for Multilinear Maps [CLT13]: need morecryptanalysis on this problemI we hope that our pratical parameters practical parameters will

spur on the cryptanalysis of AGCD

16/17

Page 36: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

Questions? or...

Copyright Grumpy Cat

Thank you for your attention

17/17

Page 37: Scale-Invariant Fully Homomorphic Encryption over the · PDF filei is a 4MB image, using [GHS12,CCKLLTY13], the user would have to send around200/300GBof encrypted data ... What if

Recent Attack on Eprint?

18/17