Files
tfhe-rs/tfhe/src/shortint/parameters/meta.rs
Thomas Montaigu 18159d6458 chore(MetaParameters)!: move re-rand ksk params in
Re-Randomization is something that requires a
dedicated public key.

Thus we move the parameters of the KSK
into the struct for dedicated PKE parameters

BREAKING CHANGE: This is breaking change regarding the latest alpha
released. But MetaParameters did not seem to be used directly in
fhevm/kms
2025-10-06 16:47:13 +02:00

32 lines
1.4 KiB
Rust

use crate::shortint::parameters::{
Backend, CompactPublicKeyEncryptionParameters, CompressionParameters,
MetaNoiseSquashingParameters, ShortintKeySwitchingParameters,
};
use crate::shortint::AtomicPatternParameters;
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct DedicatedCompactPublicKeyParameters {
/// Parameters used by the dedicated compact public key
pub pke_params: CompactPublicKeyEncryptionParameters,
/// Parameters used to key switch from the compact public key
/// parameters to compute parameters
pub ksk_params: ShortintKeySwitchingParameters,
/// Parameters to key switch from the compact public key
/// to rerand state
pub re_randomization_parameters: Option<ShortintKeySwitchingParameters>,
}
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct MetaParameters {
pub backend: Backend,
/// The parameters used by ciphertext when doing computations
pub compute_parameters: AtomicPatternParameters,
/// Parameters when using a dedicated compact public key
/// (For smaller and more efficient CompactCiphertextList)
pub dedicated_compact_public_key_parameters: Option<DedicatedCompactPublicKeyParameters>,
/// Parameters for compression CompressedCiphertextList
pub compression_parameters: Option<CompressionParameters>,
/// Parameters for noise squashing
pub noise_squashing_parameters: Option<MetaNoiseSquashingParameters>,
}