Sparse-secret Ring-LWE in FHE: Is It Really Needed? Ilia Iliashenko - - PowerPoint PPT Presentation

โ–ถ
sparse secret ring lwe in fhe is it really needed
SMART_READER_LITE
LIVE PREVIEW

Sparse-secret Ring-LWE in FHE: Is It Really Needed? Ilia Iliashenko - - PowerPoint PPT Presentation

Sparse-secret Ring-LWE in FHE: Is It Really Needed? Ilia Iliashenko (joint work with Hao Chen, Kim Laine, Yongsoo Song) Lattice Coding & Crypto Meeting, Royal Holloway 20 Nov Learning with Errors (LWE) = + 02


slide-1
SLIDE 1

Sparse-secret Ring-LWE in FHE: Is It Really Needed?

Ilia Iliashenko (joint work with Hao Chen, Kim Laine, Yongsoo Song)

Lattice Coding & Crypto Meeting, Royal Holloway 20 Nov

slide-2
SLIDE 2

Learning with Errors (LWE)

๐’„ = โ‹… + ๐‘ฉ ๐’• ๐’‡

Decision: distinguish between (๐‘ฉ, ๐’„) and uniformly random (๐‘ต, ๐’˜). Search:

find ๐’•. ๐‘ฉ โˆˆ โ„ค/

0ร—2 is uniformly random, ๐’• โˆˆ โ„ค/ 0 and ๐’‡ โˆˆ โ„ค/ 0 is small.

slide-3
SLIDE 3

Sample ๐’• and ๐’‡ coefficient-wise

๐’„ = โ‹… + ๐‘ฉ ๐’• ๐’‡ ๐’•๐Ÿ ๐’•๐Ÿ โ€ฆ ๐’•๐’6๐Ÿ

Uniformly random ๐‘‰8 over 0,1 0. Uniformly random ๐‘‰< over โˆ’1,0,1 0. Uniformly random ๐‘‰/ over โ„ค/

0.

Discrete Gaussian ๐’ / over โ„ค/

0.

slide-4
SLIDE 4

Hardness of LWE

๐’„ = โ‹… + ๐‘ฉ ๐’• ๐’‡ ๐’•๐Ÿ ๐’•๐Ÿ โ€ฆ ๐’•๐’6๐Ÿ ๐’• โ† ๐‘‰/, or ๐‘‰8, or ๐’ / ๐’‡ โ† ๐’ / with ๐œ โˆˆ ฮฉ ๐‘œ LWE is as hard as classical lattice problems (GapSVP, DGS)

Uniformly random ๐‘‰8 over 0,1 0. Uniformly random ๐‘‰< over โˆ’1,0,1 0. Uniformly random ๐‘‰/ over โ„ค/

0.

Discrete Gaussian ๐’ / over โ„ค/

0.

slide-5
SLIDE 5

Sparse-secret LWE

๐’„ = โ‹… + ๐‘ฉ ๐’• ๐’‡ ๐’•๐Ÿ ๐’•๐Ÿ โ€ฆ ๐’•๐’6๐Ÿ ๐’• โ† ๐‘‰< โ„Ž : ๐‘ฅ๐‘ข ๐’• = โ„Ž ๐’‡ โ† ๐’ / ???

Uniformly random ๐‘‰8 over 0,1 0. Uniformly random ๐‘‰< over โˆ’1,0,1 0. Uniformly random ๐‘‰/ over โ„ค/

0.

Discrete Gaussian ๐’ / over โ„ค/

0.

slide-6
SLIDE 6

Ring-LWE

๐’„ = โ‹… + ๐’• ๐’‡

๐’ƒ๐Ÿ ๐’ƒ๐Ÿ ๐’ƒ๐Ÿ‘ โ€ฆ ๐’ƒ๐’6๐Ÿ โˆ’๐’ƒ๐’6๐Ÿ ๐’ƒ๐Ÿ ๐’ƒ๐Ÿ โ€ฆ ๐’ƒ๐’6๐Ÿ‘ โ€ฆ

slide-7
SLIDE 7

Ring-LWE

๐‘ = + ๐‘ก ๐‘“ ๐‘ ๐‘, ๐‘, ๐‘ก, ๐‘“ โˆˆ ๐‘†/ = โ„ค[๐‘Œ]/(๐‘Ÿ, ๐‘Œ0 + 1) (๐‘œ must be a power of two) โ‹…

slide-8
SLIDE 8

Hardness of Ring-LWE

๐‘ = + ๐‘ก ๐‘“ ๐‘ ๐‘, ๐‘, ๐‘ก, ๐‘“ โˆˆ ๐‘†/ = โ„ค[๐‘Œ]/(๐‘Ÿ, ๐‘Œ0 + 1) (๐‘œ must be a power of two) ๐‘ก โ† ๐‘‰/ or ๐’ / Ring-LWE is at least as hard as SIVP โ‹…

slide-9
SLIDE 9

Attacks on sparse-secret LWE

Albrecht, Eurocryptโ€™17 Albrecht et al., Asiacrypt โ€™17 Cheon et al., IEEE Accessโ€™19 Curtis and Player, WAHCโ€™19 Cheon and Son, WAHCโ€™19 โ€ฆ

slide-10
SLIDE 10

Efficient FHE schemes need sparse secrets for bootstrapping

computation bootstrapping noise plaintext Bootstrapping performs decryption homomorphically.

slide-11
SLIDE 11

Multiplicative depth of bootstrapping depends on ๐‘ฅ๐‘ข ๐‘ก :

  • FV:

