Are there any other good/reliable hashs which are smaller than MD5 and faster? (for purposes of checking for file corruption - not for security purposes) (preferably 16bit?)

Recommended Answers

All 2 Replies

MD5 is popular because it can be implemented small and fast. Better ones are SHA256 and SHA512 hashes, which can be implemented pretty efficiently in todays' hardware. In any case, adding a salt value to permute the hash of a string is always a good idea from the security perspective.

So, for a simple file checksum, md5 is very good, and will very rarely generate a collision (if ever), but for speed, the old cksum tool is much faster for big files (like video files of 1+GB size).

FWIW, md5 check sums are 128 bits in size, sha256 are (duh) 256 bits, and sha512 are 512 bits.

In case you are enterested, my organization uses sha256 to encrypt user identifiable browsing information in our cell phone proxy browsers. These are one-way hashes, and make recovering data about a specific user very difficult. We are considering moving to a sha512+salt hash to make them pretty much un-encryptable, even with modern brute-force tools and tonnes of processors.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.