Understanding encryption and its different types

Home | Blog | Understanding encryption and its different types

What does encryption do?

Encryption is a way of protecting your online privacy by making plain text unreadable to anyone who does not have the right code, or decryption key. This code is like a secret password that only you and the person you want to share the information with know. Encryption helps you keep your sensitive information safe from hackers, spies, or anyone else who might try to access it without your permission.

Why do you need encryption?

You need encryption because you have a lot of personal data that you use or store online, such as:

Your email conversations with your doctor about your health Your bank account details that you use to log in to your online banking Your confidential report that you share with your boss If you do not encrypt this data, it could be stolen, leaked, or tampered with by someone who has access to the network or system where it is stored or sent. This could cause you a lot of trouble, such as identity theft, fraud, or blackmail. Encryption prevents this by making sure only you and the person you trust can see the data.

How does encryption work?

Encryption works by changing plain text, like a text message or email, into a random sequence of characters called ciphertext. This makes the data look like gibberish to anyone who does not have the decryption key. The decryption key is a set of rules that tell how to reverse the encryption process and turn the ciphertext back into plain text. When you want to send or receive an encrypted message, you and the other person need to have the same decryption key. This way, you can both encrypt and decrypt the message using the key. This is called encryption and decryption.

What are the different kinds of encryption?

Encryption is a way of making your data unreadable to anyone who does not have the right code, or decryption key. Encryption keys are made with mathematical formulas, and each key is different and random.

There are two main kinds of encryption methods: symmetric encryption and asymmetric encryption. Here’s how they are different.

Symmetric encryption

Symmetric encryption uses one secret password or key to make data unreadable and readable again. The key can be a code or a random mix of letters or numbers made by a random number generator (RNG), which is usually needed for high-level encryption. Symmetric methods are the easiest and most common way of encryption.

Symmetric encryption methods come in two types:

Block methods: Make a group of plain text symbols unreadable as one unit. 

Stream methods: Make one symbol of plain text unreadable at a time. 

Symmetric encryption has some weaknesses, but it is fast and effective. Since only one key is used by both sides—and that key is usually much shorter than with asymmetric encryption—symmetric encryption is quicker to run.

For instance: Symmetric encryption is a common method for securing ATM pins and other card payment data. It uses the same key to encrypt and decrypt the data, making it faster and more efficient than asymmetric encryption.

Asymmetric encryption

Asymmetric encryption—also called public key encryption—uses two keys to make data unreadable and readable again. A public key, which is given to everyone, can either make data unreadable or readable. A private key can also make data unreadable or readable, but it is not given to anyone. 

The key you use to make data unreadable or readable depends on what you want to do:

Making data unreadable with the public key: It makes sure only the person who has the matching private key can make the data readable again, even if someone else gets the data while it is being sent.

Making data unreadable with the private key: It lets the person who gets the data check who sent it, since they cannot make the data readable if someone else changed it. 

Asymmetric encryption uses two longer keys, so it is much slower and harder to run than symmetric encryption. It can also slow down networks and cause problems with memory space and battery life.

For instance: One of the most well-known examples of asymmetric encryption is the Digital Signature Algorithm (DSA). Developed by the National Institute of Standards and Technology (NIST) in 1991, DSA is used for digital signature and its verification. DSA is an example of asymmetric encryption based on modular exponentiation and discrete logarithms.

But, asymmetric encryption is more secure than symmetric encryption. Both are still used today—sometimes together to make up for their weaknesses.

Exploring Six Encryption Algorithms

Encryption algorithms are essential for securing data. They come in various forms, with some being more robust than others. 

Let’s delve into six prevalent encryption algorithms:

  • Data Encryption Standard (DES)

DES, a symmetric encryption standard developed in 1977, was initially designed to safeguard government agencies. However, its 56-bit key length is insufficient against modern cyber threats. In fact, a DES system was hacked in just 22 hours in 1999. Today, cracking a 56-bit DES key can take as little as six minutes. Consequently, DES is now considered obsolete for protecting sensitive data.

  • Triple DES (3DES)

As an enhancement of the original DES, 3DES applies DES encryption thrice to each data block. Despite this improvement, 3DES still falls short of current security standards. The National Institute of Standards and Technology plans to phase out both DES and 3DES by the end of 2023, given the availability of more effective algorithms like AES.

  • Advanced Encryption Standard (AES)

AES stands out for its remarkable blend of speed and security, making it the industry’s preferred encryption standard. It employs symmetric encryption and a substitution permutation network (SPN) algorithm to execute multiple encryption rounds, making it nearly impossible for cybercriminals to breach. Cracking a 128-bit AES key could take up to 36 quadrillion years. AES replaced DES as the U.S. government standard in 2002.

  • Rivest-Shamir-Adleman (RSA)

Named after its creators, RSA is an asymmetric system that offers the choice of encrypting with a public or private key. This feature makes RSA ideal for transmitting private data over the internet. If the public key is used for encryption, only the intended recipient can decrypt it with the private key. Conversely, encrypting with the private key allows the recipient to confirm the sender’s identity.

  • Twofish

Twofish is among the fastest symmetric encryption algorithms and is available for free use. Its 128-bit key makes it nearly impervious to brute-force attacks. Twofish is suitable for both hardware and software applications.

  • Elliptic Curve Cryptography (ECC)

ECC, the future of cryptography, is an asymmetric encryption algorithm that leverages the mathematics of elliptic curves. The absence of a known solution to the underlying mathematical problem makes ECC virtually uncrackable. ECC offers a significantly more secure connection than first-generation systems like RSA.

Final Thoughts

Encryption is a crucial safety measure for protecting your data, regardless of whether you’re a large-scale national bank storing millions of financial records or an individual sharing your address via text with a local friend. By employing encryption as an additional security layer, you can significantly mitigate the risk of severe cybersecurity threats.