From 79cabb3d8d7cb61a618046167a91bbb8fd5c2857 Mon Sep 17 00:00:00 2001 From: therealyingtong Date: Fri, 9 Oct 2020 12:21:06 +0800 Subject: [PATCH] Move random scaling of MSM into multiopen verifier Co-authored-by: Sean Bowe --- src/poly/multiopen/verifier.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/poly/multiopen/verifier.rs b/src/poly/multiopen/verifier.rs index 36ba1aa..4b1f193 100644 --- a/src/poly/multiopen/verifier.rs +++ b/src/poly/multiopen/verifier.rs @@ -25,11 +25,16 @@ impl<'a, C: CurveAffine> Proof { transcript: &mut HBase, transcript_scalar: &mut HScalar, queries: I, - msm: MSM<'a, C>, + mut msm: MSM<'a, C>, ) -> Result, Error> where I: IntoIterator> + Clone, { + // Scale the MSM by a random factor to ensure that if the existing MSM + // has is_zero() == false then this argument won't be able to interfere + // with it to make it true, with high probability. + msm.scale(C::Scalar::random()); + // Sample x_4 for compressing openings at the same points together let x_4: C::Scalar = get_challenge_scalar(Challenge(transcript.squeeze().get_lower_128()));