by dhimes · 9y ago · 0 comments
So if I have a hashed password, and I start a hashing a dictionary, will I know that I have, say, the [whatever the word is for iterations or depth of hashing] correct, before seeing exact matches with the hashed database? Is there, I don't know, some convergence of some statistical property of the output as I get closer?
In general, that depends on the hash function. Some hash functions have that property (e.g. you might want to use such a function for some internal data structure), but cryptographic hash functions must not. If you'd find some property where you could check if you're "getting close", then that would be a major flaw in that function - i.e., it's possible that SHA-3 has some way to do that, but as far as we know (and we've tried) it does not, and if it would be the case then that would be a good enough reason to stop using SHA-3 anywhere.
The above is just one of the subtle things you need to worry about when trying to design a password checker. If you get it right the answer is NO, the attacker doesn't know when he is getting close.
However, for plaintext passwords using the default string comparison routines, a timing attack becomes possible since it will take slightly longer to compare a partially right password than a completely wrong password. The timing discrepancies would give the attacker clues about how close he is to succeeding.
Not trolling, I guess for people that don't know how it works it can be confusing.
Your comment just make me thought of that, and how it makes me laugh each time I see that on a movie/show. And also realize that there is surely a (big) part of non-tech people that may think it's how it works.
If an encrypting method "tells" you you're getting close, it will be a bad one.
(and sorry if you took it personaly. Next time I'll check the poster profile first :)