Remove aux_commitments computation from Prover; remove blinding factor when accumulator aux_evals

This commit is contained in:
therealyingtong 2020-09-18 22:51:48 +08:00 committed by Sean Bowe
parent c772801f8f
commit 24fe3fae29
No known key found for this signature in database
GPG Key ID: 95684257D8F8B031
3 changed files with 3 additions and 23 deletions

View File

@ -431,7 +431,7 @@ fn test_proving() {
// TODO: use meaningful value from recursion
let mut aux_commitments: Vec<EqAffine> = vec![];
for poly in &aux_lagrange_polys {
let commitment = params.commit_lagrange(poly, Blind::default());
let commitment = params.commit_lagrange(poly, Blind(Fp::zero()));
aux_commitments.push(commitment.to_affine());
}
@ -487,7 +487,7 @@ fn test_proving() {
let g_lagrange_poly = srs.domain.lagrange_from_vec(g_scalars.clone());
aux_lagrange_polys = vec![g_lagrange_poly.clone(); 1];
let g_commitment = params
.commit_lagrange(&g_lagrange_poly, Blind::default())
.commit_lagrange(&g_lagrange_poly, Blind(Fp::zero()))
.to_affine();
aux_commitments = vec![g_commitment; 1];
}

View File

@ -126,20 +126,6 @@ impl<C: CurveAffine> Proof<C> {
})
.collect();
// Compute commitments to auxiliary wire polynomials
let aux_commitments_projective: Vec<_> = aux_lagrange_polys
.iter()
.map(|poly| params.commit_lagrange(poly, Blind::default()))
.collect();
let mut aux_commitments = vec![C::zero(); aux_commitments_projective.len()];
C::Projective::batch_to_affine(&aux_commitments_projective, &mut aux_commitments);
let aux_commitments = aux_commitments;
drop(aux_commitments_projective);
for commitment in &aux_commitments {
hash_point(&mut transcript, commitment)?;
}
let aux_polys: Vec<_> = aux_lagrange_polys
.clone()
.into_iter()
@ -538,7 +524,7 @@ impl<C: CurveAffine> Proof<C> {
accumulate(
point_index,
&aux_polys[wire.0],
Blind::default(),
Blind(C::Scalar::zero()),
aux_evals[query_index],
);
}

View File

@ -34,12 +34,6 @@ impl<'a, C: CurveAffine> Proof<C> {
.expect("proof cannot contain points at infinity");
}
// Hash the external auxiliary commitments into the transcript
for commitment in &aux_commitments {
hash_point(&mut transcript, commitment)
.expect("proof cannot contain points at infinity");
}
// Sample x_0 challenge
let x_0: C::Scalar = get_challenge_scalar(Challenge(transcript.squeeze().get_lower_128()));