Trait halo2_backend::poly::commitment::CommitmentScheme

source ·
pub trait CommitmentScheme {
    type Scalar: Field;
    type Curve: CurveAffine<ScalarExt = Self::Scalar>;
    type ParamsProver: ParamsProver<Self::Curve>;
    type ParamsVerifier: for<'params> ParamsVerifier<'params, Self::Curve>;

    // Required methods
    fn new_params(k: u32) -> Self::ParamsProver;
    fn read_params<R: Read>(reader: &mut R) -> Result<Self::ParamsProver>;
}
Expand description

Defines components of a commitment scheme.

Required Associated Types§

source

type Scalar: Field

Application field of this commitment scheme

source

type Curve: CurveAffine<ScalarExt = Self::Scalar>

Elliptic curve used to commit the application and witnesses

source

type ParamsProver: ParamsProver<Self::Curve>

Constant prover parameters

source

type ParamsVerifier: for<'params> ParamsVerifier<'params, Self::Curve>

Constant verifier parameters

Required Methods§

source

fn new_params(k: u32) -> Self::ParamsProver

Wrapper for parameter generator

source

fn read_params<R: Read>(reader: &mut R) -> Result<Self::ParamsProver>

Wrapper for parameter reader

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<E: Engine> CommitmentScheme for KZGCommitmentScheme<E>
where E::G1Affine: SerdeCurveAffine<ScalarExt = <E as Engine>::Fr, CurveExt = <E as Engine>::G1>, E::G1: CurveExt<AffineExt = E::G1Affine>, E::G2Affine: SerdeCurveAffine,

§

type Scalar = <E as Engine>::Fr

§

type Curve = <E as Engine>::G1Affine

§

type ParamsProver = ParamsKZG<E>

§

type ParamsVerifier = ParamsVerifierKZG<E>