diff --git a/poly-commit/src/linear_codes/ligero.rs b/poly-commit/src/linear_codes/ligero.rs index 51898dd1..7e36acdd 100644 --- a/poly-commit/src/linear_codes/ligero.rs +++ b/poly-commit/src/linear_codes/ligero.rs @@ -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}; @@ -96,6 +97,23 @@ where } } +impl Absorb for LigeroPCParams +where + F: PrimeField, + C: Config, + H: CRHScheme, +{ + fn to_sponge_bytes(&self, dest: &mut Vec) { + self.sec_param.to_sponge_bytes(dest); + self.rho_inv.to_sponge_bytes(dest); + } + + fn to_sponge_field_elements(&self, dest: &mut Vec) { + self.sec_param.to_sponge_field_elements(dest); + self.rho_inv.to_sponge_field_elements(dest); + } +} + impl LinCodeParametersInfo for LigeroPCParams where F: PrimeField,