[package]
name = "crypt-io"
version = "0.8.0"
edition = "2024"
rust-version = "1.85"
readme = "README.md"
license = "Apache-2.0 OR MIT"
authors = [
"James Gober <me@jamesgober.com>"
]
description = "AEAD encryption (ChaCha20-Poly1305, AES-256-GCM), hashing (BLAKE3, SHA-2), MAC (HMAC, BLAKE3 keyed), and KDF (HKDF, Argon2id) for Rust. Algorithm-agile. RustCrypto-backed primitives with REPS discipline. Simple API. Sub-microsecond throughput."
keywords = [
"encryption",
"cryptography",
"ciphers",
"crypto",
"hash"
]
categories = [
"cryptography",
"authentication",
"algorithms",
"encoding",
"data-structures"
]
documentation = "https://docs.rs/crypt-io"
repository = "https://github.com/jamesgober/crypt-io"
homepage = "https://github.com/jamesgober/crypt-io"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[lib]
name = "crypt_io"
path = "src/lib.rs"
[features]
default = ["std", "zeroize", "aead-chacha20", "aead-aes-gcm", "hash-blake3", "hash-sha2", "mac-hmac", "mac-blake3", "kdf-hkdf", "kdf-argon2", "stream"]
std = []
zeroize = ["dep:zeroize"]
aead-chacha20 = ["dep:chacha20poly1305"]
aead-aes-gcm = ["dep:aes-gcm"]
aead-all = ["aead-chacha20", "aead-aes-gcm"]
hash-blake3 = ["dep:blake3"]
hash-sha2 = ["dep:sha2"]
hash-all = ["hash-blake3", "hash-sha2"]
mac-hmac = ["dep:hmac", "hash-sha2"]
mac-blake3 = ["hash-blake3"]
mac-all = ["mac-hmac", "mac-blake3"]
kdf-hkdf = ["dep:hkdf", "hash-sha2"]
kdf-argon2 = ["dep:argon2"]
kdf-all = ["kdf-hkdf", "kdf-argon2"]
stream = ["aead-chacha20", "aead-aes-gcm"]
metrics = ["dep:metrics-lib"]
logging = ["dep:log-io"]
async-trait = ["dep:async-trait"]
preset-all = ["std", "zeroize", "aead-all", "hash-all", "mac-all", "kdf-all", "stream"]
preset-minimal = ["std", "aead-chacha20"]
[dependencies]
chacha20poly1305 = { version = "0.10", optional = true }
aes-gcm = { version = "0.10", optional = true }
blake3 = { version = "1", optional = true }
sha2 = { version = "0.10", optional = true }
hmac = { version = "0.12", optional = true }
hkdf = { version = "0.12", optional = true }
argon2 = { version = "0.5", optional = true }
mod-rand = { version = "1" }
error-forge = { version = "1" }
log-io = { version = "1", optional = true }
metrics-lib = { version = "1", optional = true }
zeroize = { version = "1.7", optional = true, features = ["derive"] }
async-trait = { version = "0.1", optional = true }
[dev-dependencies]
criterion = { version = "0.5", features = ["html_reports"] }
proptest = "1"
hex = "0.4"
[[bench]]
name = "aead"
harness = false
[[bench]]
name = "hash"
harness = false
[[bench]]
name = "mac"
harness = false
[[bench]]
name = "kdf"
harness = false
[[bench]]
name = "stream"
harness = false
[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
strip = "symbols"
[profile.bench]
opt-level = 3
lto = "fat"
codegen-units = 1
debug = true