Hashes are used to verify that integrity of files have not changed since being published by the author. When sending or downloading files, there is always a chance that a file has been corrupted from the original version from the author. This corruption could have occured from an impropper download, a damaged storage device, or a MITM (Man-In-The-Middle) attack.

A hash is an algorithm that is applied to a file and produces a product with a fixed number of digits. When an author publishes a file, they can choose to also publish a hash with the file. Any users who subsequently download the file can run the same hash. If the product of the hash run by the user matches the hash publushed by the author, the the user is assured to have an exact copy of the file produced by the author. If there are any changes to the file, the product of the hash will differ from the hash published by the author. One such hash algorithm is MD5. Though MD5 is relatively secure and is extremely popular, it has been superceded by the SHA1 and again by SHA2 algorithms.

To apply the hash to a file, navigate to the directory that contains the file, then execute the following command (depending on the hash provided by the author):

md5sum filename

sha1sum filename

sha2sum filename

Webmaster: hardyjc@yahoo.com