Skip to content

Commit

Permalink
fix check
Browse files Browse the repository at this point in the history
  • Loading branch information
brech1 committed Oct 16, 2024
1 parent a52f04e commit aea9656
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/kzg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ impl<E: Pairing> KZG<E> {

/// Commits to a polynomial.
pub fn commit(&self, p: &[E::ScalarField]) -> Result<E::G1, KZGError> {
if p.len() > self.g1_pow.len() {
return Err(KZGError::PolynomialTooLarge(p.len(), self.g1_pow.len()));
}

let mut commitment = E::G1::zero();

// commitment = sum(p[i] * g1_powers[i])
Expand Down

0 comments on commit aea9656

Please sign in to comment.