FHE over the Integers and Modular Arithmetic Circuits
Eunkyung Kim1 Mehdi Tibouchi2
1Ewha Womans University, South Korea 2NTT Secure Platform Laboratories, Japan
WHEAT 2016, 2016–07–06
1/27 c ⃝2016 NTT Secure Platform Laboratories
FHE over the Integers and Modular Arithmetic Circuits Eunkyung Kim 1 - - PowerPoint PPT Presentation
FHE over the Integers and Modular Arithmetic Circuits Eunkyung Kim 1 Mehdi Tibouchi 2 1 Ewha Womans University, South Korea 2 NTT Secure Platform Laboratories, Japan WHEAT 2016, 20160706 1/27 2016 NTT Secure Platform Laboratories c
1Ewha Womans University, South Korea 2NTT Secure Platform Laboratories, Japan
1/27 c ⃝2016 NTT Secure Platform Laboratories
2/27 c ⃝2016 NTT Secure Platform Laboratories
3/27 c ⃝2016 NTT Secure Platform Laboratories
▶ Most FHE schemes introduced with message space Z/2Z ▶ Support the homomorphic evaluation of Boolean circuits ▶ In particular, in FHE “over the integers” [vDGHV10,. . . ], ciphertexts
▶ Some variants with multiple slots (message space (Z/2Z)m) or
4/27 c ⃝2016 NTT Secure Platform Laboratories
▶ Could we replace 2 by some other value Q? (odd prime, say) ▶ We would then evaluate mod-Q arithmetic circuits instead of
▶ The most naive way works somewhat ▶ E.g. for FHE over the integers, use ciphertexts of the form:
▶ Addition and multiplication work fine mod Q: can evaluate
▶ Can you get fully homomorphic encryption that way?
5/27 c ⃝2016 NTT Secure Platform Laboratories
▶ To get FHE from somewhat homomorphic encryption, we use
▶ Decryption (for ciphertexts above) looks like:
▶ This has to be expressed as a low-depth mod-Q arithmetic circuit
▶ In binary: write 1/p ≈ ∑ siyi (yi fixed precision public reals, all but
6/27 c ⃝2016 NTT Secure Platform Laboratories
▶ Squashing mod Q: need to write a low-depth mod-Q arithmetic
▶ Looked like a daunting task, so nobody touched it for many years,
▶ They gave explicit mod-Q circuits for iterated addition; deduced an
▶ Only works for small Q (otherwise, squashed decryption circuit
7/27 c ⃝2016 NTT Secure Platform Laboratories
8/27 c ⃝2016 NTT Secure Platform Laboratories
▶ Mod-Q arithmetic circuits can be efficiently simulated by Boolean
▶ In particular, easy to homomorphically evaluate mod-Q arithmetic
▶ Therefore, FHE with non-binary message space at most an
9/27 c ⃝2016 NTT Secure Platform Laboratories
▶ So we asked ourselves the following question: is the mod-Q scheme
▶ For large Q, impossible:
▶ overhead of NKQ (in terms of ciphertext size & cost of
▶ converting a mod-Q circuit to Boolean, the overhead is only
▶ It could be worth it for small Q, though. Let’s compare. ▶ For a level playing field, we compared NKQ to its own binary
10/27 c ⃝2016 NTT Secure Platform Laboratories
11/27 c ⃝2016 NTT Secure Platform Laboratories
▶ KeyGen(1λ): (pk, sk) ← NK2. KeyGen(1λ) ▶ Enc(pk, m): for m ∈ M = Z/QZ, write m = (mn−1, · · · , m0)
▶ Dec(sk,⃗
n−1
i=0
▶ Eval: Use Boolean circuits which compute mod-Q addition and
12/27 c ⃝2016 NTT Secure Platform Laboratories
13/27 c ⃝2016 NTT Secure Platform Laboratories
▶ γQ: NQ ∈ [1, 2γQ ) ∩ Z ▶ γ′
2 ≈ γ2 log Q: ciphertext of Convert-NK2 is n-tuple of ciphertexts of
▶ TQ: time complexity of a single ciphertext refresh operation in NKQ, ▶ T ′
2: time complexity of carrying out a multiplication mod Q in
14/27 c ⃝2016 NTT Secure Platform Laboratories
15/27 c ⃝2016 NTT Secure Platform Laboratories
16/27 c ⃝2016 NTT Secure Platform Laboratories
▶ ρ = Θ(λ log log log λ): size of noise ▶ η = Θ(λ2 log log λ): size of secret prime ▶ γ = Θ(λ4 log2 λ): size of ciphertexts ▶ L = ⌈logQ λ⌉ + 2: the number of precision after Q-ary point in zi ▶ Θ = Θ((λ log λ)4): the number of sparse elements si
17/27 c ⃝2016 NTT Secure Platform Laboratories
▶ ρ = Θ(λ log log log λ): size of noise ▶ η = Θ(λ2 log log λ): size of secret prime ▶ γ = Θ(λ4 log2 λ): size of ciphertexts ▶ L = ⌈logQ λ⌉ + 2: the number of precision after Q-ary point in zi ▶ Θ = Θ((λ log λ)4): the number of sparse elements si
17/27 c ⃝2016 NTT Secure Platform Laboratories
▶ In NKQ. KeyGen, we have vi = pqi + Qri + si and
▶ Squashed decryption circuit can be computed within in degree
18/27 c ⃝2016 NTT Secure Platform Laboratories
▶ ηQ = Θ(Q3λ2 log log λ): size of secret prime ▶ γQ = Θ(Q6λ4 log2 λ): size of ciphertexts ▶ LQ = ⌈logQ λ⌉ + 2: the number of precision after Q-ary point in zi
▶ ρ = Θ(λ log log log λ): size of noise ▶ Θ = Θ((λ log λ)4): the number of sparse elements si
19/27 c ⃝2016 NTT Secure Platform Laboratories
▶ γQ: ciphertext size of NKQ ▶ γ′ 2: ciphertext size of Convert-NK2
2
20/27 c ⃝2016 NTT Secure Platform Laboratories
▶ Ciphertext space of NKQ is Z/NQZ and NQ ∈ [1, 2γ Q) ∩ Z ▶ γQ = Θ(Q6λ4 log2 λ) ▶ Ciphertext space of Convert-NK2 is (Z/N2Z)log Q ▶ γ′ 2 = log Q · Θ(26λ4 log2 λ) = Θ(log Qλ4 log2 λ) ▶ γ′ 2
21/27 c ⃝2016 NTT Secure Platform Laboratories
22/27 c ⃝2016 NTT Secure Platform Laboratories
▶ k bit + k bit: 2 AND for each carry, and total 2k AND ▶ k bit × l bit for (k ≤ l): 2l(k + l) AND using so-called
23/27 c ⃝2016 NTT Secure Platform Laboratories
Q ⌉ with K > 2n
2k
2k
24/27 c ⃝2016 NTT Secure Platform Laboratories
Q ⌉ with K > 2n
2k
2k
24/27 c ⃝2016 NTT Secure Platform Laboratories
▶ tQ: time complexity of one mod-NQ multiplication ▶ TQ: (♯ of mults in NKQ. Dec)×tQ ▶ T ′ 2: (♯ of AND gate in mod-Q mult Boolean circuit)×T2
2
25/27 c ⃝2016 NTT Secure Platform Laboratories
▶ tQ = log NQ log log NQ ≈ log NQ = γQ = Θ(Q6λ4 log2 λ) ▶
Q · tQ
▶
2
2 · t2
26/27 c ⃝2016 NTT Secure Platform Laboratories
▶ tQ = Θ(Q6λ4 log2 λ) ▶ TQ = Θ
▶ T ′ 2 = Θ(log2 QΘλ4 log4 λ)
2
Q7Θλ4 log4 λ log Q
26/27 c ⃝2016 NTT Secure Platform Laboratories
27/27 c ⃝2016 NTT Secure Platform Laboratories