Skip to content

Commit

Permalink
add sha-3 exposition
Browse files Browse the repository at this point in the history
  • Loading branch information
cmazakas committed Feb 6, 2025
1 parent eca172e commit 3f94538
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions doc/hash2/hashing_bytes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,22 @@ as SHA2-256 on a 64 bit platform, but twice as slow in 32 bit code.
On 64 bit platforms, SHA2-512/256 and SHA2-512/224 should be preferred over SHA2-256 and SHA2-224 not just because of speed, but because
they are resistant to length extension attacks as they don't expose all of the bits of their internal state in the final digest.

### SHA-3

https://en.wikipedia.org/wiki/SHA-3[SHA-3] is the most recent addition to the Secure Hash Algorithm standards, published in 2015
as https://csrc.nist.gov/pubs/fips/202/final[FIPS 202].

SHA-3 includes 6 algorithms: SHA3-224, SHA3-256, SHA3-384, SHA3-512, SHAKE128, and SHAKE256.

The SHA3 functions output a fixed-sized digest while SHAKE128 and SHAKE256 are approved extendable-output functions, also known as XOFs. XOFs permit generation
of an arbitrarily long message digest in a defined manner.

Unlike SHA-2, SHA3-224 is not a truncated version of the SHA3-256 algorithm. Instead, all SHA-3 algorithms create their digests by truncating the
lower portion of the 1600-bit state permuted by the Keccak algorithm. The XOFs return their digests incrementally as fixed-sized blocks, using the truncation specified
in Algorithm 8, step 8 of FIPS 202.

SHA-3 uses 64 bit operations for all of the algorithms in the family.

### RIPEMD-160, RIPEMD-128

Designed in 1996, https://en.wikipedia.org/wiki/RIPEMD[RIPEMD-160] is a cryptographic hash function that was less well known than MD5 and SHA-1,
Expand Down

0 comments on commit 3f94538

Please sign in to comment.