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.
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
- The sender and receiver agree on a shared secret key
- The sender uses the key and an encryption algorithm to transform the plaintext into ciphertext
- The ciphertext is sent over the network — even if intercepted, it looks like random data
- 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
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
| Advantage | Disadvantage |
|---|---|
| Very fast — good for large amounts of data | Same key must be shared by both parties |
| Simple to implement | Key distribution is a security challenge |
| Strong security with long keys | If 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
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.