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
//! # veracrypt-core — pure-Rust VeraCrypt/TrueCrypt reader and decryptor
//!
//! Brute the volume header's PRF + cipher from a password, recover the master
//! key, and decrypt the data area. Panic-free and `forbid(unsafe)`; every crypto
//! primitive is an audited RustCrypto crate.
//!
//! ```no_run
//! use std::fs::File;
//! let mut vol = veracrypt::VeraVolume::unlock_with_password(
//! File::open("container.vc")?,
//! b"passphrase",
//! )?;
//! let mut first = [0u8; 512];
//! vol.read_at(0, &mut first)?;
//! # Ok::<(), Box<dyn std::error::Error>>(())
//! ```
//!
//! Correctness is validated against `cryptsetup --veracrypt` on a real VeraCrypt
//! volume with a published password (Tier-1); see `docs/validation.md`.
pub use ;
pub use ;
pub use ;
pub use ;