Skip to content

Commit

Permalink
implement absorb for Ligero pp
Browse files Browse the repository at this point in the history
  • Loading branch information
mmagician committed Jun 24, 2024
1 parent 30faef0 commit 35eae27
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions poly-commit/src/linear_codes/ligero.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use crate::{
use ark_crypto_primitives::{
crh::{CRHScheme, TwoToOneCRHScheme},
merkle_tree::{Config, LeafParam, TwoToOneParam},
sponge::Absorb,
};
use ark_ff::PrimeField;
use ark_std::{log2, marker::PhantomData};
Expand Down Expand Up @@ -96,6 +97,23 @@ where
}
}

impl<F, C, H> Absorb for LigeroPCParams<F, C, H>
where
F: PrimeField,
C: Config,
H: CRHScheme,
{
fn to_sponge_bytes(&self, dest: &mut Vec<u8>) {

Check failure on line 106 in poly-commit/src/linear_codes/ligero.rs

View workflow job for this annotation

GitHub Actions / Check no_std

cannot find type `Vec` in this scope
self.sec_param.to_sponge_bytes(dest);
self.rho_inv.to_sponge_bytes(dest);
}

fn to_sponge_field_elements<F2: PrimeField>(&self, dest: &mut Vec<F2>) {

Check failure on line 111 in poly-commit/src/linear_codes/ligero.rs

View workflow job for this annotation

GitHub Actions / Check no_std

cannot find type `Vec` in this scope
self.sec_param.to_sponge_field_elements(dest);
self.rho_inv.to_sponge_field_elements(dest);
}
}

impl<F, C, H> LinCodeParametersInfo<C, H> for LigeroPCParams<F, C, H>
where
F: PrimeField,
Expand Down

0 comments on commit 35eae27

Please sign in to comment.