pub trait CommitmentEvaluationProof {
    type Scalar: Scalar + Serialize + for<'a> Deserialize<'a>;
    type Commitment: Commitment<Scalar = Self::Scalar, PublicSetup = Self::ProverPublicSetup> + Serialize + for<'a> Deserialize<'a>;
    type Error;
    type ProverPublicSetup;
    type VerifierPublicSetup;

    // Required methods
    fn new(
        transcript: &mut Transcript,
        a: &[Self::Scalar],
        b_point: &[Self::Scalar],
        generators_offset: u64,
        setup: &Self::ProverPublicSetup,
    ) -> Self;
    fn verify_proof(
        &self,
        transcript: &mut Transcript,
        a_commit: &Self::Commitment,
        product: &Self::Scalar,
        b_point: &[Self::Scalar],
        generators_offset: u64,
        table_length: usize,
        setup: &Self::VerifierPublicSetup,
    ) -> Result<(), Self::Error>;

    // Provided method
    fn verify_batched_proof(
        &self,
        transcript: &mut Transcript,
        commit_batch: &[Self::Commitment],
        batching_factors: &[Self::Scalar],
        product: &Self::Scalar,
        b_point: &[Self::Scalar],
        generators_offset: u64,
        table_length: usize,
        setup: &Self::VerifierPublicSetup,
    ) -> Result<(), Self::Error> { ... }
}
Expand description

A trait for using commitment schemes generically. Specifically, this trait is for the evaluation proof of a commitment scheme.

Required Associated Types§

source

type Scalar: Scalar + Serialize + for<'a> Deserialize<'a>

The associated scalar that the commitment is for.

source

type Commitment: Commitment<Scalar = Self::Scalar, PublicSetup = Self::ProverPublicSetup> + Serialize + for<'a> Deserialize<'a>

The associated commitment type.

source

type Error

The error type for the proof.

source

type ProverPublicSetup

The public setup parameters required by the prover. This is simply precomputed data that is required by the prover to create a proof.

source

type VerifierPublicSetup

The public setup parameters required by the verifier. This is simply precomputed data that is required by the verifier to verify a proof.

Required Methods§

source

fn new( transcript: &mut Transcript, a: &[Self::Scalar], b_point: &[Self::Scalar], generators_offset: u64, setup: &Self::ProverPublicSetup, ) -> Self

Create a new proof.

Note: b_point must have length nu, where 2^nu is at least the length of a. b_point are the values for the variables that are being evaluated. The resulting evaluation is the the inner product of a and b, where b is the expanded vector form of b_point.

source

fn verify_proof( &self, transcript: &mut Transcript, a_commit: &Self::Commitment, product: &Self::Scalar, b_point: &[Self::Scalar], generators_offset: u64, table_length: usize, setup: &Self::VerifierPublicSetup, ) -> Result<(), Self::Error>

Verify a proof.

Note: b_point must have length nu, where 2^nu is at least the length of a. b_point are the values for the variables that are being evaluated. The resulting evaluation is the the inner product of a and b, where b is the expanded vector form of b_point.

Provided Methods§

source

fn verify_batched_proof( &self, transcript: &mut Transcript, commit_batch: &[Self::Commitment], batching_factors: &[Self::Scalar], product: &Self::Scalar, b_point: &[Self::Scalar], generators_offset: u64, table_length: usize, setup: &Self::VerifierPublicSetup, ) -> Result<(), Self::Error>

Verify a batch proof. This can be more efficient than verifying individual proofs for some schemes.

Object Safety§

This trait is not object safe.

Implementors§