mirror of
https://github.com/arnaucube/sonobe.git
synced 2026-02-06 11:16:46 +01:00
Add CommitmentProver trait, and add KZG prover to it (#62)
* Add KZG commitment scheme adapted to vector commitment Add KZG commitment scheme adapted to vector commitment Also move the `src/pedersen.rs` into `src/commitment/pedersen.rs` where it will coexist with `kzg.rs` and the trait defined in `src/commitment/mod.rs`. * Adapt Pedersen into the new CommitmentProver trait * add CommitmentProver (Pedersen&KZG) homomorphic property test * polishing * Use divide_with_q_and_r, rename skip_first_zero_coeffs Co-authored-by: han0110 <tinghan0110@gmail.com> --------- Co-authored-by: han0110 <tinghan0110@gmail.com>
This commit is contained in:
@@ -213,7 +213,7 @@ where
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
let mut g_over_bhc = C::ScalarField::zero();
|
||||
for x in BooleanHypercube::new(ccs.s) {
|
||||
g_over_bhc += g.evaluate(&x).unwrap();
|
||||
g_over_bhc += g.evaluate(&x)?;
|
||||
}
|
||||
|
||||
// note: this is the sum of g(x) over the whole boolean hypercube
|
||||
@@ -378,7 +378,7 @@ pub mod tests {
|
||||
use ark_std::test_rng;
|
||||
use ark_std::UniformRand;
|
||||
|
||||
use crate::pedersen::Pedersen;
|
||||
use crate::commitment::pedersen::Pedersen;
|
||||
use ark_pallas::{Fr, Projective};
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user