Skip to content

Commit

Permalink
feat(core): rename LweCiphertextListParameters CiphertextListParameters
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeul-zama committed Oct 4, 2024
1 parent 256378f commit 299cd7b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions tfhe/src/core_crypto/entities/lwe_compact_ciphertext_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,16 +334,16 @@ pub type LweCompactCiphertextListMutView<'data, Scalar> =
/// Can be used on a server to check if client inputs are well formed
/// before running a computation on them
#[derive(Copy, Clone)]
pub struct LweCiphertextListParameters<T: UnsignedInteger> {
pub struct CiphertextListParameters<T: UnsignedInteger> {
pub lwe_dim: LweDimension,
pub lwe_ciphertext_count_constraint: ListSizeConstraint,
pub ct_modulus: CiphertextModulus<T>,
}

impl<T: UnsignedInteger> ParameterSetConformant for LweCompactCiphertextListOwned<T> {
type ParameterSet = LweCiphertextListParameters<T>;
type ParameterSet = CiphertextListParameters<T>;

fn is_conformant(&self, param: &LweCiphertextListParameters<T>) -> bool {
fn is_conformant(&self, param: &CiphertextListParameters<T>) -> bool {
let Self {
data,
lwe_size,
Expand Down
4 changes: 2 additions & 2 deletions tfhe/src/shortint/ciphertext/zk.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use super::{Degree, NoiseLevel};
use crate::conformance::{ListSizeConstraint, ParameterSetConformant};
use crate::core_crypto::algorithms::verify_lwe_compact_ciphertext_list;
use crate::core_crypto::prelude::LweCiphertextListParameters;
use crate::core_crypto::prelude::CiphertextListParameters;
use crate::shortint::backward_compatibility::ciphertext::ProvenCompactCiphertextListVersions;
use crate::shortint::ciphertext::CompactCiphertextList;
use crate::shortint::parameters::{
Expand Down Expand Up @@ -249,7 +249,7 @@ impl ParameterSetConformant for ProvenCompactCiphertextList {
};

let params = CiphertextListConformanceParams {
ct_list_params: LweCiphertextListParameters {
ct_list_params: CiphertextListParameters {
lwe_dim: *encryption_lwe_dimension,
lwe_ciphertext_count_constraint: ListSizeConstraint::exact_size(expected_len),
ct_modulus: *ciphertext_modulus,
Expand Down
8 changes: 4 additions & 4 deletions tfhe/src/shortint/parameters/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ pub use crate::core_crypto::commons::parameters::{
};
use crate::core_crypto::fft_impl::fft64::crypto::bootstrap::BootstrapKeyConformanceParams;
use crate::core_crypto::prelude::{
GlweCiphertextConformanceParameters, KeyswitchKeyConformanceParams, LweCiphertextCount,
LweCiphertextListParameters, LweCiphertextParameters, MsDecompressionType,
CiphertextListParameters, GlweCiphertextConformanceParameters, KeyswitchKeyConformanceParams,
LweCiphertextCount, LweCiphertextParameters, MsDecompressionType,
};
use crate::shortint::backward_compatibility::parameters::*;
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -250,7 +250,7 @@ pub struct CompressedCiphertextConformanceParams {
/// before running a computation on them
#[derive(Copy, Clone)]
pub struct CiphertextListConformanceParams {
pub ct_list_params: LweCiphertextListParameters<u64>,
pub ct_list_params: CiphertextListParameters<u64>,
pub message_modulus: MessageModulus,
pub carry_modulus: CarryModulus,
pub degree: Degree,
Expand All @@ -264,7 +264,7 @@ impl CiphertextConformanceParams {
list_constraint: ListSizeConstraint,
) -> CiphertextListConformanceParams {
CiphertextListConformanceParams {
ct_list_params: LweCiphertextListParameters {
ct_list_params: CiphertextListParameters {
lwe_dim: self.ct_params.lwe_dim,
ct_modulus: self.ct_params.ct_modulus,
lwe_ciphertext_count_constraint: list_constraint,
Expand Down

0 comments on commit 299cd7b

Please sign in to comment.