pub trait LweBootstrapKeyGenerationEngine<LweSecretKey, GlweSecretKey, BootstrapKey>: AbstractEnginewhere
BootstrapKey: LweBootstrapKeyEntity,
LweSecretKey: LweSecretKeyEntity,
GlweSecretKey: GlweSecretKeyEntity,{
fn generate_new_lwe_bootstrap_key(
&mut self,
input_key: &LweSecretKey,
output_key: &GlweSecretKey,
decomposition_base_log: DecompositionBaseLog,
decomposition_level_count: DecompositionLevelCount,
noise: Variance
) -> Result<BootstrapKey, LweBootstrapKeyGenerationError<Self::EngineError>>;
unsafe fn generate_new_lwe_bootstrap_key_unchecked(
&mut self,
input_key: &LweSecretKey,
output_key: &GlweSecretKey,
decomposition_base_log: DecompositionBaseLog,
decomposition_level_count: DecompositionLevelCount,
noise: Variance
) -> BootstrapKey;
}
Expand description
A trait for engines generating new LWE bootstrap keys.
Semantics
This pure operation generates a new LWE bootstrap key from the
input_key
LWE secret key, and the output_key
GLWE secret key.
Formal Definition
cf here
Required Methods
sourcefn generate_new_lwe_bootstrap_key(
&mut self,
input_key: &LweSecretKey,
output_key: &GlweSecretKey,
decomposition_base_log: DecompositionBaseLog,
decomposition_level_count: DecompositionLevelCount,
noise: Variance
) -> Result<BootstrapKey, LweBootstrapKeyGenerationError<Self::EngineError>>
fn generate_new_lwe_bootstrap_key(
&mut self,
input_key: &LweSecretKey,
output_key: &GlweSecretKey,
decomposition_base_log: DecompositionBaseLog,
decomposition_level_count: DecompositionLevelCount,
noise: Variance
) -> Result<BootstrapKey, LweBootstrapKeyGenerationError<Self::EngineError>>
Generates a new LWE bootstrap key.
sourceunsafe fn generate_new_lwe_bootstrap_key_unchecked(
&mut self,
input_key: &LweSecretKey,
output_key: &GlweSecretKey,
decomposition_base_log: DecompositionBaseLog,
decomposition_level_count: DecompositionLevelCount,
noise: Variance
) -> BootstrapKey
unsafe fn generate_new_lwe_bootstrap_key_unchecked(
&mut self,
input_key: &LweSecretKey,
output_key: &GlweSecretKey,
decomposition_base_log: DecompositionBaseLog,
decomposition_level_count: DecompositionLevelCount,
noise: Variance
) -> BootstrapKey
Unsafely generates a new LWE bootstrap key.
Safety
For the general safety concerns regarding this operation, refer to the different variants
of LweBootstrapKeyGenerationError
. For safety concerns specific to an engine, refer to
the implementer safety section.
Implementors
impl LweBootstrapKeyGenerationEngine<LweSecretKey32, GlweSecretKey32, LweBootstrapKey32> for DefaultEngine
Description:
Implementation of LweBootstrapKeyGenerationEngine
for DefaultEngine
that operates on
32 bits integers. It outputs a bootstrap key in the standard domain.
impl LweBootstrapKeyGenerationEngine<LweSecretKey32, GlweSecretKey32, LweBootstrapKey32> for DefaultParallelEngine
Description:
Implementation of LweBootstrapKeyGenerationEngine
for DefaultParallelEngine
that
operates on 32 bits integers. It outputs a bootstrap key in the standard domain.
impl LweBootstrapKeyGenerationEngine<LweSecretKey64, GlweSecretKey64, LweBootstrapKey64> for DefaultEngine
Description:
Implementation of LweBootstrapKeyGenerationEngine
for DefaultEngine
that operates on
64 bits integers. It outputs a bootstrap key in the standard domain.
impl LweBootstrapKeyGenerationEngine<LweSecretKey64, GlweSecretKey64, LweBootstrapKey64> for DefaultParallelEngine
Description:
Implementation of LweBootstrapKeyGenerationEngine
for DefaultParallelEngine
that
operates on 64 bits integers. It outputs a bootstrap key in the standard domain.