Trait nova_snark::traits::commitment::CommitmentEngineTrait
source · pub trait CommitmentEngineTrait<E: Engine>: Clone + Send + Sync {
type CommitmentKey: Len + Clone + Debug + Send + Sync + Serialize + for<'de> Deserialize<'de>;
type Commitment: CommitmentTrait<E>;
// Required methods
fn setup(label: &'static [u8], n: usize) -> Self::CommitmentKey;
fn commit(ck: &Self::CommitmentKey, v: &[E::Scalar]) -> Self::Commitment;
}Expand description
A trait that ties different pieces of the commitment generation together
Required Associated Types§
sourcetype CommitmentKey: Len + Clone + Debug + Send + Sync + Serialize + for<'de> Deserialize<'de>
type CommitmentKey: Len + Clone + Debug + Send + Sync + Serialize + for<'de> Deserialize<'de>
Holds the type of the commitment key The key should quantify its length in terms of group generators.
sourcetype Commitment: CommitmentTrait<E>
type Commitment: CommitmentTrait<E>
Holds the type of the commitment
Required Methods§
sourcefn setup(label: &'static [u8], n: usize) -> Self::CommitmentKey
fn setup(label: &'static [u8], n: usize) -> Self::CommitmentKey
Samples a new commitment key of a specified size
sourcefn commit(ck: &Self::CommitmentKey, v: &[E::Scalar]) -> Self::Commitment
fn commit(ck: &Self::CommitmentKey, v: &[E::Scalar]) -> Self::Commitment
Commits to the provided vector using the provided generators
Object Safety§
This trait is not object safe.