Stewdent.eu
▾

Symmetric Encryption

Symmetric encryption uses the same key to both encrypt and decrypt data, making it fast but requiring the key to be shared securely.

Last updated: 20 January 2026

★★★☆☆ Level 3computingDataencryptionsymmetriccryptographyaes4 min read

Report an error

What is Symmetric Encryption?

Symmetric encryption is an encryption method where the same key is used to both lock (encrypt) and unlock (decrypt) the data. Both the sender and receiver must have the same secret key.

Think of it like a padlocked box: the sender locks the box, the receiver uses an identical key to open it.

Note

The Caesar cipher is actually a very simple form of symmetric encryption — the key (shift number) is used for both encryption and decryption.

How It Works

  1. The sender and receiver agree on a shared secret key
  2. The sender uses the key and an encryption algorithm to transform the plaintext into ciphertext
  3. The ciphertext is sent over the network — even if intercepted, it looks like random data
  4. The receiver uses the same key and the algorithm to decrypt the ciphertext back to plaintext
Plaintext  + Key → [Encryption Algorithm] → Ciphertext
Ciphertext + Key → [Decryption Algorithm] → Plaintext

AES: The Modern Standard

The most widely used symmetric algorithm today is AES (Advanced Encryption Standard). It was chosen by the US government in 2001 and is used worldwide.

Key features of AES:

  • Key lengths of 128, 192, or 256 bits
  • Processes data in 128-bit blocks
  • Goes through multiple rounds of mathematical transformations
  • Extremely fast — hardware-accelerated on most modern processors
Note

A 256-bit AES key has 2²⁵⁶ possible values. If every computer on Earth tried one billion keys per second, it would take longer than the age of the universe to try them all. This is why AES is considered unbreakable by brute force.

The Key Distribution Problem

Symmetric encryption has one major weakness: both parties must share the secret key securely before communicating. How do you send a key over an insecure internet connection without someone intercepting it?

This is called the key distribution problem. If you send the key unencrypted, an eavesdropper could steal it and decrypt all future messages.

The solution used on the internet is asymmetric (public key) encryption to securely exchange the symmetric key — combining the security of asymmetric encryption with the speed of symmetric encryption. This is how HTTPS works.

Advantages and Disadvantages

AdvantageDisadvantage
Very fast — good for large amounts of dataSame key must be shared by both parties
Simple to implementKey distribution is a security challenge
Strong security with long keysIf the key is stolen, all data is compromised

Practice Problems

Explain the key distribution problem in symmetric encryption. Why can you not simply send the key in an ordinary email?

Show answer
The key distribution problem is that both parties need the same secret key, but sending the key over an insecure channel (like ordinary email) risks it being intercepted. If an attacker intercepts the key, they can decrypt all future messages. You cannot use symmetric encryption to send the key because you would first need a secure channel — which is the very problem you are trying to solve.

A 128-bit AES key is considered very secure. How many possible key values does it have? Express your answer as a power of 2 and explain why brute force is not practical.

Show answer
A 128-bit key has 2¹²⁸ possible values (approximately 3.4 × 10³⁸). Even at one billion (10⁹) attempts per second, it would take 3.4 × 10²⁹ seconds — vastly longer than the age of the universe (~4 × 10¹⁷ seconds). Brute force is completely impractical.