22.04.2014 Views

a590003

a590003

a590003

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

space modulus p), we need to convert ⃗c into another ciphertext vector ⃗c ′ satisfying (a) (q ′ ) −1 ⃗c ′ ≡<br />

q −1 ⃗c (mod p), and (b) the “rounding error term” ɛ def = ⃗c ′ − (q ′ /q)⃗c is small. As described in [5], we<br />

apply the following optimized procedure:<br />

1. Let ⃗ δ = ⃗c mod ∆,<br />

2. Add or subtract multiples of ∆ from the coefficients in ⃗ δ until it is divisible by p,<br />

3. Set ⃗c ∗ = ⃗c − ⃗ δ, // ⃗c ∗ divisible by ∆, and ⃗c ∗ ≡ ⃗c (mod p)<br />

4. Output ⃗c ′ = ⃗c/∆.<br />

An argument similar to the proof of [2, Lemma 4] shows that if before the transformation we<br />

had m = [〈⃗c, ⃗s〉] q ≡ q · m (mod p), then after the transformation we have m ′ = [〈⃗c ′ , ⃗s〉] q ′ ≡ q ′ · m<br />

(mod p), as needed. (The difference from [2, Lemma 4] is that we do not assume that q, q ′ ≡ 1<br />

(mod p).)<br />

Considering the noise magnitude, we can write ⃗c ′ = ⃗c/∆ + ⃗ɛ where ⃗ɛ is the rounding error (i.e.,<br />

the terms that are added in Step 2 above, divided by ∆). The noise polynomial is thus scaled down<br />

by a ∆ factor, then increased by the additive term a def = 〈⃗ɛ, ⃗s〉 = ∑ j ɛ j(X) · s r j<br />

j<br />

(X t j<br />

) (with a ∈ A).<br />

We make the heuristic assumption that the coefficients in all the ɛ j ’s behave as if they are chosen<br />

uniformly in the interval −[p/2, p/2). Under this assumption, we have<br />

[<br />

E |ɛ j (τ m )| 2] = φ(m) · p 2 /12,<br />

since the variance of a uniform random variable in −[p/2, p/2) is p 2 /12, and ɛ j (τ m ) is a sum of<br />

φ(m) such variables, scaled by different magnitude-1 complex constants. Assuming heuristically<br />

that the ɛ j ’s are independent of the public key, we have<br />

[<br />

E |a(τ m )| 2] = ∑ j<br />

[<br />

E |ɛ j (ρ m )| 2] [ ∣∣∣s r<br />

· E<br />

j<br />

j<br />

(X t j ) ∣ 2] ≈ ∑ j<br />

(φ(m) · p 2 /12) · (r j )! · H r j<br />

j<br />

,<br />

where p is the plaintext-space modulus, H j is the Hamming weight of the secret key for the j’th<br />

part, and r j is the power of that secret key.<br />

3.1.6 Key-switching/re-linearization<br />

The re-linearization operation ensures that all the ciphertext parts have handles that point to either<br />

the constant 1 or a base secret-key: Any ciphertext part j with a handle pointing to s r j<br />

j<br />

(X t j<br />

) with<br />

either r j > 1 or r j = 1 and t j > 1, is replace by two adding two parts, one that points to 1 and<br />

the other than points to s j (X), using some key-switching matrices from the public key. Also, a<br />

side-effect of re-linearization is that we add all the “special primes” to the prime-set of the resulting<br />

ciphertext.<br />

To explain the re-linearization procedure, we begin by recalling that the “ciphertext primes”<br />

that define our moduli-chain are partitioned into some number n ≥ 1 of “digits”, of roughly equal<br />

size. (For example, say that we have 15 small primes in the chain and we partition them to three<br />

digits, then we may take the first five primes to be the first digit, the next five primes to be the<br />

second, and the last five primes to be the third.) The size of a digit is the product of all the primes<br />

that are associated with it, and below we denote by D i the size of the i’th digit.<br />

19<br />

16. Design and Implementation of a Homomorphic-Encryption Library

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

Saved successfully!

Ooh no, something went wrong!