pub trait LweCiphertextDiscardingKeyswitchEngine<KeyswitchKey, InputCiphertext, OutputCiphertext>: AbstractEngine where
    KeyswitchKey: LweKeyswitchKeyEntity,
    InputCiphertext: LweCiphertextEntity<KeyDistribution = KeyswitchKey::InputKeyDistribution>,
    OutputCiphertext: LweCiphertextEntity<KeyDistribution = KeyswitchKey::OutputKeyDistribution>, 
{ fn discard_keyswitch_lwe_ciphertext(
        &mut self,
        output: &mut OutputCiphertext,
        input: &InputCiphertext,
        ksk: &KeyswitchKey
    ) -> Result<(), LweCiphertextDiscardingKeyswitchError<Self::EngineError>>;
unsafe fn discard_keyswitch_lwe_ciphertext_unchecked(
        &mut self,
        output: &mut OutputCiphertext,
        input: &InputCiphertext,
        ksk: &KeyswitchKey
    ); }
Expand description

A trait for engines keyswitching (discarding) LWE ciphertexts.

Semantics

This discarding operation fills the output LWE ciphertext with the keyswitch of the input LWE ciphertext, using the ksk LWE keyswitch key.

Formal Definition

Required methods

Keyswitch an LWE ciphertext.

Unsafely keyswitch an LWE ciphertext.

Safety

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

Implementors