Suppose Alice is using a password prompt that only accepts up to 32 characters for any particular password.
Memorization of long strings of random characters is not one of Alice's strengths, so she opts instead for a memorable passphrase consisting of a permutation of 7 of the 2000 most common English words. Unfortunately this passphrase exceeds the maximum password length allowed by the prompt (i.e. the passphrase is easily longer than 32 characters).
This is a common problem faced by the average user, who often is required to enter passwords to sites or server with maximum password length limits. What I wonder is whether this solution is relatively secure:
- Alice hashes her passphrase:
passphrase --> MD5(passphrase) --> new_passhash
- MD5 digests have a length of 128 bits or 32 hexadecimal digits.
- Alice takes
new_passhash
, which has a length of 32 characters, and uses it as her new password.
On the surface, it appears as if her password is in fact strengthened. Assuming an attacker is performing a brute-force attack:
Permutations for passphrase = 2000^7 (set of 2000 words, 7 choices)
Permutations for MD5 string = 16^32 (set of 16 alphanum characters, 32 choosen)
(2000^7) is strictly less than (16^32)
However, if the attacker does know that the passphrase is hashed using MD5, would the fact that MD5 is susceptible to collision attacks render the new_passhash
less secure than the original passphrase?