Password hashing

Argon2d

The Password Hashing Competition winner: memory-hard hashing standardised in RFC 9106

standard Safe API

About Argon2d

Argon2d is one of 3 Argon2 variants in the NextSSL registry, a password hashing function. It uses a 16–1,024-byte output and a 16–64-byte salt. It takes the parameters m_kib (default 65536), out_len (default 32), p (default 1) and t (default 3). Its registry entry cites RFC 9106. NextSSL lists it in the standard tier and exposes it through the safe API.

Overview

Argon2 is a memory-hard password hashing and key derivation function designed at the University of Luxembourg. It won the Password Hashing Competition in 2015, is standardised in RFC 9106, and is the recommended choice for new password storage.

Argon2 fills a large memory array of 1 KiB blocks, each computed from previous blocks through a compression function based on the BLAKE2b round. Memory is organised into lanes that can be filled in parallel. After several passes over memory, the final blocks are combined and hashed with BLAKE2b to produce the output. Cost is set by three parameters: memory size, number of passes and degree of parallelism.

NextSSL includes all three variants. Argon2d picks earlier blocks based on data, which maximises resistance to GPU cracking but leaks timing information. Argon2i uses data-independent addressing, which resists side channels. Argon2id, the RFC 9106 recommendation, uses data-independent addressing for the first half pass and data-dependent addressing thereafter. Argon2id is the default choice.

History

2013–2021
  1. Password Hashing Competition announced

    Password Hashing Competition
  2. 24 candidates submitted; nine finalists named in December

    Password Hashing Competition
  3. Argon2 wins the Password Hashing Competition

  4. Specified in RFC 9106

How it works

  1. Hash password, salt and parameters into a seed with BLAKE2b
  2. Fill memory blocks lane by lane from earlier blocks
  3. Repeat for the configured number of passes
  4. XOR the last block of each lane and hash to the output length

Security notes

Argon2id is considered secure when parameters are set appropriately; RFC 9106 gives recommended settings such as 2 GiB with one pass, or 64 MiB with three passes for constrained environments. Argon2i with few passes has known time–memory trade-off attacks, so Argon2id is preferred.

Typical uses

Password storageDeriving encryption keys from passphrasesProof-of-work or cost functions requiring memory

Sizes

FieldBytesMeaning
out16 – 1,024Output
salt16 – 64Salt

Parameters

NameTypeRangeDefaultRequired
m_kib u32 8 – 4194304 65536 no
out_len u32 16 – 1024 32 no
p u32 1 – 255 1 no
t u32 1 – 1024 3 no

Parameters are passed as a string, for example nextssl_mac("hmac", "hash=sha512", …). Omitted parameters take their declared default.

Use it

from nextssl_demo import NextSSL

ns = NextSSL()              # safe API: safe and standard tiers
phc = ns.call("pwhash", "argon2d", None, b"correct horse")[0]   # PHC string, fresh salt
ok  = ns.check("pwhash_verify", "argon2d", None, b"correct horse", phc)

Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.

Other Argon2 variants

2

Frequently asked questions

What is Argon2d?

Argon2d is a password hash in the Argon2 family. Argon2 is a memory-hard password hashing and key derivation function designed at the University of Luxembourg.

What are the Argon2d sizes?

In NextSSL, Argon2d uses: output 16 to 1,024 bytes.

Who designed Argon2d and when?

Argon2d belongs to the Argon2 family, first published in 2015 by Alex Biryukov, Daniel Dinu, Dmitry Khovratovich. Its origin: Password Hashing Competition winner; RFC 9106.

Which standards define Argon2d?

Argon2d is referenced by RFC 9106.

Is Argon2d safe to use?

Argon2d is in the standard tier. Standardised and sound. Reachable from the safe API. It can be called from the safe API.

What other Argon2 variants are there?

NextSSL also registers argon2i, argon2id in the Argon2 family.