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.

To maintain the noise estimate, the procedure uses the pre-set ring-constant c m (cf. Appendix A.2) and<br />

also a pre-set constant B scale which is meant to bound the magnitude of the added noise term from this<br />

operation. It works as follows:<br />

SwitchModulus((c 0 , c 1 ), t, ν):<br />

1. If t < 1 then abort; // Sanity check<br />

2. ν ′ ← q t−1<br />

q t<br />

· ν + B scale ; // Scale down the noise estimate<br />

3. If ν ′ > q t−1 /2c m then abort; // Another sanity check<br />

4. c ′ i ← Scale(c i, q t , q t−1 ) for i = 0, 1; // Scale down the vector<br />

5. Output ((c ′ 0 , c′ 1 ), t − 1, ν′ ).<br />

The constant B scale is set as B scale = 2 √ φ(m)/3 · (8 √ h + 3), where h is the Hamming weight of the<br />

secret key. (In our implementation we use h = 64, so we get B scale ≈ 77 √ φ(m).) To justify this choice, we<br />

apply to the proof of the modulus switching lemma from [15, Lemma 13] (in the full version), relative to the<br />

canonical embedding norm. In that proof it is shown that when the noise magnitude in the input ciphertext<br />

c = (c 0 , c 1 ) is bounded by ν, then the noise magnitude in the output vector c ′ = (c ′ 0 , c′ 1 ) is bounded by<br />

ν ′ = q t−1<br />

q t<br />

· ν + ‖ 〈s, τ〉 ‖ can<br />

∞ , provided that the last quantity is smaller than q t−1 /2.<br />

Above τ is the “rounding error” vector, namely τ def = (τ 0 , τ 1 ) = (c ′ 0 , c′ 1 ) − q t−1<br />

q t<br />

(c 0 , c 1 ). Heuristically<br />

assuming that τ behaves as if its coefficients are chosen uniformly in [−1, +1], the evaluation τ i (ζ) at an<br />

m-th root of unity ζ m is distributed close to a Gaussian complex with variance φ(m)/3. Also, s was drawn<br />

from HWT (h) so s(ζ m ) is distributed close to a Gaussian complex with variance h. Hence we expect<br />

τ 1 (ζ)s(ζ) to have magnitude at most 16 √ φ(m)/3 · h (recall that we use h = 64). We can similarly bound<br />

τ 0 (ζ m ) by 6 √ φ(m)/3, and therefore the evaluation of 〈s, τ〉 at ζ m is bounded in magnitude (whp) by:<br />

16 √ φ(m)/3 · h + 6 √ φ(m)/3 = 2 √ φ(m)/3 · (8 √ h + 3 ) ≈ 77 √ φ(m) = B scale (3)<br />

B.3 Key Switching<br />

After some homomorphic evaluation operations we have on our hands not a “normal” ciphertext which is<br />

valid relative to “normal” secret key, but rather an “extended ciphertext” ((d 0 , d 1 , d 2 ), q t , ν) which is valid<br />

with respect to an “extended secret key” s ′ = (1, −s, −s ′ ). Namely, this ciphertext encrypts the plaintext<br />

a ∈ A via<br />

a = [[ d 0 − s · d 1 − s ′ · d 2<br />

]<br />

q t<br />

]2<br />

and the magnitude of the noise [ d 0 −s·d 1 −d 2 ·s ′] q t<br />

is bounded by ν. In our implementation, the component<br />

s is always the same element s ∈ A that was drawn from HWT (h) during key generation, but s ′ can vary<br />

depending on the operation. (See the description of multiplication and automorphisms below.)<br />

To enable that translation, we use some “key switching matrices” that are included in the public key. (In<br />

our implementation these “matrices” have dimension 2 × 1, i.e., the consist of only two elements from A.)<br />

As explained in Section 3.1, we save on space and time by artificially “boosting” the modulus we use from<br />

q t up to P · q t for some “large” modulus P . We note that in order to represent elements in A P qt using our<br />

dble-CRT representation we need to choose P so that Z/P Z also has primitive m-th roots of unity. (In fact<br />

in our implementation we pick P to be a prime.)<br />

19<br />

5. Homomorphic Evaluation of the AES Circuit

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

Saved successfully!

Ooh no, something went wrong!