Skip to main content

CompTIA Security+View full course outline

Symmetric Encryption and Key Length(OBJ.1.3)

By Jonathon Eades — Founder & IT InstructorUpdated

11 min read

A field technician's laptop holds 300 GB of customer site surveys. Every time a file opens, BitLocker decrypts the sectors on the fly with AES, fast enough that the technician never notices. The same key that scrambled the data unscrambles it, and that single fact explains both why symmetric encryption is everywhere and why it is hard to manage.

On the CompTIA Security+ SY0-801 exam, symmetric encryption sits under objective 1.3, which expects you to pick the right cryptographic solution for a job and explain why it fits. This lesson covers how symmetric ciphers work, the algorithms you need to recognize, why the mode of operation matters, what key length buys you, and the key distribution problem that asymmetric cryptography was invented to solve.

Symmetric encryption uses one shared key to lock and unlock data

Every encryption system has four parts: the plaintext you want to protect, the algorithm (also called the cipher) that transforms it, the key that controls the transformation, and the ciphertext that comes out. In symmetric encryption the same secret key both encrypts and decrypts. Anyone who holds the key can read the data. Anyone who doesn't sees bytes that look random.

The algorithm itself is not secret. AES has been a published standard since 2001, and cryptographers around the world have studied it for more than two decades. All of the security rests on the key, an idea known as Kerckhoffs's principle. On the exam, an answer that depends on keeping the algorithm hidden is security through obscurity and is never the best choice.

Symmetric encryption is fast. Modern processors have AES instructions built in (AES-NI on Intel and AMD chips, cryptography extensions on ARM), and a single core can encrypt several gigabytes per second. That speed is why symmetric ciphers carry the bulk data everywhere: full-disk encryption, database encryption, VPN tunnels, and the data inside every HTTPS session. When a scenario stresses large volumes of data or performance, symmetric encryption is the fit.

Symmetric encryption gives you confidentiality and, in authenticated modes, integrity. It can't give you non-repudiation. Because both parties hold the same key, either one could have produced a given ciphertext, so neither can prove the other sent it. Digital signatures solve that, and they are covered in the hashing and signatures section.

AES is the standard block cipher and ChaCha20 is the standard stream cipher

Symmetric ciphers come in two shapes. A block cipher encrypts fixed-size chunks of data. A stream cipher turns the key and a nonce (a number used once) into a long pseudorandom keystream, then combines it with the plaintext one byte at a time using XOR.

AES, the Advanced Encryption Standard, is a block cipher. NIST standardized it in 2001, from a design originally called Rijndael, to replace DES. AES always works on 128-bit (16-byte) blocks and accepts three key lengths: 128, 192 and 256 bits. Longer keys add internal rounds: 10 for AES-128, 12 for AES-192 and 14 for AES-256. AES is approved for U.S. classified information and is the default for disks, databases, VPNs and TLS.

ChaCha20 is a stream cipher designed by Daniel J. Bernstein. It uses a 256-bit key and is almost always paired with the Poly1305 authenticator as ChaCha20-Poly1305. Its advantage is speed in plain software: on phones and small devices that lack AES hardware, it often outruns AES. TLS 1.3 and SSH support it, and the WireGuard VPN uses it exclusively.

Stream ciphers have one rule that can never be broken: never reuse a nonce with the same key. Two messages encrypted with the same keystream can be XORed together, which cancels the keystream and leaves the XOR of the two plaintexts. From there, recovering both messages is often straightforward. The same rule applies to AES in GCM mode, which works internally like a stream cipher.

Algorithm Type Key length (bits) Status
AES Block, 128-bit blocks 128, 192, 256 Current standard
ChaCha20 Stream 256 Current, common on mobile
3DES Block, 64-bit blocks 168 (about 112 effective) Deprecated
DES Block, 64-bit blocks 56 Broken
RC4 Stream 40 to 2,048 Broken, banned from TLS
Blowfish Block, 64-bit blocks 32 to 448 Legacy

This lesson is part of ExamWizardz Pro

Unlock every lesson, unlimited practice tests, and the AI tutor.

See Pro pricing

or start with a free account

Test yourself on this topic: free Encryption: Symmetric, Asymmetric, and Key Exchange practice questions — no account needed.