Skip to main content

shadow_crypt_core/
lib.rs

1//! # Shadow Crypt Core
2//!
3//! Core layer for shadow_crypt providing types and deterministic operations without side effects.
4//!
5//! This crate implements version-specific file format and encryption.
6//! Algorithm choices may differ across versions.
7
8/// Supported encryption algorithms.
9pub mod algorithm;
10
11/// The archive payload format for directory trees, carried inside an
12/// encrypted file's content stream.
13pub mod archive;
14
15/// Error types for cryptographic operations.
16pub mod errors;
17
18/// Version-independent file types shared by all format versions.
19pub mod file;
20
21/// Secure memory management with automatic zeroization of sensitive data.
22pub mod memory;
23
24/// Security profiles for different operational contexts.
25pub mod profile;
26
27/// Progress tracking utilities for long-running operations.
28pub mod progress;
29
30/// Reporting structures for encryption and decryption operations.
31pub mod report;
32
33/// Version 1 implementation of the encryption protocol
34///
35/// Uses XChaCha20-Poly1305 with Argon2id key derivation.
36pub mod v1;
37
38/// Version 2 implementation of the encryption protocol
39///
40/// Same algorithms as v1, but authenticates the header via associated data
41/// with domain separation between filename and content encryption.
42pub mod v2;
43
44/// Version 3 implementation of the encryption protocol
45///
46/// Same algorithms and header authentication as v2, but the content is
47/// encrypted as a stream of chunks (bounded memory for any file size) and
48/// the header stores an encrypted metadata envelope (filename, mtime, mode).
49pub mod v3;
50
51/// Version-erased reading of shadow files across all format versions.
52pub mod vault;
53
54/// Version management for encryption formats.
55pub mod version;