# Different types of cryptography attacks

Cryptography is the art of hiding information so that only the receiver can see it. This is achieved by decoding the information at the receiver’s side and encoding it at the sender’s.

Cryptography is an ancient field that dates back to 2000 B.C. Egypt. Before we get into the various types of attacks, let’s take a look at how cryptography works.

The text to be transmitted that can be easily read is called ‘plaintext’.

This plaintext is encrypted to make it unreadable and is known as “Ciphertext”.

This ciphertext can be transmitted securely over insecure channels without fear of snooping. Once the ciphertext has been transmitted successfully, it must be decrypted at receiver’s end. The ‘plaintext” can then be recovered.

An algorithm is a mathematical formula that helps in encrypting information with the “key”.

The “key” is a long sequence or bits that is used to encrypt or decrypt text.

This is the fundamental idea behind cryptography. There are two types of encryption: symmetric encryption or asymmetric encryption.

The same key that is used to encrypt a message can also be used to decrypt it in ‘Symmetric encryption.’

Different keys are used in ‘Asymmetric encryption’ algorithms to encrypt and decrypt messages.

Cryptography is a way to ensure that information is sent securely and safely. It also preserves confidentiality, integrity, authenticity, and security. We have now covered the basics of cryptography as well as the various types of encryption. Let’s now look at the different attacks that can be used.

There are two types: ‘Passive attacks’ and active attacks. Passive attacks include eavesdropping, data snooping, and data stealing. Passive attacks aren’t as dangerous as they don’t cause data alteration or modification. Active attacks cause system files to be altered and data to be altered. They are clearly more dangerous than ‘passive’ attacks.

These are just a few examples of “active attacks”:

Bruteforce attacks

Brute-force attacks are a method of trying every possible combination of characters to find the “key” to decrypt encrypted messages. Brute-force attacks can take less time for smaller keyspaces but take much longer for larger keyspaces. It is therefore impossible to attempt brute-force attacks on modern encryption systems.

Attack cipher-only

The attacker can determine the ciphertext for various messages encrypted with the same encryption algorithm in the ‘cipher only’ attack. The attacker must figure the key that can be used to decrypt all messages.

The ‘cipher only’ attack is one of the easiest to commit because it is easy to sniff the ciphertext but difficult to implement due to limited knowledge about the encryption process.

Known-plaintext attack

The attacker must know some plaintext and ciphertext in order to use the ‘knownplaintext’ attack. He must then reverse engineer the ‘key’ to decipher messages that use the same algorithm and ‘key.

The ‘known plaintext’ attack was very effective against simple ciphers like the’substitution-cipher’. It was used to break ciphers during the Second World War.

Chosen plaintext attack

The ‘chosen plaintext’ attack is similar in nature to the known-plaintext attack. However, the attacker chooses his own plaintext (e.g. cryptography) to generate a ciphertext for a ’Vignere cipher’. He can then figure the?key’ using the generated ciphertext.

Once he has figured the key, he can find out more about the encryption process and how it is being used.

He can also decrypt other messages using this information.

Chosen ciphertext attack

The attacker selects a section of the decryption text to attack with the ‘chosen encryption text’ attack