You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rscrypto is a single-crate crypto and checksum toolbox with a deliberately curated root surface. The root exports cover the default algorithms and traits; more specialized controls stay under explicit modules such as checksum::config, checksum::introspect, hashes::introspect, hashes::fast, and platform.
Design: no C FFI, no vendored C/C++, no_std first, portable fallback is authoritative, and ISA-specific kernels are accelerators rather than separate APIs.
Performance Posture
The canonical competitive report is docs/bench/BENCHMARKS.md, currently based on CI run #23822408700 from March 31, 2026.
Release gate 2, pure win rate (W / total): 1396 / 2155 = 64.78% — below the 70% public-release bar.
Current claim: rscrypto is broadly competitive and often faster, but it does not yet clear this project's public-release performance bar.
Current Ed25519 reality: signing is strong in the canonical sweep (27W / 1T / 0L), verification is not (3W / 4T / 21L). Do not describe Ed25519 as uniformly behind or uniformly ahead.
Invariants
Invariant
What it guarantees
What breaks if violated
Portable fallback is the authority
SIMD and ISA dispatch only change speed
Wrong digest or checksum output
Backends are byte-for-byte equivalent
Dispatch is transparent to callers
Silent data corruption
Verification errors stay opaque
MAC and signature checks do not leak extra detail
Timing and oracle risk
Secret material is zeroized on drop where stored
Keying material does not linger in owned buffers
Key retention in memory
Root exports stay small and uniform
Default UX is easy to discover
Public API turns into a junk drawer
Official vectors and differential tests stay green
Algorithms match published behavior and reference crates
Interop and correctness failures
Repository-level evidence:
Official vector coverage: tests/sha256_official_vectors.rs, tests/sha3_official_vectors.rs, tests/blake3_official_vectors.rs, tests/ascon_official_vectors.rs, tests/hmac_sha256_vectors.rs, tests/hkdf_sha256_vectors.rs, tests/ed25519_rfc8032_vectors.rs
Cryptographic hashes, XOFs, fast hashes, introspection, I/O
src/lib.rs:182, src/hashes/mod.rs:20
platform
CPU capability detection and override control
src/lib.rs:175, src/platform/mod.rs:35
traits
Core contracts and constant-time helpers
src/lib.rs:176, src/traits/mod.rs:32
ct
Constant-time equality and zeroization helpers
src/lib.rs:200, src/traits/ct.rs:24
Traits and Core Utility
Item
Kind
Purpose
Source
Checksum
trait
Stateful and one-shot checksum API
src/traits/checksum.rs:51
ChecksumCombine
trait
Parallel CRC combine contract
src/traits/checksum.rs:280
Digest
trait
Stateful and one-shot fixed-output digest API
src/traits/digest.rs:11
Xof
trait
Arbitrary-output squeeze API
src/traits/xof.rs:7
Mac
trait
Keyed streaming MAC API
src/traits/mac.rs:13
FastHash
trait
One-shot seeded fast hash API
src/traits/fast_hash.rs:13
VerificationError
error type
Opaque verification failure
src/traits/error.rs:38
ct::constant_time_eq
fn
Constant-time byte comparison
src/traits/ct.rs:24
ct::zeroize
fn
Best-effort buffer wiping
src/traits/ct.rs:50
Root Checksums
Type
Kind
Purpose
Source
Crc16Ccitt
struct
CRC-16/CCITT
src/checksum/crc16/mod.rs:411
Crc16Ibm
struct
CRC-16/IBM
src/checksum/crc16/mod.rs:553
Crc24OpenPgp
struct
CRC-24/OpenPGP
src/checksum/crc24/mod.rs:250
Crc32
struct
CRC-32/IEEE default
src/checksum/crc32/mod.rs:585
Crc32C
struct
CRC-32C/Castagnoli default
src/checksum/crc32/mod.rs:728
Crc64
struct
CRC-64/XZ default
src/checksum/crc64/mod.rs:530
Crc64Nvme
struct
CRC-64/NVME
src/checksum/crc64/mod.rs:691
Root Cryptographic Hashes and XOFs
Type
Kind
Purpose
Source
Sha224
struct
SHA-224 digest
src/hashes/crypto/sha224.rs:42
Sha256
struct
SHA-256 digest
src/hashes/crypto/sha256/mod.rs:304
Sha384
struct
SHA-384 digest
src/hashes/crypto/sha384.rs:36
Sha512
struct
SHA-512 digest
src/hashes/crypto/sha512/mod.rs:180
Sha512_256
struct
SHA-512/256 digest
src/hashes/crypto/sha512_256.rs:36
Sha3_224
struct
SHA3-224 digest
src/hashes/crypto/sha3.rs:18
Sha3_256
struct
SHA3-256 digest
src/hashes/crypto/sha3.rs:12
Sha3_384
struct
SHA3-384 digest
src/hashes/crypto/sha3.rs:143
Sha3_512
struct
SHA3-512 digest
src/hashes/crypto/sha3.rs:137
Shake128
struct
SHAKE128 state
src/hashes/crypto/sha3.rs:257
Shake128XofReader
struct
SHAKE128 XOF reader
src/hashes/crypto/sha3.rs:325
Shake256
struct
SHAKE256 state
src/hashes/crypto/sha3.rs:251
Shake256XofReader
struct
SHAKE256 XOF reader
src/hashes/crypto/sha3.rs:394
Blake3
struct
BLAKE3 digest and XOF entry point
src/hashes/crypto/blake3/mod.rs:2318
Blake3XofReader
struct
BLAKE3 XOF reader
src/hashes/crypto/blake3/mod.rs:3122
AsconHash256
struct
Ascon hash
src/hashes/crypto/ascon.rs:383
AsconXof
struct
Ascon XOF state
src/hashes/crypto/ascon.rs:578
AsconXofReader
struct
Ascon XOF reader
src/hashes/crypto/ascon.rs:787
Root Authentication and KDF Types
Type
Kind
Purpose
Source
HmacSha256
struct
HMAC-SHA256 MAC state
src/auth/hmac.rs:34
HkdfSha256
struct
HKDF-SHA256 extract/expand state
src/auth/hkdf.rs:59
Ed25519SecretKey
struct
Typed Ed25519 secret key
src/auth/ed25519.rs:97
Ed25519PublicKey
struct
Typed Ed25519 public key
src/auth/ed25519.rs:160
Ed25519Signature
struct
Typed Ed25519 signature
src/auth/ed25519.rs:210
Ed25519Keypair
struct
Typed Ed25519 keypair
src/auth/ed25519.rs:253
verify_ed25519
fn
Free-function Ed25519 verification
src/auth/ed25519.rs:305
Root Fast Hashes
Type
Kind
Purpose
Source
Xxh3
re-export
Canonical 64-bit XXH3 root name
src/hashes/fast/mod.rs:11
Xxh3_128
struct
128-bit XXH3
src/hashes/fast/xxh3.rs:31
RapidHash
re-export
Canonical 64-bit rapidhash root name
src/hashes/fast/mod.rs:10
RapidHash128
struct
128-bit rapidhash
src/hashes/fast/rapidhash.rs:30
RapidHashFast64 and RapidHashFast128 are public but intentionally module-only under rscrypto::hashes::fast::*. They are tuned for in-process hashing, not the default root surface.