This post picks up at the point of considering BGV (Brakerski, Gentry, Vaikuntanathan) encryption variants based on Ring-LWE. Thought it may seem natural to start by considering the BGV enciphering function, I will avoid discussing this since is actually quite simple in principle and essentially consists of polynomial mixing and sampling from an error distribution. Also, it is described well in a post on Windows on Theory by Boaz Barak and Zvika Brakerski that can be found here:
http://windowsontheory.org/2012/05/02/building-the-swiss-army-knife/
Instead, I’d like to delve into the plaintext algebra of the “Ring-LWE” BGV variant in order to understand the encoding / representation of plaintext bits in the scheme . In this post, we consider the idea of batched homomorphic operations and so called ‘plaintext slots’, along with some of the basic algebra that supports the specification of plaintext slots.
In particular, we consider the Ring-LWE BGV variant defined over rings of form:
where
is a parameter and
is the
cyclotomic polynomial whose roots are the primitive
roots of unity. The native plaintext space for this variant is taken to be the ring:
Note that the cyclotomic polynomial factors into r irreducible factors mod 2 (which follows partially from the fact that the cyclotomic extension is Galois) :
mod 2
Lets cover some background around Chinese Remaindering and homomorphisms of rings – Consider , a monic polynomial of degree N that splits into r distinct irreducible factors of degree d = N/r, viz.
. (In the case of
mod 2 we have
. Let
denote the ring
which is the quotient of modulo the ideal generated by
By the Chinese remainder theorem, there is the isomorphism:
So that is isomorphic to
copies of
(fields of
bit strings).
This captures central idea around the of batching homomorphic operations -We start by encoding individual bits in the distinct plaintext fields
. More precisely, we are not just confined to representing bits, but any element in the ring. For example, if 8 divides d, then we can represent a byte since in this case there is an embedding of
in
. Then, rather than evaluating functions on the individual bits or ring elements, we use the isomorphism above and work in the ring
. Evaluating a function once in
implicitly evaluates the function in parallel over the
distinct plaintext spaces
. The ring
is typically referred to as the “aggregate” plaintext space in BGV, and the sub-rings
are referred to as the “embedded” plaintext spaces or “slots”.