How Encryption Works, Encryption Types, and Known Cipher Vulnerabilities


Seeking private investigator services? Get a free consultation today.

Introduction

What is cryptography and how do you prevent attacks on it? Cryptography is how confidentiality, integrity, authenticity, and non-repudiation can exist in data. This means it provides the mechanism to secure data into unreadable forms by anyone not authorized while allowing the same message to be verified from any given sender as legitimate and non-corrupted. However, it isn’t perfect and there are many types of attacks on cryptography.

What is encryption?

Encryption is the process of changing data into an unreadable format which can only be reversed with the proper key. It is simply a mathematical formula, known as a cipher or algorithm, combined with a key and initialization vector (which we won’t get into), is generated by the user in some manner, in conjunction with the data you are trying to hide in order to convert it to an unreadable format known as Cyphertext. Whoever has the key will be able to reverse this process in order to obtain the original message known as Plaintext.

How does it work?

All encryption can be reversed, other than one time pad encryption, because encryption is built on modulo math functions, albeit quite complex ones. Without getting into too much detail, modulo math is essentially taking the two numbers with an operator, such as a addition or multiplication, and performing those operations around a circle of numbers in numerical order. The length of this numbered circle is predicated on the number associated with mod. For instance, mod 10 would have 0-9 in a circle. If this has confused you, click here if you want to learn more. Once you understand this, you’ll see why all encryption (except one-time pad) can be reversed or ‘cracked’ even without the key.

The stronger the algorithm, the more complicated the math goes. In the video, the instructor demonstrates how it takes longer to reverse larger numbers. This is the concept encryption uses but it does so with incredibly large numbers which changes from cipher to cipher. A strong encryption would take hundreds of thousands of years to reverse and that’s with all of the computer processing power of the world combined.

Types of attacks on cryptography

Known Ciphertext

When only the ciphertext is known by the attacker, which is the unreadable encrypted message, generally the only means of attack is by using brute force on a key or frequency analysis. Brute force is usually the longest and most resource intensive attack there is. It is simply guessing the key/password repeatedly until it guesses correctly. This can be done by a human being but it is usually done by script or application.

Prevention: To prevent this attack, it is best to use strong encryption with long keys and strong passwords of long length and high complexity.

Known Plaintext

This is an interesting attack because it takes the known ciphertext, which is fairly easily available, and some of the original message or plaintext in order to reverse the ciphertext. This attack is fairly useful on weak or outdated encryption methods. A notable one is the Caesar cipher. If you know a portion of the plaintext under a Caesar cipher, the key is recoverable instantly. However, this attack is rarely useful on modern encryption ciphers.

Prevention: The best way to prevent this attack is by using a modern cipher.

Chosen Plaintext

In a chosen plaintext attack, the attacker is the one sending a non-encrypted message that gets encrypted by the algorithm he intends on cracking. The attack uses differential cryptanalysis in order to compare the ciphertext to the plaintext. The attacker places his plaintext input and measure the output of the encryption and attempts to reverse the process, attempting to expose the private key. This attack is fairly dangerous because of some fading, but still in use, algorithms like DES and other block ciphers are vulnerable to these types of attacks on cryptography.

Prevention: As with before, use a more modern or non-block ciphers. In addition to this, if you are aware that an attacker is manipulating communications, cease your communication with them. Every bit of information they obtain of your ciphertext can help them in their quest to crack the key.

Chosen Ciphertext

The chosen ciphertext attack is very similar to the previous in that it uses both ciphertext and plaintext. However, with this attack the attacker has already fully compromised the system and they are simply trying to recover the private key. There could be many reasons for this, perhaps the key is re-used in another system they have not yet compromised or to gather further information on the host they have access to. Whatever the case is, this is a serious flaw, one that old versions of RSA used to be particularly vulnerable to.

Prevention: First, you want to prevent the attacker from gaining access to the plaintext to begin with, this would prevent this attack up-front. However, if you believe the attacker already has plaintexts, changing re-generating a key/password might easily resolve this. And of course, always keep updates rolling, if possible, this will always minimize available attacks on cryptography.

About us

Spectre Intelligence is a private investigation and intelligence firm located in sunny Round Rock, TX (Austin area). If you need investigation or cyber security services, visit us at www.spectreintel.com and www.spectretechnology.com