Skip to content

Commit

Permalink
Update halo2_proofs/src/poly/kzg/commitment.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Han <[email protected]>
  • Loading branch information
chiro-hiro and han0110 authored Sep 20, 2023
1 parent 8458569 commit 80b4a03
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion halo2_proofs/src/poly/kzg/commitment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ where
};

let mut g_lagrange_projective = vec![E::G1::identity(); n as usize];
let root = E::Scalar::ROOT_OF_UNITY.pow_vartime([1 << (E::Scalar::S - k)]);
let mut root = E::Scalar::ROOT_OF_UNITY;
for _ in k..E::Scalar::S {
root = root.square();
}
let n_inv = E::Scalar::from(n)
.invert()
.expect("inversion should be ok for n = 1<<k");
Expand Down

0 comments on commit 80b4a03

Please sign in to comment.