Week 9 — 7 / 22

Password Security: One-Way Hashing

The first thing you could do is, instead of storing passwords directly, you could store a one-way hash. That lets you check whether the password a user enters is the right one (just hash it and compare the hashes), and there's no easy way to get the passwords from the hashes.

But just because there's no easy way doesn't mean that there's no way. And modern computers make lots of hard things possible!

You might try every possible password, or every likely one by using the words in a dictionary. You might cleverly precompute hashes in a space-efficient format for re-use.