key-vault 1.0.0

Enterprise-grade key management vault for Rust. 9-layer defense-in-depth: fragmentation, decoy bytes, codex transform, mlock + zeroize, constant-time ops, security monitoring. Pluggable key fetchers (TPM, keychain, file, env). Sub-microsecond access. REPS-compliant.
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.85"
name = "key-vault"
version = "1.0.0"
authors = ["James Gober <me@jamesgober.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Enterprise-grade key management vault for Rust. 9-layer defense-in-depth: fragmentation, decoy bytes, codex transform, mlock + zeroize, constant-time ops, security monitoring. Pluggable key fetchers (TPM, keychain, file, env). Sub-microsecond access. REPS-compliant."
homepage = "https://github.com/jamesgober/key-vault"
documentation = "https://docs.rs/key-vault"
readme = "README.md"
keywords = [
    "vault",
    "keys",
    "encryption",
    "secure",
    "keychain",
]
categories = [
    "cryptography",
    "authentication",
    "memory-management",
    "os",
    "api-bindings",
]
license = "Apache-2.0 OR MIT"
repository = "https://github.com/jamesgober/key-vault"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[features]
audit = []
codex = []
codex-dynamic = ["codex"]
decoy-all = [
    "decoy-random",
    "decoy-self-ref",
    "decoy-key-derived",
]
decoy-key-derived = []
decoy-random = []
decoy-self-ref = []
default = [
    "std",
    "mlock",
    "zeroize",
    "fragment-standard",
    "decoy-self-ref",
]
fetcher-all = [
    "fetcher-keychain",
    "fetcher-file",
    "fetcher-env",
]
fetcher-env = []
fetcher-file = []
fetcher-keychain = ["dep:keyring"]
fetcher-tpm = []
fragment-all = [
    "fragment-standard",
    "fragment-interleaved",
    "fragment-random",
    "fragment-layered",
]
fragment-interleaved = []
fragment-layered = []
fragment-random = []
fragment-standard = []
mlock = []
monitor = []
monitor-tracing = [
    "monitor",
    "dep:tracing",
]
post-quantum = []
preset-balanced = [
    "std",
    "mlock",
    "zeroize",
    "fragment-standard",
    "decoy-self-ref",
]
preset-fast = [
    "std",
    "fragment-standard",
    "decoy-random",
]
preset-paranoid = [
    "std",
    "mlock",
    "zeroize",
    "fragment-layered",
    "decoy-all",
    "codex",
    "monitor",
    "audit",
    "tee-detect",
]
std = []
tee-detect = []
zeroize = ["dep:zeroize"]

[lib]
name = "key_vault"
path = "src/lib.rs"

[[example]]
name = "dhat_hot_path"
path = "examples/dhat_hot_path.rs"
required-features = []

[[test]]
name = "fragment_roundtrip"
path = "tests/fragment_roundtrip.rs"

[[test]]
name = "fragment_strategies"
path = "tests/fragment_strategies.rs"

[[test]]
name = "mlock_verified"
path = "tests/mlock_verified.rs"

[[test]]
name = "proptest_invariants"
path = "tests/proptest_invariants.rs"

[[test]]
name = "registry_concurrent"
path = "tests/registry_concurrent.rs"

[[test]]
name = "smoke"
path = "tests/smoke.rs"

[[test]]
name = "tee_detection"
path = "tests/tee_detection.rs"

[[bench]]
name = "access_latency"
path = "benches/access_latency.rs"
harness = false

[[bench]]
name = "codex_overhead"
path = "benches/codex_overhead.rs"
harness = false

[[bench]]
name = "concurrent_access"
path = "benches/concurrent_access.rs"
harness = false

[[bench]]
name = "decoy_strategies"
path = "benches/decoy_strategies.rs"
harness = false

[[bench]]
name = "fragment_strategies"
path = "benches/fragment_strategies.rs"
harness = false

[[bench]]
name = "memory_overhead"
path = "benches/memory_overhead.rs"
harness = false

[dependencies.arc-swap]
version = "1.7"

[dependencies.blake3]
version = "1"

[dependencies.getrandom]
version = "0.2"

[dependencies.keyring]
version = "3"
optional = true

[dependencies.rand_core]
version = "0.6"

[dependencies.subtle]
version = "2.5"

[dependencies.tracing]
version = "0.1"
optional = true

[dependencies.zeroize]
version = "1.7"
features = ["derive"]
optional = true

[dev-dependencies.criterion]
version = "0.5"
features = ["html_reports"]

[dev-dependencies.dhat]
version = "0.3"

[dev-dependencies.proptest]
version = "1"

[target."cfg(unix)".dependencies.libc]
version = "0.2"

[target."cfg(windows)".dependencies.windows-sys]
version = "0.59"
features = ["Win32_System_Memory"]

[profile.bench]
opt-level = 3
lto = "fat"
codegen-units = 1
debug = 2

[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
strip = "symbols"