SHA-3
SHA-3 (Secure Hash Algorithm 3) is the latest member of the Secure Hash Algorithm family of standards, released by NIST on August 5, 2015.[src] Although part of the same series of standards, SHA-3 is internally different from the MD5-like structure of SHA-1 and SHA-2.[src] SHA-3 is a subset of the broader cryptographic primitive family Keccak ( or ), designed by Guido Bertoni, Joan Daemen, Michaël Peeters, and Gilles Van Assche, building upon RadioGatún.[src] Keccak's authors have proposed additional uses for the function, not (yet) standardized by NIST, including a stream cipher, an authenticated encryption system, a "tree" hashing scheme for faster hashing on certain architectures, and AEAD ciphers Keyak and Ketje.[src] Keccak is based on a novel approach called sponge construction.[src] The sponge construction is based on a pseudorandom permutation, and allows inputting ("absorbing" in sponge terminology) any amount of data, and outputting ("squeezing") any amount of data, while acting as a pseudorandom function with regard to all previous inputs.[src] This leads to great flexibility.[src] NIST does not plan to withdraw SHA-2 or remove it from the revised Secure Hash Standard.[src] The purpose of SHA-3 is that it can be directly substituted for SHA-2 in current applications if necessary, and to significantly improve the robustness of NIST's overall hash algorithm toolkit.…[src]
SHA-3 (Secure Hash Algorithm 3) is the latest member of the Secure Hash Algorithm family of standards, released by NIST on August 5, 2015.[src] Although part of the same series of standards, SHA-3 is internally different from the MD5-like structure of SHA-1 and SHA-2.[src] SHA-3 is a subset of the broader cryptographic primitive family Keccak ( or ), designed by Guido Bertoni, Joan Daemen, Michaël Peeters, and Gilles Van Assche, building upon RadioGatún.[src] Keccak's authors have proposed additional uses for the function, not (yet) standardized by NIST, including a stream cipher, an authenticated encryption system, a "tree" hashing scheme for faster hashing on certain architectures, and AEAD ciphers Keyak and Ketje.[src] Keccak is based on a novel approach called sponge construction.[src] The sponge construction is based on a pseudorandom permutation, and allows inputting ("absorbing" in sponge terminology) any amount of data, and outputting ("squeezing") any amount of data, while acting as a pseudorandom function with regard to all previous inputs.[src] This leads to great flexibility.[src] NIST does not plan to withdraw SHA-2 or remove it from the revised Secure Hash Standard.[src] The purpose of SHA-3 is that it can be directly substituted for SHA-2 in current applications if necessary, and to significantly improve the robustness of NIST's overall hash algorithm toolkit.[src] For small message sizes, the creators of the Keccak algorithms and the SHA-3 functions suggest using the faster function KangarooTwelve with adjusted parameters and a new tree hashing mode without extra overhead.[src] ==History== The Keccak algorithm is the work of Guido Bertoni, Joan Daemen (who also co-designed the Rijndael cipher with Vincent Rijmen), Michaël Peeters, and Gilles Van Assche.[src] It is based on earlier hash function designs PANAMA and RadioGatún.[src] PANAMA was designed by Daemen and Craig Clapp in 1998.[src] RadioGatún, a successor of PANAMA, was designed by Daemen, Peeters, and Van Assche, and was presented at the NIST Hash Workshop in 2006.[src] The reference implementation was released to the public domain.[src] In 2006, NIST started to organize the NIST hash function competition to create a new hash standard, SHA-3.[src] SHA-3 is not meant to replace SHA-2, as no significant attack on SHA-2 has been publicly demonstrated .[src] Because of the successful attacks on MD5, SHA-0 and SHA-1, NIST perceived a need for an alternative, dissimilar cryptographic hash, which became SHA-3.[src] After a setup period, admissions were to be submitted by the end of 2008.[src] Keccak was accepted as one of the 51 candidates.[src] In July 2009, 14 algorithms were selected for the second round.[src] Keccak advanced to the last round in December 2010.[src] During the competition, entrants were permitted to "tweak" their algorithms to address issues that were discovered.[src] Changes that have been made to Keccak are: The number of rounds was increased from to to be more conservative about security.[src] The message padding was changed from a more complex scheme to the simple 10 * 1 pattern described below.[src] The rate r was increased to the security limit, rather than rounding down to the nearest power of 2.[src] On October 2, 2012, Keccak was selected as the winner of the competition.[src] In 2014, the NIST published a draft FIPS 202 "SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions".[src] FIPS 202 was approved on August 5, 2015.[src] On August 5, 2015, NIST announced that SHA-3 had become a hashing standard.[src] ===Weakening controversy=== In early 2013 NIST announced they would select different values for the "capacity", the overall strength vs.[src] speed parameter, for the SHA-3 standard, compared to the submission.[src] The changes caused some turmoil.[src] The hash function competition called for hash functions at least as secure as the SHA-2 instances.[src] It means that a d-bit output should have d/2-bit resistance to collision attacks and d-bit resistance to preimage attacks, the maximum achievable for d bits of output.[src] Keccak's security proof allows an adjustable level of security based on a "capacity" c, providing c/2-bit resistance to both collision and preimage attacks.[src] To meet the original competition rules, Keccak's authors proposed .[src] The announced change was to accept the same d/2-bit security for all forms of attack and standardize .[src] This would have sped up Keccak by allowing an additional d bits of input to be hashed each iteration.[src] However, the hash functions would not have been drop-in replacements with the same preimage resistance as SHA-2 any more; it would have been cut in half, making it vulnerable to advances in quantum computing, which effectively would cut it in half once more.[src] In September 2013, Daniel J.[src] Bernstein suggested on the NIST hash-forum mailing list to strengthen the security to the 576-bit capacity that was originally proposed as the default Keccak, in addition to and not included in the SHA-3 specifications.[src] This would have provided at least a SHA3-224 and SHA3-256 with the same preimage resistance as their SHA-2 predecessors, but SHA3-384 and SHA3-512 would have had significantly less preimage resistance than their SHA-2 predecessors.[src] In late September, the Keccak team responded by stating that they had proposed 128-bit security by setting as an option already in their SHA-3 proposal.[src] Although the reduced capacity was justifiable in their opinion, in the light of the negative response, they proposed raising the capacity to bits for all instances.[src] This would be as much as any previous standard up to the 256-bit security level, while providing reasonable efficiency, but not the 384-/512-bit preimage resistance offered by SHA2-384 and SHA2-512.[src] The authors stated that "claiming or relying on security strength levels above 256 bits is meaningless".[src] In early October 2013, Bruce Schneier criticized NIST's decision on the basis of its possible detrimental effects on the acceptance of the algorithm, saying: He later retracted his earlier statement, saying: Paul Crowley, a cryptographer and senior developer at an independent software development company, expressed his support of the decision, saying that Keccak is supposed to be tunable and there is no reason for different security levels within one primitive.[src] He also added: There was some confusion that internal changes may have been made to Keccak, which were cleared up by the original team, stating that NIST's proposal for SHA-3 is a subset of the Keccak family, for which one can generate test vectors using their reference code submitted to the contest, and that this proposal was the result of a series of discussions between them and the NIST hash team.[src] In response to the controversy, in November 2013 John Kelsey of NIST proposed to go back to the original proposal for all SHA-2 drop-in replacement instances.[src] The reversion was confirmed in subsequent drafts and in the final release.[src] ==Design== or preimage attacks.]] SHA-3 uses the sponge construction, in which data is "absorbed" into the sponge, then the result is "squeezed" out.[src] In the absorbing phase, message blocks are XORed into a subset of the state, which is then transformed as a whole using a permutation function (or transformation) f .[src] In the "squeeze" phase, output blocks are read from the same subset of the state, alternated with the state transformation function f .[src] The size of the part of the state that is written and read is called the "rate" (denoted r ), and the size of the part that is untouched by input/output is called the "capacity" (denoted c ).[src] The capacity determines the security of the scheme.[src] The maximum security level is half the capacity.[src] Given an input bit string N , a padding function pad , a permutation function f that operates on bit blocks of width b , a rate r and an output length d , we have capacity c = b - r and the sponge construction Z = \text{sponge}[f,pad,r](N,d) .[src] This yields a bit string Z of length d as follows: pad the input N using the pad function, yielding a padded bit string P with a length divisible by r (such that n = \text{len}(P)/r is an integer) break P into n consecutive r-bit pieces P 0 , ..., P n−1 initialize the state S to a string of b zero bits absorb the input into the state: for each block P i : extend P i at the end by a string of c zero bits, yielding one of length b XOR that with S apply the block permutation f to the result, yielding a new state S initialize Z to be the empty string while the length of Z is less than d: append the first r bits of S to Z if Z is still less than d bits long, apply f to S, yielding a new state S truncate Z to d bits The fact that the internal state S contains c additional bits of information in addition to what is output to Z prevents the length extension attacks that SHA-2, SHA-1, MD5 and other hashes based on the Merkle–Damgård construction are susceptible to.[src] In SHA-3, the state S consists of a array of w-bit words (with w = 64), b = 5 × 5 × w = 5 × 5 × 64 = 1600 bits total.[src] Keccak is also defined for smaller power-of-2 word sizes w down to 1 bit (total state of 25 bits).[src] Small state sizes can be used to test cryptanalytic attacks, and intermediate state sizes (from , 200 bits, to , 800 bits) can be used in practical, lightweight applications.[src] For SHA3-224, SHA3-256, SHA3-384, and SHA3-512 instances, r is greater than d, so there is no need for additional block permutations in the squeezing phase; the leading d bits of the state are the desired hash.[src] However, SHAKE128 and SHAKE256 allow an arbitrary output length, which is useful in applications such as optimal asymmetric encryption padding.[src] ==Padding== To ensure the message can be evenly divided into r-bit blocks, padding is required.[src] SHA-3 uses the pattern 10...01 in its padding function: a 1 bit, followed by zero or more 0 bits (maximum ) and a final 1 bit.[src] The maximum of zero bits occurs when the last message block is bits long.[src] Then another block is added after the initial 1 bit, containing zero bits before the final 1 bit.[src] The two 1 bits will be added even if the length of the message is already divisible by r.[src] In this case, another block is added to the message, containing a 1 bit, followed by a block of zero bits and another 1 bit.[src] This is necessary so that a message with length divisible by r ending in something that looks like padding does not produce the same hash as the message with those bits removed.[src] The initial 1 bit is required so messages differing only in a few additional 0 bits at the end do not produce the same hash.[src] The position of the final 1 bit indicates which rate r was used (multi-rate padding), which is required for the security proof to work for different hash variants.[src] Without it, different hash variants of the same short message would be the same up to truncation.[src] ==The block permutation== The block transformation f, which is Keccak-f[1600] for SHA-3, is a permutation that uses XOR, AND and NOT operations, and is designed for easy implementation in both software and hardware.[src] It is defined for any power-of-two word size, bits.[src] The main SHA-3 submission uses 64-bit words, .[src] The state can be considered to be a array of bits.[src] Let be bit of the input, using a little-endian bit numbering convention and row-major indexing.[src] I.e.[src] selects the row, the column, and the bit.[src] Index arithmetic is performed modulo 5 for the first two dimensions and modulo w for the third.[src] The basic block permutation function consists of rounds of five steps: (theta) Compute the parity of each of the (320, when ) 5-bit columns, and exclusive-or that into two nearby columns in a regular pattern.[src] To be precise, ) (rho) Bitwise rotate each of the 25 words by a different triangular number 0, 1, 3, 6, 10, 15, ....[src] To be precise, a[0][0] is not rotated, and for all , , where \begin{pmatrix} i \\ j \end{pmatrix} = \begin{pmatrix} 3 & 2 \\ 1 & 0 \end{pmatrix}^t \begin{pmatrix} 0 \\ 1 \end{pmatrix} .[src] (pi) Permute the 25 words in a fixed pattern.[src] .[src] (chi) Bitwise combine along rows, using .[src] To be precise, .[src] This is the only non-linear operation in SHA-3.[src] (iota) Exclusive-or a round constant into one word of the state.[src] To be precise, in round , for , is XORed with bit of a degree-8 LFSR sequence.[src] This breaks the symmetry that is preserved by the other steps.[src] ==Speed== The speed of SHA-3 hashing of long messages is dominated by the computation of f = Keccak-f[1600] and XORing S with the extended P i , an operation on b = 1600 bits.[src] However, since the last c bits of the extended P i are 0 anyway, and XOR with 0 is a NOP, it is sufficient to perform XOR operations only for r bits (r = 1600 − 2 × 224 = 1152 bits for SHA3-224, 1088 bits for SHA3-256, 832 bits for SHA3-384 and 576 bits for SHA3-512).[src] The lower r is (and, conversely, the higher c = b − r = 1600 − r), the less efficient but more secure the hashing becomes since fewer bits of the message can be XORed into the state (a quick operation) before each application of the computationally expensive f.[src] The authors report the following speeds for software implementations of Keccak-f[1600] plus XORing 1024 bits, which roughly corresponds to SHA3-256: 57.4 cpb on IA-32, Intel Pentium 3 41 cpb on IA-32+MMX, Intel Pentium 3 20 cpb on IA-32+SSE, Intel Core 2 Duo or AMD Athlon 64 12.6 cpb on a typical x86-64-based machine 6–7 cpb on IA-64 For the exact SHA3-256 on x86-64, Bernstein measures 11.7–12.25 cpb depending on the CPU.[src] SHA-3 has been criticized for being slow on instruction set architectures (CPUs) which do not have instructions meant specially for computing Keccak functions faster – SHA2-512 is more than twice as fast as SHA3-512, and SHA-1 is more than three times as fast on an Intel Skylake processor clocked at 3.2 GHz.[src] The authors have reacted to this criticism by suggesting to use SHAKE128 and SHAKE256 instead of SHA3-256 and SHA3-512 , at the expense of cutting the preimage resistance in half (but while keeping the collision resistance).[src] With this, performance is on par with SHA2-256 and SHA2-512.[src] However, in hardware implementations, SHA-3 is notably faster than all other finalists, and also faster than SHA-2 and SHA-1.[src] As of 2018, ARM's ARMv8 architecture includes special instructions which enable Keccak algorithms to execute faster and IBM's z/Architecture includes a complete implementation of SHA-3 and SHAKE in a single instruction.[src] There have also been extension proposals for RISC-V to add Keccak-specific instructions.[src] ==Instances== The NIST standard defines the following instances, for message M and output length d: With the following definitions Keccak[c](N, d) = sponge[Keccak-f[1600], pad10 * 1, r](N, d) Keccak-f[1600] = Keccak-p[1600, 24] c is the capacity r is the rate = 1600 − c N is the input bit string SHA-3 instances are drop-in replacements for SHA-2, intended to have identical security properties.[src] SHAKE will generate as many bits from its sponge as requested, thus being extendable-output functions (XOFs).[src] For example, SHAKE128(M, 256) can be used as a hash function with a 256 character bitstream with 128-bit security strength.[src] Arbitrarily large lengths can be used as pseudo-random number generators.[src] Alternately, SHAKE256(M, 128) can be used as a hash function with a 128-bit length and 128-bit resistance.[src] All instances append some bits to the message, the rightmost of which represent the domain separation suffix.[src] The purpose of this is to ensure that it is not possible to construct messages that produce the same hash output for different applications of the Keccak hash function.[src] The following domain separation suffixes exist: ==Later developments== There is a general result (Grover's algorithm) that quantum computers can perform a structured preimage attack in \sqrt{2^d} = 2^{d/2} , while a classical brute-force attack needs 2 d .[src] A structured preimage attack implies a second preimage attack and thus a collision attack.[src] A quantum computer can also perform a birthday attack, thus break collision resistance, in \sqrt[3]{2^d} = 2^{d/3} (although that is disputed).[src] Noting that the maximum strength can be c/2 , this gives the following upper bounds on the quantum security of SHA-3: It has been shown that the Merkle–Damgård construction, as used by SHA-2, is collapsing and, by consequence, quantum collision-resistant, but for the sponge construction used by SHA-3, the authors provide proofs only for the case when the block function f is not efficiently invertible; Keccak-f[1600], however, is efficiently invertible, and so their proof does not apply.[src] ==Examples of SHA-3 variants== The following hash values are from NIST.gov: SHA3-224("") 6b4e03423667dbb73b6e15454f0eb1abd4597f9a1b078e3f5b5a6bc7 SHA3-256("") a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a SHA3-384("") 0c63a75b845e4f7d01107d852e4c2485c51a50aaaa94fc61995e71bbee983a2ac3713831264adb47fb6bd1e058d5f004 SHA3-512("") a69f73cca23a9ac5c8b567dc185a756e97c982164fe25859e0d1dcc1475c80a615b2123af1f5f94c11e3e9402c3ac558f500199d95b6d3e301758586281dcd26 SHAKE128("", 256) 7f9c2ba4e88f827d616045507605853ed73b8093f6efbc88eb1a6eacfa66ef26 SHAKE256("", 512) 46b9dd2b0ba88d13233b3feb743eeb243fcd52ea62b81b82b50c27646ed5762fd75dc4ddd8c0f200cb05019d67b592f6fc821c49479ab48640292eacb3b7c4be Changing a single bit causes each bit in the output to change with 50% probability, demonstrating an avalanche effect: SHAKE128("The quick brown fox jumps over the lazy dog", 256) f4202e3c5852f9182a0430fd8144f0a74b95e7417ecae17db0f8cfeed0e3e66e SHAKE128("The quick brown fox jumps over the lazy do f ", 256) 853f4538be0db9621a6cea659a06c1107b1f83f02b13d18297bd39d7411cf10c ==Comparison of SHA functions== In the table below, internal state means the number of bits that are carried over to the next block.[src] Optimized implementation using AVX-512VL (i.e.[src] from OpenSSL, running on Skylake-X CPUs) of SHA3-256 do achieve about 6.4 cycles per byte for large messages, and about 7.8 cycles per byte when using AVX2 on Skylake CPUs.[src] Performance on other x86, Power and ARM CPUs depending on instructions used, and exact CPU model varies from about 8 to 15 cycles per byte, with some older x86 CPUs up to 25–40 cycles per byte.[src] ==See also== Ethash – another Keccak-based hash ==References== ==External links== The Keccak web site SHA-3 Standard SHA-3 in Excel - Example implementation and demonstration in Excel (without macros) by Tim Wambach.[src]
128 sentences · 128 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"SHA-3." encyclopegia.org, 2026, https://encyclopegia.org/wiki/sha-3. Accessed 29 November 2026.
Chicago
"SHA-3." encyclopegia.org. Accessed November 29, 2026. https://encyclopegia.org/wiki/sha-3.
APA
encyclopegia.org. (2026). SHA-3. Retrieved November 29, 2026, from https://encyclopegia.org/wiki/sha-3
Accessed November 29, 2026 · CC BY-SA 4.0 · citation page · JSON
Claims
| Predicate | Value | Source |
|---|---|---|
| release date | 2015-08-05 | Wikipedia |