21
Fully Homomorphic Encryption without Modulus Switching from Classical GapSVP Zvika Brakerski Stanford University CRYPTO 2012

Fully Homomorphic Encryption from LWE · PDF fileFully Homomorphic Encryption ... [G09,G10] – first candidate. •[vDGHV10, BV11a] ... also see blog post with Boaz Barak:

Embed Size (px)

Citation preview

Page 1: Fully Homomorphic Encryption from LWE · PDF fileFully Homomorphic Encryption ... [G09,G10] – first candidate. •[vDGHV10, BV11a] ... also see blog post with Boaz Barak:

Fully Homomorphic Encryption without Modulus Switching

from Classical GapSVP

Zvika Brakerski

Stanford University

CRYPTO 2012

Page 2: Fully Homomorphic Encryption from LWE · PDF fileFully Homomorphic Encryption ... [G09,G10] – first candidate. •[vDGHV10, BV11a] ... also see blog post with Boaz Barak:

Outsourcing Computation

Email, web-search, navigation, social networkingโ€ฆ

๐‘ฅ ๐‘“

๐‘“(๐‘ฅ)

๐‘ฅ

What if ๐‘ฅ is private?

Search query, location, business information, medical informationโ€ฆ

Page 3: Fully Homomorphic Encryption from LWE · PDF fileFully Homomorphic Encryption ... [G09,G10] – first candidate. •[vDGHV10, BV11a] ... also see blog post with Boaz Barak:

Outsourcing Computation โ€“ Privately

Homomorphic Encryption

๐‘“, ๐ธ๐‘›๐‘ ๐‘ฅ1 , โ€ฆ , ๐ธ๐‘›๐‘ ๐‘ฅ๐‘› โ†’ ๐ธ๐‘›๐‘(๐‘“ ๐‘ฅ1, โ€ฆ , ๐‘ฅ๐‘› )

We assume w.l.o.g ๐‘“ โˆˆ *+,ร—+ (over โ„ค2).

๐‘ฅ ๐‘“

๐‘ฆ

๐ธ๐‘›๐‘(๐‘ฅ)

๐ท๐‘’๐‘ ๐‘ฆ = ๐‘“(๐‘ฅ)

Learns nothing on ๐‘ฅ.

Page 4: Fully Homomorphic Encryption from LWE · PDF fileFully Homomorphic Encryption ... [G09,G10] – first candidate. •[vDGHV10, BV11a] ... also see blog post with Boaz Barak:

The Old Days of FHE

โ€ข Gentryโ€™s breakthrough [G09,G10] โ€“ first candidate.

โ€ข [vDGHV10, BV11a]: Similar outline, different assumptions.

โ€ข [GH11]: Chimeric-FHE.

โ€ข Efficiency attempts [SV10,SS10,GH10,LNV11].

2009-2011

Page 5: Fully Homomorphic Encryption from LWE · PDF fileFully Homomorphic Encryption ... [G09,G10] – first candidate. •[vDGHV10, BV11a] ... also see blog post with Boaz Barak:

2nd Generation FHE

โ€ข [BV11b]: LWE-based FHE (= apx. short vector in lattice).

โ€“ Better assumption.

โ€“ Clean presentation: no ideals, no โ€œsquashingโ€.

โ€“ Efficiency improvement.

โ€ข [BGV12]: Improved performance via Modulus Switching.

โ€“ Quantitatively better assumption.

โ€“ โ€œLeveledโ€ homomorphism without bootstrapping.

โ€“ Efficiency improvements using ideals (โ€œbatchingโ€).

[GHS11,GHS12a, GHS12b]: Efficiency improvements and optimizations using ideals.

Page 6: Fully Homomorphic Encryption from LWE · PDF fileFully Homomorphic Encryption ... [G09,G10] – first candidate. •[vDGHV10, BV11a] ... also see blog post with Boaz Barak:

This work:

Modulus switching is a red herring

โ€œScale-independent encryptionโ€

โ‡’ better performance with less headache

