pub trait PCCheckVar<PCF: PrimeField, PC: PolynomialCommitment<PCF, ConstraintF>, ConstraintF: PrimeField>: Clone {
    type VerifierKeyVar: AllocGadget<PC::VerifierKey, ConstraintF> + Clone + ToBytesGadget<ConstraintF> + ToConstraintFieldGadget<ConstraintF> + PrepareGadget<Self::PreparedVerifierKeyVar, ConstraintF>;
    type PreparedVerifierKeyVar: AllocGadget<PC::PreparedVerifierKey, ConstraintF> + AllocGadget<PC::VerifierKey, ConstraintF> + Clone + Into<Self::VerifierKeyVar>;
    type CommitmentVar: AllocGadget<PC::Commitment, ConstraintF> + Clone + ToBytesGadget<ConstraintF> + ToConstraintFieldGadget<ConstraintF> + PrepareGadget<Self::PreparedCommitmentVar, ConstraintF> + ToMinimalBitsGadget<ConstraintF>;
    type PreparedCommitmentVar: AllocGadget<PC::PreparedCommitment, 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, ConstraintF, PC>, ConstraintF> + Clone;
    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

An allocated version of PC::VerifierKey.

An allocated version of PC::PreparedVerifierKey.

An allocated version of PC::Commitment.

An allocated version of PC::PreparedCommitment.

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

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

An allocated version of PC::Proof.

An allocated version of PC::BatchLCProof.

Required methods

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.

Create the labeled commitment gadget from the commitment gadget

Create the prepared labeled commitment gadget from the commitment gadget

Implementors