Expand description
A pure-rust implementation of various cryptographic algorithms, which no dependencies and no foreign code (specially C or assembly).
Our goals is to support rust cryptography in various constrained environment like embedded devices and web assembly
This is a fork of Rust-Crypto by DaGenix, which we owe a debt of gratitude for starting some good quality pure rust implementations of various cryptographic algorithms.
Notable Differences with the original sources:
- Maintained
- Extended ED25519 support for extended secret key (64 bytes) support
- ED25519 parametrized by its hash function, allowing BLAKE2b-512 in place of SHA512
- Proper implementation of ChaChaPoly1305
- old cryptographic algorithms removed: Blowfish, Fortuna, RC4, Whirlpool and MD5.
- Argon2 support
- SHA-3 support
- ML-KEM support
- ML-DSA support
As with everything cryptographic implementations, please make sure it suits your security requirements, and review and audit before using.
Modules§
- aes
- AES Block Cipher
- aes_gcm
- AES-GCM authenticated encryption.
- chacha
- ChaCha Stream Cipher – Engine implementation
- chacha20
- ChaCha20 Stream Cipher
- chacha20poly1305
- ChaCha20Poly1305 is an authenticated symmetric stream cipher based on chacha20 and poly1305.
- constant_
time - Constant time operations
- curve25519
- Curve25519 elliptic curve diffie hellman (X25519)
- drg
- Deterministic Random Generator
- ed25519
- ED25519 Signature Scheme
- hashing
- Cryptographic Hash Functions root module
- hkdf
- HMAC Key Derivation Function (HKDF)
- hmac
- Implements the Hash Message Authentication Code (HMAC)
- kdf
- Key Derivation Function (KDF) Algorithms
- mldsa
- ML-DSA, the Module-Lattice-Based Digital Signature Algorithm standardised in FIPS 204
- mlkem
- ML-KEM, the Module-Lattice-Based Key-Encapsulation Mechanism standardised in FIPS 203
- pbkdf2
- This module implements the PBKDF2 Key Derivation Function as specified in Specification.
- poly1305
- Poly1305 Message Authentication Code (MAC) as defined in Specification.
- salsa20
- Salsa20 Stream Cipher
- scrypt
- Implements the Scrypt key derivation function as Specification.
- x25519
- X25519 - diffie hellman using curve25519