Page 7: Fully Homomorphic Encryption from LWE · PDF fileFully Homomorphic Encryption ... [G09,G10] – first candidate. •[vDGHV10, BV11a] ... also see blog post with Boaz Barak:

FHE 101 [BV11b]

Secret key: ๐‘  โˆˆ โ„ค๐‘ž๐‘›

Ciphertext: ๐‘ โˆˆ โ„ค๐‘ž๐‘›

Encryption algorithm: Doesnโ€™t matter.

Decryption algorithm: ๐‘ โ‹… ๐‘  ๐‘š๐‘œ๐‘‘ ๐‘ž (๐‘š๐‘œ๐‘‘ 2).

Security based on ๐ฟ๐‘Š๐ธ๐‘›,๐‘ž,๐›ผ The Scheme:

๐‘ โ‹… ๐‘  = ๐‘š + 2๐‘’ + ๐‘ž๐ผ

small (initial) noise ๐‘’ < ๐ต = ๐›ผ๐‘ž

dec. if ๐‘’ /๐‘ž <1

4

Page 8: Fully Homomorphic Encryption from LWE · PDF fileFully Homomorphic Encryption ... [G09,G10] – first candidate. •[vDGHV10, BV11a] ... also see blog post with Boaz Barak:

FHE 101 [BV11b]

Secret key: ๐‘  โˆˆ โ„ค๐‘ž๐‘›

Ciphertext: ๐‘ โˆˆ โ„ค๐‘ž๐‘›

The Scheme:

๐‘ โ‹… ๐‘  = ๐‘š + 2๐‘’ + ๐‘ž๐ผ

small (initial) noise ๐‘’ < ๐ต = ๐›ผ๐‘ž

dec. if ๐‘’ /๐‘ž <1

4

Additive Homomorphism: That again? Just addโ€™em, dudeโ€ฆ

๐‘ 1, ๐‘ 2 โ‡’ ๐‘ 1 + ๐‘ 2 ๐‘š๐‘œ๐‘‘ ๐‘ž

Page 9: Fully Homomorphic Encryption from LWE · PDF fileFully Homomorphic Encryption ... [G09,G10] – first candidate. •[vDGHV10, BV11a] ... also see blog post with Boaz Barak:

FHE 101 [BV11b]

Multiplicative Homomorphism:

๐‘ 1, ๐‘ 2 โ‡’ ๐‘ 1 โŠ— ๐‘ 2 ๐‘š๐‘œ๐‘‘ ๐‘ž โˆˆ โ„ค๐‘ž๐‘›2

vector of all cross terms ๐‘ 1 ๐‘– โ‹… ๐‘ 2 ๐‘— ๐‘–,๐‘—

๐‘ 1 โŠ— ๐‘ 2 โ‹… ๐‘  โŠ— ๐‘  = ๐‘ 1 โ‹… ๐‘  โ‹… ๐‘ 2 โ‹… ๐‘  = ๐‘š1 + 2๐‘’1 โ‹… ๐‘š2 + 2๐‘’2 (๐‘š๐‘œ๐‘‘ ๐‘ž)

= ๐‘š1๐‘š2 + 2 โ‹… ๐‘‚ ๐‘’1๐‘’2 (๐‘š๐‘œ๐‘‘ ๐‘ž)

๐‘ ๐‘˜ changedโ€ฆ but we can bring it back

(we have the technology)

~๐ต2

noise blows up!

๐‘ฉ โ†’ ๐‘ฉ๐Ÿ โ†’ โ‹ฏ โ†’ ๐‘ฉ๐Ÿ๐’…

dec. if ๐ต2๐‘‘/๐‘ž <

1

4

Secret key: ๐‘  โˆˆ โ„ค๐‘ž๐‘›

Ciphertext: ๐‘ โˆˆ โ„ค๐‘ž๐‘›

The Scheme:

๐‘ โ‹… ๐‘  = ๐‘š + 2๐‘’ + ๐‘ž๐ผ

