Techabulary

Secure Hashing Algorithm (SHA-1, SHA-256, SHA-384, SHA-512)

The Secure Hashing Algorithm (SHA) is a suite of algorithms for a generating cryptographically secure one-way hash (also referred to as a message digest).

The original algorithm was defined by the United Stated Government in FIPS PUB 180-1, which was published in 1995. The text was also reproduced in RFC 3174, which includes source code for a reference implementation. The function accepts an input message of any length from 0 to 2^64 octets and produces a 160-bit one-way hash.

The Secure Hashing Algorithm family was further expanded upon several times, progressing though FIPS 180-2, 180-3, and most recently published as the Secure Hashing Standard in FIPS PUB 180-4 (2015). This revised standard defines SHA-1, SHA-256, SHA-384, and SHA-512. The newer additions to this suite beyond SHA-1, generally referred to collectively as SHA-2, produce message digest of various sizes, with the number of bits following the acronym SHA (i.e., 256 bits, 384 bits, and 512 bits).

Resources: SHA-1 Source Code