pub trait EncodedChallenge<C: CurveAffine> {
    type Input;

    fn new(challenge_input: &Self::Input) -> Self;
    fn get_scalar(&self) -> C::Scalar;

    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

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

Get an encoded challenge from a given input challenge.

Get a scalar field element from an encoded challenge.

Provided Methods

Cast an encoded challenge as a typed ChallengeScalar.

Implementors