Skip to main content

Crate rscrypto

Crate rscrypto 

Source
Expand description

Pure Rust cryptography with hardware acceleration. no_std first.

rscrypto is a single-crate cryptography stack: hashes, AEADs, MACs, KDFs, password hashing, signatures, key exchange, and checksums. Enable one leaf feature for a minimal build (sha2, aes-gcm, ed25519, anything) or full for the entire primitive set. Zero default dependencies; getrandom, serde, and rayon are opt-in.

The portable Rust path is the byte-for-byte authority. SIMD and ASM kernels are accelerators, differential-tested against the portable path on every release. Three-tier dispatch (compile-time target_feature → runtime detection → portable fallback) picks the fastest safe backend at runtime; without std, only the compile-time tier runs.

[dependencies]
rscrypto = { version = "0.12", default-features = false, features = ["sha2"] }

§Guides

§API Shape

  • Checksums: Type::checksum(data) or new / update / finalize.
  • Digests: Type::digest(data) or new / update / finalize.
  • XOFs: Type::xof(data) or new / update / finalize_xof.
  • MACs: Type::mac(key, data) and Type::verify_tag(key, data, tag).
  • AEADs: typed keys and nonces, with combined, detached, and alloc Vec helpers.

§Quick Start

use rscrypto::{Digest, Sha256};

let digest = Sha256::digest(b"hello world");

let mut h = Sha256::new();
h.update(b"hello ");
h.update(b"world");
assert_eq!(h.finalize(), digest);

§AEAD

use rscrypto::{Aead, ChaCha20Poly1305, ChaCha20Poly1305Key};

let key = ChaCha20Poly1305Key::from_bytes([0x11; 32]);
let cipher = ChaCha20Poly1305::new(&key);

let mut sealed = [0u8; 4 + ChaCha20Poly1305::TAG_SIZE];
let nonce = cipher.seal_random(b"aad", b"data", &mut sealed)?;

let mut opened = [0u8; 4];
cipher.decrypt(&nonce, b"aad", &sealed, &mut opened)?;
assert_eq!(&opened, b"data");

§Password Hashing

use rscrypto::Argon2idPassword;

let passwords = Argon2idPassword::default();
let encoded = passwords.hash_password(b"correct horse battery staple")?;

assert!(
  passwords
    .verify_password(b"correct horse battery staple", &encoded)
    .is_ok()
);

§Feature Groups

  • checksums: CRC families.
  • hashes: SHA-2, SHA-3, BLAKE2, BLAKE3, Ascon, XXH3, RapidHash.
  • auth: MACs, KDFs, password hashing, ECDSA signing/verification, Ed25519, RSA signing/verification/OAEP, ML-DSA, SLH-DSA, P-256 and P-384 ECDH, X25519, ML-KEM.
  • aead: AES-GCM, AES-GCM-SIV, ChaCha20-Poly1305, XChaCha20-Poly1305, AEGIS-256, Ascon-AEAD128.
  • full: all public primitive families.

Leaf features are available for size-conscious builds.

§Security Posture

Fixed-size secret-bearing owners expose comparison through an opaque ct::CtDecision and require explicit declassification. Public structural rejects such as malformed lengths, unsupported algorithms, or out-of-range RSA representatives may fail before the full primitive work. Opaque verification errors leak no failure detail. Generated-code constant-time claims remain compiler-, target-, feature-, and release-evidence-bound. Zeroize on drop for every secret-bearing type. strict_* arithmetic on counters and lengths; release builds keep overflow-checks = true. Fuzz targets exercise production paths; Miri covers the portable backends.

