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