Skip to content

Commit

Permalink
Fix transcript label
Browse files Browse the repository at this point in the history
  • Loading branch information
davxy committed Jun 1, 2024
1 parent de9ba92 commit e724349
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/ring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ pub type RingProof<S> = ring_proof::RingProof<BaseField<S>, Pcs<S>>;

pub type PiopParams<S> = ring_proof::PiopParams<BaseField<S>, CurveConfig<S>>;

const TRANSCRIPT_LABEL: &'static [u8] = b"";

#[derive(Clone, CanonicalSerialize, CanonicalDeserialize)]
pub struct Proof<S: RingSuite>
where
Expand Down Expand Up @@ -183,15 +185,15 @@ where
prover_key,
self.piop_params.clone(),
key_index,
merlin::Transcript::new(b""),
merlin::Transcript::new(TRANSCRIPT_LABEL),
)
}

pub fn verifier(&self, verifier_key: VerifierKey<S>) -> RingVerifier<S> {
RingVerifier::<S>::init(
verifier_key,
self.piop_params.clone(),
merlin::Transcript::new(b""),
merlin::Transcript::new(TRANSCRIPT_LABEL),
)
}
}
Expand Down Expand Up @@ -299,6 +301,6 @@ where
RingVerifier::<S>::init(
verifier_key,
piop_params,
merlin::Transcript::new(b"ring-vrf"),
merlin::Transcript::new(TRANSCRIPT_LABEL),
)
}

0 comments on commit e724349

Please sign in to comment.