pub trait LweKeyswitchKeyEntity: AbstractEntity<Kind = LweKeyswitchKeyKind> {
fn input_lwe_dimension(&self) -> LweDimension;
fn output_lwe_dimension(&self) -> LweDimension;
fn decomposition_level_count(&self) -> DecompositionLevelCount;
fn decomposition_base_log(&self) -> DecompositionBaseLog;
}
Expand description
A trait implemented by types embodying an LWE keyswitch key.
Formal Definition
Key Switching Key
A key switching key is a vector of Lev ciphertexts (described on the bottom of
this page
).
It encrypts the coefficient of
the LWE secret key
$\vec{s}_{\mathsf{in}}$ under the
LWE secret key
$\vec{s}_{\mathsf{out}}$.
$$\mathsf{KSK}_{\vec{s}_{\mathsf{in}}\rightarrow \vec{s}_{\mathsf{out}}} = \left( \overline{\mathsf{ct}_0}, \cdots , \overline{\mathsf{ct}_{n_{\mathsf{in}}-1}}\right) \subseteq \mathbb{Z}_q^{(n_{\mathsf{out}}+1)\cdot n_{\mathsf{in}}}$$
where $\vec{s}_{\mathsf{in}} = \left( s_0 , \cdots , s_{\mathsf{in}-1} \right)$ and for all $0\le i <n_{\mathsf{in}}$ we have $\overline{\mathsf{ct}_i} \in \mathsf{Lev}_{\vec{s}_{\mathsf{out}}}^{\beta, \ell}\left(s_i\right)$.
Required Methods
sourcefn input_lwe_dimension(&self) -> LweDimension
fn input_lwe_dimension(&self) -> LweDimension
Returns the input LWE dimension of the key.
sourcefn output_lwe_dimension(&self) -> LweDimension
fn output_lwe_dimension(&self) -> LweDimension
Returns the output lew dimension of the key.
sourcefn decomposition_level_count(&self) -> DecompositionLevelCount
fn decomposition_level_count(&self) -> DecompositionLevelCount
Returns the number of decomposition levels of the key.
sourcefn decomposition_base_log(&self) -> DecompositionBaseLog
fn decomposition_base_log(&self) -> DecompositionBaseLog
Returns the logarithm of the base used in the key.