22.04.2014 Views

a590003

a590003

a590003

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

a different ciphertext c 2 that encrypts the same message, but is now decryptable under a second secret key<br />

vector s 2 . The vectors c 2 , s 2 may not necessarily be of lower degree or dimension than c 1 , s 1 .<br />

Below, we review the concrete details of Brakerski and Vaikuntanathan’s key switching procedures. The<br />

procedures will use some subroutines that, given two vectors c and s, “expand” these vectors to get longer<br />

(higher-dimensional) vectors c ′ and s ′ such that 〈c ′ , s ′ 〉 = 〈c, s〉 mod q. We describe these subroutines first.<br />

• BitDecomp(x ∈ Rq n , q) decomposes x into its bit representation. Namely, write x = ∑ ⌊log q⌋<br />

j=0<br />

2 j · u j ,<br />

where all of the vectors u j are in R2 n, and output (u n·⌈log q⌉<br />

0, u 1 , . . . , u ⌊log q⌋ ) ∈ R2 .<br />

• Powersof2(x ∈ R n q , q) outputs the vector (x, 2 · x, . . . , 2 ⌊log q⌋ · x) ∈ R<br />

n·⌈log q⌉<br />

q .<br />

If one knows a priori that x has coefficients in [0, B] for B ≪ q, then BitDecomp can be optimized in<br />

n·⌈log B⌉<br />

the obvious way to output a shorter decomposition in R2 . Observe that:<br />

Lemma 2. For vectors c, s of equal length, we have 〈BitDecomp(c, q), Powersof2(s, q)〉 = 〈c, s〉 mod q.<br />

Proof.<br />

〈BitDecomp(c, q), Powersof2(s, q)〉 =<br />

⌊log q⌋<br />

∑<br />

j=0<br />

〈<br />

uj , 2 j · s 〉 =<br />

⌊log q⌋<br />

∑<br />

j=0<br />

〈<br />

2j · u j , s 〉 =<br />

〈 ⌊log q⌋<br />

∑<br />

j=0<br />

2 j · u j , s<br />

〉<br />

= 〈c, s〉 .<br />

We remark that this obviously generalizes to decompositions wrt bases other than the powers of 2.<br />

Now, key switching consists of two procedures: first, a procedure SwitchKeyGen(s 1 , s 2 , n 1 , n 2 , q),<br />

which takes as input the two secret key vectors as input, the respective dimensions of these vectors, and<br />

the modulus q, and outputs some auxiliary information τ s1 →s 2<br />

that enables the switching; and second, a<br />

procedure SwitchKey(τ s1 →s 2<br />

, c 1 , n 1 , n 2 , q), that takes this auxiliary information and a ciphertext encrypted<br />

under s 1 and outputs a new ciphertext c 2 that encrypts the same message under the secret key s 2 . (Below,<br />

we often suppress the additional arguments n 1 , n 2 , q.)<br />

SwitchKeyGen(s 1 ∈ R n 1<br />

q , s 2 ∈ R n 2<br />

q ):<br />

1. Run A ← E.PublicKeyGen(s 2 , N) for N = n 1 · ⌈log q⌉.<br />

2. Set B ← A + Powersof2(s 1 ) (Add Powersof2(s 1 ) ∈ R N q to A’s first column.) Output τ s1 →s 2<br />

= B.<br />

SwitchKey(τ s1 →s 2<br />

, c 1 ): Output c 2 = BitDecomp(c 1 ) T · B ∈ R n 2<br />

q .<br />

Note that, in SwitchKeyGen, the matrix A basically consists of encryptions of 0 under the key s 2 . Then,<br />

pieces of the key s 1 are added to these encryptions of 0. Thus, in some sense, the matrix B consists of<br />

encryptions of pieces of s 1 (in a certain format) under the key s 2 . We now establish that the key switching<br />

procedures are meaningful, in the sense that they preserve the correctness of decryption under the new key.<br />

Lemma 3. [Correctness] Let s 1 , s 2 , q, n 1 , n 2 , A, B = τ s1 →s 2<br />

be as in SwitchKeyGen(s 1 , s 2 ), and let<br />

A · s 2 = 2e 2 ∈ Rq N . Let c 1 ∈ R n 1<br />

q and c 2 ← SwitchKey(τ s1 →s 2<br />

, c 1 ). Then,<br />

〈c 2 , s 2 〉 = 2 〈BitDecomp(c 1 ), e 2 〉 + 〈c 1 , s 1 〉 mod q<br />

9<br />

2. Fully Homomorphic Encryption without Bootstrapping

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!