Expand description
Provides simplified abstracted APIs over classes of cryptigraphic primitives, such as Hash, KDF, etc.
Re-exports§
pub use crate::key_material::KeyMaterial;
Enums§
Traits§
- Algorithm
- Hash
- Hash
AlgParams - KDF
- A Key Derivation Function (KDF) is a function that takes in one or more input key and some unstructured additional input, and uses them to produces a derived key.
- MAC
- A Message Authentication Code algorithm is a keyed hash function that behaves somewhat like a symmetric signature function. A MAC algorithm takes in a key and some data, and produces a MAC (message authentication code) that can be used to verify the integrity of data.
- RNG
- An interface for random number generation.
This interface is meant to be simpler and more ergonomic than the interfaces provided by the
rngcrate, but that one should be used by applications that intend to submit to FIPS certification as it more closely aligns with the requirements of SP 800-90A. Note: this interface produces bytes. If you want a KeyMaterial, then use KeyMaterialInternal::from_rng. - XOF
- Extensible Output Functions (XOFs) are similar to hash functions, except that they can produce output of arbitrary length. The naming used for the functions of this trait are borrowed from the SHA3-style sponge constructions that split XOF operation into two phases: an absorb phase in which an arbitrary amount of input is provided to the XOF, and then a squeeze phase in which an arbitrary amount of output is extracted. Once squeezing begins, no more input can be absorbed.