concrete_core/specification/entities/
lwe_seeded_keyswitch_key.rs

1use crate::commons::math::random::CompressionSeed;
2use crate::prelude::{DecompositionBaseLog, DecompositionLevelCount, LweDimension};
3use crate::specification::entities::markers::LweSeededKeyswitchKeyKind;
4use crate::specification::entities::AbstractEntity;
5
6/// A trait implemented by types embodying a seeded LWE keyswitch key.
7///
8/// # Formal Definition
9///
10/// ## Seeded Key Switching Key
11///
12/// TODO
13pub trait LweSeededKeyswitchKeyEntity: AbstractEntity<Kind = LweSeededKeyswitchKeyKind> {
14    /// Returns the input LWE dimension of the key.
15    fn input_lwe_dimension(&self) -> LweDimension;
16
17    /// Returns the output lew dimension of the key.
18    fn output_lwe_dimension(&self) -> LweDimension;
19
20    /// Returns the number of decomposition levels of the key.
21    fn decomposition_level_count(&self) -> DecompositionLevelCount;
22
23    /// Returns the logarithm of the base used in the key.
24    fn decomposition_base_log(&self) -> DecompositionBaseLog;
25
26    /// Returns the compression seed used to generate the mask of the LWE ciphertext during
27    /// encryption.
28    fn compression_seed(&self) -> CompressionSeed;
29}