pub trait LweKeyswitchKeyCreationEngine<InputSecretKey, OutputSecretKey, KeyswitchKey>: AbstractEngine where
    InputSecretKey: LweSecretKeyEntity,
    OutputSecretKey: LweSecretKeyEntity,
    KeyswitchKey: LweKeyswitchKeyEntity<InputKeyDistribution = InputSecretKey::KeyDistribution, OutputKeyDistribution = OutputSecretKey::KeyDistribution>, 
{ fn create_lwe_keyswitch_key(
        &mut self,
        input_key: &InputSecretKey,
        output_key: &OutputSecretKey,
        decomposition_level_count: DecompositionLevelCount,
        decomposition_base_log: DecompositionBaseLog,
        noise: Variance
    ) -> Result<KeyswitchKey, LweKeyswitchKeyCreationError<Self::EngineError>>; unsafe fn create_lwe_keyswitch_key_unchecked(
        &mut self,
        input_key: &InputSecretKey,
        output_key: &OutputSecretKey,
        decomposition_level_count: DecompositionLevelCount,
        decomposition_base_log: DecompositionBaseLog,
        noise: Variance
    ) -> KeyswitchKey; }
Expand description

A trait for engines creating LWE keyswitch keys.

Semantics

This pure operation creates an LWE keyswitch key allowing to switch from the input_key LWE secret key to the output_key LWE secret key.

Formal Definition

cf here

Required Methods

Creates an LWE keyswitch key.

Unsafely creates an LWE keyswitch key.

Safety

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

Implementors