Struct snarkvm_circuit_algorithms::pedersen::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.
Trait Implementations§
source§impl<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>
source§fn commit_uncompressed(
&self,
input: &[Self::Input],
randomizer: &Self::Randomizer
) -> Self::Output
fn commit_uncompressed( &self, input: &[Self::Input], randomizer: &Self::Randomizer ) -> Self::Output
Returns the Pedersen commitment of the given input and randomizer as an affine group element.
type Input = Boolean<E>
type Output = Group<E>
type Randomizer = Scalar<E>
source§impl<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>
source§impl<E: Environment, const NUM_BITS: u8> Inject for Pedersen<E, NUM_BITS>
impl<E: Environment, const NUM_BITS: u8> Inject for Pedersen<E, NUM_BITS>
source§impl<E: Environment, const NUM_BITS: u8> Metrics<dyn Commit<Output = Field<E>, Input = Boolean<E>, Randomizer = Scalar<E>>> for Pedersen<E, NUM_BITS>
impl<E: Environment, const NUM_BITS: u8> Metrics<dyn Commit<Output = Field<E>, Input = Boolean<E>, Randomizer = Scalar<E>>> for Pedersen<E, NUM_BITS>
source§impl<E: Environment, const NUM_BITS: u8> Metrics<dyn CommitUncompressed<Input = Boolean<E>, Output = Group<E>, Randomizer = Scalar<E>>> for Pedersen<E, NUM_BITS>
impl<E: Environment, const NUM_BITS: u8> Metrics<dyn CommitUncompressed<Input = Boolean<E>, Output = Group<E>, Randomizer = Scalar<E>>> for Pedersen<E, NUM_BITS>
source§impl<E: Environment, const NUM_BITS: u8> Metrics<dyn Hash<Input = Boolean<E>, Output = Field<E>>> for Pedersen<E, NUM_BITS>
impl<E: Environment, const NUM_BITS: u8> Metrics<dyn Hash<Input = Boolean<E>, Output = Field<E>>> for Pedersen<E, NUM_BITS>
source§impl<E: Environment, const NUM_BITS: u8> Metrics<dyn HashUncompressed<Output = Group<E>, Input = Boolean<E>>> for Pedersen<E, NUM_BITS>
impl<E: Environment, const NUM_BITS: u8> Metrics<dyn HashUncompressed<Output = Group<E>, Input = Boolean<E>>> for Pedersen<E, NUM_BITS>
source§impl<E: Environment, const NUM_BITS: u8> OutputMode<dyn Commit<Output = Field<E>, Input = Boolean<E>, Randomizer = Scalar<E>>> for Pedersen<E, NUM_BITS>
impl<E: Environment, const NUM_BITS: u8> OutputMode<dyn Commit<Output = Field<E>, Input = Boolean<E>, Randomizer = Scalar<E>>> for Pedersen<E, NUM_BITS>
source§impl<E: Environment, const NUM_BITS: u8> OutputMode<dyn CommitUncompressed<Input = Boolean<E>, Output = Group<E>, Randomizer = Scalar<E>>> for Pedersen<E, NUM_BITS>
impl<E: Environment, const NUM_BITS: u8> OutputMode<dyn CommitUncompressed<Input = Boolean<E>, Output = Group<E>, Randomizer = Scalar<E>>> for Pedersen<E, NUM_BITS>
Auto Trait Implementations§
impl<E, const NUM_BITS: u8> RefUnwindSafe for Pedersen<E, NUM_BITS>where <E as Environment>::BaseField: UnwindSafe + 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>where <E as Environment>::BaseField: Unpin,
impl<E, const NUM_BITS: u8> UnwindSafe for Pedersen<E, NUM_BITS>where <E as Environment>::BaseField: UnwindSafe + RefUnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more