pub enum HashFunction {
    Blake3_192,
    Blake3_256,
    Sha3_256,
}
Expand description

Defines a set of available hash function for STARK protocol.

Choice of a hash function has a direct impact on proof generation time, proof size, and proof soundness. In general, sounds of the proof is bounded by the collision resistance of the hash function used by the protocol.

Variants

Blake3_192

BLAKE3 hash function with 192 bit output.

When this function is used in the STARK protocol, proof security cannot exceed 96 bits.

Blake3_256

BLAKE3 hash function with 256 bit output.

When this function is used in the STARK protocol, proof security cannot exceed 128 bits.

Sha3_256

SHA3 hash function with 256 bit output.

When this function is used in the STARK protocol, proof security cannot exceed 128 bits.

Implementations

Returns collision resistance of this hash function in bits.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Reads a hash function enum from the specified source.

Reads a sequence of bytes from the provided source, attempts to deserialize these bytes into a vector with the specified number of Self elements, and returns the result. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Serializes self and writes the resulting bytes into the target.

Serializes self into a vector of bytes.
Serializes all elements of the source and writes these bytes into the target. Read more
Returns an estimate of how many bytes are needed to represent self. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.