2 ms·
Right, but that means that what you actually want to do is store a hash of the password salted based on the identity of the machine you’re connecting to. (And
by comex 7y ago
Right, but that means that what you actually want to do is store a hash of the password salted based on the identity of the machine you’re connecting to. (And the authentication protocol would be changed to verify possession of that hash rather than the password itself.) That way, not only do you avoid leaking the password itself, you ensure the hash can’t be used to connect to any other machines that use the same password. But changing the password is still what you need to do to block future access, preserving the expected semantics for sophisticated users.
(For bonus points, the salt should be re-randomized whenever the password changes, so that changing the password makes old hashes permanently useless, even if someone later changes the password back to its old value. Not that going back to an old password is ever a good idea, but some users will inevitably do it anyway.)
Edit: Actually, it’s probably better to use a completely random token and just have the server reset it whenever the password changes. That avoids any possibility of cracking the hash to recover the original password.