Sunday, June 10, 2012

MD5Sum

Ever wonder about md5sum on the packages?

The long and the short of what it is can be found on wiki, but once upon a time it was used for security. Nowadays it gets used verification that a download is complete. If you're looking for security, the wiki page rightly redirects you to use sha256sum (or some variant) instead. On most linux systems both are available, typically with the same options when run from the command line. In a nutshell, the difference between them is md5sum is a 126-bit checksum. Whereas, sha256sum does just like the name implies, it uses a 256-bit checksum. Alternatively, one could use shasum and then define the algorithm size, but I digress.

Even an md5sum can be used to make sure that you've downloaded the entire file. Once your target file has been downloaded, you can run the command on the file and compare the checksums.

md5sum filename.ext

Nothing complicated, just a single line and you have your answer.

No comments: