Skip to content

Commit cb2f20a

Browse files
committed
Fix Argon2 hash alias for Windows CLI
Accept Argon2 and Argon2id aliases through HashGetIdByName so Windows mount parsing matches volume creation. Update Windows command-line documentation in English, Russian, and Chinese, and rebuild the CHM user guides.
1 parent a8a8e50 commit cb2f20a

7 files changed

Lines changed: 17 additions & 12 deletions

doc/chm/VeraCrypt User Guide.chm

-156 Bytes
Binary file not shown.
46 Bytes
Binary file not shown.
50 Bytes
Binary file not shown.

doc/html/en/Command Line Usage for Windows.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ <h1>Command Line Usage for Windows</h1>
4949
</tr>
5050
<tr>
5151
<td><em>/hash</em></td>
52-
<td>It must be followed by a parameter indicating the PRF hash algorithm or KDF to use when mounting the volume. Possible values for /hash parameter are: sha256, sha-256, sha512, sha-512, whirlpool, blake2s, blake2s-256, streebog, and blake2b-512 (for Argon2id volumes). When /hash is omitted, VeraCrypt will try
52+
<td>It must be followed by a parameter indicating the PRF hash algorithm or KDF to use when mounting the volume. Possible values for /hash parameter are: sha256, sha-256, sha512, sha-512, whirlpool, blake2s, blake2s-256, streebog, blake2b-512, argon2, and argon2id. The values blake2b-512, argon2, and argon2id select Argon2id volumes. When /hash is omitted, VeraCrypt will try
5353
all possible PRF/KDF algorithms thus lengthening the mount operation time.</td>
5454
</tr>
5555
<tr>
@@ -252,7 +252,7 @@ <h4>VeraCrypt Format.exe (VeraCrypt Volume Creation Wizard):</h4>
252252
<tr>
253253
<td>&nbsp;<em>/hash</em></td>
254254
<td>(Only with /create)<br>
255-
It must be followed by a parameter indicating the PRF hash algorithm or KDF to use when creating the volume. It has the same syntax as VeraCrypt.exe, and also accepts argon2 as an alias for Argon2id.</td>
255+
It must be followed by a parameter indicating the PRF hash algorithm or KDF to use when creating the volume. It has the same syntax as VeraCrypt.exe; argon2 and argon2id select Argon2id.</td>
256256
</tr>
257257
<tr>
258258
<td>/encryption</td>
@@ -324,9 +324,9 @@ <h4>VeraCrypt Format.exe (VeraCrypt Volume Creation Wizard):</h4>
324324
</tbody>
325325
</table>
326326
<h4>Syntax</h4>
327-
<p>VeraCrypt.exe [/tc] [/hash {sha256|sha-256|sha512|sha-512|whirlpool|blake2s|blake2s-256|streebog|blake2b-512}][/a [devices|favorites]] [/b] [/c [y|n|f]] [/d [drive letter]] [/e] [/f] [/h [y|n]] [/k keyfile or search path] [tryemptypass [y|n]] [/l drive letter] [/m {bk|rm|recovery|ro|sm|ts|noattach}]
327+
<p>VeraCrypt.exe [/tc] [/hash {sha256|sha-256|sha512|sha-512|whirlpool|blake2s|blake2s-256|streebog|blake2b-512|argon2|argon2id}][/a [devices|favorites]] [/b] [/c [y|n|f]] [/d [drive letter]] [/e] [/f] [/h [y|n]] [/k keyfile or search path] [tryemptypass [y|n]] [/l drive letter] [/m {bk|rm|recovery|ro|sm|ts|noattach}]
328328
[/p password] [/pim pimvalue] [/q [background|preferences]] [/s] [/tokenlib path] [/v volume] [/w]</p>
329-
<p>&quot;VeraCrypt Format.exe&quot; [/n] [/create] [/size number[{K|M|G|T}]] [/p password]&nbsp; [/encryption {AES | Serpent | Twofish | Camellia | Kuznyechik | AES(Twofish) | AES(Twofish(Serpent)) | Serpent(AES) | Serpent(Twofish(AES)) | Twofish(Serpent) | Camellia(Kuznyechik) | Kuznyechik(Twofish) | Camellia(Serpent) | Kuznyechik(AES) | Kuznyechik(Serpent(Camellia)))}] [/hash {sha256|sha-256|sha512|sha-512|whirlpool|blake2s|blake2s-256|streebog|blake2b-512|argon2}]
329+
<p>&quot;VeraCrypt Format.exe&quot; [/n] [/create] [/size number[{K|M|G|T}]] [/p password]&nbsp; [/encryption {AES | Serpent | Twofish | Camellia | Kuznyechik | AES(Twofish) | AES(Twofish(Serpent)) | Serpent(AES) | Serpent(Twofish(AES)) | Twofish(Serpent) | Camellia(Kuznyechik) | Kuznyechik(Twofish) | Camellia(Serpent) | Kuznyechik(AES) | Kuznyechik(Serpent(Camellia)))}] [/hash {sha256|sha-256|sha512|sha-512|whirlpool|blake2s|blake2s-256|streebog|blake2b-512|argon2|argon2id}]
330330
[/filesystem {None|FAT|NTFS|ExFAT|ReFS}] [/dynamic] [/force] [/silent] [/noisocheck] [FastCreateFile] [/quick]</p>
331331
<p>Note that the order in which options are specified does not matter.</p>
332332
<h4>Examples</h4>

