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§

source

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.

source

type Commitment: CommitmentTrait<E>

Holds the type of the commitment

Required Methods§

source

fn setup(label: &'static [u8], n: usize) -> Self::CommitmentKey

Samples a new commitment key of a specified size

source

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.

Implementors§

source§

impl<E> CommitmentEngineTrait<E> for CommitmentEngine<E>
where E: Engine, E::GE: PairingGroup,