Skip to content
CryptoAcademy logo CryptoAcademy
Menu
Beginner Cryptography

Hash function

A one-way function that turns any input into a fixed-size fingerprint.

Hash function at a glance
A hash function turns input of any length into a fixed 256-bit digest INPUT — ANY SIZE Hello Blockchain 17 bytes SHA-256 one-way compression no key · deterministic · fast DIGEST — ALWAYS 256 BIT 7f83b1657ff1fc53b92dc1814 8a1d65dfc2d4b1fa3d677284 addd200126d9069 64 hexadecimal characters Change one character in the input and the entire digest changes. Going back from digest to input is computationally infeasible — hashing is one-way.

In simple terms

Think of a hash as a fingerprint for data. The same input always gives the same fingerprint, and you cannot work backwards from the fingerprint to the input.

Analogy

A blender: fruit goes in, a smoothie comes out — and you can never turn the smoothie back into the original fruit.

Going deeper

Formally, a cryptographic hash must be preimage-resistant (you cannot find an input for a given digest), second-preimage-resistant (given one input you cannot find another with the digest) and collision-resistant (finding any two inputs with the same digest is infeasible).

Common mistake

Hashing is not encryption. There is no key and no way to reverse it.

Share this page

Send this link to a friend, or scan the QR code to open it on your phone.