Trait halo2_proofs::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>(reader: &mut R) -> Result<Self::ParamsProver, Error>
       where R: Read;
}
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>(reader: &mut R) -> Result<Self::ParamsProver, Error>
where R: Read,

Wrapper for parameter reader

Object Safety§

This trait is not object safe.

Implementors§

source§

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

§

type Scalar = <E as Engine>::Fr

§

type Curve = <E as Engine>::G1Affine

§

type ParamsProver = ParamsKZG<E>

§

type ParamsVerifier = ParamsVerifierKZG<E>