Skip to content

Commit

Permalink
feat(halo2_proofs): implement From<&[u8;32]> for Challeng255
Browse files Browse the repository at this point in the history
  • Loading branch information
chokobole committed Jan 15, 2024
1 parent 8e61a59 commit 6bf4e0a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions halo2_proofs/src/transcript.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,12 @@ impl<C: CurveAffine> std::ops::Deref for Challenge255<C> {
}
}

impl<C: CurveAffine> From<&[u8; 32]> for Challenge255<C> {
fn from(value: &[u8; 32]) -> Self {
Challenge255(*value, PhantomData)
}
}

impl<C: CurveAffine> EncodedChallenge<C> for Challenge255<C> {
type Input = [u8; 64];

Expand Down

0 comments on commit 6bf4e0a

Please sign in to comment.