Partner or alone, as you wish.
Hand in by creating a folder named "passwords" at the top level of your CS231 repository.
See the What to hand in section below for more details.
Part 1. Unsalted passwords
Password files on Unix systems have lines that look something like this:
jondich:2fe7cec3131fa9662906ecfb2eac8a49::0:99999:7:::
This colon-delimited set of fields includes the user name, the MD5 hash
of the user's password, and then miscellaneous other stuff that won't concern us.
As we'll see, this is not an ideal format for a variety of reasons, including the fact
that MD5 has been substantially weakened by mathematical research and faster computers,
but it's certainly an improvement on storing the passwords themselves.
Consider this example password file. Your job for Part 1 is to:
- Figure out as many of the passwords as possible
- Collect timing information (see What to hand in below for details)".
A little help
Part 2. Salted passwords
Now, let's switch to a slightly different password file format:
jondich:e75fa822$8a604057b98aff07885d29eea97e885e::0:99999:7:::
In the hash field, we have an 8-digit hexadecimal number known as "salt", then a
dollar sign, and then the hash of the salt (which is just a string of hexadecimal digits)
concatenated with the password.
As before, the "jondich" password is "moose", so you can use that to check your hash computation code.
Also, as before, the hash function we're using is MD5.
(WARNING: This hashing technique is designed to introduce you to the
basic idea of salted passwords. However, the technique and salt sizes used here are not ready
for prime-time. There are a couple more steps we need to take—longer salts, multiple rounds of
hashing, etc.—before we're getting close to best practice for password storage.)
Here's the salted password file. Same kind of passwords
as in Part 1.
Again:
- Figure out as many of the passwords as possible
- Collect timing information (see What to hand in below for details)".
By what factor has your password-checking slowed down? Why?
What to hand in?
In your "passwords" folder, put:
- A file for Part 1 named passwords1.txt, consisting of lines of the form "username:password", like
jondich:moose
for each of the passwords you discovered.
- A file for Part 2 named passwords2.txt, same format as passwords1.txt.
- A file named summary.txt, showing:
Part 1
Passwords cracked: [number cracked]
Total time: [user time from a "time" command]
Number of hashes computed: [number of MD5's computed]
Passwords cracked per number of hashes computed: [passwords per hash]
Time per password cracked: [seconds per password]
Part 2
Passwords cracked: [number cracked]
Total time: [user time from a "time" command]
Number of hashes computed: [number of MD5's computed]
Passwords cracked per number of hashes computed: [passwords per hash]
Time per password cracked: [seconds per password]
Factor by which your time per password lengthened, and why.
[number and explanation]
Have fun!