What is "sha1"

SHA is a family of cryptographic hashes (i.e., cryptographic scrambles). That is, they are checksum functions (which produce a fixed size output for an (almost) arbitrary size input), with no known way to find two entries with the same checksum or to retrieve the input given the checksum.

SHA algorithms are specified by the US Standard Institute NIST's in the publication FIPS-180. There have been several versions of SHA, both SHA-1 and SHA-2 and are currently in widespread use:

  • SHA-0: withdrawal in favor of SHA-1 due to an undisclosed failure
  • SHA-1: a widely used algorithm with a 160-bit result, published in 1993. SHA-1 is deprecated in favor of SHA-2, although it is still approved for many official uses and no serious flaw is known.
  • SHA-2: a family of four similar algorithms with different output sizes: SHA-256, SHA-512, and less common SHA-224 and SHA-384 variants. It was published in 2002.
  • SHA-3: the successor of SHA-1 and SHA-2, although these have no known flaws yet.

MD5 is an old cryptographic summary algorithm, now obsolete, because collisions have been found, but still used in legacy systems.