← Cryptography guide

K053 / Hashes, MACs and key derivation

BLAKE2

BLAKE2 hash · Survey date 2026-12-05

BLAKE2 is a cryptographic hash function with two basic forms, BLAKE2b and BLAKE2s.

CRYPTOGRAPHY LAB / K053

Cryptography Lab · BLAKE2

Run real computations and inspect intermediate states step by step.

Educational only. Never enter real passwords or secret keys. Computation stays in your browser; input and trace values are not sent to a server. Do not use this implementation in production.

Scope: Limited implementation

BLAKE2s-256 (unkeyed)

See the scope above for fixed examples, reduced parameters and supported variants. Standard operation names and formulas are retained.

Reference ↗

Open lab →

Definition and overview
BLAKE2 is a cryptographic hash function with two basic forms, BLAKE2b and BLAKE2s. Source document ↗
Classification and reversibility
Hash family, not encryption/encoding or reversible plaintext recovery. Source document ↗
Key or secret requirements
Basic hash needs no key; keyed mode optionally uses secret key. Supports salt and personalization. Source document ↗
Operating principle and structure
Compresses blocks using G-function rounds mixing four words by addition, XOR and rotation in a 16-word working state. Source document ↗
Key size, block size and parameters
BLAKE2b: 128-byte block, up to 64-byte output and key, 16-byte salt/personalization. Source document ↗
Security strength and recommendation
BLAKE2b/BLAKE2s are regarded as highly secure and performant across platforms. Source document ↗
Known attacks and vulnerabilities
No known practical collision/preimage attacks on full rounds; public cryptanalysis is limited to reduced rounds. Source document ↗
Standards and certification
Specified in RFC 7693. Source document ↗
Typical uses
Keyed MAC, salted hashing, personalization and tree hashing. Source document ↗
Implementations, libraries and tools
b2sum command-line file-hashing tool. Source document ↗
Decryption or decoding
Not confirmed in the survey
Advantages
Often faster than MD5 on 64-bit platforms; targets security comparable to SHA-3. Source document ↗
Limitations and cautions
Unsuitable for password hashing or password-derived keys; prefer dedicated functions such as Argon2. Source document ↗
Distinguishing encryption, encoding and hashing
BLAKE2 is hash/MAC, not encryption/encoding; keyed mode is MAC with a secret key. Source document ↗

Practical examples

Examples are illustrative; they are not execution-tested implementations or operational recommendations.

Example

Message/file yields fixed-length digest; same input gives same output but cannot recover input from output alone. Optional keyed hashing creates message authentication value.

Procedure

Encryption: select key, produce ciphertext, decrypt. Encoding: representation conversion and reversal. Hash: compute BLAKE2 digest and compare expected value, no decryption. Keyed MAC: compute using secret key and compare in constant time.

Scenario

Publish BLAKE2 digest for downloadable files and rehash for integrity. Use keyed mode between components sharing a secret. Use Argon2 instead for passwords.

Pitfalls and alternatives

Do not try to decrypt hashes. Use Argon2/scrypt/bcrypt for passwords, manage keyed-hash keys and avoid prefix-MAC; check FIPS/NIST approval where required.

References