doc/html/ru/Command Line Usage.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ <h1>Использование в режиме командной строки</
4848
</tr>
4949
<tr>
5050
<td>&nbsp;<em>/hash</em></td>
51-
<td>После этого ключа указывается хеш-алгоритм PRF или KDF, используемый при монтировании тома. Возможные значения ключа /hash: <code>sha256, sha-256, sha512, sha-512, whirlpool, blake2s, blake2s-256, streebog</code> и <code>blake2b-512</code> (для томов Argon2id). Если ключ <code>/hash</code> не указан, VeraCrypt будет пробовать
51+
<td>После этого ключа указывается хеш-алгоритм PRF или KDF, используемый при монтировании тома. Возможные значения ключа /hash: <code>sha256, sha-256, sha512, sha-512, whirlpool, blake2s, blake2s-256, streebog, blake2b-512, argon2, argon2id</code>. Значения <code>blake2b-512</code>, <code>argon2</code> и <code>argon2id</code> выбирают тома Argon2id. Если ключ <code>/hash</code> не указан, VeraCrypt будет пробовать
5252
все доступные PRF/KDF-алгоритмы, тем самым увеличивая время монтирования.</td>
5353
</tr>
5454
<tr>
@@ -233,7 +233,7 @@ <h4>VeraCrypt Format.exe (Мастер создания томов VeraCrypt):</
233233
<tr>
234234
<td>&nbsp;<em>/hash</em></td>
235235
<td>(Только с ключом <code>/create</code>)<br>
236-
После этого ключа указывается хеш-алгоритм PRF или KDF, используемый при создании тома. Синтаксис такой же, как у VeraCrypt.exe; также принимается <code>argon2</code> как псевдоним Argon2id.</td>
236+
После этого ключа указывается хеш-алгоритм PRF или KDF, используемый при создании тома. Синтаксис такой же, как у VeraCrypt.exe; <code>argon2</code> и <code>argon2id</code> выбирают Argon2id.</td>
237237
</tr>
238238
<tr>
239239
<td>&nbsp;<em>/encryption</em></td>
@@ -305,9 +305,9 @@ <h4>VeraCrypt Format.exe (Мастер создания томов VeraCrypt):</
305305
</tbody>
306306
</table>
307307
<h4>Синтаксис</h4>
308-
<p><code>VeraCrypt.exe [/tc] [/hash {sha256|sha-256|sha512|sha-512|whirlpool|blake2s|blake2s-256|streebog|blake2b-512}][/a [devices|favorites]] [/b] [/c [y|n|f]] [/d [буква диска]] [/e] [/f] [/h [y|n]] [/k ключевой файл или путь поиска] [tryemptypass [y|n]] [/l буква диска] [/m {bk|rm|recovery|ro|sm|ts|noattach}]
308+
<p><code>VeraCrypt.exe [/tc] [/hash {sha256|sha-256|sha512|sha-512|whirlpool|blake2s|blake2s-256|streebog|blake2b-512|argon2|argon2id}][/a [devices|favorites]] [/b] [/c [y|n|f]] [/d [буква диска]] [/e] [/f] [/h [y|n]] [/k ключевой файл или путь поиска] [tryemptypass [y|n]] [/l буква диска] [/m {bk|rm|recovery|ro|sm|ts|noattach}]
309309
[/p пароль] [/pim значение pim] [/q [background|preferences]] [/s] [/tokenlib путь] [/v том] [/w]</code></p>
310-
<p><code>&quot;VeraCrypt Format.exe&quot; [/n] [/create] [/size число[{K|M|G|T}]] [/p пароль]&nbsp; [/encryption {AES | Serpent | Twofish | Camellia | Kuznyechik | AES(Twofish) | AES(Twofish(Serpent)) | Serpent(AES) | Serpent(Twofish(AES)) | Twofish(Serpent) | Camellia(Kuznyechik) | Kuznyechik(Twofish) | Camellia(Serpent) | Kuznyechik(AES) | Kuznyechik(Serpent(Camellia))}] [/hash {sha256|sha-256|sha512|sha-512|whirlpool|blake2s|blake2s-256|streebog|blake2b-512|argon2}]
310+
<p><code>&quot;VeraCrypt Format.exe&quot; [/n] [/create] [/size число[{K|M|G|T}]] [/p пароль]&nbsp; [/encryption {AES | Serpent | Twofish | Camellia | Kuznyechik | AES(Twofish) | AES(Twofish(Serpent)) | Serpent(AES) | Serpent(Twofish(AES)) | Twofish(Serpent) | Camellia(Kuznyechik) | Kuznyechik(Twofish) | Camellia(Serpent) | Kuznyechik(AES) | Kuznyechik(Serpent(Camellia))}] [/hash {sha256|sha-256|sha512|sha-512|whirlpool|blake2s|blake2s-256|streebog|blake2b-512|argon2|argon2id}]
311311
[/filesystem {пусто|FAT|NTFS|ExFAT|ReFS}] [/dynamic] [/force] [/silent] [/noisocheck] [FastCreateFile] [/quick]</code></p>
312312
<p>Порядок, в котором указаны параметры, не имеет значения.</p>
313313
<h4>Примеры</h4>

