Let \(X\) be an integer, and \((x_n,...,x_0)\) binary decomposition
Goal: define packing technique so that we can assume that the scheme works over messages that are vectors in \(F^n_p\) despite the HE message space are polynomials in \(R=F_p[X]/(X^n + 1)\).
To this end we want define a bijection \((encode, decode)\) where
\(encode: F_p^n \to R=F_p[X]/(X^n + 1))\) s.t. \(\forall v_1, v_2 \in F^n_p: v_1\cdot v_2 = decode(encode(v_1) * encode(v_2))\)
Let \(z\) be an integer, \(n = 2^z\), \(m = 2 · n\), and \(p\) be a prime such that \(p = 1 \mod m\).
In this case, \((X^n + 1)\) splits over \(F_p\), i.e., \((X^n +1) = \prod_i F_i(X)\), where each \(F_i\) is a linear polynomial.
The \(encode\) function can be defined via CRT encoding as follows.
Given \(\vec v\), build a polynomial \(p(X)\) of degree \(n-1\) by solving the following system of equations
\[\forall i: p(X) = v_i \bmod F_i(X)\]
The \(decode\) function is the one that, on input a polynomial \(p(X)\), returns the vector
\[(p(X) \bmod F_1(X), \ldots, p(X) \bmod F_n(X))\]
Let us briefly see how the homomorphic property holds after a multiplication. Assume \(p_j(X) =encode(\vec v_j)\) for \(j=1,2\), and that \(p(X) = p_1(X)\cdot p_2(X) \bmod (X^n + 1)\). Namely, \(p(X) = p_1(X)\cdot p_2(X) - t(X) (X^n + 1)\) for some polynomial \(t(X)\).
Then
\[p(X) \bmod F_i(X) = p_1(X)\cdot p_2(X) - t(X) (X^n + 1) \bmod F_i(X) = \]
\[ p_1(X)\cdot p_2(X) \bmod F_i(X) = v_{1,i} \cdot v_{2,i}\]
(using the fact that \(X^n + 1 \mod F_i(X) = \prod_j F_j(X) \bmod F_i(X) = 0\))
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing