mirror of
https://github.com/zama-ai/tfhe-rs.git
synced 2026-01-08 22:28:01 -05:00
fix(zk-pok): missing Versionize for ComputeLoadProofFields
This commit is contained in:
committed by
Nicolas Sarlin
parent
3dcb982a0b
commit
ae3e5f1a32
@@ -62,8 +62,8 @@ pub enum ProofVersions<G: Curve> {
|
||||
}
|
||||
|
||||
#[derive(VersionsDispatch)]
|
||||
#[allow(dead_code)]
|
||||
pub(crate) enum ComputeLoadProofFieldVersions<G: Curve> {
|
||||
pub(crate) enum ComputeLoadProofFieldsVersions<G: Curve> {
|
||||
#[allow(dead_code)]
|
||||
V0(ComputeLoadProofFields<G>),
|
||||
}
|
||||
|
||||
@@ -132,11 +132,11 @@ where
|
||||
}
|
||||
|
||||
#[derive(VersionsDispatch)]
|
||||
#[allow(dead_code)]
|
||||
pub(crate) enum CompressedComputeLoadProofFieldsVersions<G: Curve>
|
||||
where
|
||||
G::G1: Compressible,
|
||||
G::G2: Compressible,
|
||||
{
|
||||
#[allow(dead_code)]
|
||||
V0(CompressedComputeLoadProofFields<G>),
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
use super::*;
|
||||
use crate::backward_compatibility::pke_v2::{CompressedProofVersions, ProofVersions};
|
||||
use crate::backward_compatibility::pke_v2::*;
|
||||
use crate::backward_compatibility::BoundVersions;
|
||||
use crate::curve_api::{CompressedG1, CompressedG2};
|
||||
use crate::four_squares::*;
|
||||
@@ -29,7 +29,7 @@ fn bit_iter(x: u64, nbits: u32) -> impl Iterator<Item = bool> {
|
||||
serialize = "PublicParams<G>: Into<SerializablePKEv2PublicParams>"
|
||||
)
|
||||
)]
|
||||
#[versionize(convert = SerializablePKEv2PublicParams)]
|
||||
#[versionize(try_convert = SerializablePKEv2PublicParams)]
|
||||
pub struct PublicParams<G: Curve> {
|
||||
pub(crate) g_lists: GroupElements<G>,
|
||||
pub(crate) D: usize,
|
||||
@@ -299,7 +299,8 @@ impl<G: Curve> Proof<G> {
|
||||
|
||||
/// These fields can be pre-computed on the prover side in the faster Verifier scheme. If that's the
|
||||
/// case, they should be included in the proof.
|
||||
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
|
||||
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Versionize)]
|
||||
#[versionize(ComputeLoadProofFieldsVersions)]
|
||||
pub(crate) struct ComputeLoadProofFields<G: Curve> {
|
||||
pub(crate) C_hat_h3: G::G2,
|
||||
pub(crate) C_hat_w: G::G2,
|
||||
@@ -331,11 +332,12 @@ where
|
||||
pub(crate) compute_load_proof_fields: Option<CompressedComputeLoadProofFields<G>>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
#[derive(Serialize, Deserialize, Versionize)]
|
||||
#[serde(bound(
|
||||
deserialize = "G: Curve, CompressedG1<G>: serde::Deserialize<'de>, CompressedG2<G>: serde::Deserialize<'de>",
|
||||
serialize = "G: Curve, CompressedG1<G>: serde::Serialize, CompressedG2<G>: serde::Serialize"
|
||||
))]
|
||||
#[versionize(CompressedComputeLoadProofFieldsVersions)]
|
||||
pub(crate) struct CompressedComputeLoadProofFields<G: Curve>
|
||||
where
|
||||
G::G1: Compressible,
|
||||
|
||||
Reference in New Issue
Block a user