Ring Switching and Bootstrapping FHE Chris Peikert
School of Computer Science Georgia Tech
Oberwolfach Crypto Workshop 29 July 2014
1 / 22
Ring Switching and Bootstrapping FHE Chris Peikert School of - - PowerPoint PPT Presentation
Ring Switching and Bootstrapping FHE Chris Peikert School of Computer Science Georgia Tech Oberwolfach Crypto Workshop 29 July 2014 1 / 22 Agenda 1 A homomorphic encryption tool: ring switching 2 An application: (practical!) bootstrapping
School of Computer Science Georgia Tech
1 / 22
1 A homomorphic encryption tool: ring switching 2 An application: (practical!) bootstrapping FHE in ˜
2 / 22
3 / 22
4 / 22
4 / 22
k = 1).
5 / 22
k = 1).
⋆ O1 = Z[1] = Z.
5 / 22
k = 1).
⋆ O1 = Z[1] = Z.
⋆ O2 = Z[−1] = Z. 5 / 22
k = 1).
⋆ O1 = Z[1] = Z.
⋆ O2 = Z[−1] = Z. ⋆ O4 ∼
5 / 22
k = 1).
⋆ O1 = Z[1] = Z.
⋆ O2 = Z[−1] = Z. ⋆ O4 ∼
⋆ O3 = Z[ζ3] ∼
5 / 22
k = 1).
⋆ O1 = Z[1] = Z.
⋆ O2 = Z[−1] = Z. ⋆ O4 ∼
⋆ O3 = Z[ζ3] ∼
⋆ O5 = Z[ζ5] ∼
5 / 22
k = 1).
⋆ O1 = Z[1] = Z.
⋆ O2 = Z[−1] = Z. ⋆ O4 ∼
⋆ O3 = Z[ζ3] ∼
⋆ O5 = Z[ζ5] ∼
1 For prime p, Op ∼
5 / 22
k = 1).
⋆ O1 = Z[1] = Z.
⋆ O2 = Z[−1] = Z. ⋆ O4 ∼
⋆ O3 = Z[ζ3] ∼
⋆ O5 = Z[ζ5] ∼
1 For prime p, Op ∼
2 For prime power pe, Ope ∼
5 / 22
k = 1).
⋆ O1 = Z[1] = Z.
⋆ O2 = Z[−1] = Z. ⋆ O4 ∼
⋆ O3 = Z[ζ3] ∼
⋆ O5 = Z[ζ5] ∼
1 For prime p, Op ∼
2 For prime power pe, Ope ∼
3 For distinct primes p1, p2, . . .,
1 pe2 2 ··· ∼
1
1
2
2
5 / 22
k′
6 / 22
k′
6 / 22
k′
k = ζk/2
k = {1, ζk}
8 = ζ4
8 = {1, ζ8}
4 = ζ2
4 = {1, ζ4}
2 = 1
2 = {1}
6 / 22
k′
k = ζk/2
k = {1, ζk}
8 = ζ4
8 = {1, ζ8}
4 = ζ2
4 = {1, ζ4}
2 = 1
2 = {1}
k · Bk/2 = B′ k · B′ k/2 · · · B′ 2
6 / 22
k′
k = ζk/2
k = {1, ζk}
8 = ζ4
8 = {1, ζ8}
4 = ζ2
4 = {1, ζ4}
2 = 1
2 = {1}
k · Bk/2 = B′ k · B′ k/2 · · · B′ 2 = {1, ζ, ζ2, . . . , ζk/2−1}.
6 / 22
k′
7 / 22
k′
7 / 22
k′
1 R-linear: for any rj ∈ R and r′
j ∈ R′,
1 + r2 · r′ 2) = r1 · Tr(r′ 1) + r2 · Tr(r′ 2).
7 / 22
k′
1 R-linear: for any rj ∈ R and r′
j ∈ R′,
1 + r2 · r′ 2) = r1 · Tr(r′ 1) + r2 · Tr(r′ 2).
2 Universal: any R-linear function L: R′ → R can be written as
L · x)
L depending only on L.
7 / 22
k′
1 R-linear: for any rj ∈ R and r′
j ∈ R′,
1 + r2 · r′ 2) = r1 · Tr(r′ 1) + r2 · Tr(r′ 2).
2 Universal: any R-linear function L: R′ → R can be written as
L · x)
L depending only on L.
j} of R′, and vice versa:
j
j).
7 / 22
8 / 22
8 / 22
8 / 22
q satisfying
2µ
⋆ Thanks to this relation we can do + and × homomorphically. ⋆ Semantic security follows from hardness of ring-LWE over R
8 / 22
q satisfying
2µ
⋆ Thanks to this relation we can do + and × homomorphically. ⋆ Semantic security follows from hardness of ring-LWE over R
8 / 22
q satisfying
2µ
⋆ Thanks to this relation we can do + and × homomorphically. ⋆ Semantic security follows from hardness of ring-LWE over R
8 / 22
9 / 22
⋆ any R-linear L: R′
2 → R2
2 to µ = L(µ′) ∈ R2)
9 / 22
⋆ any R-linear L: R′
2 → R2
2 to µ = L(µ′) ∈ R2)
⋆ by mapping the ciphertext c′ over R′ to some c over R, 9 / 22
⋆ any R-linear L: R′
2 → R2
2 to µ = L(µ′) ∈ R2)
⋆ by mapping the ciphertext c′ over R′ to some c over R, ⋆ assuming hardness of R-LWE. 9 / 22
⋆ any R-linear L: R′
2 → R2
2 to µ = L(µ′) ∈ R2)
⋆ by mapping the ciphertext c′ over R′ to some c over R, ⋆ assuming hardness of R-LWE.
9 / 22
⋆ any R-linear L: R′
2 → R2
2 to µ = L(µ′) ∈ R2)
⋆ by mapping the ciphertext c′ over R′ to some c over R, ⋆ assuming hardness of R-LWE.
0, c′ 1), let ci = Tr(r′ L · c′ i).
9 / 22
⋆ any R-linear L: R′
2 → R2
2 to µ = L(µ′) ∈ R2)
⋆ by mapping the ciphertext c′ over R′ to some c over R, ⋆ assuming hardness of R-LWE.
0, c′ 1), let ci = Tr(r′ L · c′ i).
0 + s′ · c′ 1 ≈ q 2 · µ′ (mod qR′)
L · c′ 0) + Tr(s′ · r′ L · c′ 1) ≈ q 2 · Tr(r′ L · µ′) (mod qR)
2 · µ (mod qR).
9 / 22
⋆ any R-linear L: R′
2 → R2
2 to µ = L(µ′) ∈ R2)
⋆ by mapping the ciphertext c′ over R′ to some c over R, ⋆ assuming hardness of R-LWE.
0, c′ 1), let ci = Tr(r′ L · c′ i).
0 + s · c′ 1 ≈ q 2 · µ′ (mod qR′)
L · c′ 0) + Tr(s · r′ L · c′ 1) ≈ q 2 · Tr(r′ L · µ′) (mod qR)
2 · µ (mod qR).
9 / 22
⋆ any R-linear L: R′
2 → R2
2 to µ = L(µ′) ∈ R2)
⋆ by mapping the ciphertext c′ over R′ to some c over R, ⋆ assuming hardness of R-LWE.
0, c′ 1), let ci = Tr(r′ L · c′ i).
0 + s · c′ 1 ≈ q 2 · µ′ (mod qR′)
L · c′ 0) + Tr(s · r′ L · c′ 1) ≈ q 2 · Tr(r′ L · µ′) (mod qR)
2 · µ (mod qR).
9 / 22
10 / 22
11 / 22
11 / 22
12 / 22
⋆ The only known way of obtaining unbounded FHE. ⋆ Goal: Efficiency! Minimize depth d and size s of decryption “circuit.” ⋆ Most efficient SHEs [BGV’12] can evaluate in time ˜
12 / 22
⋆ The only known way of obtaining unbounded FHE. ⋆ Goal: Efficiency! Minimize depth d and size s of decryption “circuit.” ⋆ Most efficient SHEs [BGV’12] can evaluate in time ˜
12 / 22
⋆ The only known way of obtaining unbounded FHE. ⋆ Goal: Efficiency! Minimize depth d and size s of decryption “circuit.” ⋆ Most efficient SHEs [BGV’12] can evaluate in time ˜
12 / 22
13 / 22
13 / 22
13 / 22
13 / 22
13 / 22
13 / 22
13 / 22
14 / 22
1 For “unpacked” (single-bit) plaintexts:
14 / 22
1 For “unpacked” (single-bit) plaintexts:
⋆ Cf. [BGV’12]: ˜
14 / 22
1 For “unpacked” (single-bit) plaintexts:
⋆ Cf. [BGV’12]: ˜
2 For “packed” (many-bit) plaintexts:
14 / 22
1 For “unpacked” (single-bit) plaintexts:
⋆ Cf. [BGV’12]: ˜
2 For “packed” (many-bit) plaintexts:
⋆ Based on an enhancement of ring-switching to non-subrings. 14 / 22
1 For “unpacked” (single-bit) plaintexts:
⋆ Cf. [BGV’12]: ˜
2 For “packed” (many-bit) plaintexts:
⋆ Based on an enhancement of ring-switching to non-subrings.
14 / 22
1 For “unpacked” (single-bit) plaintexts:
⋆ Cf. [BGV’12]: ˜
2 For “packed” (many-bit) plaintexts:
⋆ Based on an enhancement of ring-switching to non-subrings.
14 / 22
1 For “unpacked” (single-bit) plaintexts:
⋆ Cf. [BGV’12]: ˜
2 For “packed” (many-bit) plaintexts:
⋆ Based on an enhancement of ring-switching to non-subrings.
14 / 22
1 Prepare: view c as a “noiseless” encryption of plaintext
2 · µ, so µ = ⌊v⌉ := j⌊vj⌉ · bj ∈ R2.
15 / 22
1 Prepare: view c as a “noiseless” encryption of plaintext
2 · µ, so µ = ⌊v⌉ := j⌊vj⌉ · bj ∈ R2. 2 Homomorphically map Zq-coeffs vj to “Zq-slots” of certain ring Sq:
15 / 22
1 Prepare: view c as a “noiseless” encryption of plaintext
2 · µ, so µ = ⌊v⌉ := j⌊vj⌉ · bj ∈ R2. 2 Homomorphically map Zq-coeffs vj to “Zq-slots” of certain ring Sq:
3 Batch-round: homom’ly apply ⌊·⌉ on all Zq-slots at once [SV’11]:
15 / 22
1 Prepare: view c as a “noiseless” encryption of plaintext
2 · µ, so µ = ⌊v⌉ := j⌊vj⌉ · bj ∈ R2. 2 Homomorphically map Zq-coeffs vj to “Zq-slots” of certain ring Sq:
3 Batch-round: homom’ly apply ⌊·⌉ on all Zq-slots at once [SV’11]:
4 Homomorphically reverse-map Z2-slots back to B-coeffs:
15 / 22
16 / 22
16 / 22
j (S/pj) via natural homomorphism.
16 / 22
j (S/pj) via natural homomorphism.
16 / 22
j (S/pj) via natural homomorphism.
i · Ci−1: let c′ k = 1 (mod p⋆,k), = 0 (mod p⋆,=k).
16 / 22
j (S/pj) via natural homomorphism.
i · Ci−1: let c′ k = 1 (mod p⋆,k), = 0 (mod p⋆,=k).
j (S/plg q j
16 / 22
q −
17 / 22
q −
17 / 22
q −
17 / 22
q −
17 / 22
q −
17 / 22
q −
17 / 22
18 / 22
18 / 22
18 / 22
18 / 22
19 / 22
19 / 22
19 / 22
1 Trivially embed ciphertext R → T (still encrypts v). 2 Homomorphically apply S-linear ¯
19 / 22
1 Trivially embed ciphertext R → T (still encrypts v). 2 Homomorphically apply S-linear ¯
19 / 22
1 Trivially embed ciphertext R → T (still encrypts v). 2 Homomorphically apply S-linear ¯
19 / 22
20 / 22
20 / 22
20 / 22
8 · B′ 4 = {1, ζ8} · {1, ζ4}.
21 / 22
8 · B′ 4 = {1, ζ8} · {1, ζ4}.
7 · C′ 91 = {c1, c2} · {c′ 1, c′ 2, c′ 3}.
21 / 22
8 · B′ 4 = {1, ζ8} · {1, ζ4}.
7 · C′ 91 = {c1, c2} · {c′ 1, c′ 2, c′ 3}.
8 · B′ 4
4 · C′ 7
7 · C′ 91
4
8 → C′ 7
7
4 → C′ 91
21 / 22
8 · B′ 4 = {1, ζ8} · {1, ζ4}.
7 · C′ 91 = {c1, c2} · {c′ 1, c′ 2, c′ 3}.
8 · B′ 4
4 · C′ 7
7 · C′ 91
4
8 → C′ 7
7
4 → C′ 91
21 / 22
22 / 22
22 / 22
22 / 22
22 / 22