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.
- PHSignature
- Pre-Hashed Signature is an extension to Signature that adds functionality specific to signature primatives that can operate on a pre-hashed message instead of the full message.
- 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 KeyMaterialSized::from_rng. - Secret
- A trait that forces an object to implement a zeroizing Drop() as well as Debug and Display that will not log the sensitive contents, even in error or crash-dump scenarios.
- Signature
- A digital signature algorithm is defined as a set of three operations: key generation, signing, and verification.
- Signature
Private Key - A private key for a signature algorithm, often denoted “sk” (for “secret key”).
- Signature
Public Key - A public key for a signature algorithm, often denoted “pk”.
- 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.