Trait snarkvm_polycommit::PCCheckVar[][src]

pub trait PCCheckVar<PCF: PrimeField, PC: PolynomialCommitment<PCF>, ConstraintF: PrimeField>: Clone {
    type VerifierKeyVar: AllocGadget<PC::VerifierKey, ConstraintF> + Clone + ToBytesGadget<ConstraintF>;
    type PreparedVerifierKeyVar: AllocGadget<PC::PreparedVerifierKey, ConstraintF> + Clone + PrepareGadget<Self::VerifierKeyVar, ConstraintF>;
    type CommitmentVar: AllocGadget<PC::Commitment, ConstraintF> + Clone + ToBytesGadget<ConstraintF>;
    type PreparedCommitmentVar: AllocGadget<PC::PreparedCommitment, ConstraintF> + PrepareGadget<Self::CommitmentVar, ConstraintF> + Clone;
    type LabeledCommitmentVar: AllocGadget<LabeledCommitment<PC::Commitment>, ConstraintF> + Clone;
    type PreparedLabeledCommitmentVar: Clone;
    type ProofVar: AllocGadget<PC::Proof, ConstraintF> + Clone;
    type BatchLCProofVar: AllocGadget<BatchLCProof<PCF, PC>, ConstraintF> + Clone;
    fn batch_check_evaluations<CS: ConstraintSystem<ConstraintF>>(
        cs: CS,
        verification_key: &Self::VerifierKeyVar,
        commitments: &[Self::LabeledCommitmentVar],
        query_set: &QuerySetVar<PCF, ConstraintF>,
        evaluations: &EvaluationsVar<PCF, ConstraintF>,
        proofs: &[Self::ProofVar],
        rand_data: &PCCheckRandomDataVar<PCF, ConstraintF>
    ) -> Result<Boolean, SynthesisError>;
fn prepared_check_combinations<CS: ConstraintSystem<ConstraintF>>(
        cs: CS,
        prepared_verification_key: &Self::PreparedVerifierKeyVar,
        linear_combinations: &[LinearCombinationVar<PCF, ConstraintF>],
        prepared_commitments: &[Self::PreparedLabeledCommitmentVar],
        query_set: &QuerySetVar<PCF, ConstraintF>,
        evaluations: &EvaluationsVar<PCF, ConstraintF>,
        proof: &Self::BatchLCProofVar,
        rand_data: &PCCheckRandomDataVar<PCF, ConstraintF>
    ) -> Result<Boolean, SynthesisError>;
fn create_labeled_commitment(
        label: String,
        commitment: Self::CommitmentVar,
        degree_bound: Option<FpGadget<ConstraintF>>
    ) -> Self::LabeledCommitmentVar;
fn create_prepared_labeled_commitment(
        label: String,
        commitment: Self::PreparedCommitmentVar,
        degree_bound: Option<FpGadget<ConstraintF>>
    ) -> Self::PreparedLabeledCommitmentVar; }
Expand description

Describes the interface for a gadget for a PolynomialCommitment verifier.

Associated Types

type VerifierKeyVar: AllocGadget<PC::VerifierKey, ConstraintF> + Clone + ToBytesGadget<ConstraintF>[src]

An allocated version of PC::VerifierKey.

type PreparedVerifierKeyVar: AllocGadget<PC::PreparedVerifierKey, ConstraintF> + Clone + PrepareGadget<Self::VerifierKeyVar, ConstraintF>[src]

An allocated version of PC::PreparedVerifierKey.

type CommitmentVar: AllocGadget<PC::Commitment, ConstraintF> + Clone + ToBytesGadget<ConstraintF>[src]

An allocated version of PC::Commitment.

type PreparedCommitmentVar: AllocGadget<PC::PreparedCommitment, ConstraintF> + PrepareGadget<Self::CommitmentVar, ConstraintF> + Clone[src]

An allocated version of PC::PreparedCommitment.

type LabeledCommitmentVar: AllocGadget<LabeledCommitment<PC::Commitment>, ConstraintF> + Clone[src]

An allocated version of LabeledCommitment<PC::Commitment>.

type PreparedLabeledCommitmentVar: Clone[src]

A prepared, allocated version of LabeledCommitment<PC::Commitment>.

type ProofVar: AllocGadget<PC::Proof, ConstraintF> + Clone[src]

An allocated version of PC::Proof.

type BatchLCProofVar: AllocGadget<BatchLCProof<PCF, PC>, ConstraintF> + Clone[src]

An allocated version of PC::BatchLCProof.

Required methods

fn batch_check_evaluations<CS: ConstraintSystem<ConstraintF>>(
    cs: CS,
    verification_key: &Self::VerifierKeyVar,
    commitments: &[Self::LabeledCommitmentVar],
    query_set: &QuerySetVar<PCF, ConstraintF>,
    evaluations: &EvaluationsVar<PCF, ConstraintF>,
    proofs: &[Self::ProofVar],
    rand_data: &PCCheckRandomDataVar<PCF, ConstraintF>
) -> Result<Boolean, SynthesisError>
[src]

Add to ConstraintSystem<ConstraintF> new constraints that check that proof_i is a valid evaluation proof at point_i for the polynomial in commitment_i.

