Expand description
Pure Rust cryptography with no_std support and hardware / SIMD acceleration
for x86_64, aarch64 and WebAssembly.
§⚠️ Warning
This crate has not undergone a third-party security audit yet. Use at your own risk.
Modules§
- aes
- argon2
- Argon2id (RFC 9106) password hashing function.
- ascon
- Ascon lightweight cryptography (NIST SP 800-232)
- blake2
- BLAKE2 Cryptographic Hash and Message Authentication Code (MAC) (RFC 7693).
- blake3
- BLAKE3: a fast cryptographic hash function with support for keyed hashing (MAC), key derivation and extendable output (XOF).
- chacha
- The ChaCha family of stream ciphers and AEADs.
- curve25519
- X25519 key exchange and Ed25519 signatures.
- encoding
- hkdf
- HKDF (HMAC-based Extract-and-Expand Key Derivation Function) key derivation function.
- hmac
- HMAC (Hash-based Message Authentication Code)
- mldsa
- ML-DSA post-quantum signatures standardized in FIPS 204.
- mlkem
- ML-KEM post-quantum key encapsulation mechanism (KEM) standardized in FIPS 203.
- p224
- P-224 (secp224r1) ECDSA and ECDH.
- p256
- P-256 (secp256r1) ECDSA and ECDH.
- p384
- P-384 (secp384r1) ECDSA and ECDH.
- p521
- P-521 (secp521r1) ECDSA and ECDH.
- pbkdf2
- PBKDF2 (Password-Based Key Derivation Function 2) as defined in RFC 2898.
- poly1305
- Poly1305 MAC
- random
- rsa
- RSA signature verification: PKCS#1 v1.5 and RSA-PSS (RFC 8017).
- sha2
- The SHA-2 family of hashing functions.
- sha3
- The SHA-3 family of hashing functions (FIPS 202 and NIST SP 800-185).
- xwing
- X-Wing: hybrid post-quantum key encapsulation mechanism (KEM) algorithm (ML-KEM-768 with X25519).
Structs§
- Hash
- A stack-allocated bytes buffer.
Use
Self::as_refto get the bytes as a&[u8]andSelf::as_mutto get the bytes as a&mut [u8]. ComparingHashis a constant-time operation.
Enums§
- Aead
Error - Elliptic
Curve Error - Hash
Error - Errors
- Hkdf
Error - Random
Error - Error returned when the operating system’s random number generator fails.
- RsaError
Constants§
- MAX_
HASH_ OUTPUT_ SIZE - Maximum output size supported by [
Hash].
Traits§
- Aead
- Hasher
Zeroizeis a no-op when thezeroizefeature is not enabled.- Stream
Cipher - Xof
- Zeroize