packing messages and optimizing bootstrapping in gsw-fhethis talk 1. simd (matrix) fhe from...

51
Packing Messages and Optimizing Bootstrapping in GSW-FHE Ryo Hiromasa Masayuki Abe Tatsuaki Okamoto Kyoto University NTT PKC ’15 April 1, 2015 1 / 13

Upload: others

Post on 20-Sep-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Packing Messages and Optimizing Bootstrapping

in GSW-FHE

Ryo Hiromasa† Masayuki Abe‡ Tatsuaki Okamoto‡

†Kyoto University ‡NTT

PKC ’15

April 1, 2015

1 / 13

Page 2: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Fully Homomorphic Encryption (FHE)

....

f , c

.

c

.

c← Enc(m)

.

c← Eval( f , c)

.

( f (m)← Dec(c))

▶ FHE from . . .

3 Ideal lattices: [Gen09]3 Integers: [DGHV10]3 RLWE: [BV11b]3 LWE: [BV11a]3 Approx. eigenvector: [GSW13]

▶ SIMD FHE from . . .

3 Ideal lattices: [SV10]3 Integers: [CCKLLTY13]3 RLWE: [SV10]3 LWE: [BGH13]7 Approx. eigenvector: ?

2 / 13

Page 3: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Fully Homomorphic Encryption (FHE)

....

f , c

.

c

.

c← Enc(m)

.

c← Eval( f , c)

.

( f (m)← Dec(c))

▶ FHE from . . .

3 Ideal lattices: [Gen09]3 Integers: [DGHV10]3 RLWE: [BV11b]3 LWE: [BV11a]3 Approx. eigenvector: [GSW13]

▶ SIMD FHE from . . .

3 Ideal lattices: [SV10]3 Integers: [CCKLLTY13]3 RLWE: [SV10]3 LWE: [BGH13]7 Approx. eigenvector: ?

2 / 13

Page 4: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Fully Homomorphic Encryption (FHE)

....

f , c1, . . . , cr

.

c1, . . . , cr

.

c1 ← Enc(m1)

.

...

.

cr ← Enc(mr)

.

c1 ← Eval( f , c1)

.

...

.

cr ← Eval( f , cr)

.

( f (mi)← Dec(ci))

▶ FHE from . . .

3 Ideal lattices: [Gen09]3 Integers: [DGHV10]3 RLWE: [BV11b]3 LWE: [BV11a]3 Approx. eigenvector: [GSW13]

▶ SIMD FHE from . . .

3 Ideal lattices: [SV10]3 Integers: [CCKLLTY13]3 RLWE: [SV10]3 LWE: [BGH13]7 Approx. eigenvector: ?

2 / 13

Page 5: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Fully Homomorphic Encryption (FHE)

....

f , c1, . . . , cr

.

c1, . . . , cr

.

c1 ← Enc(m1)

.

...

.

cr ← Enc(mr)

.

c1 ← Eval( f , c1)

.

...

.

cr ← Eval( f , cr)

.

( f (mi)← Dec(ci))

.

7

▶ FHE from . . .

3 Ideal lattices: [Gen09]3 Integers: [DGHV10]3 RLWE: [BV11b]3 LWE: [BV11a]3 Approx. eigenvector: [GSW13]

▶ SIMD FHE from . . .

3 Ideal lattices: [SV10]3 Integers: [CCKLLTY13]3 RLWE: [SV10]3 LWE: [BGH13]7 Approx. eigenvector: ?

2 / 13

Page 6: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Single-Instruction-Multiple-Data (SIMD) FHE

....

f , c

.

c

.

c← Enc(m1, . . . ,mr)

.

c← Eval( f , c)

.

( f (m1), . . . , f (mr)← Dec(c))

▶ FHE from . . .

3 Ideal lattices: [Gen09]3 Integers: [DGHV10]3 RLWE: [BV11b]3 LWE: [BV11a]3 Approx. eigenvector: [GSW13]

▶ SIMD FHE from . . .

3 Ideal lattices: [SV10]3 Integers: [CCKLLTY13]3 RLWE: [SV10]3 LWE: [BGH13]7 Approx. eigenvector: ?

2 / 13

Page 7: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Single-Instruction-Multiple-Data (SIMD) FHE

....

f , c

.

c

.

c← Enc(m1, . . . ,mr)

.

c← Eval( f , c)

.

( f (m1), . . . , f (mr)← Dec(c))

▶ FHE from . . .

3 Ideal lattices: [Gen09]3 Integers: [DGHV10]3 RLWE: [BV11b]3 LWE: [BV11a]3 Approx. eigenvector: [GSW13]

