1. Home
  2. Knowledge Center
  3. Glossary
  4. Hashing (and salting)
Cryptography

Hashing (and salting)

hash function · hash · digest · salt · salting · SHA-256 · Argon2id · bcrypt

A calculation that turns any piece of data into a fixed-size fingerprint that cannot practically be reversed, and that changes completely if the data changes even slightly.

In practice

Hashing is used to check a file’s integrity (SHA-256), to prepare a digital signature and to store passwords without keeping them in plain text. For passwords, a salt is added, a random value unique to each account, so that two identical passwords produce different hashes and precomputed tables become useless. Above all, a deliberately slow function designed for the job is chosen (Argon2id, scrypt, bcrypt or PBKDF2), which slows down mass guessing if the database is stolen. MD5 and SHA-1 are broken (collisions can be produced) and have no place in any security use.

Example

Fictional case: two websites have their user databases stolen. The first stored passwords as unsalted MD5: most are recovered within hours. The second used Argon2id with a salt per account: each password has to be attacked separately, at a prohibitive cost.

How to protect yourself

  • Store passwords with Argon2id, scrypt, bcrypt or PBKDF2, and a unique salt per account.
  • Ban MD5 and SHA-1 from every security use.
  • Check the hash of downloaded software when the vendor publishes it.

Sources

The whole glossary

From theory to practice

So how does your system measure up?

Create your account and get an A+ to F grade for your domains’ encryption in minutes, with every finding explained and the fix to apply.

Run the audit from your account: an A+ to F grade for your domains’ encryption in minutes, with every finding explained and the fix to apply.

Belinda

Contact us

A question, a project, a partnership? Write to us: the team answers by email, usually within one business day.

Your details are only used to answer you. Do not include passwords or vulnerability details.