rscrypto is a primitives crate, not a FIPS 140-3 validated module. It exposes FIPS-aligned primitives (AES-256-GCM, SHA-2, SHA-3 / SHAKE, HMAC, KMAC, HKDF, PBKDF2) alongside non-FIPS ones. The portable-only feature makes runtime capability detection report no SIMD/ASM capabilities, so dispatchers that consult runtime caps fall through to portable backends, and it turns off assembly that the crate selects at compile time from the target alone. It excludes nightly-only POWER, IBM Z, and RISC-V backends from compilation. Hash backends that a compile-time target_feature enables can still run. It is a deployment control, not a substitute for release constant-time evidence. See the security guidance for nonce lifecycle, PHC verification limits, and platform fallback notes.

Re-exports§

pub use aead::AeadBufferError;aead
pub use aead::OpenError;aead
pub use aead::Aegis256;aegis256
pub use aead::Aegis256Key;aegis256
pub use aead::Aegis256Tag;aegis256
pub use aead::Aes128Gcm;aes-gcm
pub use aead::Aes128GcmKey;aes-gcm
pub use aead::Aes128GcmTag;aes-gcm
pub use aead::Aes128GcmSiv;aes-gcm-siv
pub use aead::Aes128GcmSivKey;aes-gcm-siv
pub use aead::Aes128GcmSivTag;aes-gcm-siv
pub use aead::Aes256Gcm;aes-gcm
pub use aead::Aes256GcmKey;aes-gcm
pub use aead::Aes256GcmTag;aes-gcm
pub use aead::Aes256GcmSiv;aes-gcm-siv
pub use aead::Aes256GcmSivKey;aes-gcm-siv
pub use aead::Aes256GcmSivTag;aes-gcm-siv
pub use aead::AesSivCmac256;aes-siv
pub use aead::AesSivCmac256Key;aes-siv
pub use aead::AesSivCmac256Nonce;aes-siv
pub use aead::AesSivCmac256NonceError;aes-siv
pub use aead::AesSivCmac256Tag;aes-siv
pub use aead::AsconAead128;ascon-aead
pub use aead::AsconAead128Key;ascon-aead
pub use aead::AsconAead128Tag;ascon-aead
pub use aead::ChaCha20Poly1305;chacha20poly1305
pub use aead::ChaCha20Poly1305Key;chacha20poly1305
pub use aead::ChaCha20Poly1305Tag;chacha20poly1305
pub use aead::XChaCha20Poly1305;xchacha20poly1305
pub use aead::XChaCha20Poly1305Key;xchacha20poly1305
pub use aead::XChaCha20Poly1305Tag;xchacha20poly1305
pub use auth::HkdfOutputLengthError;hkdf
pub use auth::Argon2Block;argon2
pub use auth::Argon2Context;argon2
pub use auth::Argon2Error;argon2
pub use auth::Argon2Params;argon2
pub use auth::Argon2d;argon2
pub use auth::Argon2i;argon2
pub use auth::Argon2id;argon2
pub use auth::Argon2VerificationLimits;argon2 and phc-strings
pub use auth::Argon2idPassword;argon2 and phc-strings
pub use auth::EcdsaBlindedSigningError;ecdsa-p256 or ecdsa-p384
pub use auth::EcdsaError;ecdsa-p256 or ecdsa-p384
pub use auth::EcdsaKeyGenerationError;ecdsa-p256 or ecdsa-p384
pub use auth::EcdsaP256Keypair;ecdsa-p256
pub use auth::EcdsaP256PublicKey;ecdsa-p256
pub use auth::EcdsaP256SecretKey;ecdsa-p256
pub use auth::EcdsaP256Signature;ecdsa-p256
pub use auth::EcdsaP384Keypair;ecdsa-p384
pub use auth::EcdsaP384PublicKey;ecdsa-p384
pub use auth::EcdsaP384SecretKey;ecdsa-p384
pub use auth::EcdsaP384Signature;ecdsa-p384
pub use auth::Ed25519KeyError;ed25519
pub use auth::Ed25519Keypair;ed25519
pub use auth::Ed25519PublicKey;ed25519
pub use auth::Ed25519SecretKey;ed25519
pub use auth::Ed25519Signature;ed25519
pub use auth::HashSlhDsaSha2_128fWithSha256;slh-dsa
pub use auth::HashSlhDsaSha2_128fWithSha256PublicKey;slh-dsa
pub use auth::HashSlhDsaSha2_128fWithSha256SecretKey;slh-dsa
pub use auth::HashSlhDsaSha2_128sWithSha256;slh-dsa
pub use auth::HashSlhDsaSha2_128sWithSha256PublicKey;slh-dsa
pub use auth::HashSlhDsaSha2_128sWithSha256SecretKey;slh-dsa
pub use auth::HashSlhDsaSha2_192fWithSha512;slh-dsa
pub use auth::HashSlhDsaSha2_192fWithSha512PublicKey;slh-dsa
pub use auth::HashSlhDsaSha2_192fWithSha512SecretKey;slh-dsa
pub use auth::HashSlhDsaSha2_192sWithSha512;slh-dsa
pub use auth::HashSlhDsaSha2_192sWithSha512PublicKey;slh-dsa
pub use auth::HashSlhDsaSha2_192sWithSha512SecretKey;slh-dsa
pub use auth::HashSlhDsaSha2_256fWithSha512;slh-dsa
pub use auth::HashSlhDsaSha2_256fWithSha512PublicKey;slh-dsa
pub use auth::HashSlhDsaSha2_256fWithSha512SecretKey;slh-dsa
pub use auth::HashSlhDsaSha2_256sWithSha512;slh-dsa
pub use auth::HashSlhDsaSha2_256sWithSha512PublicKey;slh-dsa
pub use auth::HashSlhDsaSha2_256sWithSha512SecretKey;slh-dsa
pub use auth::HashSlhDsaShake128fWithShake128;slh-dsa
pub use auth::HashSlhDsaShake128fWithShake128PublicKey;slh-dsa
pub use auth::HashSlhDsaShake128fWithShake128SecretKey;slh-dsa
pub use auth::HashSlhDsaShake128sWithShake128;slh-dsa
pub use auth::HashSlhDsaShake128sWithShake128PublicKey;slh-dsa
pub use auth::HashSlhDsaShake128sWithShake128SecretKey;slh-dsa
pub use auth::HashSlhDsaShake192fWithShake256;slh-dsa
pub use auth::HashSlhDsaShake192fWithShake256PublicKey;slh-dsa
pub use auth::HashSlhDsaShake192fWithShake256SecretKey;slh-dsa
pub use auth::HashSlhDsaShake192sWithShake256;slh-dsa
pub use auth::HashSlhDsaShake192sWithShake256PublicKey;slh-dsa
pub use auth::HashSlhDsaShake192sWithShake256SecretKey;slh-dsa
pub use auth::HashSlhDsaShake256fWithShake256;slh-dsa
pub use auth::HashSlhDsaShake256fWithShake256PublicKey;slh-dsa
pub use auth::HashSlhDsaShake256fWithShake256SecretKey;slh-dsa
pub use auth::HashSlhDsaShake256sWithShake256;slh-dsa
pub use auth::HashSlhDsaShake256sWithShake256PublicKey;slh-dsa
pub use auth::HashSlhDsaShake256sWithShake256SecretKey;slh-dsa
pub use auth::SlhDsaError;slh-dsa
pub use auth::SlhDsaKeyError;slh-dsa
pub use auth::SlhDsaSha2_128f;slh-dsa
pub use auth::SlhDsaSha2_128fPublicKey;slh-dsa
pub use auth::SlhDsaSha2_128fSecretKey;slh-dsa
pub use auth::SlhDsaSha2_128s;slh-dsa
pub use auth::SlhDsaSha2_128sPublicKey;slh-dsa
pub use auth::SlhDsaSha2_128sSecretKey;slh-dsa
pub use auth::SlhDsaSha2_192f;slh-dsa
pub use auth::SlhDsaSha2_192fPublicKey;slh-dsa
pub use auth::SlhDsaSha2_192fSecretKey;slh-dsa
pub use auth::SlhDsaSha2_192s;slh-dsa
pub use auth::SlhDsaSha2_192sPublicKey;slh-dsa
pub use auth::SlhDsaSha2_192sSecretKey;slh-dsa
pub use auth::SlhDsaSha2_256f;slh-dsa
pub use auth::SlhDsaSha2_256fPublicKey;slh-dsa
pub use auth::SlhDsaSha2_256fSecretKey;slh-dsa
pub use auth::SlhDsaSha2_256s;slh-dsa
pub use auth::SlhDsaSha2_256sPublicKey;slh-dsa
pub use auth::SlhDsaSha2_256sSecretKey;slh-dsa
pub use auth::SlhDsaShake128f;slh-dsa
pub use auth::SlhDsaShake128fPublicKey;slh-dsa
pub use auth::SlhDsaShake128fSecretKey;slh-dsa
pub use auth::SlhDsaShake128s;slh-dsa
pub use auth::SlhDsaShake128sPublicKey;slh-dsa
pub use auth::SlhDsaShake128sSecretKey;slh-dsa
pub use auth::SlhDsaShake192f;slh-dsa
pub use auth::SlhDsaShake192fPublicKey;slh-dsa
pub use auth::SlhDsaShake192fSecretKey;slh-dsa
pub use auth::SlhDsaShake192s;slh-dsa
pub use auth::SlhDsaShake192sPublicKey;slh-dsa
pub use auth::SlhDsaShake192sSecretKey;slh-dsa
pub use auth::SlhDsaShake256f;slh-dsa
pub use auth::SlhDsaShake256fPublicKey;slh-dsa
pub use auth::SlhDsaShake256fSecretKey;slh-dsa
pub use auth::SlhDsaShake256s;slh-dsa
pub use auth::SlhDsaShake256sPublicKey;slh-dsa
pub use auth::SlhDsaShake256sSecretKey;slh-dsa
pub use auth::HkdfSha256;hkdf
pub use auth::HkdfSha384;hkdf
pub use auth::HkdfSha512;hkdf
pub use auth::HmacSha3_224;hmac-sha3
pub use auth::HmacSha3_224Tag;hmac-sha3
pub use auth::HmacSha3_256;hmac-sha3
pub use auth::HmacSha3_256Tag;hmac-sha3
pub use auth::HmacSha3_384;hmac-sha3
pub use auth::HmacSha3_384Tag;hmac-sha3
pub use auth::HmacSha3_512;hmac-sha3
pub use auth::HmacSha3_512Tag;hmac-sha3
pub use auth::HmacSha256;hmac
pub use auth::HmacSha256Tag;hmac
pub use auth::HmacSha384;hmac
pub use auth::HmacSha384Tag;hmac
pub use auth::HmacSha512;hmac
pub use auth::HmacSha512Tag;hmac
pub use auth::Kmac128;kmac
pub use auth::Kmac256;kmac
pub use auth::MlDsa44;ml-dsa
pub use auth::MlDsa44PreparedPublicKey;ml-dsa
pub use auth::MlDsa44PreparedPublicKeyStorage;ml-dsa
pub use auth::MlDsa44PreparedSecretKey;ml-dsa
pub use auth::MlDsa44PreparedSecretKeyStorage;ml-dsa
pub use auth::MlDsa44PublicKey;ml-dsa
pub use auth::MlDsa44SecretKey;ml-dsa
pub use auth::MlDsa44Seed;ml-dsa
pub use auth::MlDsa44Signature;ml-dsa
pub use auth::MlDsa65;ml-dsa
pub use auth::MlDsa65PreparedPublicKey;ml-dsa
pub use auth::MlDsa65PreparedPublicKeyStorage;ml-dsa
pub use auth::MlDsa65PreparedSecretKey;ml-dsa
pub use auth::MlDsa65PreparedSecretKeyStorage;ml-dsa
pub use auth::MlDsa65PublicKey;ml-dsa
pub use auth::MlDsa65SecretKey;ml-dsa
pub use auth::MlDsa65Seed;ml-dsa
pub use auth::MlDsa65Signature;ml-dsa
pub use auth::MlDsa87;ml-dsa
pub use auth::MlDsa87PreparedPublicKey;ml-dsa
pub use auth::MlDsa87PreparedPublicKeyStorage;ml-dsa
pub use auth::MlDsa87PreparedSecretKey;ml-dsa
pub use auth::MlDsa87PreparedSecretKeyStorage;ml-dsa
pub use auth::MlDsa87PublicKey;ml-dsa
pub use auth::MlDsa87SecretKey;ml-dsa
pub use auth::MlDsa87Seed;ml-dsa
pub use auth::MlDsa87Signature;ml-dsa
pub use auth::MlDsaError;ml-dsa
pub use auth::MlDsaKeyError;ml-dsa
pub use auth::MlDsaPrehash;ml-dsa
pub use auth::MlDsaPrehashAlgorithm;ml-dsa
pub use auth::MlKem512;ml-kem
pub use auth::MlKem512Ciphertext;ml-kem
pub use auth::MlKem512DecapsulationKey;ml-kem
pub use auth::MlKem512EncapsulationKey;ml-kem
pub use auth::MlKem512PreparedDecapsulationKey;ml-kem
pub use auth::MlKem512PreparedEncapsulationKey;ml-kem
pub use auth::MlKem512Seed;ml-kem
pub use auth::MlKem512SharedSecret;ml-kem
pub use auth::MlKem768;ml-kem
pub use auth::MlKem768Ciphertext;ml-kem
pub use auth::MlKem768DecapsulationKey;ml-kem
pub use auth::MlKem768EncapsulationKey;ml-kem
pub use auth::MlKem768PreparedDecapsulationKey;ml-kem
pub use auth::MlKem768PreparedEncapsulationKey;ml-kem
pub use auth::MlKem768Seed;ml-kem
pub use auth::MlKem768SharedSecret;ml-kem
pub use auth::MlKem1024;ml-kem
pub use auth::MlKem1024Ciphertext;ml-kem
pub use auth::MlKem1024DecapsulationKey;ml-kem
pub use auth::MlKem1024EncapsulationKey;ml-kem
pub use auth::MlKem1024PreparedDecapsulationKey;ml-kem
pub use auth::MlKem1024PreparedEncapsulationKey;ml-kem
pub use auth::MlKem1024Seed;ml-kem
pub use auth::MlKem1024SharedSecret;ml-kem
pub use auth::MlKemError;ml-kem
pub use auth::MlKemKeyError;ml-kem
pub use auth::P256EphemeralSecret;p256-ecdh
pub use auth::P256KeyGenerationError;p256-ecdh
pub use auth::P256PublicKey;p256-ecdh
pub use auth::P256PublicKeyError;p256-ecdh
pub use auth::P256SharedSecret;p256-ecdh
pub use auth::P384EphemeralSecret;p384-ecdh
pub use auth::P384KeyGenerationError;p384-ecdh
pub use auth::P384PublicKey;p384-ecdh
pub use auth::P384PublicKeyError;p384-ecdh
pub use auth::P384SharedSecret;p384-ecdh
pub use auth::PasswordHashError;phc-strings and (argon2 or scrypt)
pub use auth::PasswordStatus;phc-strings and (argon2 or scrypt)
pub use auth::Pbkdf2Error;pbkdf2
pub use auth::Pbkdf2Params;pbkdf2
pub use auth::Pbkdf2Sha256;pbkdf2
pub use auth::Pbkdf2Sha512;pbkdf2
pub use auth::Pbkdf2VerifyPolicy;pbkdf2
pub use auth::Poly1305;poly1305
pub use auth::Poly1305OneTimeKey;poly1305
pub use auth::Poly1305Tag;poly1305
pub use auth::RsaBlindingPair;rsa
pub use auth::RsaEncryptionError;rsa
pub use auth::RsaJwtAlgorithm;rsa
pub use auth::RsaJwtVerifier;rsa
pub use auth::RsaKeyError;rsa
pub use auth::RsaKeyGenerationContract;rsa
pub use auth::RsaKeyGenerationError;rsa
pub use auth::RsaOaepProfile;rsa
pub use auth::RsaPkcs1v15Profile;rsa
pub use auth::RsaPrivateKey;rsa
pub use auth::RsaPrivateKeyParts;rsa
pub use auth::RsaPrivateOpError;rsa
pub use auth::RsaPrivateScratch;rsa
pub use auth::RsaProtocolAlgorithmError;rsa
pub use auth::RsaPssProfile;rsa
pub use auth::RsaPublicExponent;rsa
pub use auth::RsaPublicExponentPolicy;rsa
pub use auth::RsaPublicKey;rsa
pub use auth::RsaPublicKeyPolicy;rsa
pub use auth::RsaPublicOpError;rsa
pub use auth::RsaPublicScratch;rsa
pub use auth::RsaSignatureProfile;rsa
pub use auth::RsaSignatureSigner;rsa
pub use auth::RsaSignatureVerifier;rsa
pub use auth::RsaTlsSignatureSchemes;rsa
pub use auth::RsaX509PublicKey;rsa
pub use auth::RsaX509PublicKeyAlgorithm;rsa
pub use auth::Scrypt;scrypt
pub use auth::ScryptBlock;scrypt
pub use auth::ScryptError;scrypt
pub use auth::ScryptParams;scrypt
pub use auth::ScryptPassword;phc-strings and scrypt
pub use auth::ScryptVerificationLimits;phc-strings and scrypt
pub use auth::X25519Error;x25519
pub use auth::X25519PublicKey;x25519
pub use auth::X25519SecretKey;x25519
pub use auth::X25519SharedSecret;x25519
pub use checksum::Crc24OpenPgp;crc24
pub use checksum::Crc16Ccitt;crc16
pub use checksum::Crc16Ibm;crc16
pub use checksum::Crc32;crc32
pub use checksum::Crc32C;crc32
pub use checksum::Crc64;crc64
pub use checksum::Crc64Nvme;crc64
pub use hashes::crypto::Blake2Error;blake2b or blake2s
pub use hashes::crypto::ascon::AsconCxofCustomizationError;ascon-hash
pub use hashes::crypto::AsconCxof128;ascon-hash
pub use hashes::crypto::AsconCxof128Reader;ascon-hash
pub use hashes::crypto::AsconHash256;ascon-hash
pub use hashes::crypto::AsconXof;ascon-hash
pub use hashes::crypto::AsconXofReader;ascon-hash
pub use hashes::crypto::Blake2b;blake2b
pub use hashes::crypto::Blake2b256;blake2b
pub use hashes::crypto::Blake2b512;blake2b
pub use hashes::crypto::Blake2bKey;blake2b
pub use hashes::crypto::Blake2bParams;blake2b
pub use hashes::crypto::Blake2s128;blake2s
pub use hashes::crypto::Blake2s256;blake2s
pub use hashes::crypto::Blake2sKey;blake2s
pub use hashes::crypto::Blake2sParams;blake2s
pub use hashes::crypto::Blake3;blake3
pub use hashes::crypto::Blake3DeriveContext;blake3
pub use hashes::crypto::Blake3KeyedHash;blake3
pub use hashes::crypto::Blake3XofReader;blake3
pub use hashes::crypto::Cshake128;sha3
pub use hashes::crypto::Cshake128XofReader;sha3
pub use hashes::crypto::Cshake256;sha3
pub use hashes::crypto::Cshake256XofReader;sha3
pub use hashes::crypto::Sha3_224;sha3
pub use hashes::crypto::Sha3_256;sha3
pub use hashes::crypto::Sha3_384;sha3
pub use hashes::crypto::Sha3_512;sha3
pub use hashes::crypto::Shake128;sha3
pub use hashes::crypto::Shake128XofReader;sha3
pub use hashes::crypto::Shake256;sha3
pub use hashes::crypto::Shake256XofReader;sha3
pub use hashes::crypto::Sha224;sha2
pub use hashes::crypto::Sha256;sha2
pub use hashes::crypto::Sha384;sha2
pub use hashes::crypto::Sha512;sha2
pub use hashes::crypto::Sha512_256;sha2
pub use hashes::fast::RapidHash64;rapidhash
pub use hashes::fast::RapidHasher;rapidhash
pub use hashes::fast::RapidRandomState;rapidhash
pub use hashes::fast::RapidSeededState;rapidhash
pub use hashes::fast::RapidStreamHasher;rapidhash
pub use hashes::fast::Xxh3;xxh3
pub use hashes::fast::Xxh3_128;xxh3
pub use hashes::fast::Xxh3_128Hasher;xxh3
pub use hashes::fast::Xxh3BuildHasher;xxh3
pub use hashes::fast::Xxh3Hasher;xxh3
pub use traits::Aead;aegis256 or aes-gcm-siv or aes-gcm or aes-siv or ascon-aead or chacha20poly1305 or xchacha20poly1305
pub use traits::Checksum;
pub use traits::ChecksumCombine;
pub use traits::Kem;
pub use traits::Mac;
pub use traits::TrySigner;
pub use traits::TrySignerInto;
pub use traits::VerificationError;
pub use traits::Verifier;
pub use traits::ct;
pub use traits::Digest;ascon-hash or blake2b or blake2s or blake3 or rapidhash or sha2 or sha3 or xxh3
pub use traits::FastHash;ascon-hash or blake2b or blake2s or blake3 or rapidhash or sha2 or sha3 or xxh3
pub use traits::Xof;ascon-hash or blake2b or blake2s or blake3 or rapidhash or sha2 or sha3 or xxh3