small (initial) noise ๐‘’ < ๐ต = ๐›ผ๐‘ž

dec. if ๐‘’ /๐‘ž <1

4

Page 10: Fully Homomorphic Encryption from LWE · PDF fileFully Homomorphic Encryption ... [G09,G10] – first candidate. •[vDGHV10, BV11a] ... also see blog post with Boaz Barak:

Modulus Switching [BGV12]

Idea: Bring noise back down by dividing the entire ciphertext by ๐ต.

๐‘ โˆˆ โ„ค๐‘ž๐‘›

with noise |๐‘’| < ๐ต2 /๐ต

๐‘ /๐ต โˆˆ โ„ค๐‘ž/๐ต๐‘›

with noise |๐‘’| < ๐ต

(make sure not to harm the message bit ๐‘š)

(๐‘ฉ, ๐’’) โ†’ (๐‘ฉ, ๐’’/๐‘ฉ) โ†’ โ‹ฏ โ†’ (๐‘ฉ, ๐’’/๐‘ฉ๐’…)

Noise/modulus evolution:

dec. if ๐ต๐‘‘+1 < ๐‘ž/4

Page 11: Fully Homomorphic Encryption from LWE · PDF fileFully Homomorphic Encryption ... [G09,G10] – first candidate. •[vDGHV10, BV11a] ... also see blog post with Boaz Barak:

My Problems with Modulus Switching

1. Modulus switching is scale-dependent. - Scaling ๐ต, ๐‘ž changes performance:

Smaller ๐ต, ๐‘ž smaller ๐ต๐‘‘+1/๐‘ž better homomorphism.

2. What does modulus switching really do?

- Same as a scaling factor in the tensoring process ( ๐‘ 1, ๐‘ 2 โ‡’ ๐œ โ‹… ๐‘ 1 โŠ— ๐‘ 2 ๐‘š๐‘œ๐‘‘ ๐‘ž ).

- In a โ€œcorrectโ€ scale, this factor should be 1.

nothingโ€ฆ

Page 12: Fully Homomorphic Encryption from LWE · PDF fileFully Homomorphic Encryption ... [G09,G10] – first candidate. •[vDGHV10, BV11a] ... also see blog post with Boaz Barak:

Our Solution: Scale-Independent FHE

Compare with previous:

real numbers ๐‘š๐‘œ๐‘‘ 2 โ‰ก (โˆ’1,1]

Hardness assumption is the same ๐ฟ๐‘Š๐ธ๐‘›,๐‘ž,๐›ผ.

Secret key: ๐‘  โˆˆ โ„ค๐‘›

Ciphertext: ๐‘ โˆˆ โ„2๐‘›

๐‘ โ‹… ๐‘  = ๐‘š + ๐œ– + 2๐ผ

small (initial) noise ๐œ– < 2๐›ผ

dec. if ๐œ– <1

2

Page 13: Fully Homomorphic Encryption from LWE · PDF fileFully Homomorphic Encryption ... [G09,G10] – first candidate. •[vDGHV10, BV11a] ... also see blog post with Boaz Barak:

Scale-Independent Multiplication

Multiplicative Homomorphism:

๐‘ 1, ๐‘ 2 โ‡’ ๐‘ 1 โŠ— ๐‘ 2 ๐‘š๐‘œ๐‘‘ 2 โˆˆ โ„2๐‘›2

๐‘ 1 โŠ— ๐‘ 2 โ‹… ๐‘  โŠ— ๐‘  = ๐‘ 1 โ‹… ๐‘  โ‹… ๐‘ 2 โ‹… ๐‘ 

= ๐‘š1 + ๐œ–1 + 2๐ผ1 โ‹… ๐‘š2 + ๐œ–2 + 2๐ผ2 (๐‘š๐‘œ๐‘‘ 2)

= ๐‘š1๐‘š2 + ๐œ–1 โ‹… ๐‘š2 + 2๐ผ2 + ๐œ–2 โ‹… ๐‘š1 + 2๐ผ1 + ๐œ–1๐œ–2 (๐‘š๐‘œ๐‘‘ 2)

