3.3 SHA Algorithm

The Secure Hash Algorithm (SHA) was designed by the United States National Security Agency (NSA) and is a U.S. Federal Information Processing Standard (FIPS). The SHA-3 family of standards was released by the National Institute of Standards and Technology (NIST).

SHA-1 is based on older Message Digest algorithms like MD2, MD4, and MD5, but it generates a larger hash. SHA-2 includes major improvements over SHA-1. SHA-3 is based on the KECCAK algorithm.

SHA-1 has only one hash function. The SHA-2 family includes six hash functions, with two truncated versions: SHA-512/224 and SHA-512/256. The SHA-3 family includes four fixed-length hash functions and two extendable-output functions (XOFs), SHAKE-128 and SHAKE-256.