Trait proof_of_sql::base::commitment::Commitment

source ·
pub trait Commitment:
    AddAssign
    + SubAssign
    + Sized
    + Default
    + Copy
    + Neg<Output = Self>
    + Eq
    + Sub<Output = Self>
    + Debug
    + Sync
    + Send {
    type Scalar: Scalar + for<'a> Mul<&'a Self, Output = Self> + Mul<Self, Output = Self> + Serialize + for<'a> Deserialize<'a>;
    type PublicSetup<'a>;

    // Required method
    fn compute_commitments(
        commitments: &mut [Self],
        committable_columns: &[CommittableColumn<'_>],
        offset: usize,
        setup: &Self::PublicSetup<'_>,
    );
}
Expand description

A trait for using commitment schemes generically.

Required Associated Types§

source

type Scalar: Scalar + for<'a> Mul<&'a Self, Output = Self> + Mul<Self, Output = Self> + Serialize + for<'a> Deserialize<'a>

The associated scalar that the commitment is for. There are multiple possible commitment schemes for a scalar, but only one scalar for any commitment.

source

type PublicSetup<'a>

The public setup for the commitment scheme.

Required Methods§

source

fn compute_commitments( commitments: &mut [Self], committable_columns: &[CommittableColumn<'_>], offset: usize, setup: &Self::PublicSetup<'_>, )

Compute the commitments for the given columns.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Commitment for RistrettoPoint

§

type Scalar = MontScalar<FrConfig>

§

type PublicSetup<'a> = ()

source§

fn compute_commitments( commitments: &mut [Self], committable_columns: &[CommittableColumn<'_>], offset: usize, _setup: &Self::PublicSetup<'_>, )

Implementors§