08.01.2015 Views

Design and Implementation of a Homomorphic ... - Researcher

Design and Implementation of a Homomorphic ... - Researcher

Design and Implementation of a Homomorphic ... - Researcher

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.

‖a‖ canon<br />

2 .<br />

The basic operations that we have in this scheme are the usual key-generation, encryption, <strong>and</strong><br />

decryption, the homomorphic evaluation routines for addition, multiplication <strong>and</strong> automorphism<br />

(<strong>and</strong> also addition-<strong>of</strong>-constant <strong>and</strong> multiplication-by-constant), <strong>and</strong> the “ciphertext maintenance”<br />

operations <strong>of</strong> key-switching <strong>and</strong> modulus-switching. These are described in the rest <strong>of</strong> this report,<br />

but first we describe our plaintext encoding conventions <strong>and</strong> our Double-CRT representation <strong>of</strong><br />

polynomials.<br />

1.1 Plaintext Slots<br />

The native plaintext space <strong>of</strong> our variant <strong>of</strong> BGV are elements <strong>of</strong> A 2 , <strong>and</strong> the polynomial Φ m (X)<br />

factors modulo 2 into l irreducible factors, Φ m (X) = F 1 (X)·F 2 (X) · · · F l (X) (mod 2), all <strong>of</strong> degree<br />

d = φ(m)/l. Just as in [2, 4, 10] each factor corresponds to a “plaintext slot”. That is, we can<br />

view a polynomial a ∈ A 2 as representing an l-vector (a mod F i ) l i=1 .<br />

More specifically, for the purpose <strong>of</strong> packing we think <strong>of</strong> a polynomial a ∈ A 2 not as a binary<br />

polynomial but as a polynomial over the extension field F 2 d (with some specific representation),<br />

<strong>and</strong> the plaintext values that are encoded in a are its evaluations at l specific primitive m-th roots<br />

<strong>of</strong> unity in F 2d . In other words, if ρ ∈ F 2 d is a particular fixed primitive m-th root <strong>of</strong> unity, <strong>and</strong> our<br />

distinguished evaluation points are ρ t 1<br />

, ρ t 2<br />

, . . . , ρ t l<br />

(for some set <strong>of</strong> indexes T = {t 1 , . . . , t l }), then<br />

the vector <strong>of</strong> plaintext values encoded in a is:<br />

(<br />

a(ρ<br />

t j<br />

) : t j ∈ T ) .<br />

See Section 2.4 for a discussion <strong>of</strong> the choice <strong>of</strong> representation <strong>of</strong> F 2 d <strong>and</strong> the evaluation points.<br />

It is st<strong>and</strong>ard fact that the Galois group Gal = Gal(Q(ρ m )/Q) consists <strong>of</strong> the mappings κ k :<br />

a(X) ↦→ a(X k ) mod Φ m (X) for all k co-prime with m, <strong>and</strong> that it is isomorphic to Z ∗ m. As noted<br />

in [4], for each i, j ∈ {1, 2, . . . , l} there is an element κ k ∈ Gal which sends an element in slot i to<br />

an element in slot j. Indeed if we set k = t −1<br />

j<br />

· t i (mod m) <strong>and</strong> b = κ k (a) then we have<br />

b(ρ t j<br />

) = a(ρ t jk ) = a(ρ t j·t −1<br />

j t i<br />

) = a(ρ t i<br />

),<br />

so the element in the j’th slot <strong>of</strong> b is the same as that in the i’th slot <strong>of</strong> a. In addition to these “datamovement<br />

maps”, Gal contains also the Frobenius maps, X −→ X 2i , which also act as Frobenius<br />

on the individual slots separately.<br />

We note that the values that are encoded in the slots do not have to be individual bits, in<br />

general they can be elements <strong>of</strong> the extension field F 2 d (or any sub-field <strong>of</strong> it). For example, for the<br />

AES application we may want to pack elements <strong>of</strong> F 2 8 in the slots, so we choose the parameters so<br />

that F 2 8 is a sub-field <strong>of</strong> F 2 d (which means that d is divisible by 8).<br />

1.2 Our Modulus Chain <strong>and</strong> Double-CRT Representation<br />

We define the chain <strong>of</strong> moduli by choosing L + 1 “small primes” p 0 , p 1 , . . . , p L <strong>and</strong> the l’th modulus<br />

in our chain is defined as q l = ∏ l<br />

j=0 p j. The primes p i ’s are chosen so that for all i, Z/p i Z<br />

contains a primitive m-th root <strong>of</strong> unity (call it ζ i ) so Φ m (X) factors modulo p i to linear terms<br />

Φ m (X) = ∏ j∈Z ∗ (X − ζj m i ) (mod p i).<br />

A key feature <strong>of</strong> our implementation is that we represent an element a ∈ A ql via double-CRT<br />

representation, with respect to both the integer factors <strong>of</strong> q l <strong>and</strong> the polynomial factor <strong>of</strong> Φ m (X)<br />

2

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

Saved successfully!

Ooh no, something went wrong!