log ๐‘ฅ๐‘ข ๐‘ก + log(log ๐‘ฅ๐‘ข ๐‘ก + log ๐‘ข)

  • BGV:

log ๐‘ฅ๐‘ข ๐‘ก + log ๐‘ข

Reference: Chen and Han, Eurocryptโ€™18

TFHE bootstrapping does not have this dependency.

Efficient FHE schemes need sparse secrets for bootstrapping

slide-12
SLIDE 12

Approximate HE

๐‘‘๐‘ข ๐‘›Z โ‹† ๐‘‘๐‘ข ๐‘›8 = ๐‘‘๐‘ข โ‰ƒ ๐‘›Z โŠ™ ๐‘›8

slide-13
SLIDE 13

Approximate HE (HEAAN/CKKS)

Idea: consider ciphertext noise as a part of a message.

Decrypt ๐‘‘๐‘ข = ๐‘› + ๐‘“ โ‰ƒ ๐‘›.

Reference: Cheon et al., Asiacryptโ€™17

slide-14
SLIDE 14

HEAAN bootstrapping

computation Mult undecryptable noise plaintext

slide-15
SLIDE 15

HEAAN bootstrapping

computation bootstrapping noise plaintext

slide-16
SLIDE 16

HEAAN โ€œbootstrappingโ€

bootstrapping plaintext is lost

slide-17
SLIDE 17

HEAAN โ€œbootstrappingโ€

bootstrapping plaintext is lost Bootstrappable Encryption Scheme Let ๐ทe be the set of circuits that ๐น can compactly and correctly evaluate. We say that ๐น is bootstrappable with the respect to gate ฮ“ if ๐ธ๐‘“๐‘‘e ฮ“ โІ ๐ทe. Correctness of Homomorphic Encryption HE scheme ๐น is correct for a circuit ๐ท if for any plaintexts ๐œŒZ, โ€ฆ , ๐œŒk it holds: If ct = Evaluatee(๐ท, Enc ๐œŒZ , โ€ฆ , Enc ๐œŒk ), then Dece ๐‘‘๐‘ข = ๐ท ๐œŒZ, โ€ฆ , ๐œŒk .

slide-18
SLIDE 18

HEAAN โ€œbootstrappingโ€

bootstrapping plaintext is lost Bootstrappable Encryption Scheme Let ๐ทe be the set of circuits that ๐น can compactly and correctly evaluate. We say that ๐น is bootstrappable with the respect to gate ฮ“ if ๐ธ๐‘“๐‘‘e ฮ“ โІ ๐ทe. Correctness of Homomorphic Encryption HE scheme ๐น is correct for a circuit ๐ท if for any plaintexts ๐œŒZ, โ€ฆ , ๐œŒk it holds: If ct = Evaluatee(๐ท, Enc ๐œŒZ , โ€ฆ , Enc ๐œŒk ), then Dece ๐‘‘๐‘ข = ๐ท ๐œŒZ, โ€ฆ , ๐œŒk .

slide-19
SLIDE 19

HEAAN works with complex vectors

โ„‚0/8 ๐‘จZ ๐‘จ8 โ€ฆ ๐‘จ0/8 ๐‘จZ โ€ฆ ๐‘จ0/8 ๐‘จ0/8 โ€ฆ s ๐‘จZ โ„‚0 ๐‘คu โ€ฆ ๐‘ค06Z โ„0

Inverse DFT* *with primitive roots of unity

๐‘†/ โŒŠ โŒ‰ ฮ” โ‹… ๐‘คu โ€ฆ โŒŠ โŒ‰ ฮ” โ‹… ๐‘ค06Z

๐‘Œu ๐‘Œ06Z โ€ฆ

slide-20
SLIDE 20

How to encode less than ๐‘œ/2 values?

