Lines of code on a screen, representing password salting.

The random data that makes stored passwords harder to crack.

What salting is

In cryptography, a salt is random data added to a password before it is processed by a hashing function. Rather than storing a password directly, systems store a hashed version of it; salting mixes in unique random data first, so the stored result is different even for the same password. The salt is stored alongside the hashed value so the system can check passwords later. Salting is a standard technique for protecting stored passwords.

Why hashing alone is not enough

Storing only a hash of a password is better than storing it in plain text, but it has a weakness: identical passwords produce identical hashes. Attackers exploit this by precomputing the hashes of common passwords and comparing them against stolen data. Because many people choose the same weak passwords, a single precomputed table can crack many accounts at once. Salting is designed specifically to defeat this kind of attack.

How a salt helps

By adding a unique salt to each password before hashing, the same password produces a completely different stored value for each user. This means an attacker cannot simply look up a precomputed hash, because the salt changes the result. Precomputed tables, which rely on hashes being predictable, become useless. The attacker is forced to attack each salted password individually, which is vastly more work.

Unique salts per password

For salting to be effective, each password should have its own randomly generated salt. If the same salt were used everywhere, an attacker could build a new precomputed table for that one salt. Using a different salt for every password ensures that even two users with the same password have different stored hashes, and that an attacker must redo their effort for each account rather than cracking many at once.

Salting in practice

Salts do not need to be secret; they are typically stored together with the hashed password. Their value comes from being unique and random, not hidden. When a user logs in, the system retrieves the stored salt, combines it with the entered password, hashes the result, and compares it to the stored hash. This lets the system verify passwords without ever storing them directly, while keeping each stored value unique.

Why it matters

Salting is a simple but essential practice for storing passwords securely, turning a database of hashes from an easy target into a much harder one. Understanding what salting is - adding unique random data before hashing - clarifies why a password leak does not automatically expose every account. For anyone interested in security, salting is a foundational concept in how passwords should be protected.

See also: What is hashing? Explained, Strong passwords vs passphrases explained.

Sources

Published date reflects the original event date (2023-02-14). This article is original Skillo editorial written from the sources above; facts were verified in September 2026.

Skillo Staff

Skillo Staff

All stories by: Skillo Staff

Leave a Reply