mirror of
https://github.com/zama-ai/tfhe-rs.git
synced 2026-01-10 07:08:03 -05:00
feat(integer): construct proven ct list conformance from another source
- allows to use ZK parameters directly
This commit is contained in:
@@ -1008,6 +1008,16 @@ 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,
|
||||
@@ -1015,7 +1025,7 @@ impl IntegerProvenCompactCiphertextListConformanceParams {
|
||||
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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user