From 0f93d31b3d79cd059b8d2c8e36169b7c564bead0 Mon Sep 17 00:00:00 2001 From: Nicolas Sarlin Date: Mon, 19 Aug 2024 17:19:29 +0200 Subject: [PATCH] chore(zk): use pke v2 for zk --- tfhe/src/core_crypto/algorithms/lwe_encryption.rs | 2 +- .../core_crypto/algorithms/lwe_zero_knowledge_verification.rs | 2 +- tfhe/src/zk.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tfhe/src/core_crypto/algorithms/lwe_encryption.rs b/tfhe/src/core_crypto/algorithms/lwe_encryption.rs index 6ae1ce2e89..72c3c5f103 100644 --- a/tfhe/src/core_crypto/algorithms/lwe_encryption.rs +++ b/tfhe/src/core_crypto/algorithms/lwe_encryption.rs @@ -16,7 +16,7 @@ use crate::core_crypto::commons::traits::*; use crate::core_crypto::entities::*; use rayon::prelude::*; #[cfg(feature = "zk-pok")] -use tfhe_zk_pok::proofs::pke::{commit, prove}; +use tfhe_zk_pok::proofs::pke_v2::{commit, prove}; /// Convenience function to share the core logic of the LWE encryption between all functions needing /// it. diff --git a/tfhe/src/core_crypto/algorithms/lwe_zero_knowledge_verification.rs b/tfhe/src/core_crypto/algorithms/lwe_zero_knowledge_verification.rs index 2f0e2d4a57..62e40fa7f6 100644 --- a/tfhe/src/core_crypto/algorithms/lwe_zero_knowledge_verification.rs +++ b/tfhe/src/core_crypto/algorithms/lwe_zero_knowledge_verification.rs @@ -1,7 +1,7 @@ use crate::core_crypto::entities::{LweCompactCiphertextList, LweCompactPublicKey}; use crate::core_crypto::prelude::{CastFrom, Container, LweCiphertext, UnsignedInteger}; use crate::zk::{CompactPkeProof, CompactPkePublicParams, ZkVerificationOutCome}; -use tfhe_zk_pok::proofs::pke::{verify, PublicCommit}; +use tfhe_zk_pok::proofs::pke_v2::{verify, PublicCommit}; /// Verifies with the given proof that a [`LweCompactCiphertextList`] /// is valid. diff --git a/tfhe/src/zk.rs b/tfhe/src/zk.rs index f044c1f748..1c0f30e92f 100644 --- a/tfhe/src/zk.rs +++ b/tfhe/src/zk.rs @@ -4,7 +4,7 @@ use rand_core::RngCore; use std::cmp::Ordering; use std::collections::Bound; use std::fmt::Debug; -use tfhe_zk_pok::proofs::pke::crs_gen; +use tfhe_zk_pok::proofs::pke_v2::crs_gen; pub use tfhe_zk_pok::proofs::ComputeLoad as ZkComputeLoad; pub use tfhe_zk_pok::{CanonicalDeserialize, CanonicalSerialize, Compress, Validate};