mirror of
https://github.com/saymrwulf/pasta_curves-source.git
synced 2026-09-04 20:03:39 +00:00
Change absorb_ to read_ in subprotocols.
This commit is contained in:
parent
9a26ef1acd
commit
775151a67d
4 changed files with 8 additions and 8 deletions
|
|
@ -30,7 +30,7 @@ pub struct Evaluated<C: CurveAffine> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Argument {
|
impl Argument {
|
||||||
pub(in crate::plonk) fn absorb_permuted_commitments<C: CurveAffine, T: TranscriptRead<C>>(
|
pub(in crate::plonk) fn read_permuted_commitments<C: CurveAffine, T: TranscriptRead<C>>(
|
||||||
&self,
|
&self,
|
||||||
transcript: &mut T,
|
transcript: &mut T,
|
||||||
) -> Result<PermutationCommitments<C>, Error> {
|
) -> Result<PermutationCommitments<C>, Error> {
|
||||||
|
|
@ -49,7 +49,7 @@ impl Argument {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<C: CurveAffine> PermutationCommitments<C> {
|
impl<C: CurveAffine> PermutationCommitments<C> {
|
||||||
pub(in crate::plonk) fn absorb_product_commitment<T: TranscriptRead<C>>(
|
pub(in crate::plonk) fn read_product_commitment<T: TranscriptRead<C>>(
|
||||||
self,
|
self,
|
||||||
transcript: &mut T,
|
transcript: &mut T,
|
||||||
) -> Result<Committed<C>, Error> {
|
) -> Result<Committed<C>, Error> {
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ pub struct Evaluated<C: CurveAffine> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Argument {
|
impl Argument {
|
||||||
pub(crate) fn absorb_product_commitment<C: CurveAffine, T: TranscriptRead<C>>(
|
pub(crate) fn read_product_commitment<C: CurveAffine, T: TranscriptRead<C>>(
|
||||||
&self,
|
&self,
|
||||||
transcript: &mut T,
|
transcript: &mut T,
|
||||||
) -> Result<Committed<C>, Error> {
|
) -> Result<Committed<C>, Error> {
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ pub struct Evaluated<C: CurveAffine> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<C: CurveAffine> Argument<C> {
|
impl<C: CurveAffine> Argument<C> {
|
||||||
pub(in crate::plonk) fn absorb_commitments<T: TranscriptRead<C>>(
|
pub(in crate::plonk) fn read_commitments<T: TranscriptRead<C>>(
|
||||||
vk: &VerifyingKey<C>,
|
vk: &VerifyingKey<C>,
|
||||||
transcript: &mut T,
|
transcript: &mut T,
|
||||||
) -> Result<Committed<C>, Error> {
|
) -> Result<Committed<C>, Error> {
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ pub fn verify_proof<'a, C: CurveAffine, T: TranscriptRead<C>>(
|
||||||
.cs
|
.cs
|
||||||
.lookups
|
.lookups
|
||||||
.iter()
|
.iter()
|
||||||
.map(|argument| argument.absorb_permuted_commitments(transcript))
|
.map(|argument| argument.read_permuted_commitments(transcript))
|
||||||
.collect::<Result<Vec<_>, _>>()?;
|
.collect::<Result<Vec<_>, _>>()?;
|
||||||
|
|
||||||
// Sample beta challenge
|
// Sample beta challenge
|
||||||
|
|
@ -58,19 +58,19 @@ pub fn verify_proof<'a, C: CurveAffine, T: TranscriptRead<C>>(
|
||||||
.cs
|
.cs
|
||||||
.permutations
|
.permutations
|
||||||
.iter()
|
.iter()
|
||||||
.map(|argument| argument.absorb_product_commitment(transcript))
|
.map(|argument| argument.read_product_commitment(transcript))
|
||||||
.collect::<Result<Vec<_>, _>>()?;
|
.collect::<Result<Vec<_>, _>>()?;
|
||||||
|
|
||||||
// Hash each lookup product commitment
|
// Hash each lookup product commitment
|
||||||
let lookups = lookups
|
let lookups = lookups
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|lookup| lookup.absorb_product_commitment(transcript))
|
.map(|lookup| lookup.read_product_commitment(transcript))
|
||||||
.collect::<Result<Vec<_>, _>>()?;
|
.collect::<Result<Vec<_>, _>>()?;
|
||||||
|
|
||||||
// Sample y challenge, which keeps the gates linearly independent.
|
// Sample y challenge, which keeps the gates linearly independent.
|
||||||
let y = ChallengeY::get(transcript);
|
let y = ChallengeY::get(transcript);
|
||||||
|
|
||||||
let vanishing = vanishing::Argument::absorb_commitments(vk, transcript)?;
|
let vanishing = vanishing::Argument::read_commitments(vk, transcript)?;
|
||||||
|
|
||||||
// Sample x challenge, which is used to ensure the circuit is
|
// Sample x challenge, which is used to ensure the circuit is
|
||||||
// satisfied with high probability.
|
// satisfied with high probability.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue