Trait halo2_proofs::transcript::EncodedChallenge

source ·
pub trait EncodedChallenge<C>
where C: CurveAffine,
{ type Input; // Required methods fn new(challenge_input: &Self::Input) -> Self; fn get_scalar(&self) -> <C as PrimeCurveAffine>::Scalar; // Provided method fn as_challenge_scalar<T>(&self) -> ChallengeScalar<C, T> { ... } }
Expand description

EncodedChallenge<C> defines a challenge encoding with a Self::Input that is used to derive the challenge encoding and get_challenge obtains the real C::Scalar that the challenge encoding represents.

Required Associated Types§

source

type Input

The Input type used to derive the challenge encoding. For example, an input from the Poseidon hash would be a base field element; an input from the Blake2b hash would be a [u8; 64].

Required Methods§

source

fn new(challenge_input: &Self::Input) -> Self

Get an encoded challenge from a given input challenge.

source

fn get_scalar(&self) -> <C as PrimeCurveAffine>::Scalar

Get a scalar field element from an encoded challenge.

Provided Methods§

source

fn as_challenge_scalar<T>(&self) -> ChallengeScalar<C, T>

Cast an encoded challenge as a typed ChallengeScalar.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<C> EncodedChallenge<C> for Challenge255<C>
where C: CurveAffine, <C as PrimeCurveAffine>::Scalar: FromUniformBytes<64>,

§

type Input = [u8; 64]