BLAKE2b Hash Generator
Generate BLAKE2b cryptographic hashes from text or files with configurable digest length (1-64 bytes). Full RFC 7693 implementation.
About
BLAKE2b is a cryptographic hash function defined in RFC 7693. It outperforms SHA-3, SHA-2, and MD5 in software while maintaining equivalent or superior security margins. The function accepts messages of arbitrary length and produces digests from 1 to 64 bytes (8 - 512 bits). Incorrect hash verification leads to undetected file corruption, failed integrity checks in deployment pipelines, and potential acceptance of tampered binaries. This tool implements the full BLAKE2b compression function with 12 rounds of the G mixing function, operating on 64-bit words. It does not rely on WebCrypto (which lacks BLAKE2b support) but computes every round in pure arithmetic.
The implementation handles UTF-8 text encoding via the TextEncoder API and binary file inputs through the FileReader API. Note: this tool performs all computation client-side. No data leaves your browser. For files exceeding several hundred megabytes, browser memory constraints may apply. The output digest is formatted as lowercase hexadecimal. Pro tip: BLAKE2b-256 (32-byte digest) is the most common configuration for general integrity verification.
Formulas
BLAKE2b operates on a 16-word state vector v of 64-bit words. The compression function F takes the current hash state h, message block m, byte counter t, and finalization flag f:
The G mixing function operates on four words at positions (a, b, c, d) with two message words x and y:
The rotation amounts are 32, 24, 16, 63 bits. Each compression round applies G to 8 combinations of the state vector columns and diagonals. After 12 rounds, the new hash state is: hi ← hi ⊕ vi ⊕ vi + 8 for i ∈ {0..7}.
Where h = running hash state (8 × 64-bit words), IV = initialization vector (fractional parts of square roots of first 8 primes), t = byte offset counter (split into low and high 64-bit words), f = finalization flag (0xFFFFFFFFFFFFFFFF for final block), ⊕ = bitwise XOR, ≫≫≫ = right rotation.
Reference Data
| Hash Function | Digest Size | Block Size | Rounds | Word Size | Speed (cpb) | Security Level | Standard |
|---|---|---|---|---|---|---|---|
| BLAKE2b-512 | 512 bits | 128 bytes | 12 | 64 bits | 3.3 | 256 bits | RFC 7693 |
| BLAKE2b-384 | 384 bits | 128 bytes | 12 | 64 bits | 3.3 | 192 bits | RFC 7693 |
| BLAKE2b-256 | 256 bits | 128 bytes | 12 | 64 bits | 3.3 | 128 bits | RFC 7693 |
| BLAKE2s-256 | 256 bits | 64 bytes | 10 | 32 bits | 5.1 | 128 bits | RFC 7693 |
| SHA-256 | 256 bits | 64 bytes | 64 | 32 bits | 11.8 | 128 bits | FIPS 180-4 |
| SHA-512 | 512 bits | 128 bytes | 80 | 64 bits | 7.5 | 256 bits | FIPS 180-4 |
| SHA3-256 | 256 bits | 136 bytes | 24 | 64 bits | 8.2 | 128 bits | FIPS 202 |
| SHA3-512 | 512 bits | 72 bytes | 24 | 64 bits | 12.5 | 256 bits | FIPS 202 |
| MD5 | 128 bits | 64 bytes | 64 | 32 bits | 4.9 | Broken | RFC 1321 |
| SHA-1 | 160 bits | 64 bytes | 80 | 32 bits | 6.0 | Broken | FIPS 180-4 |
| BLAKE (original) | 512 bits | 128 bytes | 16 | 64 bits | 5.4 | 256 bits | SHA-3 Finalist |
| Whirlpool | 512 bits | 64 bytes | 10 | 8 bits | 14.8 | 256 bits | ISO/IEC 10118-3 |
| RIPEMD-160 | 160 bits | 64 bytes | 80 | 32 bits | 7.0 | 80 bits | ISO/IEC 10118-3 |