The "argon2" Module (v3)
New in v3.8.0!
If you are using an older version you will need to upgrade to use this module.
This module depends on a third-party library (Argon2) and must be manually enabled at compile time.
Once you have installed the dependency you can enable this module using the following command:
./configure --enable-extras argon2
Description
This module allows other modules to generate Argon2 hashes.
Configuration
To load this module use the following <module>
tag:
<module name="argon2">
<argon2>
The <argon2>
tag defines the defaults for the Argon2 algorithms. This tag can only be defined once.
Name | Type | Default Value | Description |
---|---|---|---|
memory | Number | 131072 | The memory hardness in kibibytes of the Argon2 algorithms. |
iterations | Number | 3 | The time hardness of the Argon2 algorithms. |
lanes | Number | 1 | The number of parallel chains to run at once. |
threads | Number | 1 | The number of threads that generating an Argon2 hash can spawn. |
length | Number | 32 | The length of the output in bytes. |
saltlength | Number | 16 | The length of the salt in bytes. |
version | Number | 13 | The version of the Argon2 algorithm to use. |
The version field should be set to one of the following values:
Value | Description |
---|---|
10 | Use version 1.0 of the Argon2 algorithm. |
13 | Use version 1.3 of the Argon2 algorithm. |
Example Usage
<argon2 memory="128MB"
iterations="3"
lanes="1"
threads="1"
length="32"
saltlength="16"
version="13">
<argon2d>
The <argon2d>
tag defines the settings for the Argon2d algorithm. This tag can only be defined once.
Name | Type | Default Value | Description |
---|---|---|---|
memory | Number | See <argon2:memory> | The memory hardness in kibibytes of the Argon2d algorithm. |
iterations | Number | See <argon2:iterations> | The time hardness of the Argon2d algorithm. |
lanes | Number | See <argon2:lanes> | The number of parallel chains to run at once. |
threads | Number | See <argon2:threads> | The number of threads that generating an Argon2d hash can spawn. |
length | Number | See <argon2:length> | The length of the output in bytes. |
saltlength | Number | See <argon2:saltlength> | The length of the salt in bytes. |
version | Number | See <argon2:version> | The version of the Argon2d algorithm to use. |
The version field should be set to one of the following values:
Value | Description |
---|---|
10 | Use version 1.0 of the Argon2d algorithm. |
13 | Use version 1.3 of the Argon2d algorithm. |
Example Usage
<argon2d memory="128MB"
iterations="3"
lanes="1"
threads="1"
length="32"
saltlength="16"
version="13">
<argon2i>
The <argon2i>
tag defines the settings for the Argon2i algorithm. This tag can only be defined once.
Name | Type | Default Value | Description |
---|---|---|---|
memory | Number | See <argon2:memory> | The memory hardness in kibibytes of the Argon2i algorithm. |
iterations | Number | See <argon2:iterations> | The time hardness of the Argon2i algorithm. |
lanes | Number | See <argon2:lanes> | The number of parallel chains to run at once. |
threads | Number | See <argon2:threads> | The number of threads that generating an Argon2i hash can spawn. |
length | Number | See <argon2:length> | The length of the output in bytes. |
saltlength | Number | See <argon2:saltlength> | The length of the salt in bytes. |
version | Number | See <argon2:version> | The version of the Argon2i algorithm to use. |
The version field should be set to one of the following values:
Value | Description |
---|---|
10 | Use version 1.0 of the Argon2i algorithm. |
13 | Use version 1.3 of the Argon2i algorithm. |
Example Usage
<argon2i memory="128MB"
iterations="3"
lanes="1"
threads="1"
length="32"
saltlength="16"
version="13">
<argon2id>
The <argon2id>
tag defines the settings for the Argon2id algorithm. This tag can only be defined once.
Name | Type | Default Value | Description |
---|---|---|---|
memory | Number | See <argon2:memory> | The memory hardness in kibibytes of the Argon2id algorithm. |
iterations | Number | See <argon2:iterations> | The time hardness of the Argon2id algorithm. |
lanes | Number | See <argon2:lanes> | The number of parallel chains to run at once. |
threads | Number | See <argon2:threads> | The number of threads that generating an Argon2id hash can spawn. |
length | Number | See <argon2:length> | The length of the output in bytes. |
saltlength | Number | See <argon2:saltlength> | The length of the salt in bytes. |
version | Number | See <argon2:version> | The version of the Argon2id algorithm to use. |
The version field should be set to one of the following values:
Value | Description |
---|---|
10 | Use version 1.0 of the Argon2id algorithm. |
13 | Use version 1.3 of the Argon2id algorithm. |
Example Usage
<argon2id memory="128MB"
iterations="3"
lanes="1"
threads="1"
length="32"
saltlength="16"
version="13">
Special Notes
Argon2 is a memory-hard hashing function. If you are using an older system with low memory you should make sure to configure it appropriately for your system. Alternately, you should consider using another hashing function such as bcrypt or HMAC-SHA256.