๐‘จZ ๐‘จ8 โ€ฆ ๐‘จ{ โ„‚{

๐‘› must divide n/2

๐‘คu ๐‘คZ โ€ฆ ๐‘ค8{6Z

๐‘u ๐‘8{6Z โ€ฆ ๐‘Z

โ„ค[๐‘] ๐‘คu 0 โ€ฆ ๐‘คZ โ€ฆ ๐‘ค8{6Z โ€ฆ

๐‘Œu ๐‘Œ0/8{ ๐‘Œ(0/8{)(8{6Z) ๐‘ โ†ฆ ๐‘Œ0/8{

๐‘†/

slide-21
SLIDE 21

Decoding

๐‘u โ€ฆ ๐‘06Z ๐‘u

~

โ€ฆ ๐‘06Z

~ computation

โˆ†~ โ‹… ๐’œ๐Ÿ + ๐’‡๐Ÿ โ€ฆ โˆ†~ โ‹… ๐’œ๐’/๐Ÿ‘ + ๐’‡๐’/๐Ÿ‘

DFT*

โ‰ˆ ๐‘จZ โ€ฆ โ‰ˆ ๐‘จ0/8

1/โˆ†~ *with primitive roots of unity ๐‘Œu ๐‘Œ06Z ๐‘Œu ๐‘Œ06Z

slide-22
SLIDE 22

Rotation of encoded vectors

โ„‚โ€š/8 ๐‘จZ ๐‘จ8 โ€ฆ ๐‘จ0/8 ๐‘†/ ๐‘u โ€ฆ ๐‘06Z

๐‘Œu ๐‘Œ06Z

๐‘u โ€ฆ ๐‘06Z

๐‘Œu ๐‘Œ06Z

๐‘Œ โ†’ ๐‘Œโ€žโ€ฆ ๐‘จโ€ โ€กZ ๐‘จโ€ โ€ก8 โ€ฆ ๐‘จโ€ 

slide-23
SLIDE 23

Rotation of encoded vectors

โ„‚{ ๐‘จZ ๐‘จ8 โ€ฆ ๐‘จ{ ๐‘†/ ๐‘u โ€ฆ ๐‘06Z

๐‘Œu ๐‘Œ06Z

๐‘u โ€ฆ ๐‘06Z

๐‘Œu ๐‘Œ06Z

๐‘Œ โ†’ ๐‘Œโ€žห† ๐‘จZ ๐‘จ8 โ€ฆ ๐‘จ{

Rotations by ๐‘™๐‘› slots are automorphisms of ๐‘† fixing ๐‘†~ = โ„ค ๐‘Œ

ล  โ€นห† /(๐‘Ÿ, ๐‘Œ0 + 1), ๐‘†~ โŠ‚ ๐‘†.

slide-24
SLIDE 24

โˆ’ + โ‹… = ๐‘

Key generation, encryption and decryption

๐’ / secret key public key ๐‘‰/ ๐‘‰<(โ„Ž)

๐‘“ ๐‘ก ๐‘ Key generation

slide-25
SLIDE 25

โˆ’ + โ‹… = ๐‘

Key generation, encryption and decryption

๐’ / secret key public key ๐‘‰/ ๐‘‰<(โ„Ž)

๐‘“ ๐‘ก ๐‘ Encryption

Given a public key ๐‘ž๐‘™ and an encoding ๐‘› โˆˆ ๐‘†/ compute

๐‘“Z

๐’ /

๐‘‘Z ๐‘ฃ

๐‘‰< ๐’ /

๐‘‘u ๐‘› + โ‹… ๐‘ž๐‘™โ€ข + ๐‘“u ๐‘ฃ โ‹… ๐‘ž๐‘™โ€ข + Key generation

slide-26
SLIDE 26

โˆ’ + โ‹… = ๐‘

Key generation, encryption and decryption

๐’ / secret key public key ๐‘‰/ ๐‘‰<(โ„Ž)

๐‘“ ๐‘ก ๐‘ Encryption

Given a public key ๐‘ž๐‘™ and an encoding ๐‘› โˆˆ ๐‘†/ compute

๐‘“Z

๐’ /

๐‘‘Z ๐‘ฃ

๐‘‰< ๐’ /

๐‘‘u Decryption

Given a secret key ๐‘ก and a ciphertext ๐‘‘๐‘ข = (๐‘‘u, ๐‘‘Z) compute

๐‘‘๐‘ข ๐‘ก

/ = ๐‘‘u + ๐‘‘Z โ‹… ๐‘ก mod ๐‘Ÿ = ๐‘› + ๐‘“ noise

๐‘› + โ‹… ๐‘ž๐‘™โ€ข + ๐‘“u ๐‘ฃ โ‹… ๐‘ž๐‘™โ€ข + Key generation

slide-27
SLIDE 27

Rescaling

๐‘‘u ฮ” , ๐‘‘Z ฮ” โ„‚0/8 ๐›ฆ8 โ‹… ๐‘จZ ๐›ฆ8 โ‹… ๐‘จ8 โ€ฆ ๐›ฆ8 โ‹… ๐‘จ0/8 ๐›ฆ โ‹… ๐‘จZ ๐›ฆ โ‹… ๐‘จ8 โ€ฆ ๐›ฆ โ‹… ๐‘จ0/8 ๐‘‘u, ๐‘‘Z ๐‘†/ Let ฮ” divide ๐‘Ÿ. ๐‘†//โ€

slide-28
SLIDE 28

HEAAN bootstrapping

๐‘‘๐‘ข โˆˆ ๐‘†/

8

๐‘‘๐‘ขโ€ฒ โˆˆ ๐‘†/โ€“

8 , ๐‘Ÿโ€ฒ > ๐‘Ÿ

Plaintext Cleartext vector Ciphertext Input Output ๐‘› ๐‘Œ

8{

= ๐‘‘๐‘ข ๐‘ก

/

๐’œ๐Ÿ โ€ฆ ๐’œ๐’6๐Ÿ โ‰ƒ ๐‘›(๐‘Œ

8{)

๐’œ๐Ÿ โ€ฆ ๐’œ๐’6๐Ÿ

slide-29
SLIDE 29

CKKS bootstrapping

๐‘‘๐‘ข โˆˆ ๐‘†/

8

๐‘‘๐‘ขโ€ฒ โˆˆ ๐‘†/โ€“

8 , ๐‘Ÿโ€ฒ > ๐‘Ÿ

Plaintext Cleartext vector Ciphertext Input Output ๐‘› ๐‘Œ

8{

= ๐‘‘๐‘ข ๐‘ก โˆ’ ๐ฝ ๐‘Œ โ‹… ๐‘Ÿ ๐’œ๐Ÿ โ€ฆ ๐’œ๐’6๐Ÿ ๐’œ๐Ÿ โ€ฆ ๐’œ๐’6๐Ÿ โ‰ƒ ๐‘›(๐‘Œ

8{)

slide-30
SLIDE 30

CKKS bootstrapping

๐‘‘๐‘ข โˆˆ ๐‘†/

8

๐‘‘๐‘ขโ€ฒ โˆˆ ๐‘†/โ€“

8 , ๐‘Ÿโ€ฒ > ๐‘Ÿ

Plaintext Cleartext vector Ciphertext Input Output ModRaise ๐‘‘๐‘ข โˆˆ ๐‘†ลกโ€บ

8 , ๐‘…u > ๐‘Ÿ

๐‘› ๐‘Œ

8{ + ๐ฝ ๐‘Œ โ‹… ๐‘Ÿ ลกโ€บ

๐’œ๐Ÿ โ€ฆ ๐’œ๐’6๐Ÿ ๐’œ๐Ÿ โ€ฆ ๐’œ๐’6๐Ÿ ๐‘› ๐‘Œ

8{

= ๐‘‘๐‘ข ๐‘ก โˆ’ ๐ฝ ๐‘Œ โ‹… ๐‘Ÿ โ‰ƒ ๐‘›(๐‘Œ

8{)

slide-31
SLIDE 31

CKKS bootstrapping

๐‘‘๐‘ข โˆˆ ๐‘†/

8

๐‘‘๐‘ขโ€ฒ โˆˆ ๐‘†/โ€“

8 , ๐‘Ÿโ€ฒ > ๐‘Ÿ

Plaintext Cleartext vector Ciphertext Input Output ModRaise ๐‘‘๐‘ข โˆˆ ๐‘†ลกโ€บ

8 , ๐‘…u > ๐‘Ÿ

SubSum ๐‘‘๐‘ขZ โˆˆ ๐‘†ลกโ€ข

8

โ‰ƒ ๐‘› ๐‘Œ

8{ + ๐ฝ ๐‘Œ 8{ โ‹… ๐‘Ÿ ลกโ€ข

๐’œ๐Ÿ โ€ฆ ๐’œ๐’6๐Ÿ ๐’œ๐Ÿ โ€ฆ ๐’œ๐’6๐Ÿ โ‰ƒ ๐‘›(๐‘Œ

8{)

๐‘› ๐‘Œ

8{ + ๐ฝ ๐‘Œ โ‹… ๐‘Ÿ ลกโ€บ

๐‘› ๐‘Œ

8{

= ๐‘‘๐‘ข ๐‘ก โˆ’ ๐ฝ ๐‘Œ โ‹… ๐‘Ÿ

slide-32
SLIDE 32

CKKS bootstrapping

๐‘‘๐‘ข โˆˆ ๐‘†/

8

๐‘‘๐‘ขโ€ฒ โˆˆ ๐‘†/โ€“

8 , ๐‘Ÿโ€ฒ > ๐‘Ÿ

Plaintext Cleartext vector Ciphertext Input Output ModRaise ๐‘‘๐‘ข โˆˆ ๐‘†ลกโ€บ

8 , ๐‘…u > ๐‘Ÿ

SubSum ๐‘‘๐‘ขZ โˆˆ ๐‘†ลกโ€ข

8

โ‰ƒ ๐‘ข(๐‘Œ

8{) ลกโ€ข

๐’œ๐Ÿ โ€ฆ ๐’œ๐’6๐Ÿ ๐’œ๐Ÿ โ€ฆ ๐’œ๐’6๐Ÿ โ‰ƒ ๐‘›(๐‘Œ

8{)

๐‘› ๐‘Œ

8{ + ๐ฝ ๐‘Œ โ‹… ๐‘Ÿ ลกโ€บ

๐‘› ๐‘Œ

8{

= ๐‘‘๐‘ข ๐‘ก โˆ’ ๐ฝ ๐‘Œ โ‹… ๐‘Ÿ

slide-33
SLIDE 33

CKKS bootstrapping

๐‘‘๐‘ข โˆˆ ๐‘†/

8

๐‘‘๐‘ขโ€ฒ โˆˆ ๐‘†/โ€“

8 , ๐‘Ÿโ€ฒ > ๐‘Ÿ

Plaintext Cleartext vector Ciphertext Input Output ModRaise ๐‘‘๐‘ข โˆˆ ๐‘†ลกโ€บ

8 , ๐‘…u > ๐‘Ÿ

SubSum ๐‘‘๐‘ขZ โˆˆ ๐‘†ลกโ€ข

8

๐‘‘๐‘ข8 โˆˆ ๐‘†ลกโ€น

8

๐’–๐Ÿ โ€ฆ ๐’–๐Ÿ‘๐’6๐Ÿ CoefToSlot (inverse DFT) ๐’œ๐Ÿ โ€ฆ ๐’œ๐’6๐Ÿ ๐’œ๐Ÿ โ€ฆ ๐’œ๐’6๐Ÿ โ‰ƒ ๐‘›(๐‘Œ

8{)

๐‘› ๐‘Œ

8{ + ๐ฝ ๐‘Œ โ‹… ๐‘Ÿ ลกโ€บ

๐‘› ๐‘Œ

8{

= ๐‘‘๐‘ข ๐‘ก โˆ’ ๐ฝ ๐‘Œ โ‹… ๐‘Ÿ โ‰ƒ ๐‘ข(๐‘Œ

8{) ลกโ€ข

slide-34
SLIDE 34

CKKS bootstrapping

Plaintext Cleartext vector Ciphertext Input Output ModRaise SubSum ๐‘‘๐‘ขZ โˆˆ ๐‘†ลกโ€ข

8

๐‘‘๐‘ข8 โˆˆ ๐‘†ลกโ€น

8

Mod ๐‘Ÿ ๐‘‘๐‘ข< โˆˆ ๐‘†ลกลธ

8

๐’๐Ÿ โ€ฆ ๐’๐Ÿ‘๐’6๐Ÿ CoefToSlot (inverse DFT) ๐’œ๐Ÿ โ€ฆ ๐’œ๐’6๐Ÿ ๐’œ๐Ÿ โ€ฆ ๐’œ๐’6๐Ÿ โ‰ƒ ๐‘›(๐‘Œ

8{)

โ‰ƒ ๐‘ข(๐‘Œ

8{) ลกโ€ข

๐’–๐Ÿ โ€ฆ ๐’–๐Ÿ‘๐’6๐Ÿ ๐‘‘๐‘ข โˆˆ ๐‘†/

8

๐‘‘๐‘ขโ€ฒ โˆˆ ๐‘†/โ€“

8 , ๐‘Ÿโ€ฒ > ๐‘Ÿ

๐‘‘๐‘ข โˆˆ ๐‘†ลกโ€บ

8 , ๐‘…u > ๐‘Ÿ

๐‘› ๐‘Œ

8{ + ๐ฝ ๐‘Œ โ‹… ๐‘Ÿ ลกโ€บ

๐‘› ๐‘Œ

8{

= ๐‘‘๐‘ข ๐‘ก โˆ’ ๐ฝ ๐‘Œ โ‹… ๐‘Ÿ

slide-35
SLIDE 35

CKKS bootstrapping

Plaintext Cleartext vector Ciphertext Input Output ModRaise SubSum ๐‘‘๐‘ขZ โˆˆ ๐‘†ลกโ€ข

8

๐‘‘๐‘ข8 โˆˆ ๐‘†ลกโ€น

8

๐‘‘๐‘ข< โˆˆ ๐‘†ลกลธ

8

๐‘‘๐‘ข โˆˆ ๐‘†ลกยก

8

โ‰ƒ ๐‘›(๐‘Œ

8{) ลกยก

CoefToSlot (inverse DFT) SlotToCoef (DFT) ๐’œ๐Ÿ โ€ฆ ๐’œ๐’6๐Ÿ ๐’œ๐Ÿ โ€ฆ ๐’œ๐’6๐Ÿ โ‰ƒ ๐‘›(๐‘Œ

8{)

โ‰ƒ ๐‘ข(๐‘Œ

8{) ลกโ€ข

๐’–๐Ÿ โ€ฆ ๐’–๐Ÿ‘๐’6๐Ÿ ๐’๐Ÿ โ€ฆ ๐’๐Ÿ‘๐’6๐Ÿ ๐‘‘๐‘ข โˆˆ ๐‘†/

8

๐‘‘๐‘ขโ€ฒ โˆˆ ๐‘†/โ€“

8 , ๐‘Ÿโ€ฒ > ๐‘Ÿ

๐‘‘๐‘ข โˆˆ ๐‘†ลกโ€บ

8 , ๐‘…u > ๐‘Ÿ

๐‘› ๐‘Œ

8{ + ๐ฝ ๐‘Œ โ‹… ๐‘Ÿ ลกโ€บ

๐‘› ๐‘Œ

8{

= ๐‘‘๐‘ข ๐‘ก โˆ’ ๐ฝ ๐‘Œ โ‹… ๐‘Ÿ Mod ๐‘Ÿ

slide-36
SLIDE 36

CKKS bootstrapping

๐‘‘๐‘ข~ โˆˆ ๐‘†/โ€“

8 , ๐‘Ÿโ€ฒ = ๐‘…

Plaintext Cleartext vector Ciphertext Input Output ModRaise SubSum ๐‘‘๐‘ขZ โˆˆ ๐‘†ลกโ€ข

8

CoefToSlot (inverse DFT) ๐‘‘๐‘ข8 โˆˆ ๐‘†ลกโ€น

8

๐‘‘๐‘ข< โˆˆ ๐‘†ลกลธ

8

SlotToCoef (DFT) ๐‘‘๐‘ข โˆˆ ๐‘†ลกยก

8

๐’œ๐Ÿ โ€ฆ ๐’œ๐’6๐Ÿ ๐’œ๐Ÿ โ€ฆ ๐’œ๐’6๐Ÿ โ‰ƒ ๐‘›(๐‘Œ

8{)

๐’–๐Ÿ โ€ฆ ๐’–๐Ÿ‘๐’6๐Ÿ โ‰ƒ ๐‘ข(๐‘Œ

8{) ลกโ€ข

๐’๐Ÿ โ€ฆ ๐’๐Ÿ‘๐’6๐Ÿ โ‰ƒ ๐‘›(๐‘Œ

8{) ลกยก

๐‘‘๐‘ข โˆˆ ๐‘†/

8

๐‘‘๐‘ข โˆˆ ๐‘†ลกโ€บ

8 , ๐‘…u > ๐‘Ÿ

๐‘› ๐‘Œ

8{ + ๐ฝ ๐‘Œ โ‹… ๐‘Ÿ ลกโ€บ

๐‘› ๐‘Œ

8{

= ๐‘‘๐‘ข ๐‘ก โˆ’ ๐ฝ ๐‘Œ โ‹… ๐‘Ÿ Mod ๐‘Ÿ

slide-37
SLIDE 37

SubSum

๐‘› ๐‘Œ

8{ + ๐ฝ ๐‘Œ โ‹… ๐‘Ÿ ลกโ€บ

โ‰ƒ ๐‘› ๐‘Œ

8{ + ๐ฝ ๐‘Œ 8{ โ‹… ๐‘Ÿ ลกโ€ข

SubSum computes Tr: ๐‘† โ†’ ๐‘†โ€ฒ, where ๐‘†~: โ„ค = 2๐‘›. ๐‘‘๐‘ข ยฃ

ยคยฅu 8{6Z

Rot(๐‘‘๐‘ข, ๐‘—๐‘›) ๐’œ๐Ÿ โ€ฆ ๐’œ๐’6๐Ÿ ๐’ ๐Ÿ‘๐’ ๐’œ๐Ÿ โ€ฆ ๐’ ๐Ÿ‘๐’ ๐’œ๐’6๐Ÿ

slide-38
SLIDE 38

CoefToSlot and SlotToCoef

CoefToSlot = Encoding

done homomorphically

SlotToCoef = Decoding

done homomorphically

slide-39
SLIDE 39

CoefToSlot and SlotToCoef

๐ด โ†ฆ ๐ฎ = ๐šป6Z โ‹… ๐ด t โ†ฆ ๐ด = ๐šป โ‹… ๐ฎ CoefToSlot = Encoding

done homomorphically

๐šป is the canonical embedding matrix (DFT with 4๐‘›-th primitive roots of unity) SlotToCoef = Decoding

done homomorphically

slide-40
SLIDE 40

CoefToSlot and SlotToCoef

๐ด โ†ฆ ๐ฎ = ๐šป6Z โ‹… ๐ด = ๐‘ดZ โ‹… โ€ฆ โ‹… ๐‘ด- โ‹… ๐ด

๐‘€ยคโ€™s are sparser than ๐‘.

t โ†ฆ ๐ด = ๐šป โ‹… ๐ฎ = ๐‘ดโ€ฒZ โ‹… โ€ฆ โ‹… ๐‘ดโ€ฒ-โ€“ โ‹… ๐ฎ

The columns of ๐‘ดยคโ€™s need to be encoded into the plaintext space.

CoefToSlot = Encoding

done homomorphically

SlotToCoef = Decoding

done homomorphically

๐šป is the canonical embedding matrix (DFT with 4๐‘›-th primitive roots of unity)

slide-41
SLIDE 41

CoefToSlot and SlotToCoef

๐ด โ†ฆ ๐ฎ = ๐šป6Z โ‹… ๐ด = ๐‘ดZ โ‹… โ€ฆ โ‹… ๐‘ด- โ‹… ๐ด

๐‘€ยคโ€™s are sparser than ๐‘.

t โ†ฆ ๐ด = ๐šป โ‹… ๐ฎ = ๐‘ดโ€ฒZ โ‹… โ€ฆ โ‹… ๐‘ดโ€ฒ-โ€“ โ‹… ๐ฎ

The columns of ๐‘ดยคโ€™s need to be encoded into the plaintext space. CoefToSlot ๐‘‘๐‘ขZ โˆˆ ๐‘†ลกโ€ข

8

SlotToCoef ๐‘‘๐‘ข< โˆˆ ๐‘†ลกลธ

8

Since ๐‘…Z > ๐‘…<, homomorphic operations in CoefToSlot are heavier than those of SlotToCoeff. Thus, use more FFT in CoefToSlot (๐‘š > ๐‘šโ€ฒ).

CoefToSlot = Encoding

done homomorphically

SlotToCoef = Decoding

done homomorphically

๐šป is the canonical embedding matrix (DFT with 4๐‘›-th primitive roots of unity)

slide-42
SLIDE 42

Mod ๐‘Ÿ

๐‘‘๐‘ข ๐‘ก

ลกโ€บ = ๐‘› ๐‘Œ 8{ + ๐ฝ ๐‘Œ โ‹… ๐‘Ÿ,

slide-43
SLIDE 43

Mod ๐‘Ÿ

๐‘‘๐‘ข ๐‘ก

ลกโ€บ = ๐‘› ๐‘Œ 8{ + ๐ฝ ๐‘Œ โ‹… ๐‘Ÿ,

๐ฝ ๐‘Œ

ยฑ < ๐ฟ

slide-44
SLIDE 44

Mod ๐‘Ÿ

๐‘‘๐‘ข ๐‘ก

ลกโ€บ = ๐‘› ๐‘Œ 8{ + ๐ฝ ๐‘Œ โ‹… ๐‘Ÿ,

๐ฝ ๐‘Œ

ยฑ < ๐ฟ โ‰ค 1 + ๐‘ฅ๐‘ข(๐‘ก)/2

slide-45
SLIDE 45

Mod ๐‘Ÿ

๐‘‘๐‘ข ๐‘ก

ลกโ€บ = ๐‘› ๐‘Œ 8{ + ๐ฝ ๐‘Œ โ‹… ๐‘Ÿ,

๐ฝ ๐‘Œ

ยฑ < ๐ฟ โ‰ค 1 + ๐‘ฅ๐‘ข(๐‘ก)/2 ๐‘ฆ / โ‰ƒ ๐‘Ÿ 2๐œŒ sin 2๐œŒ๐‘ฆ ๐‘Ÿ , ๐‘ฆ โˆˆ โˆ’๐ฟ๐‘Ÿ, ๐ฟ๐‘Ÿ

slide-46
SLIDE 46

Mod ๐‘Ÿ

๐‘‘๐‘ข ๐‘ก

ลกโ€บ = ๐‘› ๐‘Œ 8{ + ๐ฝ ๐‘Œ โ‹… ๐‘Ÿ,

๐ฝ ๐‘Œ

ยฑ < ๐ฟ โ‰ค 1 + ๐‘ฅ๐‘ข(๐‘ก)/2 ๐‘ฆ / โ‰ƒ ๐‘Ÿ 2๐œŒ sin 2๐œŒ๐‘ฆ ๐‘Ÿ = ๐‘Ÿ 2๐œŒ cos 2๐œŒ๐‘ฆ ๐‘Ÿ โˆ’ ๐œŒ 2 , ๐‘ฆ โˆˆ โˆ’๐ฟ๐‘Ÿ, ๐ฟ๐‘Ÿ

slide-47
SLIDE 47

Sine should be approximated by a polynomial

Previous works:

  • Cheon et al., Eurocryptโ€™18:

Taylor + double-angle formula for sine

  • Chen et al., Eurocryptโ€™19:

Chebyshev

  • Han-Ki, eprintโ€™19:

Hermite + Chebyshev nodes + double-angle formula for cosine

slide-48
SLIDE 48

Sine should be approximated by a polynomial

Previous works:

  • Cheon et al., Eurocryptโ€™18:

Taylor + double-angle formula for sine

  • Chen et al., Eurocryptโ€™19:

Chebyshev

  • Han-Ki, eprintโ€™19:

Hermite + Chebyshev nodes + double-angle formula for cosine

The above results assume that

  • the secret key ๐‘ก is sparse, ๐‘ฅ๐‘ข ๐‘ก = 64,
  • and, thus, ๐ฟ โ‰ค 12 with high probability.
slide-49
SLIDE 49

Sine should be approximated by a polynomial

Previous works:

  • Cheon et al., Eurocryptโ€™18:

Taylor + double-angle formula for sine

  • Chen et al., Eurocryptโ€™19:

Chebyshev

  • Han-Ki, eprintโ€™19:

Hermite + Chebyshev nodes + double-angle formula for cosine

The above results assume that

  • the secret key ๐‘ก is sparse, ๐‘ฅ๐‘ข ๐‘ก = 64,
  • and, thus, ๐ฟ โ‰ค 12 with high probability.

What happens when secret keys are dense?

slide-50
SLIDE 50

Distribution of K when secret keys are dense

๐‘œ = 2048 max ๐ฟ = 57 ๐‘œ = 4096 max ๐ฟ = 90 ๐‘œ = 8192 max ๐ฟ = 125

slide-51
SLIDE 51

Distribution of K when secret keys are dense

๐‘œ = 16384 max ๐ฟ = 177 ๐‘œ = 32768 max ๐ฟ = 255 ๐‘œ = 65536 max ๐ฟ = 360

slide-52
SLIDE 52

Distribution of K when secret keys are dense

๐‘œ = 16384 max ๐ฟ = 177 ๐‘œ = 32768 max ๐ฟ = 255 ๐‘œ = 65536 max ๐ฟ = 360

Similar to the extreme value distribution.

slide-53
SLIDE 53

Chebyshev approximation grows linearly with K

deg ๐ฟ deg โ‰ƒ 7๐ฟ + 25

Approximation error: 106Z8

slide-54
SLIDE 54

Chebyshev approximation grows linearly with K

deg ๐ฟ deg โ‰ƒ 7๐ฟ + 25 Using Paterson-Stockmeyer such approximation require:

  • โ‰ƒ

2 7๐ฟ + 25 + log8(2 7๐ฟ + 25 ) multiplications

  • โ‰ƒ log8 ๐ฟ + 3 mult. levels

Approximation error: 106Z8

slide-55
SLIDE 55

Chebyshev approximation grows linearly with K

deg ๐ฟ deg โ‰ƒ 7๐ฟ + 25 Using Paterson-Stockmeyer such approximation require:

  • โ‰ƒ

2 7๐ฟ + 25 + log8(2 7๐ฟ + 25 ) multiplications

  • โ‰ƒ log8 ๐ฟ + 3 mult. levels

Example: ๐‘œ = 65536 โ‡’ ๐ฟ = 360:

  • 84 multiplications
  • 12 mult. levels

Approximation error: 106Z8

slide-56
SLIDE 56

Use the double-angle formula for cosine

cos 2๐›ฝ = 2 cos8 ๐›ฝ โˆ’ 1

slide-57
SLIDE 57

Use the double-angle formula for cosine

cos 2๐›ฝ = 2 cos8 ๐›ฝ โˆ’ 1

1. Take a sufficiently large ๐ฟ = 2k.

slide-58
SLIDE 58

Use the double-angle formula for cosine

cos 2๐›ฝ = 2 cos8 ๐›ฝ โˆ’ 1

1. Take a sufficiently large ๐ฟ = 2k. 2. Approximate cos 2๐œŒ๐‘ฆ โˆ’

ร 8ร‚ in the range [โˆ’๐‘Ÿ, ๐‘Ÿ] (e.g using Chebyshev).

slide-59
SLIDE 59

Use the double-angle formula for cosine

cos 2๐›ฝ = 2 cos8 ๐›ฝ โˆ’ 1

1. Take a sufficiently large ๐ฟ = 2k. 2. Approximate cos 2๐œŒ๐‘ฆ โˆ’

ร 8ร‚ in the range [โˆ’๐‘Ÿ, ๐‘Ÿ] (e.g using Chebyshev).

3. Compute ๐‘™ iterations of the double-angle formula.

slide-60
SLIDE 60

Use the double-angle formula for cosine

cos 2๐›ฝ = 2 cos8 ๐›ฝ โˆ’ 1

1. Take a sufficiently large ๐ฟ = 2k. 2. Approximate cos 2๐œŒ๐‘ฆ โˆ’

ร 8ร‚ in the range [โˆ’๐‘Ÿ, ๐‘Ÿ] (e.g using Chebyshev).

3. Compute ๐‘™ iterations of the double-angle formula.

Example:

๐‘œ = 65536 โ‡’ ๐ฟ = 2รƒ

slide-61
SLIDE 61

Use the double-angle formula for cosine

cos 2๐›ฝ = 2 cos8 ๐›ฝ โˆ’ 1

1. Take a sufficiently large ๐ฟ = 2k. 2. Approximate cos 2๐œŒ๐‘ฆ โˆ’

ร 8ร‚ in the range [โˆ’๐‘Ÿ, ๐‘Ÿ] (e.g using Chebyshev).

3. Compute ๐‘™ iterations of the double-angle formula.

Example:

๐‘œ = 65536 โ‡’ ๐ฟ = 2รƒ: cos 2๐œŒ๐‘ฆ โˆ’ ๐œŒ 2๐ฟ โ‰ƒ ๐‘ž ๐‘Œ , deg ๐‘ž ๐‘Œ = 26

slide-62
SLIDE 62

Use the double-angle formula for cosine

cos 2๐›ฝ = 2 cos8 ๐›ฝ โˆ’ 1

1. Take a sufficiently large ๐ฟ = 2k. 2. Approximate cos 2๐œŒ๐‘ฆ โˆ’

ร 8ร‚ in the range [โˆ’๐‘Ÿ, ๐‘Ÿ] (e.g using Chebyshev).

3. Compute ๐‘™ iterations of the double-angle formula.

Example:

๐‘œ = 65536 โ‡’ ๐ฟ = 2รƒ: cos 2๐œŒ๐‘ฆ โˆ’ ๐œŒ 2๐ฟ โ‰ƒ ๐‘ž ๐‘Œ , deg ๐‘ž ๐‘Œ = 26 9 iterations of the double-angle formula

slide-63
SLIDE 63

Use the double-angle formula for cosine

cos 2๐›ฝ = 2 cos8 ๐›ฝ โˆ’ 1

1. Take a sufficiently large ๐ฟ = 2k. 2. Approximate cos 2๐œŒ๐‘ฆ โˆ’

ร 8ร‚ in the range [โˆ’๐‘Ÿ, ๐‘Ÿ] (e.g using Chebyshev).

3. Compute ๐‘™ iterations of the double-angle formula.

Example:

๐‘œ = 65536 โ‡’ ๐ฟ = 2รƒ: cos 2๐œŒ๐‘ฆ โˆ’ ๐œŒ 2๐ฟ โ‰ƒ ๐‘ž ๐‘Œ , deg ๐‘ž ๐‘Œ = 26 9 iterations of the double-angle formula Total cost:

  • 19 multiplications
  • 14 levels
slide-64
SLIDE 64

Results for the entire pipeline

# slots CtoS levels StoC levels After levels

  • Avg. time,

sec

  • Avg. amort. time,

msec 4096 2 2 9 179 44 3 2 8 114 28 8192 3 2 8 204 25 4 2 7 121 15 16384 4 3 6 181 11 5 3 5 159 10 ๐‘œ = 65536, ฮ” = 2โ€žu, ๐‘Ÿ โ‰ƒ 2ร„u, ๐œ‡ = 128 bits Input data: z โˆˆ โ„‚, |Re ๐‘จ |, |Im(๐‘จ)| < 16. Number of experiments per parameter set: 100 Precision before bootstrapping: โ‰ƒ 33 bits Precision after bootstrapping: โ‰ƒ 8 bits

slide-65
SLIDE 65

Results for the entire pipeline

๐‘œ = 65536, ฮ” = 2โ€žu, ๐‘Ÿ โ‰ƒ 2ร„u, ๐œ‡ = 128 bits Input data: z โˆˆ โ„‚, |Re ๐‘จ |, |Im(๐‘จ)| < 16. Number of experiments per parameter set: 100 Precision before bootstrapping: โ‰ƒ 33 bits Precision after bootstrapping: โ‰ƒ 8 bits Memory consumption: ~47GB (mostly due to key-switching keys) # slots CtoS levels StoC levels After levels

  • Avg. time,

sec

  • Avg. amort. time,

msec 4096 2 2 9 179 44 3 2 8 114 28 8192 3 2 8 204 25 4 2 7 121 15 16384 4 3 6 181 11 5 3 5 159 10

slide-66
SLIDE 66

Comparison to HK19

slots 1024 16384 Total time, sec After precision, bits After levels HK19 HK19 Ours Ours

slide-67
SLIDE 67

Conclusion

  • Attacks on sparse-secret LWE/RLWE become more powerful.
slide-68
SLIDE 68

Conclusion

  • Attacks on sparse-secret LWE/RLWE become more powerful.
  • HEAAN can avoid sparse secrets as its โ€œbootstrappingโ€ is practically possible

without them.

slide-69
SLIDE 69

Future work

  • Bootstrapping definition for HEAAN.
slide-70
SLIDE 70

Future work

  • Bootstrapping definition for HEAAN.
  • Better approximation of mod ๐‘Ÿ (e.g. Hermite approximation of HK19).
slide-71
SLIDE 71

Future work

  • Bootstrapping definition for HEAAN.
  • Better approximation of mod ๐‘Ÿ (e.g. Hermite approximation of HK19).
  • Mixed bootstrapping using other schemes (e.g. TFHE).
slide-72
SLIDE 72

Future work

  • Bootstrapping definition for HEAAN.
  • Better approximation of mod ๐‘Ÿ (e.g. Hermite approximation of HK19).
  • Mixed bootstrapping using other schemes (e.g. TFHE).
  • Bootstrapping without sparse secrets in other schemes.
slide-73
SLIDE 73

Thank you!

slide-74
SLIDE 74

Weโ€™re hiring! Thank you!