Struct snarkvm_console_algorithms::Pedersen
source · pub struct Pedersen<E: Environment, const NUM_BITS: u8> { /* private fields */ }
Expand description
Pedersen is a collision-resistant hash function that takes a variable-length input. The Pedersen hash function does not behave like a random oracle, see Poseidon for one.
Implementations
sourceimpl<E: Environment, const NUM_BITS: u8> Pedersen<E, NUM_BITS>
impl<E: Environment, const NUM_BITS: u8> Pedersen<E, NUM_BITS>
Trait Implementations
sourceimpl<E: Environment, const NUM_BITS: u8> Commit for Pedersen<E, NUM_BITS>
impl<E: Environment, const NUM_BITS: u8> Commit for Pedersen<E, NUM_BITS>
sourceimpl<E: Environment, const NUM_BITS: u8> CommitUncompressed for Pedersen<E, NUM_BITS>
impl<E: Environment, const NUM_BITS: u8> CommitUncompressed for Pedersen<E, NUM_BITS>
sourcefn commit_uncompressed(
&self,
input: &[Self::Input],
randomizer: &Self::Randomizer
) -> Result<Self::Output>
fn commit_uncompressed(
&self,
input: &[Self::Input],
randomizer: &Self::Randomizer
) -> Result<Self::Output>
Returns the Pedersen commitment of the given input and randomizer as a group element.
type Input = bool
type Output = Group<E>
type Randomizer = Scalar<E>
sourceimpl<E: Environment, const NUM_BITS: u8> Hash for Pedersen<E, NUM_BITS>
impl<E: Environment, const NUM_BITS: u8> Hash for Pedersen<E, NUM_BITS>
sourceimpl<E: Environment, const NUM_BITS: u8> HashUncompressed for Pedersen<E, NUM_BITS>
impl<E: Environment, const NUM_BITS: u8> HashUncompressed for Pedersen<E, NUM_BITS>
Auto Trait Implementations
impl<E, const NUM_BITS: u8> RefUnwindSafe for Pedersen<E, NUM_BITS>where
<E as Environment>::Projective: RefUnwindSafe,
impl<E, const NUM_BITS: u8> Send for Pedersen<E, NUM_BITS>
impl<E, const NUM_BITS: u8> Sync for Pedersen<E, NUM_BITS>
impl<E, const NUM_BITS: u8> Unpin for Pedersen<E, NUM_BITS>
impl<E, const NUM_BITS: u8> UnwindSafe for Pedersen<E, NUM_BITS>where
<E as Environment>::Projective: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more