▶ SIMD FHE from . . .

3 Ideal lattices: [SV10]3 Integers: [CCKLLTY13]3 RLWE: [SV10]3 LWE: [BGH13]7 Approx. eigenvector: ?

2 / 13

Page 8: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

This Talk

..1 SIMD FHE from approximate eigenvector method.

3 Simple homomorphic SIMD operations(just matrix addition/multiplication).

3 Supports homomorphic matrix addition and multiplication.3 A natural extension of SIMD FHE.

Can compute more complicated homomorphic operations.7 Requires an additional (but reasonable in FHE literature) assumption

for security.

..2 Application: optimizing bootstrapping of [AP14].

3 Lattice approximation factor: O(n3)→ O(n2.5).3 Allows us to get the best factor O(n1.5+ϵ) without successive

dimension-modulus reduction.

3 / 13

Page 9: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

This Talk

..1 SIMD FHE from approximate eigenvector method.

3 Simple homomorphic SIMD operations(just matrix addition/multiplication).

3 Supports homomorphic matrix addition and multiplication.3 A natural extension of SIMD FHE.

Can compute more complicated homomorphic operations.7 Requires an additional (but reasonable in FHE literature) assumption

for security.

..2 Application: optimizing bootstrapping of [AP14].

3 Lattice approximation factor: O(n3)→ O(n2.5).3 Allows us to get the best factor O(n1.5+ϵ) without successive

dimension-modulus reduction.

3 / 13

Page 10: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

This Talk

..1 SIMD (Matrix) FHE from approximate eigenvector method.

3 Simple homomorphic SIMD operations(just matrix addition/multiplication).

3 Supports homomorphic matrix addition and multiplication.

3 A natural extension of SIMD FHE.Can compute more complicated homomorphic operations.

7 Requires an additional (but reasonable in FHE literature) assumptionfor security.

..2 Application: optimizing bootstrapping of [AP14].

3 Lattice approximation factor: O(n3)→ O(n2.5).3 Allows us to get the best factor O(n1.5+ϵ) without successive

dimension-modulus reduction.

3 / 13

Page 11: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

This Talk

..1 SIMD (Matrix) FHE from approximate eigenvector method.

3 Simple homomorphic SIMD operations(just matrix addition/multiplication).

3 Supports homomorphic matrix addition and multiplication.3 A natural extension of SIMD FHE.

Can compute more complicated homomorphic operations.

7 Requires an additional (but reasonable in FHE literature) assumptionfor security.

..2 Application: optimizing bootstrapping of [AP14].

3 Lattice approximation factor: O(n3)→ O(n2.5).3 Allows us to get the best factor O(n1.5+ϵ) without successive

dimension-modulus reduction.

3 / 13

Page 12: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

This Talk

..1 SIMD (Matrix) FHE from approximate eigenvector method.

3 Simple homomorphic SIMD operations(just matrix addition/multiplication).

3 Supports homomorphic matrix addition and multiplication.3 A natural extension of SIMD FHE.

Can compute more complicated homomorphic operations.7 Requires an additional (but reasonable in FHE literature) assumption

for security.

..2 Application: optimizing bootstrapping of [AP14].

3 Lattice approximation factor: O(n3)→ O(n2.5).3 Allows us to get the best factor O(n1.5+ϵ) without successive

dimension-modulus reduction.

3 / 13

Page 13: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

This Talk

..1 SIMD (Matrix) FHE from approximate eigenvector method.

3 Simple homomorphic SIMD operations(just matrix addition/multiplication).

3 Supports homomorphic matrix addition and multiplication.3 A natural extension of SIMD FHE.

Can compute more complicated homomorphic operations.7 Requires an additional (but reasonable in FHE literature) assumption

for security.

..2 Application: optimizing bootstrapping of [AP14].

3 Lattice approximation factor: O(n3)→ O(n2.5).3 Allows us to get the best factor O(n1.5+ϵ) without successive

dimension-modulus reduction.

3 / 13

Page 14: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

This Talk

..1 SIMD (Matrix) FHE from approximate eigenvector method.

3 Simple homomorphic SIMD operations(just matrix addition/multiplication).

3 Supports homomorphic matrix addition and multiplication.3 A natural extension of SIMD FHE.

Can compute more complicated homomorphic operations.7 Requires an additional (but reasonable in FHE literature) assumption

for security.

..2 Application: optimizing bootstrapping of [AP14].

3 Lattice approximation factor: O(n3)→ O(n2.5).

