pub trait LweCiphertextVectorGlweCiphertextDiscardingPrivateFunctionalPackingKeyswitchEngine<LwePrivateFunctionalPackingKeyswitchKey, InputCiphertextVector, OutputCiphertext>: AbstractEnginewhere
    LwePrivateFunctionalPackingKeyswitchKey: LwePrivateFunctionalPackingKeyswitchKeyEntity,
    InputCiphertextVector: LweCiphertextVectorEntity,
    OutputCiphertext: GlweCiphertextEntity,
{ fn discard_private_functional_packing_keyswitch_lwe_ciphertext_vector(
        &mut self,
        output: &mut OutputCiphertext,
        input: &InputCiphertextVector,
        pfpksk: &LwePrivateFunctionalPackingKeyswitchKey
    ) -> Result<(), LweCiphertextVectorGlweCiphertextDiscardingPrivateFunctionalPackingKeyswitchError<Self::EngineError>>; unsafe fn discard_private_functional_packing_keyswitch_lwe_ciphertext_vector_unchecked(
        &mut self,
        output: &mut OutputCiphertext,
        input: &InputCiphertextVector,
        pfpksk: &LwePrivateFunctionalPackingKeyswitchKey
    ); }
Expand description

A trait for engines implementing private functional packing keyswitching (discarding) LWE ciphertext vectors into a GLWE ciphertext.

Semantics

This discarding operation fills the output GLWE ciphertext with the private functional packing keyswitch of the input LWE ciphertext vector, under the pfpksk private functional packing keyswitch key.

Formal Definition

The private functional packing keyswitch takes as input an [LWE ciphertext vector] (crate::specification::entities::LweCiphertextVectorEntity) $$\mathsf{CT} = (\mathsf{ct_1}, \mathsf{ct_2}, \cdots, \mathsf{ct_t}$$ where $$\mathsf{ct_i} = \left( \vec{a}_i , b\right) \in \mathsf{LWE}^n_{\vec{s}}( \mathsf{pt}_i)$$ (encrypted under some key s) along with an [LWE private functional Packing keyswitch Key] (crate::specification::entities::LwePrivateFunctionalPackingKeyswitchKeyEntity) (which privately encodes some function f) under the key K. The output is a GLWE ciphertext which encrypts the function f evaluated on the input LWE ciphertext vector. under the key K. In particular, f encodes multiplication by some polynomial p and so the output GLWE ciphertext encrypts: $(m_1 + m_2 X + … + m_t X^(t-1)) * p(X)$

A full description of the algorithm can be found in https://eprint.iacr.org/2017/430.pdf (pg.10)

Required Methods

Keyswitches an LWE ciphertext vector using a private functional packing keyswitch key.

Unsafely keyswitches an LWE ciphertext vector using a private functional packing keyswitch key.

Safety

For the general safety concerns regarding this operation, refer to the different variants of LweCiphertextVectorGlweCiphertextDiscardingPrivateFunctionalPackingKeyswitchError. For safety concerns specific to an engine, refer to the implementer safety section.

Implementors