shadow_crypt_core/profile.rs
1/// Named key-derivation cost levels. Each format version maps a profile to
2/// its own concrete Argon2id parameters (see the per-version `key` modules);
3/// the numbers below describe the current write format (v3).
4#[derive(Debug, Clone, Copy, PartialEq, Eq)]
5pub enum SecurityProfile {
6 /// The default: the OWASP Password Storage Cheat Sheet's recommended
7 /// Argon2id configuration with the highest memory hardness of the
8 /// equivalent set — 46 MiB memory, 1 iteration, parallelism 1. Fast
9 /// enough for batches and small machines.
10 Standard,
11 /// Maximum-cost derivation for high-value archives: 1 GiB memory,
12 /// 10 iterations, parallelism 4. Needs at least 1 GiB of free RAM and
13 /// takes seconds per file.
14 Paranoid,
15 /// For automated tests only: 1 MiB memory, 1 iteration. Insecure, and
16 /// password strength checks are skipped.
17 Test,
18}