Crate binius_hash

Source
Expand description

Implementations of cryptographic hash functions and related utilities used in Binius.

The default hash function Binius uses is Grøstl-256. Grøstl-256 was a SHA-3 competition finalist and based on the design of the AES block cipher. Binius selects Grøstl-256 as the default hash function because it internally makes use of the 8-bit Rijndael binary field, and so can be arithmetized efficiently with a Binius constraint system.

This crate also provides an implementation of Vision Mark-32, a cryptographic sponge function designed for efficient Binius arithmetization.

Re-exports§

pub use permutation::INV_PACKED_TRANS_AES;
pub use permutation::INV_PACKED_TRANS_AES;
pub use compression::*;
pub use hasher::*;

Modules§

arch
compress
compression
These interfaces are taken from p3_symmetric in Plonky3.
constants
digest
hasher
permutation
These interfaces are taken from p3_symmetric in Plonky3.
sha2

Structs§

Groestl256
The Grøstl-256 hash function.
Groestl256Core
Portable version of the Grøstl256 hash function’s P and Q permutations that uses the implementation of section 8.1.2 from Grøstl
GroestlDigestCompression
A compression function for Grøstl hash digests based on the Grøstl output transformation.
HashBuffer
Adapter that wraps a [Digest] references and exposes the [BufMut] interface.
INV_PACKED_TRANS_AES
Vision32MDSTransform
The MDS step in the Vision Permutation which uses AdditiveNTT to compute matrix multiplication of the state vector 24x32b
Vision32bPermutation
This is the complete permutation function for the Vision hash which implements Permutation and CryptographicPermutation traits over PackedAESBinary8x32b as well as BinaryField32b
VisionHasher
This is the struct that implements the Vision hash over AESTowerField32b and BinaryField32b isomorphically. Here the generic P represents the input type to the update function

Constants§

AFFINE_FWD_AES
AFFINE_FWD_CONST_AES
AFFINE_INV_AES
AFFINE_INV_CONST_AES
NUM_ROUNDS
ROUND_KEYS

Functions§

hash_serialize
Hashes a sequence of serializable items.

Type Aliases§

GroestlDigest
The type of output digest for Grøstl256 over F which should be isomorphic to AESTowerField8b
GroestlHasher
An alias for Grøstl256 defined over BinaryField8b
Vision32b
The vision specialization over BinaryField32b as per Vision Mark-32