Modules§

aeadaegis256 or aes-gcm-siv or aes-gcm or aes-siv or ascon-aead or chacha20poly1305 or xchacha20poly1305
Authenticated encryption with associated data foundations.
authargon2 or ecdsa-p256 or ecdsa-p384 or ed25519 or hkdf or hmac-sha3 or hmac or kmac or ml-dsa or ml-kem or p256-ecdh or p384-ecdh or phc-strings or poly1305 or rsa or scrypt or slh-dsa or x25519
Authentication and key-derivation primitives.
checksumcrc16 or crc24 or crc32 or crc64
High-performance CRC checksums.
expert
Explicitly dangerous capabilities that normal application code does not need.
hashesascon-hash or blake2b or blake2s or blake3 or rapidhash or sha2 or sha3 or websocket-sha1 or xxh3
Cryptographic digests and fast non-cryptographic hashes.
platform
CPU detection and capability reporting.
prelude
Trait-first imports for rscrypto user code.
traits
Core cryptographic traits for rscrypto.

Structs§

SecretBytes
Owned secret bytes that zeroize on drop.
SecretStringalloc
Owned UTF-8 secret that zeroizes its initialized bytes on drop.
SecretVecalloc
Owned variable-length secret bytes that zeroize on drop.

Enums§

InvalidHexError(aegis256 or aes-gcm-siv or aes-gcm or aes-siv or ascon-aead or blake3 or chacha20poly1305 or ecdsa-p256 or ecdsa-p384 or ed25519 or ml-kem or p256-ecdh or p384-ecdh or x25519 or xchacha20poly1305) and (aegis256 or aes-gcm-siv or aes-gcm or aes-siv or ascon-aead or chacha20poly1305 or ed25519 or ml-kem or x25519 or xchacha20poly1305)
Hex decoding error.
SecretVecConstructionErroralloc
Error constructing a SecretVec in place.