🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← All topics

Quiz: Password Storage Lab: questions with answers

10 questions, each with the answer and a short explanation.

Take the timed quiz + get a certificate →
  1. Q1. Why must the salt and iteration count be stored next to the hash?
  2. Q2. In the lesson's assumed numbers, roughly how much more does one PBKDF2 guess at 600,000 iterations cost than one SHA-256?
  3. Q3. When is the right moment to upgrade a user's legacy sha256 hash to PBKDF2?
  4. Q4. Why does the login function return "Incorrect username or password" in both failure cases?
  5. Q5. What does this print? (code)
  6. Q6. What extra resource does scrypt make attackers spend on every guess?
  7. Q7. Where should a pepper be kept?
  8. Q8. What does this print? (code)
  9. Q9. Why is a single SHA-256 acceptable for storing password reset tokens?
  10. Q10. Which test would catch a verify function that accepts every password?