Multiple choice technology security

How can we prevent dictionary attacks on password hashes ?

  1. Hashing the password twice

  2. Encrypting the password using the private key

  3. Use an encryption algorithm you wrote your self so no one knows how it works

  4. Salting the hash

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Salting adds unique random data to each password before hashing, which renders precomputed dictionary or rainbow table attacks ineffective since each hash must be cracked individually. Double hashing doesn't prevent dictionary attacks (it just adds computational cost), encrypting with private key is not how password storage works, and 'secret algorithms' (security by obscurity) is a dangerous practice.