Files
fcry/Cargo.toml
T
ddidderr 81ac1475ad feat: harden fcry format and IO policy
Introduce a central policy module for format and resource validation, then
route header parsing, KDF acceptance, range arithmetic, and pipeline sizing
through that policy. New encryptions now write v3 headers that include an
authenticated key commitment, which lets decrypt reject wrong keys or
passphrases before chunk processing while preserving valid v1/v2 decrypt
compatibility inside the configured caps.

Replace process-list-visible raw key input with --key-file, add passphrase NFC
normalization, enforce stronger new-encryption passphrase/KDF floors unless
--allow-weak-kdf is supplied, and add a configurable decrypt Argon2 memory
ceiling. Chunk buffers in the serial, parallel, and lookahead paths now use
zeroizing storage.

Rework output handling around randomized create-new temporary files with Unix
0600 mode, file fsync before persist, best-effort parent directory fsync,
default no-overwrite behavior, safe in-place replacement, --force, --temp-dir,
and --buffer-verify for decrypt-to-stdout.

Known caveat: --key-file currently reads with a single read call. That is fine
for regular files but can reject short reads from pipes or process
substitution. A follow-up fix will make key-file reads loop before EOF.

Test Plan:
- cargo fmt --check
- cargo clippy --all-targets -- -D warnings
- cargo test
- git diff --check
- cargo run -- --help

Refs: fcry security hardening plan
2026-06-09 23:45:02 +02:00

43 lines
803 B
TOML

[package]
name = "fcry"
version = "0.10.0"
edition = "2024"
[dependencies]
argon2 = "0.5"
chacha20poly1305 = "0.10"
clap = { version = "4", features = ["derive"] }
crossbeam-channel = "0.5"
getrandom = { version = "0.4" }
blake3 = "1"
protected-secrets = { package = "secrets", version = "1.3" }
same-file = "1"
unicode-normalization = "0.1"
zeroize = { version = "1", features = ["derive"] }
[dev-dependencies]
assert_cmd = "2"
tempfile = "3"
[target.'cfg(unix)'.dependencies]
libc = "0.2"
rlimit = "0.11"
[target.'cfg(windows)'.dependencies]
windows-sys = {
version = "0.61",
features = [
"Win32_Foundation",
"Win32_Security",
"Win32_Storage_FileSystem",
"Win32_System_Console",
]
}
[profile.release]
debug = false
strip = true
lto = true
panic = "unwind"
codegen-units = 1