Skip to content

Commit 26a754b

Browse files
committed
Documentation: Use "KDF" instead of "PKCS-5 PRF". Add Argon2 related information.
1 parent 54c39e4 commit 26a754b

7 files changed

Lines changed: 255 additions & 30 deletions

doc/html/en/Argon2.html

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
5+
<title>VeraCrypt - Free Open source disk encryption with strong security for the Paranoid</title>
6+
<meta name="description" content="VeraCrypt is free open-source disk encryption software for Windows, Mac OS X and Linux. In case an attacker forces you to reveal the password, VeraCrypt provides plausible deniability. In contrast to file encryption, data encryption performed by VeraCrypt is real-time (on-the-fly), automatic, transparent, needs very little memory, and does not involve temporary unencrypted files."/>
7+
<meta name="keywords" content="encryption, security"/>
8+
<link href="styles.css" rel="stylesheet" type="text/css" />
9+
</head>
10+
<body>
11+
12+
<div>
13+
<a href="Documentation.html"><img src="VeraCrypt128x128.png" alt="VeraCrypt"/></a>
14+
</div>
15+
16+
<div id="menu">
17+
<ul>
18+
<li><a href="Home.html">Home</a></li>
19+
<li><a href="Code.html">Source Code</a></li>
20+
<li><a href="Downloads.html">Downloads</a></li>
21+
<li><a class="active" href="Documentation.html">Documentation</a></li>
22+
<li><a href="Donation.html">Donate</a></li>
23+
<li><a href="https://sourceforge.net/p/veracrypt/discussion/" target="_blank">Forums</a></li>
24+
</ul>
25+
</div>
26+
27+
<div>
28+
<p>
29+
<a href="Documentation.html">Documentation</a>
30+
<img src="arrow_right.gif" alt=">>" style="margin-top: 5px">
31+
<a href="Hash%20Algorithms.html">Hash Algorithms</a>
32+
<img src="arrow_right.gif" alt=">>" style="margin-top: 5px">
33+
<a href="Argon2id.html">Argon2id</a>
34+
</p></div>
35+
36+
<div class="wikidoc">
37+
<h1>Argon2id</h1>
38+
<div style="text-align:left; margin-top:19px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
39+
Argon2id is a memory-hard key derivation function designed to resist both time-memory trade-off attacks and side-channel attacks. It was selected as the winner of the Password Hashing Competition (PHC) in 2015 and is defined in RFC 9106. VeraCrypt supports Argon2id as an alternative to PBKDF2-HMAC for header key derivation.
40+
</div>
41+
42+
<h3>Key Features</h3>
43+
<ul style="text-align:left; margin-top:18px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
44+
<li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
45+
<strong>Memory-hard:</strong> Requires a configurable amount of memory, making it resistant to specialized hardware attacks
46+
</li>
47+
<li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
48+
<strong>Side-channel resistant:</strong> Combines data-dependent and data-independent memory access patterns
49+
</li>
50+
<li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
51+
<strong>Internal hash function:</strong> Uses BLAKE2b internally, eliminating the need for separate hash algorithm selection
52+
</li>
53+
<li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
54+
<strong>Tunable parameters:</strong> Allows adjustment of memory cost, time cost, and parallelism
55+
</li>
56+
</ul>
57+
58+
<h3>Argon2 Variants</h3>
59+
<div style="text-align:left; margin-top:19px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
60+
Argon2 has three variants:
61+
</div>
62+
<ul style="text-align:left; margin-top:18px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
63+
<li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
64+
<strong>Argon2d:</strong> Uses data-dependent memory access, resistant to time-memory trade-off attacks but vulnerable to side-channel attacks
65+
</li>
66+
<li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
67+
<strong>Argon2i:</strong> Uses data-independent memory access, resistant to side-channel attacks but more vulnerable to time-memory trade-off attacks
68+
</li>
69+
<li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
70+
<strong>Argon2id:</strong> Hybrid approach that combines both variants, providing resistance to both attack types (used by VeraCrypt)
71+
</li>
72+
</ul>
73+
74+
<h3>Parameters in VeraCrypt</h3>
75+
<div style="text-align:left; margin-top:19px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
76+
VeraCrypt uses Argon2id with the following parameter configuration:
77+
</div>
78+
79+
<h4>Memory Cost (m_cost)</h4>
80+
<div style="text-align:left; margin-top:19px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
81+
The amount of memory used during the key derivation process, controlled by the PIM value:
82+
</div>
83+
<ul style="text-align:left; margin-top:18px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
84+
<li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
85+
<strong>Formula:</strong> m_cost(pim) = min(64 MiB + (pim - 1) × 32 MiB, 1024 MiB)
86+
</li>
87+
<li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
88+
<strong>Range:</strong> 64 MiB to 1024 MiB (capped at PIM = 31)
89+
</li>
90+
<li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
91+
<strong>Default:</strong> 96 MiB (equivalent to PIM = 2)
92+
</li>
93+
</ul>
94+
95+
<h4>Time Cost (t_cost)</h4>
96+
<div style="text-align:left; margin-top:19px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
97+
The number of iterations performed during the key derivation process:
98+
</div>
99+
<ul style="text-align:left; margin-top:18px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
100+
<li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
101+
<strong>For PIM ≤ 31:</strong> t_cost(pim) = 3 + floor((pim - 1) / 3)
102+
</li>
103+
<li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
104+
<strong>For PIM > 31:</strong> t_cost(pim) = 13 + (pim - 31)
105+
</li>
106+
<li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
107+
<strong>Default:</strong> 3 iterations (equivalent to PIM = 2)
108+
</li>
109+
</ul>
110+
111+
<h4>Parallelism</h4>
112+
<div style="text-align:left; margin-top:19px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
113+
The number of parallel threads used during computation:
114+
</div>
115+
<ul style="text-align:left; margin-top:18px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
116+
<li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
117+
<strong>Value:</strong> Fixed at 1 thread for all cases in VeraCrypt
118+
</li>
119+
<li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
120+
<strong>Rationale:</strong> Ensures consistent behavior across different hardware configurations
121+
</li>
122+
</ul>
123+
124+
<h3>Advantages over PBKDF2</h3>
125+
<ul style="text-align:left; margin-top:18px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
126+
<li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
127+
<strong>Memory hardness:</strong> Requires significant memory allocation, making GPU and ASIC attacks more expensive
128+
</li>
129+
<li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
130+
<strong>Modern design:</strong> Specifically designed to resist contemporary attack methods
131+
</li>
132+
<li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
133+
<strong>Side-channel resistance:</strong> Built-in protections against cache-timing and other side-channel attacks
134+
</li>
135+
<li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
136+
<strong>Standardization:</strong> Officially standardized in RFC 9106
137+
</li>
138+
</ul>
139+
140+
<h3>Usage Considerations</h3>
141+
<div style="text-align:left; margin-top:19px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
142+
When using Argon2id in VeraCrypt:
143+
</div>
144+
<ul style="text-align:left; margin-top:18px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
145+
<li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
146+
<strong>Memory requirements:</strong> Ensure sufficient RAM is available, especially with higher PIM values
147+
</li>
148+
<li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
149+
<strong>Performance:</strong> Higher memory costs may result in slower mounting times but provide better security
150+
</li>
151+
<li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
152+
<strong>Compatibility:</strong> Available in VeraCrypt versions that support multiple key derivation functions
153+
</li>
154+
<li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
155+
<strong>No hash selection:</strong> Unlike PBKDF2-HMAC, no separate hash algorithm needs to be chosen
156+
</li>
157+
</ul>
158+
159+
<h3>Technical Specifications</h3>
160+
<div style="text-align:left; margin-top:19px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
161+
<strong>Algorithm:</strong> Argon2id as defined in RFC 9106<br/>
162+
<strong>Internal hash:</strong> BLAKE2b<br/>
163+
<strong>Salt size:</strong> 512 bits (same as PBKDF2-HMAC)<br/>
164+
<strong>Output length:</strong> Variable, depending on the encryption algorithm (e.g., 256 bits for AES-256, 768 bits for AES-Twofish-Serpent cascade)<br/>
165+
<strong>Version:</strong> Argon2 version 0x13 (19 decimal)
166+
</div>
167+
168+
<div style="text-align:left; margin-top:19px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
169+
For more information about PIM values and their effect on Argon2id parameters, see the
170+
<a href="Personal%20Iterations%20Multiplier%20%28PIM%29.html" style="text-align:left; color:#0080c0; text-decoration:none">
171+
Personal Iterations Multiplier (PIM)</a> section.
172+
</div>
173+
174+
<p><a href="SHA-256.html" style="text-align:left; color:#0080c0; text-decoration:none; font-weight:bold">Next Section &gt;&gt;</a></p>
175+
</div><div class="ClearBoth"></div></body></html>