fn prepared_check_combinations<CS: ConstraintSystem<ConstraintF>>(
    cs: CS,
    prepared_verification_key: &Self::PreparedVerifierKeyVar,
    linear_combinations: &[LinearCombinationVar<PCF, ConstraintF>],
    prepared_commitments: &[Self::PreparedLabeledCommitmentVar],
    query_set: &QuerySetVar<PCF, ConstraintF>,
    evaluations: &EvaluationsVar<PCF, ConstraintF>,
    proof: &Self::BatchLCProofVar,
    rand_data: &PCCheckRandomDataVar<PCF, ConstraintF>
) -> Result<Boolean, SynthesisError>
[src]

Add to ConstraintSystem<ConstraintF> new constraints that conditionally check that proof is a valid evaluation proof at the points in query_set for the combinations linear_combinations.

fn create_labeled_commitment(
    label: String,
    commitment: Self::CommitmentVar,
    degree_bound: Option<FpGadget<ConstraintF>>
) -> Self::LabeledCommitmentVar
[src]

Create the labeled commitment gadget from the commitment gadget

fn create_prepared_labeled_commitment(
    label: String,
    commitment: Self::PreparedCommitmentVar,
    degree_bound: Option<FpGadget<ConstraintF>>
) -> Self::PreparedLabeledCommitmentVar
[src]

Create the prepared labeled commitment gadget from the commitment gadget

Implementors

impl<TargetCurve, BaseCurve, PG> PCCheckVar<<TargetCurve as PairingEngine>::Fr, MarlinKZG10<TargetCurve>, <BaseCurve as PairingEngine>::Fr> for MarlinKZG10Gadget<TargetCurve, BaseCurve, PG> where
    TargetCurve: PairingEngine,
    BaseCurve: PairingEngine,
    PG: PairingGadget<TargetCurve, <BaseCurve as PairingEngine>::Fr>,
    <TargetCurve as PairingEngine>::G1Affine: ToConstraintField<<BaseCurve as PairingEngine>::Fr>,
    <TargetCurve as PairingEngine>::G2Affine: ToConstraintField<<BaseCurve as PairingEngine>::Fr>, 
[src]

type BatchLCProofVar = BatchLCProofVar<TargetCurve, BaseCurve, PG>

type CommitmentVar = CommitmentVar<TargetCurve, BaseCurve, PG>

type LabeledCommitmentVar = LabeledCommitmentVar<TargetCurve, BaseCurve, PG>

type PreparedCommitmentVar = PreparedCommitmentVar<TargetCurve, BaseCurve, PG>

type PreparedLabeledCommitmentVar = PreparedLabeledCommitmentVar<TargetCurve, BaseCurve, PG>

type PreparedVerifierKeyVar = PreparedVerifierKeyVar<TargetCurve, BaseCurve, PG>

type ProofVar = ProofVar<TargetCurve, BaseCurve, PG>

type VerifierKeyVar = VerifierKeyVar<TargetCurve, BaseCurve, PG>

fn batch_check_evaluations<CS: ConstraintSystem<<BaseCurve as PairingEngine>::Fr>>(
    cs: CS,
    verification_key: &Self::VerifierKeyVar,
    commitments: &[Self::LabeledCommitmentVar],
    query_set: &QuerySetVar<<TargetCurve as PairingEngine>::Fr, <BaseCurve as PairingEngine>::Fr>,
    evaluations: &EvaluationsVar<<TargetCurve as PairingEngine>::Fr, <BaseCurve as PairingEngine>::Fr>,
    proofs: &[Self::ProofVar],
    rand_data: &PCCheckRandomDataVar<<TargetCurve as PairingEngine>::Fr, <BaseCurve as PairingEngine>::Fr>
) -> Result<Boolean, SynthesisError>
[src]

fn prepared_check_combinations<CS: ConstraintSystem<<BaseCurve as PairingEngine>::Fr>>(
    cs: CS,
    prepared_verification_key: &Self::PreparedVerifierKeyVar,
    linear_combinations: &[LinearCombinationVar<<TargetCurve as PairingEngine>::Fr, <BaseCurve as PairingEngine>::Fr>],
    prepared_commitments: &[Self::PreparedLabeledCommitmentVar],
    query_set: &QuerySetVar<<TargetCurve as PairingEngine>::Fr, <BaseCurve as PairingEngine>::Fr>,
    evaluations: &EvaluationsVar<<TargetCurve as PairingEngine>::Fr, <BaseCurve as PairingEngine>::Fr>,
    proof: &Self::BatchLCProofVar,
    rand_data: &PCCheckRandomDataVar<<TargetCurve as PairingEngine>::Fr, <BaseCurve as PairingEngine>::Fr>
) -> Result<Boolean, SynthesisError>
[src]

fn create_labeled_commitment(
    label: String,
    commitment: Self::CommitmentVar,
    degree_bound: Option<FpGadget<<BaseCurve as PairingEngine>::Fr>>
) -> Self::LabeledCommitmentVar
[src]

fn create_prepared_labeled_commitment(
    label: String,
    prepared_commitment: Self::PreparedCommitmentVar,
    degree_bound: Option<FpGadget<<BaseCurve as PairingEngine>::Fr>>
) -> Self::PreparedLabeledCommitmentVar
[src]