Use this when choosing symmetric encryption for data at rest or in transit.
Symmetric Cryptography
Symmetric cryptography uses the same secret key to encrypt and decrypt. Algorithms like AES and ChaCha20 are fast and protect bulk data, while key exchange is usually done with asymmetric cryptography.
1. Symmetric crypto: AES (block cipher) and ChaCha20 (stream cipher).
2. Use AEAD modes.
3. 128-bit keys are fine; 256 for long-term/PQ margin.
4. Never ECB.
5. Unique nonces.
key + nonce → AEAD → ciphertext + tag
Context & applicabilityCommon mistakes · platform/version boundaries
- ECB mode, which leaks patterns.
- Hard-coded keys in source code.
- Reusing nonces with GCM or ChaCha20.
- Encrypting without authentication.
- Implementing crypto yourself instead of using libsodium, Tink or platform APIs.
Operational reference
Fast context before you go deeper.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Subtopics
Go one level deeper into this subject.
AES (Advanced Encryption Standard) is the standard symmetric block cipher with 128-bit blocks and 128, 192 or 256-bit keys.
Subtopic AES-128AES-128 uses a 128-bit key and 10 rounds. It is secure for practically all uses today and slightly faster than AES-256.
Subtopic AES-192AES-192 uses a 192-bit key and 12 rounds. It is secure but rarely used, as most systems choose AES-128 or AES-256.
Subtopic AES-256AES-256 uses a 256-bit key and 14 rounds, giving the highest security margin, including against future quantum attacks.
Subtopic DESDES is the old Data Encryption Standard with a 56-bit key, which can be brute-forced in hours.
Subtopic 3DES3DES (Triple DES) applies DES three times with 112-bit effective security and a 64-bit block size, which makes it vulnerable to Sweet32 attacks.
Subtopic ChaCha20ChaCha20 is a fast stream cipher, usually paired with Poly1305 for authentication (ChaCha20-Poly1305).
Subtopic Block CipherA block cipher encrypts fixed-size blocks, such as AES's 128 bits, and needs a mode of operation like GCM, CBC or CTR to encrypt longer data securely.
Subtopic Stream CipherA stream cipher encrypts data by combining it with a keystream generated from a key and nonce, such as ChaCha20.
Subtopic CBCCBC (Cipher Block Chaining) XORs each plaintext block with the previous ciphertext block.
Subtopic GCMGCM (Galois/Counter Mode) provides encryption and authentication together (AEAD) with AES.
Subtopic Symmetric Encryption TroubleshootingTroubleshoot symmetric encryption by checking that both sides use the same algorithm, mode, key length, key and IV or nonce, the padding scheme, encoding (base64 or hex) and that authentication tags verify.
- AES-GCM and ChaCha20-Poly1305 give encryption plus integrity.
- Never reuse a nonce with the same key.
- Key management is harder than the cipher.
openssl speed -evp aes-256-gcm chacha20-poly1305— throughputgrep -o aes /proc/cpuinfo | head -1— AES-NI- Approved modes (GCM, ChaCha20-Poly1305) — policy
ReferenceWhy it matters1 section · depth on demand
What this area covers
| Topic | Answers |
|---|---|
| AES (128/192/256) | The standard block cipher and key sizes |
| DES / 3DES | Why they are retired |
| ChaCha20 | Fast software stream cipher |
| Block vs stream ciphers | How data is processed |
| CBC / GCM | Modes of operation and AEAD |
The rule of thumb: AES-GCM or ChaCha20-Poly1305 with unique nonces and well-managed keys.
ReferenceHow it works1 section · depth on demand
In depth
Symmetric cryptography uses the same secret key to encrypt and decrypt. It is fast and used for almost all bulk data protection — disks, VPN tunnels, TLS sessions, backups. The challenge is distributing and protecting the shared key, which is why it is combined with asymmetric key exchange.
| Algorithm | Status |
|---|---|
| AES-128/256 (GCM mode) | Standard, hardware accelerated |
| ChaCha20-Poly1305 | Fast in software, mobile devices |
| 3DES | Deprecated |
| DES, RC4 | Broken |
Modern protocols use authenticated encryption (AES-GCM, ChaCha20-Poly1305), which protects integrity as well as confidentiality. The topics in this group cover key sizes, modes and why older ciphers were retired.
ReferenceImportant terms & boundaries1 section · depth on demand
Symmetric algorithms at a glance
| Algorithm | Type | Key size | Status |
|---|---|---|---|
| AES | Block (128-bit) | 128/192/256 | Recommended |
| ChaCha20 | Stream | 256 | Recommended |
| 3DES | Block (64-bit) | 112 effective | Retire |
| DES | Block (64-bit) | 56 | Broken |
| RC4 | Stream | variable | Broken |
Always use an authenticated mode (GCM, ChaCha20-Poly1305).
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Symmetric Cryptography. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://csrc.nist.gov/pubs/fips/197/final · confidence 94%