BFV supports two encoding schemes: single value encoding and batch encoding. In this subsection, we will explain the single value encoding scheme.
Summary D-2.1 BFV Encoding
Input Integer: Decompose the input integer (i.e., 0 or any positive integer) as follows:
, where each
Encoded Polynomial:
Decoding:
Let’s analyze whether the encoding scheme in Summary D-2.1 ensures correct decoding after addition and multiplication. This is equivalent to showing that:
where is the encoding function
Let and . Then,
where
since decoding is evaluating the polynomial at
since evaluating at is computationally the same as splitting into and , evaluating and and summing them
Similarly, the decoding preserves correctness over multiplication as well:
where
since decoding is evaluating the polynomial at
since evaluating at is computationally the same as splitting into and , evaluating and and multiplying them
Therefore, the single value encoding scheme preserves the correctness of decoding after addition and multiplication.
The encoding scheme in Summary D-2.1 can be validly used for fully homomorphic encryption only if the multiplication of the encoded polynomials do not exceed the polynomial ring’s degree , because once the degree gets reduced due to an overflow, the evaluated values of polynomials lose consistency. Also, the coefficients of polynomials should not wrap modulo after additions or multiplications. Due to these constraints, the single value encoding is not a good choice for fully homomorphic encryption. Also, the single value encoding is computationally inefficient, because each polynomial can encode only a single value even if it holds coefficients.