3 Allows us to get the best factor O(n1.5+ϵ) without successivedimension-modulus reduction.

3 / 13

Page 15: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

This Talk

..1 SIMD (Matrix) FHE from approximate eigenvector method.

3 Simple homomorphic SIMD operations(just matrix addition/multiplication).

3 Supports homomorphic matrix addition and multiplication.3 A natural extension of SIMD FHE.

Can compute more complicated homomorphic operations.7 Requires an additional (but reasonable in FHE literature) assumption

for security.

..2 Application: optimizing bootstrapping of [AP14].

3 Lattice approximation factor: O(n3)→ O(n2.5).3 Allows us to get the best factor O(n1.5+ϵ) without successive

dimension-modulus reduction.

3 / 13

Page 16: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Starting point: Gentry-Sahai-Waters FHE (GSW-FHE)

▶ Learning with Errors (LWE): AU←− Zn×m

q , tU←− Zn

q, eR←− χm,

bT = tT A + eT bT

A

≈ Uniform(Z(n+1)×mq )

..

GSW-FHE

.

▶ Secret key is s ∈ Z(n+1)q .

▶ G = (1, 2, . . . , 2⌈log q⌉−1) ⊗ I.

▶ Public key is a LWE matrix B ∈ Z(n+1)×mq s.t. sB ≈ 0.

▶ A ciphertext of m ∈ {0, 1} is a matrix C = BR + m · G mod q s.t.

sC = noise + m · sG.

4 / 13

Page 17: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Starting point: Gentry-Sahai-Waters FHE (GSW-FHE)

▶ Learning with Errors (LWE): AU←− Zn×m

q , tU←− Zn

q, eR←− χm,

bT = tT A + eT bT

A

≈ Uniform(Z(n+1)×mq )

..

GSW-FHE

.

▶ Secret key is s ∈ Z(n+1)q .

▶ G = (1, 2, . . . , 2⌈log q⌉−1) ⊗ I.

▶ Public key is a LWE matrix B ∈ Z(n+1)×mq s.t. sB ≈ 0.

▶ A ciphertext of m ∈ {0, 1} is a matrix C = BR + m · G mod q s.t.

sC = noise + m · sG.

4 / 13

Page 18: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Extension to Matrix GSW-FHE: A Natural Extension

..

Condition to be Sufficed

.

For a secret key S ∈ Zr×(n+r)q , a ciphertext of M ∈ {0, 1}r×r is C ∈ Z(n+r)×N

q

s.t.

SC = noise + MSG.

3 Homomorphic matrix addition: just matrix addition.

S(C1 + C2) = noise + (M1 + M2)SG.

▶ G−1(X): outputs a small matrix X′ s.t. GX′ = X.

3 Homomorphic marix multiplication: computes G−1(·) and matrix

multiplication.If we let C′2R←− G−1(C2), then

SC1C′2 = (noise + M1SG)C′2= noise + M1SC2

= noise + M1 M2SG.

5 / 13

Page 19: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Extension to Matrix GSW-FHE: A Natural Extension

..

Condition to be Sufficed

.

For a secret key S ∈ Zr×(n+r)q , a ciphertext of M ∈ {0, 1}r×r is C ∈ Z(n+r)×N

q

s.t.

SC = noise + MSG.

3 Homomorphic matrix addition: just matrix addition.

S(C1 + C2) = noise + (M1 + M2)SG.

▶ G−1(X): outputs a small matrix X′ s.t. GX′ = X.

3 Homomorphic marix multiplication: computes G−1(·) and matrix

multiplication.If we let C′2R←− G−1(C2), then

SC1C′2 = (noise + M1SG)C′2= noise + M1SC2

= noise + M1 M2SG.

5 / 13

Page 20: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Extension to Matrix GSW-FHE: A Natural Extension

..

Condition to be Sufficed

.

For a secret key S ∈ Zr×(n+r)q , a ciphertext of M ∈ {0, 1}r×r is C ∈ Z(n+r)×N

q

s.t.

SC = noise + MSG.

3 Homomorphic matrix addition: just matrix addition.

S(C1 + C2) = noise + (M1 + M2)SG.

▶ G−1(X): outputs a small matrix X′ s.t. GX′ = X.

3 Homomorphic marix multiplication: computes G−1(·) and matrix

multiplication.If we let C′2R←− G−1(C2), then

SC1C′2 = (noise + M1SG)C′2= noise + M1SC2

= noise + M1 M2SG.

5 / 13

Page 21: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Extension to Matrix GSW-FHE: A Natural Extension

..

Condition to be Sufficed

