If someone breaks encryption, how do they know they're successful?
First off, this is not about cracking hashed passwords. I know that a brute-force or dictionary attack knows it cracked the password when it gets in.
However, if an attacker is trying to brute force a message, let's say a message transmitted by a government to its embassy in a foreign country, how does the cracker determine it has finally found the plain-text?
As it turns out, my original question was badly written. I stated I wasn't asking about cracking passwords, and then I worded the question as if that were what I was asking, at least partly. For one thing, I talked about MD5, which is a HASHING algorithm, not an algorithm used to encrypt for the purpose of being decrypted. @lucas-kauffman gave a good answer to what I appeared to be asking, and thanks for that, as it was informative nevertheless.
Let me cast this differently to avoid confusion.
Given a cipher-text which was created using public key cryptography, and assuming that an attacker had the resources to use a brute force method to attack it, how would the cracking program decide whether or not it had finally achieved the plain-text? This isn't password-cracking, where the result would be obvious (entrance gained to the thing being attacked). Say that the message's ciphertext was something along the line of "JPOAISUDF89L;JKQWERTYQIOP34JUU890JEROTUQ3-49TJ" (<== just some random characters I typed don't try to "break" it). How would the cracking program decide that it had found the plaintext, given that it didn't know what it was looking for in the first place?
I know a human could look at a trial decryption (presuming such a thing exists) and know that "Attack at midnight" represents an actual message, while "aroOFPS toj34ioA diy66b234" does not (he hopes), but a human isn't going to be involved (given that the process is going to be making hundreds of attempts per second). So the cracker program presumably has to have some way to know that it has hit paydirt, or at least potential paydirt? This would get especially dicey if the sender had encrypted the message twice or three times (Triple DES anyone?).
It just strikes me as incredibly unlikely that a given message encrypted using a secure method could EVER be cracked in finite time, especially if the attacker didn't know what he or she was looking for exactly.