Implement HyperNova's AugmentedFCircuit (#112)

- add LCCCS.hash methods (native & r1cs)
- add HyperNova's AugmentedFCircuit with tests
This commit is contained in:
arnaucube
2024-06-19 16:31:15 +02:00
committed by GitHub
parent bdfaa66ecb
commit fd942bda71
6 changed files with 760 additions and 113 deletions

View File

@@ -1,6 +1,27 @@
/// Implements the scheme described in [HyperNova](https://eprint.iacr.org/2023/573.pdf)
use crate::ccs::CCS;
use ark_ff::PrimeField;
pub mod cccs;
pub mod circuits;
pub mod lcccs;
pub mod nimfs;
pub mod utils;
/// Witness for the LCCCS & CCCS, containing the w vector, and the r_w used as randomness in the Pedersen commitment.
#[derive(Debug, Clone, Eq, PartialEq)]
pub struct Witness<F: PrimeField> {
pub w: Vec<F>,
pub r_w: F,
}
impl<F: PrimeField> Witness<F> {
pub fn new(w: Vec<F>) -> Self {
// note: at the current version, we don't use the blinding factors and we set them to 0
// always.
Self { w, r_w: F::zero() }
}
pub fn dummy(ccs: &CCS<F>) -> Self {
Witness::<F>::new(vec![F::zero(); ccs.n - ccs.l - 1])
}
}