banner

The MD4, MD5 and SHA-1 algorithms are secure hash functions. They take a string input, and produce a fixed size number - 128 bits for MD4 and MD5; 160 bits for SHA-1. This number is a hash of the input - a small change in the input results in a substantial change in the output. The functions are thought to be secure, in the sense that it would require an enormous amount of computing power to find a string which hashes to a chosen value. In others words, there's no way to decrypt a secure hash. The uses of securehashes include digital signatures and challenge hash authentication.
Input
Calculate
Result

hex_md4("test hash") = "549089516e75bd13c41ff098fbb58d5e"
hex_md5("message digest") = "f96b697d7cb7938d525a2f31aaf161d0"
hex_sha1("160-bit hash") = "90d925d853c3d35cd54070bb75280fefad9de9e7"


Uses for hashes
- Challenge hash authentication - a simple way to protect passwords during login.
- One time passwords - a neat way to use a different password on every website, without having to remember them all.
- Generating unique id numbers, e.g. from an email address
- Harvesting entropy, e.g. squashing a passphrase down to a 128-bit cipher key
- Data integrity and message authentication codes
- Bit commitment, e.g. this logic game by Thomas Lussnig. Here the server sends a hash to the client, which commits it to a particular choice of secret colours, but without revealing what the colours are.
- One-way encryption of passwords
- To make a pseudo symmetric-encryption algorithm