Struct snarkvm_wasm::algorithms::Pedersen
pub struct Pedersen<E, const NUM_BITS: u8>where
E: Environment,{ /* 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
impl<E, const NUM_BITS: u8> Pedersen<E, NUM_BITS>where
E: Environment,
impl<E, const NUM_BITS: u8> Pedersen<E, NUM_BITS>where
E: Environment,
Trait Implementations
impl<E, const NUM_BITS: u8> Clone for Pedersen<E, NUM_BITS>where
E: Clone + Environment,
impl<E, const NUM_BITS: u8> Clone for Pedersen<E, NUM_BITS>where
E: Clone + Environment,
impl<E, const NUM_BITS: u8> Commit for Pedersen<E, NUM_BITS>where
E: Environment,
impl<E, const NUM_BITS: u8> Commit for Pedersen<E, NUM_BITS>where
E: Environment,
fn commit(
&self,
input: &[<Pedersen<E, NUM_BITS> as Commit>::Input],
randomizer: &<Pedersen<E, NUM_BITS> as Commit>::Randomizer
) -> Result<<Pedersen<E, NUM_BITS> as Commit>::Output, Error>
fn commit(
&self,
input: &[<Pedersen<E, NUM_BITS> as Commit>::Input],
randomizer: &<Pedersen<E, NUM_BITS> as Commit>::Randomizer
) -> Result<<Pedersen<E, NUM_BITS> as Commit>::Output, Error>
Returns the Pedersen commitment of the given input and randomizer as a field element.
type Input = bool
type Output = Field<E>
type Randomizer = Scalar<E>
impl<E, const NUM_BITS: u8> CommitUncompressed for Pedersen<E, NUM_BITS>where
E: Environment,
impl<E, const NUM_BITS: u8> CommitUncompressed for Pedersen<E, NUM_BITS>where
E: Environment,
fn commit_uncompressed(
&self,
input: &[<Pedersen<E, NUM_BITS> as CommitUncompressed>::Input],
randomizer: &<Pedersen<E, NUM_BITS> as CommitUncompressed>::Randomizer
) -> Result<<Pedersen<E, NUM_BITS> as CommitUncompressed>::Output, Error>
fn commit_uncompressed(
&self,
input: &[<Pedersen<E, NUM_BITS> as CommitUncompressed>::Input],
randomizer: &<Pedersen<E, NUM_BITS> as CommitUncompressed>::Randomizer
) -> Result<<Pedersen<E, NUM_BITS> as CommitUncompressed>::Output, Error>
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>
impl<E, const NUM_BITS: u8> Hash for Pedersen<E, NUM_BITS>where
E: Environment,
impl<E, const NUM_BITS: u8> Hash for Pedersen<E, NUM_BITS>where
E: Environment,
impl<E, const NUM_BITS: u8> HashUncompressed for Pedersen<E, NUM_BITS>where
E: Environment,
impl<E, const NUM_BITS: u8> HashUncompressed for Pedersen<E, NUM_BITS>where
E: Environment,
fn hash_uncompressed(
&self,
input: &[<Pedersen<E, NUM_BITS> as HashUncompressed>::Input]
) -> Result<<Pedersen<E, NUM_BITS> as HashUncompressed>::Output, Error>
fn hash_uncompressed(
&self,
input: &[<Pedersen<E, NUM_BITS> as HashUncompressed>::Input]
) -> Result<<Pedersen<E, NUM_BITS> as HashUncompressed>::Output, Error>
Returns the Pedersen hash of the given input as a group element.
type Input = bool
type Output = Group<E>
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourcefn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
T: Future, type Output = <T as Future>::Output;
sourcefn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;