Try โ€‚โ€‰HackMD

Packing HE ciphertexts for coordinate-wise multiplication

Let

X be an integer, and
(xn,...,x0)
binary decomposition

Goal: define packing technique so that we can assume that the scheme works over messages that are vectors in

Fpn despite the HE message space are polynomials in
R=Fp[X]/(Xn+1)
.

To this end we want define a bijection

(encode,decode) where
encode:Fpnโ†’R=Fp[X]/(Xn+1))
s.t.
โˆ€v1,v2โˆˆFpn:v1โ‹…v2=decode(encode(v1)โˆ—encode(v2))

Let

z be an integer,
n=2z
,
m=2ยทn
, and
p
be a prime such that
p=1modm
.
In this case,
(Xn+1)
splits over
Fp
, i.e.,
(Xn+1)=โˆiFi(X)
, where each
Fi
is a linear polynomial.

The

encode function can be defined via CRT encoding as follows.

Given

vโ†’, build a polynomial
p(X)
of degree
nโˆ’1
by solving the following system of equations
โˆ€i:p(X)=vimodFi(X)

The

decode function is the one that, on input a polynomial
p(X)
, returns the vector
(p(X)modF1(X),โ€ฆ,p(X)modFn(X))

Let us briefly see how the homomorphic property holds after a multiplication. Assume

pj(X)=encode(vโ†’j) for
j=1,2
, and that
p(X)=p1(X)โ‹…p2(X)mod(Xn+1)
. Namely,
p(X)=p1(X)โ‹…p2(X)โˆ’t(X)(Xn+1)
for some polynomial
t(X)
.

Then

p(X)modFi(X)=p1(X)โ‹…p2(X)โˆ’t(X)(Xn+1)modFi(X)=
p1(X)โ‹…p2(X)modFi(X)=v1,iโ‹…v2,i

(using the fact that
Xn+1modFi(X)=โˆjFj(X)modFi(X)=0
)