Careful!

1/2 ๐‘š๐‘œ๐‘‘ 2 โ‹… 2 ๐‘š๐‘œ๐‘‘ 2 โ‰  1 (๐‘š๐‘œ๐‘‘ 2)

~๐›ผ2= tiny! ~๐›ผ โ‹… |๐‘š + 2๐ผ|

๐‘š + 2๐ผ โ‰ˆ ๐‘ โ‹… ๐‘  โ‰ค ๐‘  1

โ‰ฒ ๐›ผ โ‹… ๐‘  1

real numbers ๐‘š๐‘œ๐‘‘ 2 โ‰ก (โˆ’1,1]

Secret key: ๐‘  โˆˆ โ„ค๐‘›

Ciphertext: ๐‘ โˆˆ โ„2๐‘›

๐‘ โ‹… ๐‘  = ๐‘š + ๐œ– + 2๐ผ

small (initial) noise ๐œ– < 2๐›ผ

dec. if ๐œ– <1

2

Noise blowup: ๐œถ โ†’ ๐œถ โ‹… ๐’” ๐Ÿ

Page 14: Fully Homomorphic Encryption from LWE · PDF fileFully Homomorphic Encryption ... [G09,G10] – first candidate. •[vDGHV10, BV11a] ... also see blog post with Boaz Barak:

Scale-Independent Multiplication

Multiplicative Homomorphism:

๐‘ 1, ๐‘ 2 โ‡’ ๐‘ 1 โŠ— ๐‘ 2 ๐‘š๐‘œ๐‘‘ 2 โˆˆ โ„2๐‘›2

Noise blowup: ๐œถ โ†’ ๐œถ โ‹… ๐’” ๐Ÿ

Not good enough: ๐‘  1 โ‰ˆ ๐‘›๐‘ž

Solution: Decompose the elements of ๐‘  into ๐‘› log ๐‘ž bits.

real numbers ๐‘š๐‘œ๐‘‘ 2 โ‰ก (โˆ’1,1]

Secret key: ๐‘  โˆˆ โ„ค๐‘›

Ciphertext: ๐‘ โˆˆ โ„2๐‘›

๐‘ โ‹… ๐‘  = ๐‘š + ๐œ– + 2๐ผ

small (initial) noise ๐œ– < 2๐›ผ

dec. if ๐œ– <1

2

Page 15: Fully Homomorphic Encryption from LWE · PDF fileFully Homomorphic Encryption ... [G09,G10] – first candidate. •[vDGHV10, BV11a] ... also see blog post with Boaz Barak:

๐‘  = ๐‘  1 , ๐‘  2 , โ€ฆ

๐‘ = ๐‘ 1 , ๐‘ 2 , โ€ฆ

๐‘  โ‹… ๐‘ = ๐‘  1 โ‹… ๐‘ 1 + ๐‘  2 โ‹… ๐‘ 2 + โ‹ฏ

๐‘  = ๐‘  1 0, โ€ฆ , ๐‘  1 log ๐‘ž , ๐‘  2 0, โ€ฆ , ๐‘  2 log ๐‘ž , โ€ฆ

๐‘ = ๐‘ 1 , 2๐‘ 1 , โ€ฆ , 2log ๐‘ž๐‘ 1 , ๐‘ 2 , 2๐‘ 2 , โ€ฆ , 2log ๐‘ž๐‘ 2 , โ€ฆ

๐‘  โ‹… ๐‘ = ๐‘  1 ๐‘– โ‹… 2๐‘–๐‘ 1๐‘– + ๐‘  2 ๐‘– โ‹… 2๐‘–๐‘ 2๐‘– + โ‹ฏ

= ๐‘  1 โ‹… ๐‘ 1 + ๐‘  2 โ‹… ๐‘ 2 + โ‹ฏ

Binary Decomposition

Page 16: Fully Homomorphic Encryption from LWE · PDF fileFully Homomorphic Encryption ... [G09,G10] – first candidate. •[vDGHV10, BV11a] ... also see blog post with Boaz Barak:

