3 ms·
They could store a hash of your old password, along with 40 hashes, one for each character, hashed against the hash of the old password. e.g. 'this_is_my_passw
by NLips 14y ago
They could store a hash of your old password, along with 40 hashes, one for each character, hashed against the hash of the old password. e.g.
'this_is_my_password" => hash1
'hash1_t' => hash2
'hash1_h' => hash3
etc
This way, when you enter the first character of a new password, they can hash it against your old password, see if it creates hash2 and refuse permission to use the new password. Hopefully this is the same way as websites can ask for only selected characters from a password when you log in.
- teraflop 14y agoThat's functionally equivalent to storing the password in plaintext. The individual letter hashes would be trivial to reverse.
- NLips 14y agoIt would be _easier_ - you still need to know the hashing algorithm and salt. I suppose since it's the TSA, they may use encryption and an HSM instead of hashes.
- Robin_Message 14y agoKerckhoffs's principle: A cryptosystem should be secure even if everything about the system, except the key, is public knowledge. So you can assume the algo is public and the salt too (assume someone has a dump of your source code and your database - how do you keep the salt secret? You can't. This is the case where all the effort to protect passwords and use strong hashes is aimed at.) The solution of "enter your old password" when you enter the new one is simple and doesn't compromise security.
- NLips 14y agoI agree, but "password is not secure if everything about the system, except the key, is public knowledge" is better than "password is saved in plain text".