diff --git a/common/src/prover.rs b/common/src/prover.rs index 480c6d3..dccb8c3 100644 --- a/common/src/prover.rs +++ b/common/src/prover.rs @@ -7,9 +7,9 @@ use fflonk::pcs::PCS; use crate::piop::ProverPiop; use crate::Proof; -use crate::transcript::Transcript; +use crate::transcript::PlonkTranscript; -pub struct PlonkProver, T: Transcript> { +pub struct PlonkProver, T: PlonkTranscript> { // Polynomial commitment scheme committer's key. pcs_ck: CS::CK, // Transcript, @@ -17,7 +17,7 @@ pub struct PlonkProver, T: Transcript> { transcript_prelude: T, } -impl, T: Transcript> PlonkProver { +impl, T: PlonkTranscript> PlonkProver { pub fn init(pcs_ck: CS::CK, verifier_key: impl CanonicalSerialize, //TODO: a type, empty_transcript: T) -> Self { diff --git a/common/src/transcript.rs b/common/src/transcript.rs index 38a6b70..47f25e2 100644 --- a/common/src/transcript.rs +++ b/common/src/transcript.rs @@ -7,7 +7,7 @@ use rand_core::RngCore; use crate::{ColumnsCommited, ColumnsEvaluated}; -pub trait Transcript>: Clone { +pub trait PlonkTranscript>: Clone { fn add_protocol_params(&mut self, domain: &GeneralEvaluationDomain, pcs_raw_vk: &::RVK) { self._add_serializable(b"domain", domain); self._add_serializable(b"pcs_raw_vk", pcs_raw_vk); diff --git a/common/src/verifier.rs b/common/src/verifier.rs index 25316b9..b35ec8c 100644 --- a/common/src/verifier.rs +++ b/common/src/verifier.rs @@ -7,9 +7,9 @@ use rand_core::RngCore; use crate::{ColumnsCommited, ColumnsEvaluated, Proof}; use crate::piop::VerifierPiop; -use crate::transcript::Transcript; +use crate::transcript::PlonkTranscript; -pub struct PlonkVerifier, T: Transcript> { +pub struct PlonkVerifier, T: PlonkTranscript> { // Polynomial commitment scheme verifier's key. pcs_vk: CS::VK, // Transcript, @@ -17,7 +17,7 @@ pub struct PlonkVerifier, T: Transcript> { transcript_prelude: T, } -impl, T: Transcript> PlonkVerifier { +impl, T: PlonkTranscript> PlonkVerifier { pub fn init(pcs_vk: ::VK, verifier_key: &impl CanonicalSerialize, empty_transcript: T) -> Self { diff --git a/ring/src/lib.rs b/ring/src/lib.rs index 0146016..e0bc2f0 100644 --- a/ring/src/lib.rs +++ b/ring/src/lib.rs @@ -50,7 +50,7 @@ pub fn hash_to_curve(message: &[u8]) -> A { #[derive(Clone)] pub struct ArkTranscript(ark_transcript::Transcript); -impl> common::transcript::Transcript for ArkTranscript { +impl> common::transcript::PlonkTranscript for ArkTranscript { fn _128_bit_point(&mut self, label: &'static [u8]) -> F { self.0.challenge(label).read_reduce() } diff --git a/ring/src/ring_prover.rs b/ring/src/ring_prover.rs index a416b3e..62fcfe8 100644 --- a/ring/src/ring_prover.rs +++ b/ring/src/ring_prover.rs @@ -3,7 +3,7 @@ use ark_ff::PrimeField; use fflonk::pcs::PCS; use common::prover::PlonkProver; -use common::transcript::Transcript; +use common::transcript::PlonkTranscript; use crate::piop::{FixedColumns, PiopProver, ProverKey}; use crate::piop::params::PiopParams; @@ -14,7 +14,7 @@ where F: PrimeField, CS: PCS, Curve: SWCurveConfig, - T: Transcript, + T: PlonkTranscript, { piop_params: PiopParams, fixed_columns: FixedColumns>, @@ -28,7 +28,7 @@ where F: PrimeField, CS: PCS, Curve: SWCurveConfig, - T: Transcript, + T: PlonkTranscript, { pub fn init(prover_key: ProverKey>, piop_params: PiopParams, diff --git a/ring/src/ring_verifier.rs b/ring/src/ring_verifier.rs index b479c81..9879961 100644 --- a/ring/src/ring_verifier.rs +++ b/ring/src/ring_verifier.rs @@ -5,7 +5,7 @@ use fflonk::pcs::{PCS, RawVerifierKey}; use common::domain::EvaluatedDomain; use common::piop::VerifierPiop; -use common::transcript::Transcript; +use common::transcript::PlonkTranscript; use common::verifier::PlonkVerifier; use crate::piop::{FixedColumnsCommitted, PiopVerifier, VerifierKey}; @@ -17,7 +17,7 @@ where F: PrimeField, CS: PCS, Curve: SWCurveConfig, - T: Transcript, + T: PlonkTranscript, { piop_params: PiopParams, fixed_columns_committed: FixedColumnsCommitted, @@ -29,7 +29,7 @@ where F: PrimeField, CS: PCS, Curve: SWCurveConfig, - T: Transcript, + T: PlonkTranscript, { pub fn init(verifier_key: VerifierKey, piop_params: PiopParams,