Skip to content

Commit

Permalink
Fix prover_state: should include full verifier's randomness (#78)
Browse files Browse the repository at this point in the history
Co-authored-by: Pratyush Mishra <[email protected]>
  • Loading branch information
mmagician and Pratyush authored Jan 31, 2024
1 parent a40f613 commit ea56f3a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/ml_sumcheck/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ impl<F: Field> MLSumcheck<F> {
prover_msgs.push(prover_msg);
verifier_msg = Some(IPForMLSumcheck::sample_round(fs_rng));
}
prover_state
.randomness
.push(verifier_msg.unwrap().randomness);

Ok((prover_msgs, prover_state))
}
Expand Down
3 changes: 2 additions & 1 deletion src/ml_sumcheck/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ fn test_polynomial_as_subprotocol(
let (poly, asserted_sum) =
random_list_of_products::<Fr, _>(nv, num_multiplicands_range, num_products, &mut rng);
let poly_info = poly.info();
let (proof, _prover_state) =
let (proof, prover_state) =
MLSumcheck::prove_as_subprotocol(prover_rng, &poly).expect("fail to prove");
let subclaim =
MLSumcheck::verify_as_subprotocol(verifier_rng, &poly_info, asserted_sum, &proof)
Expand All @@ -116,6 +116,7 @@ fn test_polynomial_as_subprotocol(
poly.evaluate(&subclaim.point) == subclaim.expected_evaluation,
"wrong subclaim"
);
assert_eq!(prover_state.randomness, subclaim.point);
}

#[test]
Expand Down

0 comments on commit ea56f3a

Please sign in to comment.