doc/html/zh-cn/Command Line Usage.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ <h1>命令行使用</h1>
4747
</tr>
4848
<tr>
4949
<td><em>/hash</em></td>
50-
<td>必须后跟一个参数,指示挂载卷时要使用的 PRF 哈希算法或 KDF。可能的 /hash 参数值为:sha256, sha-256, sha512, sha-512, whirlpool, blake2s, blake2s-256, streebogblake2b-512(用于 Argon2id 卷。当省略 /hash 时,VeraCrypt 将尝试所有可能的 PRF/KDF 算法,从而延长挂载操作时间。</td>
50+
<td>必须后跟一个参数,指示挂载卷时要使用的 PRF 哈希算法或 KDF。可能的 /hash 参数值为:sha256, sha-256, sha512, sha-512, whirlpool, blake2s, blake2s-256, streebog, blake2b-512, argon2 和 argon2id。blake2b-512、argon2 和 argon2id 均选择 Argon2id 卷。当省略 /hash 时,VeraCrypt 将尝试所有可能的 PRF/KDF 算法,从而延长挂载操作时间。</td>
5151
</tr>
5252
<tr>
5353
<td id="volume"><em>/volume</em><em>/v</em></td>
@@ -228,7 +228,7 @@ <h4>VeraCrypt Format.exe(VeraCrypt 卷创建向导):</h4>
228228
<tr>
229229
<td>&nbsp;<em>/hash</em></td>
230230
<td>(仅与 /create 一起使用)<br>
231-
必须后跟一个参数,指示创建卷时要使用的 PRF 哈希算法或 KDF。它与 VeraCrypt.exe 具有相同的语法,并且还接受 <code>argon2</code> 作为 Argon2id 的别名</td>
231+
必须后跟一个参数,指示创建卷时要使用的 PRF 哈希算法或 KDF。它与 VeraCrypt.exe 具有相同的语法<code>argon2</code> <code>argon2id</code> 选择 Argon2id</td>
232232
</tr>
233233
<tr>
234234
<td>/encryption</td>
@@ -299,9 +299,9 @@ <h4>VeraCrypt Format.exe(VeraCrypt 卷创建向导):</h4>
299299
</tbody>
300300
</table>
301301
<h4>语法</h4>
302-
<p>VeraCrypt.exe [/tc] [/hash {sha256|sha-256|sha512|sha-512|whirlpool|blake2s|blake2s-256|streebog|blake2b-512}][/a [devices|favorites]] [/b] [/c [y|n|f]] [/d [drive letter]] [/e] [/f] [/h [y|n]] [/k keyfile or search path] [tryemptypass [y|n]] [/l drive letter] [/m {bk|rm|recovery|ro|sm|ts|noattach}]
302+
<p>VeraCrypt.exe [/tc] [/hash {sha256|sha-256|sha512|sha-512|whirlpool|blake2s|blake2s-256|streebog|blake2b-512|argon2|argon2id}][/a [devices|favorites]] [/b] [/c [y|n|f]] [/d [drive letter]] [/e] [/f] [/h [y|n]] [/k keyfile or search path] [tryemptypass [y|n]] [/l drive letter] [/m {bk|rm|recovery|ro|sm|ts|noattach}]
303303
[/p password] [/pim pimvalue] [/q [background|preferences]] [/s] [/tokenlib path] [/v volume] [/w]</p>
304-
<p>&quot;VeraCrypt Format.exe&quot; [/n] [/create] [/size number[{K|M|G|T}]] [/p password]&nbsp; [/encryption {AES | Serpent | Twofish | Camellia | Kuznyechik | AES(Twofish) | AES(Twofish(Serpent)) | Serpent(AES) | Serpent(Twofish(AES)) | Twofish(Serpent) | Camellia(Kuznyechik) | Kuznyechik(Twofish) | Camellia(Serpent) | Kuznyechik(AES) | Kuznyechik(Serpent(Camellia))}] [/hash {sha256|sha-256|sha512|sha-512|whirlpool|blake2s|blake2s-256|streebog|blake2b-512|argon2}]
304+
<p>&quot;VeraCrypt Format.exe&quot; [/n] [/create] [/size number[{K|M|G|T}]] [/p password]&nbsp; [/encryption {AES | Serpent | Twofish | Camellia | Kuznyechik | AES(Twofish) | AES(Twofish(Serpent)) | Serpent(AES) | Serpent(Twofish(AES)) | Twofish(Serpent) | Camellia(Kuznyechik) | Kuznyechik(Twofish) | Camellia(Serpent) | Kuznyechik(AES) | Kuznyechik(Serpent(Camellia))}] [/hash {sha256|sha-256|sha512|sha-512|whirlpool|blake2s|blake2s-256|streebog|blake2b-512|argon2|argon2id}]
305305
[/filesystem {None|FAT|NTFS|ExFAT|ReFS}] [/dynamic] [/force] [/silent] [/noisocheck] [FastCreateFile] [/quick]</p>
306306
<p>请注意,选项的指定顺序无关紧要。</p>
307307
<h4>示例</h4>

src/Common/Crypto.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,11 @@ Hash *HashGet (int id)
743743
int HashGetIdByName (wchar_t *name)
744744
{
745745
int i;
746+
#ifndef VC_DCS_DISABLE_ARGON2
747+
if (_wcsicmp (name, L"Argon2") == 0 || _wcsicmp (name, L"Argon2id") == 0)
748+
return ARGON2;
749+
#endif
750+
746751
for (i = 0; Hashes[i].Id != 0; i++)
747752
if (_wcsicmp (Hashes[i].Name, name) == 0)
748753
return Hashes[i].Id;

0 commit comments

Comments
 (0)