.

For a secret key S ∈ Zr×(n+r)q , a ciphertext of M ∈ {0, 1}r×r is C ∈ Z(n+r)×N

q

s.t.

SC = noise + MSG.

3 Homomorphic matrix addition: just matrix addition.

S(C1 + C2) = noise + (M1 + M2)SG.

▶ G−1(X): outputs a small matrix X′ s.t. GX′ = X.

3 Homomorphic marix multiplication: computes G−1(·) and matrix

multiplication.If we let C′2R←− G−1(C2), then

SC1C′2 = (noise + M1SG)C′2= noise + M1SC2

= noise + M1 M2SG.5 / 13

Page 22: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Extension to Matrix GSW-FHE: Construction

..

Computing Ciphertexts

.

For a matrix X s.t. SX = MS, ciphertexts are required to be of the form:

C = BR + XG.

▶ By construction, S includes an identity matrix: S = [I ∥ S′].

▶ Set X as follows:

X = MS

0

7 X can not be computed publicly.

(In [GSW13], X = m · I, so we can publicly compute it.)3 In FHE, symmetric→asymmetric is easy [Bar10, Rot11].7 It requires to introduce a circular security assumption.

6 / 13

Page 23: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Extension to Matrix GSW-FHE: Construction

..

Computing Ciphertexts

.

For a matrix X s.t. SX = MS, ciphertexts are required to be of the form:

C = BR + XG.

▶ By construction, S includes an identity matrix: S = [I ∥ S′].

▶ Set X as follows:

X = MS

0

7 X can not be computed publicly.

(In [GSW13], X = m · I, so we can publicly compute it.)3 In FHE, symmetric→asymmetric is easy [Bar10, Rot11].7 It requires to introduce a circular security assumption.

6 / 13

Page 24: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Extension to Matrix GSW-FHE: Construction

..

Computing Ciphertexts

.

For a matrix X s.t. SX = MS, ciphertexts are required to be of the form:

C = BR + XG.

▶ By construction, S includes an identity matrix: S = [I ∥ S′].

▶ Set X as follows:

X = MS

0

7 X can not be computed publicly.

(In [GSW13], X = m · I, so we can publicly compute it.)3 In FHE, symmetric→asymmetric is easy [Bar10, Rot11].7 It requires to introduce a circular security assumption.

6 / 13

Page 25: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Extension to Matrix GSW-FHE: Symmetric→Asymmetric

▶ Let M(i, j) be the matrix with 1 in (i, j)-thposition and 0 in the others.

..

1

.

0

.

0

.

0

.

0

.

j

.

i

▶ Publish encryptions of M(i, j) (= P(i, j)) as a part of the public key.

