Skip to content

Commit

Permalink
Add commitment to public b vector, to remediate frozen heart vulnerab…
Browse files Browse the repository at this point in the history
…ility
  • Loading branch information
cathieyun committed Dec 27, 2022
1 parent 6fb4135 commit be35e83
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/linear_proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ impl LinearProof {

transcript.innerproduct_domain_sep(n as u64);
transcript.append_point(b"C", &C);
for i in 0..n {
transcript.append_scalar(b"b_i", &b[i]);
}

let lg_n = n.next_power_of_two().trailing_zeros() as usize;
let mut L_vec = Vec::with_capacity(lg_n);
Expand Down Expand Up @@ -165,7 +168,12 @@ impl LinearProof {
b_vec: Vec<Scalar>,
) -> Result<(), ProofError> {
transcript.innerproduct_domain_sep(n as u64);
assert_eq!(b_vec.len(), n);

transcript.append_point(b"C", &C);
for i in 0..n {
transcript.append_scalar(b"b_i", &b_vec[i]);
}
let (x_vec, x_inv_vec, b_0) = self.verification_scalars(n, transcript, b_vec)?;

transcript.append_point(b"S", &self.S);
Expand Down

0 comments on commit be35e83

Please sign in to comment.