Skip to main content

shadow_crypt/
lib.rs

1//! # Shadow Crypt
2//!
3//! Password-based file encryption with filename obfuscation.
4//!
5//! `shadow` turns files and directories into anonymously named `.shadow`
6//! containers. `unshadow` restores them. `shadows` lists them.
7//!
8//! ## Features
9//!
10//! - **Strong cryptography**: XChaCha20-Poly1305 authenticated encryption,
11//!   Argon2id key derivation
12//! - **Metadata encrypted**: filenames, timestamps, and permissions travel
13//!   inside an encrypted metadata envelope; a directory becomes a single
14//!   archive that hides even its file count and sizes
15//! - **Tamper-evident**: headers are bound to the ciphertext as AEAD
16//!   associated data; chunk counters make reordering and truncation fail
17//! - **Any size**: streaming encryption and decryption with bounded memory
18//! - **Pure Rust**: no C or system libraries
19//!
20//! ## Command line usage
21//!
22//! ```bash
23//! shadow notes.txt photos/     # encrypt files and directories
24//! unshadow mzpuTgQmBPJfTAJh.shadow
25//! shadows                      # list .shadow files with original names
26//! ```
27//!
28//! See the repository's `docs/FORMAT.md` for the file format specification
29//! and `docs/THREAT_MODEL.md` for the threat model.
30//!
31//! ## Architecture
32//!
33//! - [`core`] - Core cryptographic operations and types (deterministic, no I/O)
34//! - [`shell`] - Command-line interface and file I/O operations
35
36// Re-export the shell crate for unified documentation
37/// Main workflows and I/O operations.
38#[doc(inline)]
39pub use shadow_crypt_shell as shell;
40
41/// Core types and deterministic operations.
42#[doc(inline)]
43pub use shadow_crypt_core as core;