Trait snarkvm_algorithms::traits::commitment::CommitmentScheme [−][src]
pub trait CommitmentScheme: Sized + Clone + From<Self::Parameters> { type Output: Clone + Debug + Default + Eq + Hash + ToBytes + FromBytes + Sync + Send; type Parameters: Clone + Debug + Eq + ToBytes + FromBytes; type Randomness: Clone + Debug + Default + Eq + UniformRand + ToBytes + FromBytes; fn setup<R: Rng>(r: &mut R) -> Self; fn commit(
&self,
input: &[u8],
randomness: &Self::Randomness
) -> Result<Self::Output, CommitmentError>; fn parameters(&self) -> &Self::Parameters; }
Associated Types
type Randomness: Clone + Debug + Default + Eq + UniformRand + ToBytes + FromBytes
Required methods
fn commit(
&self,
input: &[u8],
randomness: &Self::Randomness
) -> Result<Self::Output, CommitmentError>
fn parameters(&self) -> &Self::Parameters
Implementors
impl<G: Group + ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> CommitmentScheme for PedersenCompressedCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
impl<G: Group, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> CommitmentScheme for PedersenCommitment<G, NUM_WINDOWS, WINDOW_SIZE>