Hash functions
A hash function takes any data, from one word to a whole film, and produces a short fixed-length fingerprint. Change a single letter and the fingerprint changes completely. You cannot work backwards from the fingerprint to the original.
A fingerprint identifies a person without telling you anything else about them, and you cannot rebuild the person from it.
- MD5 Once used everywhere for checking files and storing passwords. Status: Collisions published in 2004 Used in 2012 to forge a Microsoft signature for the Flame malware.
- SHA-1 The next standard, used in certificates and Git. Status: First public collision in 2017 Browsers had already stopped trusting SHA-1 certificates.
- SHA-256 (SHA-2) Today's standard fingerprint, standardised by NIST in 2002. Status: No practical attack Used in certificates, Bitcoin and software downloads.
- SHA-3 A different design kept ready in case SHA-2 is ever weakened. Status: Standardised in 2015 Chosen in an open competition.
Why it matters
Hashes are used to check files have not been altered, to store passwords safely, and inside signatures and blockchains.
Where you meet it
Password storage on websites, software downloads, Bitcoin mining, Git.
- Encoding Changes how data is written so computers can carry it. Anyone can reverse it. Example: Base64 in email attachments, percent-encoding in web addresses Never use it to hide anything.
- Hashing Makes a fixed fingerprint that cannot be turned back into the original. Example: Password storage, file checks Easy-to-guess inputs can still be found by trying them.
- Encryption Scrambles data so only someone with the key can read it. Example: Messages, disks, websites The only one of the five that keeps the content secret.
- Message authentication code A short tag, made with a shared key, that shows the data has not been changed. Example: Every secure web connection Proves integrity, not secrecy.
- Steganography Hides the fact that a message exists, for example inside a photo. Example: Digital watermarks Usually combined with encryption in case it is found.
Go deeper history and technical detail
Hashing is not encryption: there is no key and no way to reverse it. Good hash functions make it infeasible to find two inputs with the same output (a 'collision'). MD5 was broken in 2004 and SHA-1 in 2017, when Google and CWI Amsterdam published two different PDF files with the same SHA-1 hash. SHA-256 (part of SHA-2) and SHA-3 are the current standards. Passwords need special slow hashes such as Argon2 or bcrypt.
Read or watch next
- Introduction to Cryptography by Christof PaarChristof Paar, Ruhr University Bochum (YouTube, 2014), lecture series
- Network and Computer SecurityMIT OpenCourseWare (6.857, Spring 2014), course
- Describe concepts of cryptographyMicrosoft Learn, course
- But how does bitcoin actually work?3Blue1Brown, video
- Hashing Algorithms and Security - ComputerphileComputerphile (2013), video
- What are Digital Signatures? - ComputerphileComputerphile (2020), video
Related terms
Cite this page Encryption Observer, “Hash functions”, encryption.observer/terms/hash-function/, checked December 2026.