Lets say you are presented with an encrypted string of bits or text, and no other information. What would be necessary before you could apply brute force methods to decrypting the string? How would a cryptanalyst approach such a case? (lets assume the conditions are such that the encryption can be brute forced in a reasonable time frame).
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
This is called ciphertext-only cryptanalysis*, and it's pretty difficult unless the cipher is quite weak. Therefore, the first priority for a cryptanalyst in such a situation is usually to try to find more information about the algorithm. Fortunately (for the cryptanalyst), as Kerckhoff's principle suggests, there are often ways to find out how the algorithm works. For example:
That said, there are some things that can be done even without knowing the algorithm in advance, particularly if the cipher is a simple one:
* The term "ciphertext-only cryptanalysis" is also used for the broader situation where the algorithm is known but no information about the key or the plaintext is available. Even that can be quite challenging, although obviously easier than if even the algorithm used is uncertain.
If you can't tell what function was applied to create the cipher text, your search space is as many bits as the message. It's the perfect secrecy achieved with a one time pad. (x + y = z, given z what are x and y?) During an exhaustive search the attacker could find as many messages as they were willing to compute, but they will never know which one was right.
That being said, the added clause "lets assume the conditions are such that the encryption can be brute forced in a reasonable time frame" really means you just confine your search to any ciphers that are insecure enough to be cracked in the chosen time frame.
Ilmari's answer is way cooler though. :-)