Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): rename LweCiphertextListParameters CiphertextListParameters #1628

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading