SequentialCommit

Trait SequentialCommit 

Source
pub trait SequentialCommit {
    type Commitment: From<Word>;

    // Required method
    fn to_elements(&self) -> Vec<Felt>;

    // Provided method
    fn to_commitment(&self) -> Self::Commitment { ... }
}
Expand description

Defines how to compute a commitment to an object represented as a sequence of field elements.

Required Associated Types§

Source

type Commitment: From<Word>

A type of the commitment which must be derivable from Word.

Required Methods§

Source

fn to_elements(&self) -> Vec<Felt>

Returns a representation of the object as a sequence of fields elements.

Provided Methods§

Source

fn to_commitment(&self) -> Self::Commitment

Computes the commitment to the object.

The default implementation of this function uses RPO256 hash function to hash the sequence of elements returned from Self::to_elements().

Implementors§

Source§

impl SequentialCommit for miden_crypto::dsa::ecdsa_k256_keccak::PublicKey

Source§

impl SequentialCommit for miden_crypto::dsa::eddsa_25519::PublicKey

Source§

impl SequentialCommit for miden_crypto::dsa::rpo_falcon512::PublicKey