Skip to content

Commit

Permalink
feat(integer): construct proven ct list conformance from another source
Browse files Browse the repository at this point in the history
- allows to use ZK parameters directly
  • Loading branch information
IceTDrinker committed Oct 8, 2024
1 parent 81edfbc commit b2c8338
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tfhe/src/integer/ciphertext/compact_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1008,14 +1008,24 @@ impl IntegerProvenCompactCiphertextListConformanceParams {
pub fn from_crs_and_parameters(
value: CompactPublicKeyEncryptionParameters,
crs_params: &CompactPkeCrs,
) -> Self {
Self::from_public_key_encryption_parameters_and_crs_parameters(
value,
crs_params.public_params(),
)
}

pub fn from_public_key_encryption_parameters_and_crs_parameters(
value: CompactPublicKeyEncryptionParameters,
crs_params: &crate::zk::CompactPkePublicParams,
) -> Self {
Self {
encryption_lwe_dimension: value.encryption_lwe_dimension,
message_modulus: value.message_modulus,
carry_modulus: value.carry_modulus,
ciphertext_modulus: value.ciphertext_modulus,
expansion_kind: value.expansion_kind,
max_elements_per_compact_list: crs_params.public_params().k,
max_elements_per_compact_list: crs_params.k,
}
}
}
Expand Down

0 comments on commit b2c8338

Please sign in to comment.