ddidderr 725d33939e fix: read key files through short reads
Read --key-file input in a loop until EOF or until the 33-byte rejection
threshold is reached. A single read call is enough for ordinary regular files
in practice, but FIFOs and process substitution can legally return fewer than
32 bytes before EOF. Treating that first short read as final made the new
key-file path fail spuriously for exactly the shell-friendly usage it was meant
to support.

Keep the existing exact-length policy: 32 bytes is accepted, shorter files are
rejected, and 33 or more bytes are rejected with the trailing-newline hint.
The intermediate buffer remains zeroizing.

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

Refs: review finding for --key-file short reads
2026-06-09 23:46:27 +02:00
2026-05-03 14:48:55 +02:00

fcry - [f]ile[cry]pt

A file en-/decryption tool for easy use.

Currently fcry uses ChaCha20Poly1305 (RFC 8439) as AEAD cipher provided by the chacha20poly1305 crate.

Status

Currently fcry is not thoroughly tested and in early stages of development.
There is a chance, that something is broken as of now.
Encryption seems to work, but due to a possible lack of understanding of some underlying methods (or misinterpretation) it could theoretically be not effective at all.

See TODO.md for further information.

S
Description
fcry - [f]ile[cry]pt: A file en-/decryption tool for easy use.
Readme MIT-0 450 KiB
Languages
Rust 99.7%
Just 0.3%