SHA-1 and MD5 Hashing

What is a hash?

Hashes are the product of cryptographic algorithms of varying complexity.  When a file is run through a hashing algorithm, a sequence of characters is created.  This sequence, or hash, is unique to that file.  Any changes to the file would alter the hashing and would produce a different result.  

Why is checking hashes important?

Most reputable sites that offer file downloads will provide the file’s hash.  These hashes are important to check because they verify the file’s integrity.  They will confirm that the file wasn’t altered or switched in any way.

What are some of the different types of hashing?
  • SHA-1
    • SHA-1 was designed by the National Security Agency (NSA).  It is currently a Federal Information Processing Standard.  SHA-1 is usually rendered as a hexadecimal number 40 digits long.
  • MD5
    • MD5 was developed to replace MD4.  It is commonly used to verify data integrity.  MD5 is usually rendered as a hexadecimal number 32 digits long.
How to check your files:
  • Windows
    • Certutil
      • certUtil –hashfile pathToFileToCheck [HashAlgorithm]

WinSha

WinMD5

 

 

  • Mac
    • Openssl
      • openssl [HashAlgorithm] pathToFileToCheck

MacSha

MacMD5

 

 

  • Linux
    • sha1sum
      • sha1sum pathToFileToCheck
    • md5sum
      • md5sum pathToFileToCheck

LinuxSha

LinuxMD5