concrete-core 1.0.2

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

/// A trait implemented by types embodying a packing keyswitch key.
///
/// # Formal Definition
pub trait LwePackingKeyswitchKeyEntity: AbstractEntity<Kind = LwePackingKeyswitchKeyKind> {
    /// Returns the input LWE dimension of the key.
    fn input_lwe_dimension(&self) -> LweDimension;

    /// Returns the output GLWE dimension of the key.
    fn output_glwe_dimension(&self) -> GlweDimension;

    /// Returns the output polynomial degree of the key.
    fn output_polynomial_size(&self) -> PolynomialSize;

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

    /// Returns the logarithm of the base used in the key.
    fn decomposition_base_log(&self) -> DecompositionBaseLog;
}