What is Salt?

A random value added for each user when computing the hash value of a password. It makes the same password produce different hash values, making cracking with tables of precomputed hash values difficult. It is stored together with the hash value and does not need to be kept secret.

Japanese name: ソルト

Salt appears in 2 practice questions across 1 topic, including Information Security Basics.

Field: Information Security Basics

Try it: questions about Salt

When a web service stores users' passwords, it adds a random value that differs for each user (a salt) to the password before computing and storing the hash value. What is the main purpose of the salt?

  1. ATo allow the original password to be recovered from the hash value using the salt, so it can be sent to users who forget it
  2. BTo make the stored hash values differ even when users share the same password, making cracking with tables of precomputed hash values difficult
  3. CTo shorten the hash value and save database space
Show answer and explanation

Answer: B. To make the stored hash values differ even when users share the same password, making cracking with tables of precomputed hash values difficult

The basic rule is not to store passwords as they are but to store hash values computed with a hash function. At login, the hash of the entered password is computed and compared with the stored value. If only plain hash values are stored, however, users with the same password have the same hash, and simply looking up a table of precomputed hashes of common passwords (such as a rainbow table) reveals many passwords. A salt is a value generated randomly for each user, added to the password and stored together with the hash. The salt does not need to be secret, but because it differs for each user, the same password gives different hash values and precomputed tables become useless. An attacker has to redo the computation for each user, which greatly increases the effort.

Salt in the explanations

Questions that mention Salt (2)

  1. When a web service stores users' passwords, it adds a random value that differs for each user (a salt) to the password before computing and storing the hash value. What is the main purpose of the salt?
  2. For storing passwords, it is recommended not to use a fast hash function such as SHA-256 directly but a scheme deliberately designed to take time to compute, such as bcrypt or Argon2. Why?

Books on Information Security Basics Ad

As an Amazon Associate I earn from qualifying purchases.

Semiconductor, Electronics and Computing Calculators

Related terms

Hash function Cross-site scripting (XSS) Digital signature Message authentication code Multi-factor authentication Phishing Principle of least privilege Public-key cryptography Ransomware Social engineering

Back to the glossary