Hashes/Crypto

Argon2 Hash + Verify

Hash passwords with Argon2 (winner of the Password Hashing Competition, RFC 9106) — d/i/id variants, with verification against an existing hash.


                    

Argon2 is the Password Hashing Competition winner and the algorithm recommended in RFC 9106 for hashing passwords. Unlike bcrypt, it deliberately demands a lot of memory, not just CPU time, which makes attacks on specialized hardware (GPUs, ASICs) much harder.

How to use it

Common uses

Things to keep in mind

The memory parameter is Argon2's main defense: the more memory hashing requires, the more expensive it is for an attacker to parallelize an attack on a GPU with limited fast memory per chip.

Argon2id is recommended for most cases: Argon2i resists side-channel attacks better, Argon2d resists GPU attacks better, and id combines both approaches.

Article about this tool: Argon2: why this algorithm won the password hashing competition

Frequently asked questions

Why is Argon2 recommended over older hashing like MD5 or SHA-256 for passwords?

Argon2 is deliberately slow and memory-hard, making brute-force and GPU/ASIC-based cracking far more expensive, unlike fast general-purpose hashes like MD5 or SHA-256 which are unsuited for password storage.

What do the memory, iterations, and parallelism parameters control?

Memory cost sets how much RAM each hash attempt requires, iterations control how many passes are run, and parallelism sets the number of threads — increasing any of them raises the cost of cracking at the expense of slower hashing.

Which Argon2 variant should I use — d, i, or id?

Argon2id is the recommended default for password hashing, since it combines Argon2i's resistance to side-channel attacks with Argon2d's resistance to GPU cracking.

Where did Argon2 come from as a standard?

Argon2 won the 2015 Password Hashing Competition — an open contest among cryptographers aimed at finding the best algorithm for password hashing. OWASP has recommended it as the priority choice over bcrypt ever since.

Does the parallelism parameter only speed up hashing?

No, the same parameter equally speeds up brute-forcing for an attacker with multi-core hardware, so parallelism should be tuned to the server's actual core count rather than increased without reason.

Articles: Hashes/Crypto

Hash Generator: how MD5, SHA-1, and SHA-256 differ from each other

Why MD5 is still used to verify file integrity, but not for passwords.

Checksum Verifier: how to check that a file isn't corrupted

Why a matching checksum confirms a file's integrity, but not who created it.

HMAC: how a keyed hash differs from a regular hash

Why a plain SHA-256 doesn't protect against message tampering, but HMAC does.

Bcrypt: why passwords are hashed slowly, not quickly

Why fast SHA-256 is a bad choice for passwords, and slow bcrypt is the right one.

UUID: how identifiers that almost never repeat are generated

Why UUID v4 can be generated independently on millions of machines without collision risk.

Password Generator: what actually makes a password strong

Why a long dictionary-word password is stronger than a short one with symbols and digits.

AES: how symmetric encryption works

Why the same key both encrypts and decrypts data in AES, and how that differs from asymmetric encryption.

Scrypt: why the algorithm needs so much memory

Why scrypt deliberately demands a lot of memory to make cracking on ASIC devices harder.

TOTP: how one-time codes in authenticator apps work

Why the code in Google Authenticator works offline and syncs with the server only via time.

PBKDF2: the oldest key-stretching standard

Why the recommended PBKDF2 iteration count keeps growing every year.

X.509: what's inside an SSL certificate

What exactly the browser checks in a site's certificate before showing the green padlock.

PGP: how public-key and private-key encryption works

Why you can freely share a PGP public key but never the private one.