Skip to content

Commit

Permalink
Hash and absorb
Browse files Browse the repository at this point in the history
  • Loading branch information
autquis committed Jan 23, 2024
1 parent c2e6412 commit ac4a14c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions poly-commit/src/hyrax/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,10 @@ where
}

// Absorbing public parameters
sponge.absorb(&serialize_to_vec!(*ck).map_err(|_| Error::TranscriptError)?);
sponge.absorb(
&Blake2s256::digest(serialize_to_vec!(*ck).map_err(|_| Error::TranscriptError)?)
.as_slice(),
);

// Absorbing the commitment to the polynomial
sponge.absorb(&serialize_to_vec!(com.row_coms).map_err(|_| Error::TranscriptError)?);
Expand Down Expand Up @@ -478,7 +481,10 @@ where
let t_prime: G = <G::Group as VariableBaseMSM>::msm_bigint(&row_coms, &l_bigint).into();

// Absorbing public parameters
sponge.absorb(&serialize_to_vec!(*vk).map_err(|_| Error::TranscriptError)?);
sponge.absorb(
&Blake2s256::digest(serialize_to_vec!(*vk).map_err(|_| Error::TranscriptError)?)
.as_slice(),
);

// Absorbing the commitment to the polynomial
sponge.absorb(&serialize_to_vec!(*row_coms).map_err(|_| Error::TranscriptError)?);
Expand Down

0 comments on commit ac4a14c

Please sign in to comment.