Final answer:
A brute force attack is used to guess the key in cryptographic systems by trying every possible combination until the message is decrypted. Other methods mentioned have different purposes and are not directly used for guessing keys in encryption.
Step-by-step explanation:
The attack method used to guess the key and see if the message decodes correctly is called a brute force attack. In a brute force attack, an attacker systematically checks all possible keys until the correct key is found. This method is often used when there is no clue about what the key might be, and the attacker attempts every conceivable combination until the message is decrypted.
Other methods listed, such as dictionary attacks and rainbow table attacks, are used for different types of password cracking rather than direct key guessing for message decryption. A man-in-the-middle attack is a different type of attack in which an attacker intercepts communication between two parties without their knowledge.