# Symmetric and Asymmetric Encryption

Do you know the differences between symmetric and asymmetric encryption? You should if you plan to take the Security+ exam. This post should help.

## Overview of Symmetric and Asymmetric Encryption

Encryption provides confidentiality and prevents unauthorized disclosure of data. Encrypted data is in a ciphertext format that is unreadable. Attackers can’t read encrypted traffic sent over a network or encrypted data stored on a system. In contrast, if data is sent in cleartext, an attacker can capture and read the data using a protocol analyzer.

*Encryption*scrambles, or ciphers, data to make it unreadable if intercepted. Encryption normally includes an algorithm and a key.*Symmetric encryption*uses the same key to encrypt and decrypt data.*Asymmetric encryption*uses two keys (public and private) created as a matched pair.- Anything encrypted with the public key can only be decrypted with the matching private key.
- Anything encrypted with the private key can only be decrypted with the matching public key.

## Symmetric Encryption

Symmetric encryption uses the same key to encrypt and decrypt data. In other words, if you encrypt data with a key of three, you decrypt it with the same key of three. Symmetric encryption is also called secret-key encryption or session-key encryption.

As a simple example, when I was a child, a friend and I used to pass encoded messages back and forth to each other. Our algorithm was:

**Encryption algorithm.**Move____X____spaces forward to encrypt.**Decryption algorithm.**Move____X____spaces backward to decrypt.

On the way to school, we would identify the key (X) we would use that day. For example, we may have used the key of three one day. If I wanted to encrypt a message, I would move each character three spaces forward, and he would decrypt the message by moving three spaces backward.

Imagine the message “PASS” needs to be sent.

- Three characters past “P” is “
**S**”—Start at P (Q, R,**S**) - Three characters past “A” is “
**D**”—Start at A (B, C,**D**) - Three characters past “S” is “
**V**”—Start at S (T, U,**V**) - Three characters past “S” is “
**V**”—Start at S (T, U,**V**)

The encrypted message is SDVV. My friend decrypted it by moving backward three spaces and learning that “PASS” is the original message.

This shows how symmetric encryption uses the same key for encryption and decryption. If I encrypted the message with a key of three, my friend wouldn’t be able to decrypt it with anything but a key of three. It also helps to demonstrate an algorithm and a key, though it is admittedly simple.

Most algorithms and keys are much more complex. For example, the Advanced Encryption Standard (AES) symmetric algorithm typically uses 128-bit keys, but can use keys with 256 bits.

Sophisticated symmetric encryption techniques use the same components of an algorithm and a key. Imagine two servers sending encrypted traffic back and forth to each other using AES symmetric encryption. They both use the same AES algorithm and the same key to encrypt and decrypt data. The data is encrypted on one server with AES and a key, sent over the wire or other transmission medium, and the same key is used to decrypt it on the other server. Similarly, if a database includes encrypted data, the key used to encrypt data is the same key used to decrypt data.

However, symmetric encryption doesn’t use the same key to encrypt and decrypt all data. For example, my friend and I used a different key each day. On the way to school, we decided on a key to use for that day. The next day, we picked a different key. If someone cracked our code yesterday, they couldn’t easily crack our code today.

Symmetric encryption algorithms change keys much more often than once a day. For example, imagine an algorithm uses a key of 123 to encrypt a project file. It could then use a key of 456 to encrypt a spreadsheet file. The key of 123 can only decrypt the project file and the key of 456 can only decrypt the spreadsheet file.

On the other hand, if symmetric encryption always used the same key of 123, it adds vulnerabilities. First, when keys are reused, the encryption is easier to crack. Second, once the key is cracked, all data encrypted with this key is compromised. If attackers discover the key of 123, not only would they have access to the project file, but they would also have access to the spreadsheet file and any other data encrypted with this same key.

**Remember this**

Symmetric encryption uses the same key to encrypt and decrypt data. For example, when transmitting encrypted data, symmetric encryption algorithms use the same key to encrypt and decrypt data at both ends of the transmission media. RADIUS uses symmetric encryption.

Some examples of symmetric encryption are:

- Advanced Encryption Standard (AES)
- Data Encryption Standard (DES)
- Triple DES (3DES)
- RC4
- Blowfish
- Twofish

Part 2 of Symmetric and Asymmetric Encryption covers Asymmetric encryption in more depth.

Check out these free practice test questions for symmetric and asymmetric encryption.