Network Security

symmetric-key encryption

Imagine a lockbox with one key, and you've made an identical copy for a friend. You put a note inside, lock it, and mail the box; your friend uses their copy of the same key to open it. Anyone who intercepts the box in transit can't read the note — they don't have the key. Symmetric-key encryption is this idea in math: both sender and receiver share one secret key, and that same key both scrambles (encrypts) the message and unscrambles (decrypts) it.

Concretely, an algorithm like AES takes your plaintext and the shared key and produces ciphertext that looks like random bytes; running it in reverse with the same key recovers the plaintext. Without the key, recovering the message is computationally infeasible. The big advantage is speed: symmetric algorithms are extremely fast and efficient, fast enough to encrypt a video stream or an entire disk in real time. This is why almost all bulk data on the Internet is protected by symmetric encryption.

Why it matters, and the catch: symmetric encryption is fast and strong, but it has one hard problem — how do both sides get the same secret key in the first place, without an eavesdropper learning it? You can't just send the key over the same insecure channel. This is the key-distribution problem, and it's exactly the gap public-key cryptography fills. In practice, systems like TLS combine both: they use slow public-key cryptography once to securely agree on a fresh symmetric key, then switch to fast symmetric encryption for all the actual data.

AES with a 256-bit key encrypts a 4 GB movie file in seconds. The same key decrypts it. But if Alice and Bob have never met, mailing that key safely to each other is the real puzzle — which is why TLS uses public-key crypto first, just to deliver the symmetric key.

One shared key, very fast — but how do you share it safely?

The strength is speed; the weakness is key distribution. With n people who all want to talk privately in pairs, you'd need about n-squared/2 separate keys — which doesn't scale, and is another reason public-key methods exist.

Also called
secret-key encryptionshared-key encryption對稱加密對稱金鑰加密