From 1ed268169f71f6f1941ad8d3f82d14cdccd99615 Mon Sep 17 00:00:00 2001 From: Nicolas Sarlin Date: Wed, 25 Sep 2024 18:07:45 +0200 Subject: [PATCH] feat(zk): impl Named for zk pke proof and Params --- tfhe/src/zk.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tfhe/src/zk.rs b/tfhe/src/zk.rs index 8b4ccd0081..629c95a527 100644 --- a/tfhe/src/zk.rs +++ b/tfhe/src/zk.rs @@ -1,5 +1,6 @@ use crate::core_crypto::commons::math::random::BoundedDistribution; use crate::core_crypto::prelude::*; +use crate::named::Named; use rand_core::RngCore; use std::cmp::Ordering; use std::collections::Bound; @@ -10,8 +11,17 @@ pub use tfhe_zk_pok::curve_api::Compressible; pub use tfhe_zk_pok::proofs::ComputeLoad as ZkComputeLoad; type Curve = tfhe_zk_pok::curve_api::Bls12_446; pub type CompactPkeProof = tfhe_zk_pok::proofs::pke::Proof; + +impl Named for CompactPkeProof { + const NAME: &'static str = "zk::CompactPkeProof"; +} + pub type CompactPkePublicParams = tfhe_zk_pok::proofs::pke::PublicParams; +impl Named for CompactPkePublicParams { + const NAME: &'static str = "zk::CompactPkePublicParams"; +} + #[derive(Copy, Clone, Eq, PartialEq)] pub enum ZkVerificationOutCome { /// The proof ands its entity were valid