concrete-core 1.0.2

Concrete is a fully homomorphic encryption (FHE) library that implements Zama's variant of TFHE.
Documentation
use crate::commons::math::random::CompressionSeed;
use crate::prelude::{
    DecompositionBaseLog, DecompositionLevelCount, GlweDimension, LweDimension, PolynomialSize,
};
use crate::specification::entities::markers::LweSeededBootstrapKeyKind;
use crate::specification::entities::AbstractEntity;

/// A trait implemented by types embodying a seeded LWE bootstrap key.
///
/// # Formal Definition
///
/// ## Seeded Bootstrapping Key
///
/// TODO
pub trait LweSeededBootstrapKeyEntity: AbstractEntity<Kind = LweSeededBootstrapKeyKind> {
    /// Returns the GLWE dimension of the key.
    fn glwe_dimension(&self) -> GlweDimension;

    /// Returns the polynomial size of the key.
    fn polynomial_size(&self) -> PolynomialSize;

    /// Returns the input LWE dimension of the key.
    fn input_lwe_dimension(&self) -> LweDimension;

    /// Returns the output LWE dimension of the key.
    fn output_lwe_dimension(&self) -> LweDimension {
        LweDimension(self.glwe_dimension().0 * self.polynomial_size().0)
    }

    /// Returns the number of decomposition levels of the key.
    fn decomposition_base_log(&self) -> DecompositionBaseLog;

    /// Returns the logarithm of the base used in the key.
    fn decomposition_level_count(&self) -> DecompositionLevelCount;

    /// Returns the compression seed used to generate the seeded LWE bootstrap key during
    /// encryption.
    fn compression_seed(&self) -> CompressionSeed;
}