doc/html/en/Encryption Scheme.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,15 @@ <h1>Encryption Scheme</h1>
5050
</li><li>Now VeraCrypt attempts to decrypt the standard volume header read in (1). All data used and generated in the course of the process of decryption are kept in RAM (VeraCrypt never saves them to disk). The following parameters are unknown&dagger; and have
5151
to be determined through the process of trial and error (i.e., by testing all possible combinations of the following):
5252
<ol type="a">
53-
<li>PRF used by the header key derivation function (as specified in PKCS #5 v2.0; see the section
53+
<li>Key Derivation Function (KDF) and associated parameters:
54+
<ul>
55+
<li><strong>PBKDF2-HMAC:</strong> PRF used by the header key derivation function (as specified in PKCS #5 v2.0; see the section
5456
<a href="Header%20Key%20Derivation.html">
5557
<em>Header Key Derivation, Salt, and Iteration Count</em></a>), which can be one of the following:
56-
<p>HMAC-SHA-512, HMAC-SHA-256, HMAC-BLAKE2S-256, HMAC-Whirlpool. If a PRF is explicitly specified by the user, it will be used directly without trying the other possibilities.</p>
58+
HMAC-SHA-512, HMAC-SHA-256, HMAC-BLAKE2S-256, HMAC-Whirlpool, HMAC-Streebog.</li>
59+
<li><strong>Argon2id:</strong> Memory-hard key derivation function with internal BLAKE2b hash function.</li>
60+
</ul>
61+
<p>If a PRF is explicitly specified by the user, it will be used directly without trying the other possibilities.</p>
5762
<p>A password entered by the user (to which one or more keyfiles may have been applied &ndash; see the section
5863
<a href="Keyfiles%20in%20VeraCrypt.html">
5964
<em>Keyfiles</em></a>), a PIM value (if specified) and the salt read in (1) are passed to the header key derivation function, which produces a sequence of values (see the section

doc/html/en/Hash Algorithms.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,14 @@
3434
<div class="wikidoc">
3535
<h1>Hash Algorithms</h1>
3636
<div style="text-align:left; margin-top:19px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
37-
In the Volume Creation Wizard, in the password change dialog window, and in the Keyfile Generator dialog window, you can select a hash algorithm. A user-selected hash algorithm is used by the VeraCrypt Random Number Generator as a pseudorandom &quot;mixing&quot; function,
38-
and by the header key derivation function (HMAC based on a hash function, as specified in PKCS #5 v2.0) as a pseudorandom function. When creating a new volume, the Random Number Generator generates the master key, secondary key (XTS mode), and salt. For more
37+
In the Volume Creation Wizard, in the password change dialog window, and in the Keyfile Generator dialog window, you can select a hash algorithm when using PBKDF2-HMAC as the key derivation function. When Argon2id is selected as the key derivation function, no hash algorithm selection is available as Argon2id uses its own internal BLAKE2b hash function.
38+
</div>
39+
<div style="text-align:left; margin-top:19px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
40+
For PBKDF2-HMAC, the user-selected hash algorithm is used by the VeraCrypt Random Number Generator as a pseudorandom &quot;mixing&quot; function, and by the header key derivation function (HMAC based on a hash function, as specified in PKCS #5 v2.0) as a pseudorandom function. When creating a new volume, the Random Number Generator generates the master key, secondary key (XTS mode), and salt. For more
3941
information, please see the section <a href="Random%20Number%20Generator.html" style="text-align:left; color:#0080c0; text-decoration:none">
4042
Random Number Generator</a> and section <a href="Header%20Key%20Derivation.html" style="text-align:left; color:#0080c0; text-decoration:none">
4143
Header Key Derivation, Salt, and Iteration Count</a>.</div>
42-
<div style="text-align:left; margin-top:19px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
43-
VeraCrypt currently supports the following hash algorithms:</div>
44+
VeraCrypt currently supports the following hash algorithms for PBKDF2-HMAC:</div>
4445
<ul style="text-align:left; margin-top:18px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
4546
<li style="text-align:left; margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px">
4647
<a href="BLAKE2s-256.html"><strong style="text-align:left">BLAKE2s-256</strong></a>

0 commit comments

Comments
 (0)