4 ms·
I have an honest question about cracking passwords. Does the cracker know when they are getting close? I don't understand how they could, but every field has
by dhimes 9y ago
I have an honest question about cracking passwords. Does the cracker know when they are getting close? I don't understand how they could, but every field has its experts and surprises so I thought I'd ask here.
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?
- Malice 9y agoNo. You only know whether you have it correct or incorrect.
- dhimes 9y agoThank you.
- PeterisP 9y agoNo. 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.
- dhimes 9y agoExcellent. Thank you.
- Xoros 9y agoYes in movies or tv shows they do when you see the decipher progression on screen :) But as stated by others no. Not trolling, I guess for people that don't know how it works it can be confusing.
- dhimes 9y agoI know better than the tv stuff, but what I don't know is if, for example, it takes 20 iterations of a hashing algorithm to match the hash, if there were statistical, or other measurable, differences that converged as you started working your way up to 20. Or, if you knew the iterations, but you only had a few characters right in the guessed password, if there was a way to know (decreasing entropy of the hash or something). I don't know the mathematics behind the algos very well.
- Xoros 9y agoAgain, not trolling ! 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 :)
- dhimes 9y agoNo worries. I didn't take it personally. I just wanted to clarify that I wasn't trying to ask the "obvious" question- I was asking about way more subtle things. Actually, I wasn't sure I would get a response if anybody knew that there was a way to tell. But I decided to ask anyway.
- bluGill 9y agoThey should not. However in a badly designed system they will. It turns out to be harder than you might think to not leak information. If you apply a hash to the password (which you should) and then check the hash you need to check all characters of the hash before announcing yes/no. Otherwise the attacker then time how long it takes to get to the no, when it takes longer they know that the first byte of the hash matches - this lets the attacker eliminate most of the possible passwords quickly and thus break in faster. 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.
- dhimes 9y agoAha! I was wondering if there were some "gotchas" to watch out for in the real-world systems.
- kej 9y agoAs others have said, for properly hashed passwords, the answer is no. 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.