pub trait CommitmentDefGadget: Clone {
type ConstraintField: SonobeField;
type KeyVar: AllocVar<<Self::Widget as CommitmentDef>::Key, Self::ConstraintField>;
type ScalarVar: AbsorbableVar<Self::ConstraintField> + CondSelectGadget<Self::ConstraintField> + FromBitsGadget<Self::ConstraintField> + AllocVar<<Self::Widget as CommitmentDef>::Scalar, Self::ConstraintField> + GR1CSVar<Self::ConstraintField, Value = <Self::Widget as CommitmentDef>::Scalar> + TwoStageFieldVar;
type CommitmentVar: Clone + AbsorbableVar<Self::ConstraintField> + CondSelectGadget<Self::ConstraintField> + AllocVar<<Self::Widget as CommitmentDef>::Commitment, Self::ConstraintField> + GR1CSVar<Self::ConstraintField, Value = <Self::Widget as CommitmentDef>::Commitment>;
type RandomnessVar: AllocVar<<Self::Widget as CommitmentDef>::Randomness, Self::ConstraintField> + GR1CSVar<Self::ConstraintField, Value = <Self::Widget as CommitmentDef>::Randomness>;
type Widget: CommitmentDef;
}Expand description
CommitmentDefGadget specifies the in-circuit associated types for a
commitment scheme gadget.
Required Associated Types§
Sourcetype ConstraintField: SonobeField
type ConstraintField: SonobeField
CommitmentDefGadget::ConstraintField is the field over which the
circuit running the commitment scheme is defined.
Sourcetype KeyVar: AllocVar<<Self::Widget as CommitmentDef>::Key, Self::ConstraintField>
type KeyVar: AllocVar<<Self::Widget as CommitmentDef>::Key, Self::ConstraintField>
CommitmentDefGadget::KeyVar is the in-circuit variable type for the
commitment key.
Sourcetype ScalarVar: AbsorbableVar<Self::ConstraintField> + CondSelectGadget<Self::ConstraintField> + FromBitsGadget<Self::ConstraintField> + AllocVar<<Self::Widget as CommitmentDef>::Scalar, Self::ConstraintField> + GR1CSVar<Self::ConstraintField, Value = <Self::Widget as CommitmentDef>::Scalar> + TwoStageFieldVar
type ScalarVar: AbsorbableVar<Self::ConstraintField> + CondSelectGadget<Self::ConstraintField> + FromBitsGadget<Self::ConstraintField> + AllocVar<<Self::Widget as CommitmentDef>::Scalar, Self::ConstraintField> + GR1CSVar<Self::ConstraintField, Value = <Self::Widget as CommitmentDef>::Scalar> + TwoStageFieldVar
CommitmentDefGadget::ScalarVar is the in-circuit variable type for
the scalars being committed to.
Sourcetype CommitmentVar: Clone + AbsorbableVar<Self::ConstraintField> + CondSelectGadget<Self::ConstraintField> + AllocVar<<Self::Widget as CommitmentDef>::Commitment, Self::ConstraintField> + GR1CSVar<Self::ConstraintField, Value = <Self::Widget as CommitmentDef>::Commitment>
type CommitmentVar: Clone + AbsorbableVar<Self::ConstraintField> + CondSelectGadget<Self::ConstraintField> + AllocVar<<Self::Widget as CommitmentDef>::Commitment, Self::ConstraintField> + GR1CSVar<Self::ConstraintField, Value = <Self::Widget as CommitmentDef>::Commitment>
CommitmentDefGadget::CommitmentVar is the in-circuit variable type
for the commitment.
Sourcetype RandomnessVar: AllocVar<<Self::Widget as CommitmentDef>::Randomness, Self::ConstraintField> + GR1CSVar<Self::ConstraintField, Value = <Self::Widget as CommitmentDef>::Randomness>
type RandomnessVar: AllocVar<<Self::Widget as CommitmentDef>::Randomness, Self::ConstraintField> + GR1CSVar<Self::ConstraintField, Value = <Self::Widget as CommitmentDef>::Randomness>
CommitmentDefGadget::RandomnessVar is the in-circuit variable type
for the randomness used in the commitment.
Sourcetype Widget: CommitmentDef
type Widget: CommitmentDef
CommitmentDefGadget::Widget points to the out-of-circuit commitment
scheme widget.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".