Trait ark_crypto_primitives::commitment::CommitmentScheme[][src]

pub trait CommitmentScheme {
    type Output: ToBytes + Clone + Default + Eq + Hash + Debug;
    type Parameters: Clone;
    type Randomness: Clone + ToBytes + Default + Eq + UniformRand + Debug;
    fn setup<R: Rng>(r: &mut R) -> Result<Self::Parameters, Error>;
fn commit(
        parameters: &Self::Parameters,
        input: &[u8],
        r: &Self::Randomness
    ) -> Result<Self::Output, Error>; }

Associated Types

Loading content...

Required methods

fn setup<R: Rng>(r: &mut R) -> Result<Self::Parameters, Error>[src]

fn commit(
    parameters: &Self::Parameters,
    input: &[u8],
    r: &Self::Randomness
) -> Result<Self::Output, Error>
[src]

Loading content...

Implementors

impl CommitmentScheme for ark_crypto_primitives::commitment::blake2s::Commitment[src]

type Parameters = ()

type Randomness = [u8; 32]

type Output = [u8; 32]

impl<C: ProjectiveCurve, I: InjectiveMap<C>, W: Window> CommitmentScheme for PedersenCommCompressor<C, I, W>[src]

type Output = I::Output

type Parameters = Parameters<C>

type Randomness = Randomness<C>

impl<C: ProjectiveCurve, W: Window> CommitmentScheme for ark_crypto_primitives::commitment::pedersen::Commitment<C, W>[src]

type Parameters = Parameters<C>

type Randomness = Randomness<C>

type Output = C::Affine

Loading content...