Objective 1.4: Explain the importance of using appropriate cryptographic solutions

Security+ SY0-701 practice question

During a code review of a customer portal, an auditor finds that passwords are stored as unsalted SHA-256 hashes. Two customers who chose the same password have identical hash values, and the auditor warns that an attacker who compromises the application server could copy the table and crack many of the passwords quickly by using precomputed lookup tables. Which change would MOST directly address the auditor's concern?

Explanation

A salt is a random value, unique to each password, that is combined with the password before hashing and stored alongside the hash. Because every hash now depends on its own salt, identical passwords produce different hashes and precomputed (rainbow) tables become useless, since an attacker would need a separate table for every salt. In practice, salting is paired with key stretching (for example bcrypt, scrypt, or PBKDF2) to also slow down brute-force guessing.