(7 this enlarges the key size by a #(encrypted bits) factor.)

.

.

sTj

.

0

.

0

.

P(i, j) = BR(i, j)+

.

G

.

≈ Uniform (⇐ 7 circular security)

▶ PubEncpk(M ∈ {0, 1}r×r): Let M[i, j] be the (i, j)-th element of M.

C = BR +∑

(i, j)∈[r]×[r]:M[i, j]=1

P(i, j).

7 / 13

Page 26: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Extension to Matrix GSW-FHE: Symmetric→Asymmetric

▶ Let M(i, j) be the matrix with 1 in (i, j)-thposition and 0 in the others.

..

1

.

0

.

0

.

0

.

0

.

j

.

i

▶ Publish encryptions of M(i, j) (= P(i, j)) as a part of the public key.

(7 this enlarges the key size by a #(encrypted bits) factor.)

.

.

sTj

.

0

.

0

.

P(i, j) = BR(i, j)+

.

G

.

≈ Uniform (⇐ 7 circular security)

▶ PubEncpk(M ∈ {0, 1}r×r): Let M[i, j] be the (i, j)-th element of M.

C = BR +∑

(i, j)∈[r]×[r]:M[i, j]=1

P(i, j).

7 / 13

Page 27: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Extension to Matrix GSW-FHE: Symmetric→Asymmetric

▶ Let M(i, j) be the matrix with 1 in (i, j)-thposition and 0 in the others.

..

1

.

0

.

0

.

0

.

0

.

j

.

i

▶ Publish encryptions of M(i, j) (= P(i, j)) as a part of the public key.

(7 this enlarges the key size by a #(encrypted bits) factor.)

..

sTj

.

0

.

0

.

P(i, j) = BR(i, j)+

.

G

.

≈ Uniform (⇐ 7 circular security)

▶ PubEncpk(M ∈ {0, 1}r×r): Let M[i, j] be the (i, j)-th element of M.

C = BR +∑

(i, j)∈[r]×[r]:M[i, j]=1

P(i, j).

7 / 13

Page 28: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Extension to Matrix GSW-FHE: Symmetric→Asymmetric

▶ Let M(i, j) be the matrix with 1 in (i, j)-thposition and 0 in the others.

..

1

.

0

.

0

.

0

.

0

.

j

.

i

▶ Publish encryptions of M(i, j) (= P(i, j)) as a part of the public key.

(7 this enlarges the key size by a #(encrypted bits) factor.)

..

sTj

.

0

.

0

.

P(i, j) = BR(i, j)+

.

G

.

≈ Uniform (⇐ 7 circular security)

▶ PubEncpk(M ∈ {0, 1}r×r): Let M[i, j] be the (i, j)-th element of M.

C = BR +∑

(i, j)∈[r]×[r]:M[i, j]=1

P(i, j).

7 / 13

Page 29: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Extension to Matrix GSW-FHE: Symmetric→Asymmetric

▶ Let M(i, j) be the matrix with 1 in (i, j)-thposition and 0 in the others.

..

1

.

0

.

0

.

0

.

0

.

j

.

i

▶ Publish encryptions of M(i, j) (= P(i, j)) as a part of the public key.

(7 this enlarges the key size by a #(encrypted bits) factor.)

..

sTj

.

0

.

0

.

P(i, j) = BR(i, j)+

.

G

.

≈ Uniform (⇐ 7 circular security)

▶ PubEncpk(M ∈ {0, 1}r×r): Let M[i, j] be the (i, j)-th element of M.

C = BR +∑

(i, j)∈[r]×[r]:M[i, j]=1

P(i, j).

7 / 13

Page 30: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Example: Implementing SIMD FHE

..

SIMD Ciphertexts

.

▶ A ciphertext of M ∈ {0, 1}r×r is a matrix C ∈ Z(n+r)×Nq s.t.

SC = noise + MSG.

▶ Store (m1, . . . ,mr) ∈ {0, 1}r in the diagonal entries of M:

SC = noise +

m1

. . .

mr

SG.

8 / 13

Page 31: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Example: Implementing SIMD FHE

..

SIMD Ciphertexts

.

▶ A ciphertext of M ∈ {0, 1}r×r is a matrix C ∈ Z(n+r)×Nq s.t.

SC = noise + MSG.

▶ Store (m1, . . . ,mr) ∈ {0, 1}r in the diagonal entries of M:

SC = noise +

m1

. . .

mr

SG.

3 Homomorphic SIMD addition:

S(C1 + C2) = noise +

m1,1. . .

m1,r

+

m2,1. . .

m2,r

SG.

8 / 13

Page 32: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Example: Implementing SIMD FHE

..

SIMD Ciphertexts

.

▶ A ciphertext of M ∈ {0, 1}r×r is a matrix C ∈ Z(n+r)×Nq s.t.

SC = noise + MSG.

▶ Store (m1, . . . ,mr) ∈ {0, 1}r in the diagonal entries of M:

SC = noise +

m1

. . .

mr

SG.

3 Homomorphic SIMD multiplication:

SC1C′2 = noise +

m1,1

. . .

m1,r

m2,1. . .

m2,r

SG.

8 / 13

Page 33: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Example: Implementing SIMD FHE

..

SIMD Ciphertexts

.

▶ A ciphertext of M ∈ {0, 1}r×r is a matrix C ∈ Z(n+r)×Nq s.t.

SC = noise + MSG.

▶ Store (m1, . . . ,mr) ∈ {0, 1}r in the diagonal entries of M:

SC = noise +

m1

. . .

mr

SG.

3 Plaintext-slot permutation: Let Σ be a permutation matrix of σ,

WΣ,WΣT be ciphertexts of Σ,ΣT .

S(WΣC′W′ΣT ) = noise +

mσ(1)

. . .

mσ(r)

SG.

8 / 13

Page 34: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Related Work: Graph-Induced Multilinear Maps [GGH15]

▶ Recall: a GSW-FHE ciphertext of m ∈ {0, 1} is a matrix C ∈ ZN×Nq s.t.

(sG)C = m · (sG) + noise.

⋆ sG is called approximate eigenvector.⋆ m is the eigenvalue.

▶ [GGH15]: approximate eigenvector→approximate eigenspace.

An encoding of M ∈ Zr×r is a matrix D ∈ ZN×Nq s.t. for

SU←− Zr×N

q , ER←− χr×N ,

SD = MS + E.

⋆ S is an approximate eigenspace.

9 / 13

Page 35: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Related Work: Graph-Induced Multilinear Maps [GGH15]

▶ Recall: a GSW-FHE ciphertext of m ∈ {0, 1} is a matrix C ∈ ZN×Nq s.t.

(sG)C = m · (sG) + noise.

⋆ sG is called approximate eigenvector.⋆ m is the eigenvalue.

▶ [GGH15]: approximate eigenvector→approximate eigenspace.

An encoding of M ∈ Zr×r is a matrix D ∈ ZN×Nq s.t. for

SU←− Zr×N

q , ER←− χr×N ,

SD = MS + E.

⋆ S is an approximate eigenspace.

9 / 13

Page 36: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Related Work: Graph-Induced Multilinear Maps [GGH15]

▶ PreSamp(trapdoor, A, z, σ): outputs x s.t. Ax = zaccording to a discrete Gaussian dist. with

parameter σ.

▶ [GGH15]’s encoding: DR←− PreSamp(trapdoor, S,MS + E, σ).

▶ Matrix GSW-FHE: a ciphertext of M ∈ {0, 1}r×r is computed by

CR←− PreSamp(trapdoor,G,

MS0

G + BR, σ).

⋆ We have (SG)C = M(SG) + noise.⋆ SG can be seen as an approximate eigenspace.

10 / 13

Page 37: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Related Work: Graph-Induced Multilinear Maps [GGH15]

▶ PreSamp(trapdoor, A, z, σ): outputs x s.t. Ax = zaccording to a discrete Gaussian dist. with

parameter σ.

▶ [GGH15]’s encoding: DR←− PreSamp(trapdoor, S,MS + E, σ).

▶ Matrix GSW-FHE: a ciphertext of M ∈ {0, 1}r×r is computed by

CR←− PreSamp(trapdoor,G,

MS0

G + BR, σ).

⋆ We have (SG)C = M(SG) + noise.⋆ SG can be seen as an approximate eigenspace.

10 / 13

Page 38: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Related Work: Graph-Induced Multilinear Maps [GGH15]

▶ PreSamp(trapdoor, A, z, σ): outputs x s.t. Ax = zaccording to a discrete Gaussian dist. with

parameter σ.

▶ [GGH15]’s encoding: DR←− PreSamp(trapdoor, S,MS + E, σ).

▶ Matrix GSW-FHE: a ciphertext of M ∈ {0, 1}r×r is computed by

CR←− PreSamp(trapdoor,G,

MS0

G + BR, σ).

⋆ We have (SG)C = M(SG) + noise.⋆ SG can be seen as an approximate eigenspace.

10 / 13

Page 39: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Application: Bootstrapping

▶ Bootstrapping transforms FHE schemes to have unlimited amount of

homomorphism.

▶ This is done by homomorphically evaluating the decryption circuit.

..

Recent Developments of Bootstrapping GSW-FHE

.

3 In GSW-FHE, the noise grows asymmetrically:Let |noise(ci)| < Bi. |noise(c1 · c2)| < poly(n) · B1 + B2.

→ |noise(ci)| < B→ |noise(c1 · (c2 · (· · · (cℓ−1 · cℓ) · · · ))︸ ︷︷ ︸ℓ

)| < ℓ · poly(n) · B.

3 To bootstrap with smaller noise, we want to compute the decryptionin sequence.

▶ [BV14]: uses the Barrington’s theorem.

▶ [AP14]: encodes the decryption to a subset sum.

11 / 13

Page 40: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Application: Bootstrapping

▶ Bootstrapping transforms FHE schemes to have unlimited amount of

homomorphism.

▶ This is done by homomorphically evaluating the decryption circuit.

..

Recent Developments of Bootstrapping GSW-FHE

.

3 In GSW-FHE, the noise grows asymmetrically:Let |noise(ci)| < Bi. |noise(c1 · c2)| < poly(n) · B1 + B2.

→ |noise(ci)| < B→ |noise(c1 · (c2 · (· · · (cℓ−1 · cℓ) · · · ))︸ ︷︷ ︸ℓ

)| < ℓ · poly(n) · B.

3 To bootstrap with smaller noise, we want to compute the decryptionin sequence.

▶ [BV14]: uses the Barrington’s theorem.

▶ [AP14]: encodes the decryption to a subset sum.

11 / 13

Page 41: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Application: Bootstrapping

▶ Bootstrapping transforms FHE schemes to have unlimited amount of

homomorphism.

▶ This is done by homomorphically evaluating the decryption circuit.

..

Recent Developments of Bootstrapping GSW-FHE

.

3 In GSW-FHE, the noise grows asymmetrically:Let |noise(ci)| < Bi. |noise(c1 · c2)| < poly(n) · B1 + B2.

→ |noise(ci)| < B→ |noise(c1 · (c2 · (· · · (cℓ−1 · cℓ) · · · ))︸ ︷︷ ︸ℓ

)| < ℓ · poly(n) · B.

3 To bootstrap with smaller noise, we want to compute the decryptionin sequence.

▶ [BV14]: uses the Barrington’s theorem.

▶ [AP14]: encodes the decryption to a subset sum.

11 / 13

Page 42: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Application: Bootstrapping

▶ Bootstrapping transforms FHE schemes to have unlimited amount of

homomorphism.

▶ This is done by homomorphically evaluating the decryption circuit.

..

Recent Developments of Bootstrapping GSW-FHE

.

3 In GSW-FHE, the noise grows asymmetrically:Let |noise(ci)| < Bi. |noise(c1 · c2)| < poly(n) · B1 + B2.

→ |noise(ci)| < B→ |noise(c1 · (c2 · (· · · (cℓ−1 · cℓ) · · · ))︸ ︷︷ ︸ℓ

)| < ℓ · poly(n) · B.

3 To bootstrap with smaller noise, we want to compute the decryptionin sequence.

▶ [BV14]: uses the Barrington’s theorem.

▶ [AP14]: encodes the decryption to a subset sum.

11 / 13

Page 43: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Application: Bootstrapping

▶ Bootstrapping transforms FHE schemes to have unlimited amount of

homomorphism.

▶ This is done by homomorphically evaluating the decryption circuit.

..

Recent Developments of Bootstrapping GSW-FHE

.

3 In GSW-FHE, the noise grows asymmetrically:Let |noise(ci)| < Bi. |noise(c1 · c2)| < poly(n) · B1 + B2.

→ |noise(ci)| < B→ |noise(c1 · (c2 · (· · · (cℓ−1 · cℓ) · · · ))︸ ︷︷ ︸ℓ

)| < ℓ · poly(n) · B.

3 To bootstrap with smaller noise, we want to compute the decryptionin sequence.

▶ [BV14]: uses the Barrington’s theorem.

▶ [AP14]: encodes the decryption to a subset sum.

11 / 13

Page 44: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Application: Bootstrapping

▶ Bootstrapping transforms FHE schemes to have unlimited amount of

homomorphism.

▶ This is done by homomorphically evaluating the decryption circuit.

..

Recent Developments of Bootstrapping GSW-FHE

.

3 In GSW-FHE, the noise grows asymmetrically:Let |noise(ci)| < Bi. |noise(c1 · c2)| < poly(n) · B1 + B2.

→ |noise(ci)| < B→ |noise(c1 · (c2 · (· · · (cℓ−1 · cℓ) · · · ))︸ ︷︷ ︸ℓ

)| < ℓ · poly(n) · B.

3 To bootstrap with smaller noise, we want to compute the decryptionin sequence.

▶ [BV14]: uses the Barrington’s theorem.

▶ [AP14]: encodes the decryption to a subset sum.

11 / 13

Page 45: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Application: Bootstrapping

▶ Bootstrapping transforms FHE schemes to have unlimited amount of

homomorphism.

▶ This is done by homomorphically evaluating the decryption circuit.

..

Recent Developments of Bootstrapping GSW-FHE

.

3 In GSW-FHE, the noise grows asymmetrically:Let |noise(ci)| < Bi. |noise(c1 · c2)| < poly(n) · B1 + B2.

→ |noise(ci)| < B→ |noise(c1 · (c2 · (· · · (cℓ−1 · cℓ) · · · ))︸ ︷︷ ︸ℓ

)| < ℓ · poly(n) · B.

3 To bootstrap with smaller noise, we want to compute the decryptionin sequence.

▶ [BV14]: uses the Barrington’s theorem.

▶ [AP14]: encodes the decryption to a subset sum.

11 / 13

Page 46: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Application: Optimizing the Bootstrapping of [AP14]▶ The decryption of standard lattice-based FHE is

Decs(c) = ⌊⟨c, s⟩⌉2 = ⌊∑

i

cisi⌉2 = ⌊∑

i:ci=1

si⌉2.

▶ Additive groups are isomorphic to groups of cyclic permutations.

▶ [AP14] encodes ⟨c, s⟩ to compositions of cyclic permutations.▶ The rounding

⌊x⌉2 = 1 if x ≈ q/4

0 otherwise

consists of checking equality and summing their results.3 Our optimization represents Dec except for the summation as a

sequence of homomorphic multiplications.3 Lattice approximation factor: O(n3)→ O(n2.5).3 This allows us to get the best factor O(n1.5+ϵ) without successive

dimension-modulus reduction.

12 / 13

Page 47: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Application: Optimizing the Bootstrapping of [AP14]▶ The decryption of standard lattice-based FHE is

Decs(c) = ⌊⟨c, s⟩⌉2 = ⌊∑

i

cisi⌉2 = ⌊∑

i:ci=1

si⌉2.

▶ Additive groups are isomorphic to groups of cyclic permutations.

▶ [AP14] encodes ⟨c, s⟩ to compositions of cyclic permutations.▶ The rounding

⌊x⌉2 = 1 if x ≈ q/4

0 otherwise

consists of checking equality and summing their results.3 Our optimization represents Dec except for the summation as a

sequence of homomorphic multiplications.3 Lattice approximation factor: O(n3)→ O(n2.5).3 This allows us to get the best factor O(n1.5+ϵ) without successive

dimension-modulus reduction.

12 / 13

Page 48: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Application: Optimizing the Bootstrapping of [AP14]▶ The decryption of standard lattice-based FHE is

Decs(c) = ⌊⟨c, s⟩⌉2 = ⌊∑

i

cisi⌉2 = ⌊∑

i:ci=1

si⌉2.

▶ Additive groups are isomorphic to groups of cyclic permutations.

▶ [AP14] encodes ⟨c, s⟩ to compositions of cyclic permutations.

▶ The rounding

⌊x⌉2 = 1 if x ≈ q/4

0 otherwise

consists of checking equality and summing their results.3 Our optimization represents Dec except for the summation as a

sequence of homomorphic multiplications.3 Lattice approximation factor: O(n3)→ O(n2.5).3 This allows us to get the best factor O(n1.5+ϵ) without successive

dimension-modulus reduction.

12 / 13

Page 49: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Application: Optimizing the Bootstrapping of [AP14]▶ The decryption of standard lattice-based FHE is

Decs(c) = ⌊⟨c, s⟩⌉2 = ⌊∑

i

cisi⌉2 = ⌊∑

i:ci=1

si⌉2.

▶ Additive groups are isomorphic to groups of cyclic permutations.

▶ [AP14] encodes ⟨c, s⟩ to compositions of cyclic permutations.▶ The rounding

⌊x⌉2 = 1 if x ≈ q/4

0 otherwise

consists of checking equality and summing their results.

3 Our optimization represents Dec except for the summation as asequence of homomorphic multiplications.

3 Lattice approximation factor: O(n3)→ O(n2.5).3 This allows us to get the best factor O(n1.5+ϵ) without successive

dimension-modulus reduction.

12 / 13

Page 50: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Application: Optimizing the Bootstrapping of [AP14]▶ The decryption of standard lattice-based FHE is

Decs(c) = ⌊⟨c, s⟩⌉2 = ⌊∑

i

cisi⌉2 = ⌊∑

i:ci=1

si⌉2.

▶ Additive groups are isomorphic to groups of cyclic permutations.

▶ [AP14] encodes ⟨c, s⟩ to compositions of cyclic permutations.▶ The rounding

⌊x⌉2 = 1 if x ≈ q/4

0 otherwise

consists of checking equality and summing their results.3 Our optimization represents Dec except for the summation as a

sequence of homomorphic multiplications.3 Lattice approximation factor: O(n3)→ O(n2.5).3 This allows us to get the best factor O(n1.5+ϵ) without successive

dimension-modulus reduction.12 / 13

Page 51: Packing Messages and Optimizing Bootstrapping in GSW-FHEThis Talk 1. SIMD (Matrix) FHE from approximate eigenvector method. 3 Simple homomorphic SIMD operations (just matrix addition/multiplication)

Conclusion

▶ Our result: SIMD (Matrix) GSW-FHE.

3 Simple homomorphic SIMD operations(just matrix addition/multiplication).

3 Supports homomorphic matrix addition and multiplication.3 A natural extension of SIMD FHE.

Can compute more complicated homomorphic operations.7 Requires an additional assumption for security.⋆ A FHE variant of the recent MMPs [GGH15].

▶ Application: optimizing [AP14]’s bootstrapping.

3 Lattice approximation factor: O(n3)→ O(n2.5).3 We can get the best factor O(n1.5+ϵ) without successive

dimension-modulus reduction.

13 / 13