What are the two general approaches to attacking a cipher?
In general, the main goal to attack a ciphertext is to find the key used for encryption rather than knowing just plain text.
There are essentially two approaches to attack a ciphertext.
Cryptanalysis:
In cryptanalysis, the attack relies on the nature of the algorithm and maybe having some knowledge on the characteristics of plaintext or maybe having access to a few plaintexts – ciphertext pairs to deduce the key used for the encryption. Basically, they analyze or brainstorm the algorithm in an attempt to find the key being used.
Brute-force attack:
In this type of attack, the attacker tries every possible combination key on the ciphertext till one of the keys obtains the readable plain text. In general, it’s said half of all possible keys must be tried to get success.