Scale-Independent Multiplication

๐‘ 1, ๐‘ 2 โ‡’ ๐‘ 1 โŠ— ๐‘ 2 ๐‘š๐‘œ๐‘‘ 2 โˆˆ โ„2๐‘›2

Noise blowup: ๐œถ โ†’ ๐œถ โ‹… ๐’” ๐Ÿ

๐‘  1 โ‰ค ๐‘› log ๐‘ž

Noise blowup: ๐œถ โ†’ ๐œถ โ‹… ๐’ log ๐’’ โ‰ค ๐œถ โ‹… ๐’๐Ÿ

For depth ๐‘‘ circuit: ๐›ผ โ†’ ๐›ผ โ‹… ๐‘›๐‘‚(๐‘‘) regardless of scale!

real numbers ๐‘š๐‘œ๐‘‘ 2 โ‰ก (โˆ’1,1]

Secret key: ๐‘  โˆˆ *0,1+๐‘› log ๐‘ž

Ciphertext: ๐‘ โˆˆ โ„2๐‘› log ๐‘ž

๐‘ โ‹… ๐‘  = ๐‘š + ๐œ– + 2๐ผ

small (initial) noise ๐œ– < 2๐›ผ

dec. if ๐œ– <1

2

Multiplicative Homomorphism:

Page 17: Fully Homomorphic Encryption from LWE · PDF fileFully Homomorphic Encryption ... [G09,G10] – first candidate. •[vDGHV10, BV11a] ... also see blog post with Boaz Barak:

Full Homomorphism via Bootstrapping

Evaluating depth ๐‘‘ circuit: ๐œถ โ†’ ๐œถ โ‹… ๐’๐‘ถ(๐’…)

For โ€œbootstrappingโ€: ๐‘‘ = ๐‘‚(log ๐‘›) โ‡’ ๐œถ โ†’ ๐œถ โ‹… ๐’๐‘ถ(๐ฅ๐จ๐  ๐’)

โ‡’ dec. if ๐œถ โ‰ˆ ๐’โˆ’๐‘ถ(๐ฅ๐จ๐  ๐’) regardless of ๐‘ž!

(in *BGV12+ only for โ€œsmallโ€ odd ๐‘ž)

Using ๐‘ž โ‰ˆ 2๐‘› โ‡’ Hardness based on classical GapSVP.

Page 18: Fully Homomorphic Encryption from LWE · PDF fileFully Homomorphic Encryption ... [G09,G10] – first candidate. •[vDGHV10, BV11a] ... also see blog post with Boaz Barak:

Conclusion

โ€ข Scale-independence FHE without modulus switching.

โ€ข Homomorphic properties independent of ๐‘ž. โ€“ But ๐‘ž still matters for security.

โ€ข Properties of [BGV12] extend.

โ€ข Bonuses: โ€“ Our ๐‘ž can be even (e.g. power of 2). โ€“ Security based on classical GapSVP (as opposed to quantum).

โ€ข Simpler!

Page 19: Fully Homomorphic Encryption from LWE · PDF fileFully Homomorphic Encryption ... [G09,G10] – first candidate. •[vDGHV10, BV11a] ... also see blog post with Boaz Barak:

tiny.cc/fheblog1 ; tiny.cc/fheblog2

also see blog post with Boaz Barak:

Page 20: Fully Homomorphic Encryption from LWE · PDF fileFully Homomorphic Encryption ... [G09,G10] – first candidate. •[vDGHV10, BV11a] ... also see blog post with Boaz Barak:

Farewell CRYPTO โ€™12โ€ฆ

Page 21: Fully Homomorphic Encryption from LWE · PDF fileFully Homomorphic Encryption ... [G09,G10] – first candidate. •[vDGHV10, BV11a] ... also see blog post with Boaz Barak:

tiny.cc/fheblog1 ; tiny.cc/fheblog2

also see blog post with Boaz Barak: