SHA-3 is the NIST FIPS 202 cryptographic hash standard based on the Keccak sponge construction, providing structural diversity from the SHA-2 family.
SHA-3 (Secure Hash Algorithm 3) is a family of cryptographic hash functions standardized by the U.S. National Institute of Standards and Technology (NIST) in August 2015 under FIPS PUB 202. Designed by Guido Bertoni, Joan Daemen, Michaël Peeters, and Gilles Van Assche under the name Keccak, SHA-3 was selected as the winner of the five-year NIST hash competition.
Unlike SHA-1 and SHA-2 (which are based on the Merkle–Damgård construction), SHA-3 is engineered around the sponge construction, providing structural mathematical diversity and built-in immunity against length extension attacks.
Generate SHA-3, SHA-256, BLAKE2b, and HMAC digests in your browser with our client-side Hash Generator tool.
| Specification | SHA-3-256 | SHA-3-384 | SHA-3-512 | SHAKE128 / SHAKE256 |
|---|---|---|---|---|
| Standard Reference | NIST FIPS PUB 202 | NIST FIPS PUB 202 | NIST FIPS PUB 202 | NIST FIPS PUB 202 (XOF) |
| Output Digest Length | 256 bits (32 bytes) | 384 bits (48 bytes) | 512 bits (64 bytes) | Variable (Arbitrary length) |
| State Size ($b$) | 1600 bits (200 bytes) | 1600 bits (200 bytes) | 1600 bits (200 bytes) | 1600 bits (200 bytes) |
| Bitrate ($r$) | 1088 bits (136 bytes) | 832 bits (104 bytes) | 576 bits (72 bytes) | 1344 / 1088 bits |
| Capacity ($c$) | 512 bits ($2 \times 256$) | 768 bits ($2 \times 384$) | 1024 bits ($2 \times 512$) | 256 / 512 bits |
| Transformation Rounds | 24 rounds of $\text{Keccak}-f[1600]$ | 24 rounds of $\text{Keccak}-f[1600]$ | 24 rounds of $\text{Keccak}-f[1600]$ | 24 rounds |
| Collision Security | 128 bits ($2^{128}$) | 192 bits ($2^{192}$) | 256 bits ($2^{256}$) | $\min(d/2, c/2)$ |
The sponge construction operates on an internal state of $b = r + c = 1600$ bits arranged in a 5×5 array of 64-bit words ($5 \times 5 \times 64 = 1600$).
Absorbing Phase Squeezing Phase
Message Block M_0 Message Block M_1 Digest Block Z_0 Digest Block Z_1
│ │ ▲ ▲
▼ ▼ │ │
┌───► [ ⊕ ] ───────┐ ┌───► [ ⊕ ] ───────┐ ┌───────┴──────┐ ┌───────┴──────┐
│ │ │ │ │ │ │ │
│ ┌──────────┐ │ │ ┌──────────┐ │ │ ┌──────────┐ │ │ ┌──────────┐ │
└───┤ Keccak-f ├───┴──────┴───┤ Keccak-f ├───┴───────────────┴─┤ Keccak-f ├─┴───────┴─┤ Keccak-f ├─┘
└──────────┘ └──────────┘ └──────────┘ └──────────┘
(Round 1..24) (Round 1..24) (Round 1..24) (Round 1..24)
The $c$ bits of the state (the capacity) are never directly modified by input blocks or exposed to output, providing mathematical isolation and security against structural attacks.
| Feature | SHA-2 Family (SHA-256) | SHA-3 Family (SHA-3-256) |
|---|---|---|
| Design Paradigm | Merkle–Damgård + Davies–Meyer compression | Sponge construction + Permutation state |
| Origin / Author | NSA (2001) | Guido Bertoni, Joan Daemen, et al. (2015) |
| Length Extension Vulnerability | Vulnerable (requires HMAC for MACs) | Immune (Internal capacity is unexposed) |
| Hardware ASIC Efficiency | Moderate | High (Low gate count in silicon) |
| Extensibility (XOF) | Fixed output lengths | Supports variable output lengths (SHAKE) |
| Hardware Acceleration | Intel SHA-NI, ARMv8 Cryptography extensions | ARMv8.2-A SHA3 extensions |
import crypto from 'node:crypto';
// Compute SHA-3-256 digest in Node.js
export function computeSha3_256(text) {
return crypto
.createHash('sha3-256')
.update(text, 'utf8')
.digest('hex');
}
console.log(computeSha3_256('DevFlow Tools'));
// Output: 64-character hexadecimal digest
No. NIST standardized SHA-3 to provide an alternative backup cryptographic architecture in the event that structural mathematical vulnerabilities were discovered in the Merkle–Damgård design of SHA-2. Because SHA-2 (specifically SHA-256 and SHA-512) remains completely unbroken and widely hardware-accelerated, both SHA-2 and SHA-3 are approved NIST standards.
Ethereum was developed while NIST was finalizing the SHA-3 standardization process. When NIST published FIPS 202, they introduced a domain separation padding byte (0x06 for SHA-3 vs 0x01 in original Keccak). As a result, Ethereum addresses and smart contracts use the original Keccak-256 algorithm rather than official SHA-3-256.
SHAKE functions are Extendable-Output Functions (XOFs) defined in FIPS 202. Unlike standard hash functions that produce fixed digest lengths (e.g., 256 or 512 bits), SHAKE allows developers to request an arbitrary number of output bytes, making it useful for pseudo-random number generators, key derivation, and post-quantum cryptographic schemes like ML-KEM.
Free, browser-based utilities to test, generate, and inspect Secure Hash Algorithm 3 (SHA-3 & Keccak) payloads directly.