Some notation first:
⌈x⌉ means rounding up,
⌊x⌋ means rounding down,
⌊x⌉ means the nearest integer,
The problem with hA over Z[x]/(xn−1), as defined
previously,
was that the polynomial xn−1 is not irreducible.
We might try using xn+1 instead.
The following holds: xn+1 is irreducible over Z if and only if n is a power of 2.
For some intuition, if n is divisible by an odd positive integer d, then
xn+1 is divisible by xdn+1.
So, we take Z[x]/(xn+1), where n is some power of 2.
Note that X differs in just one entry from
last time.
Matrices of the form Rot(a), as above, are sometimes called anti-cyclic or negacyclic.
If we have polynomials a=a0+a1x+...+an−1xn−1 and b=b0+b1x+...+bn−1xn−1,
the multiplication ab can be obtained by a matrix-vector product:
a(x)b(x)=Rot(a)[b0b1...bn−1]T
Let’s consider the multiplication of the following two polynomials:
a=a0+a1x+a2x2
b=b0+b1x+b2x2
In this case, we have n=3 (though in reality, we would need n to be a power of 2), so x3=−1.
For the sake of brevity (or perhaps out of laziness), let’s focus only on the constant coefficient.
We will see below that we obtain the same result when multiplying a(x) and b(x).
Again, I am ignoring the non-constant coefficients (represented by three dots).
The matrix A∈Zq6×6 has some structure—the blocks are negacylic matrices.
The strange thing is (at least to me) that the SIS problem is not easier
due to this structure; it is still difficult to find a short
vector s such that:
As=0modq
But we can think of A as follows:
a(x)=a0+a1x+a2x2
b(x)=b0+b1x+b2x2
c(x)=c0+c1x+c2x2
d(x)=d0+d1x+d2x2
A=(Rot(a)Rot(c)Rot(b)Rot(d))
To store A, we only need 4 polynomials—specifically, 3 elements
from Zq for each block (instead of 9 with an unstructured matrix).
But that’s not all; we can also apply a much faster algorithm for the multiplication.
When we, for example, multiply Rot(a)e(x), where
e(x)=e0+e1x+e2x2, we are actually
multiplying a(x)e(x), and we can use the NTT for this, which
means O(nlog(n)) operations instead of O(n2).
where modqR means reducing the coefficients of the result of the polynomial multiplication modulo q.
As in the
previous case, finding a collision for this hash function is equivalent
to solving Ring-SIS, now over this new ring, R=Z[x]/(xn+1).
It turns out, Ring-SIS is in fact hard over this ring,
under a reasonable worst-case complexity assumption.
Ideal lattices
An ideal I⊂R is an additive subgroup of a ring R that is closed
under multiplication by any element of the ring.
We can view I as a lattice by embedding R in Zn via the trivial
embedding that maps xi to the unit vector ei.
So, I can be viewed as a lattice in Zn that is invariant under the linear
transformation X. This means I⊂Zn is a lattice such that
(y1,...,yn)T∈I if and only if (−yn,y1,...,yn−1)T∈I.
Let’s now take a look at successive minima:
Definition:
Let L be a lattice of rank n. The successive minima of L are
λ1,...,λn such that, for 1≤i≤n, λi
is minimal such that there exist i linearly independent vectors
v1,...,vi∈L with ∣∣vj∣∣≤λi for 1≤j≤i.
The embedding of I into Zn allows us to consider the geometry
of an ideal I. We can define the l2 norm.
Non-zero lattice elements y∈I can be divided into groups of n linearly
independent vectors y,xy,x2y,...,xn−1y, all with the same length,
∣∣xiy∣∣=∣∣xjy∣∣.
Thus, it also holds: λ1(I)=λn(I).
Definition:
For a ring R (with an associated norm ∣∣⋅∣∣) and approximation factor
γ≥1, γ-IdealSVP over R is the approximate search problem
defined as follows. The input is (a basis for) an ideal lattice I over R.
The goal is to output a non-zero element y∈I with ∣∣y∣∣≤γλ1(I)∣∣.
Peikert and Rosen, and independently Lyubashevsky and Micciancio, proved the following
result:
Theorem:
For n any power of 2, integer l≥1, and integer modulus
q≥2n2l, γ-Ideal SVP over R=Z[x]/(xn+1) can be
efficiently reduced to Ring-SIS over R, where γ=l⋅poly(n).
Theorem:
For integers l,q≥2, for n power of 2, and an error distribution χ
over short elements in R, the (average-case, search) Ring-LWE problem is defined
as follows. The input is a1,..,an∈Rq sampled independently and uniformly
at random together with b1,...,bn∈Rq, where bi:=ais+eimodqR
for s∈Rq, and ei∼χ. The goal is to output s.
Let’s take a look at the example of public key encryption based on Ring-LWE.
The secret key is a short secret s∼χ (short usually means it’s from
R{−1,0,1}). The public key is (a^,y), where a^∈Rq
is chosen uniformly at random, and y:=a^s+emod;qR, where e∼χ.
To encrypt m∈Rq, compute
(a,b)=(a^r+xmodq,yr+x′+⌊q/2⌉mmodq)
for r,x,x′∼χ.
To decrypt (a,b), compute b−asmodqR=⌊q/2⌉m+er+x′−xsmodq.
Round each coefficient to either q/2 or 0, whichever is closest, and interpret
0 as 0 and q/2 as 1.
Note that in
LWE-encryption, only one bit is encrypted at a time.