---
{
  "title": "Symmetric encryption",
  "summary": "Understand shared-key encryption, authenticated encryption, nonces, and key access through a document-storage example.",
  "topic": "foundations",
  "level": "Beginner",
  "updated": "2026-10-12",
  "units": [
    6
  ],
  "aliases": [],
  "sources": [
    {
      "title": "NIST: Cryptographic Standards and Guidelines",
      "url": "https://csrc.nist.gov/projects/cryptographic-standards-and-guidelines"
    },
    {
      "title": "OWASP: Cryptographic Storage",
      "url": "https://cheatsheetseries.owasp.org/cheatsheets/Cryptographic_Storage_Cheat_Sheet.html"
    },
    {
      "title": "NIST: Block Cipher Modes",
      "url": "https://csrc.nist.gov/projects/block-cipher-techniques/bcm/current-modes"
    }
  ],
  "published": "2026-10-02",
  "editorialVersion": 2
}
---

## One secret supports both directions

Symmetric encryption uses a shared secret key for encryption and decryption. An authorized system transforms plaintext into ciphertext, and a system with the necessary key and parameters can recover the plaintext. The approach is widely used for protecting substantial amounts of data efficiently.

The security boundary therefore depends on controlling the key and its use. Calling the algorithm strong does not explain who can decrypt the records, whether the application exposes plaintext elsewhere, or how recovery works after a key service becomes unavailable. [[key-management]] covers those operational responsibilities.

## A document-storage example

Imagine a fictional academy stores private learner documents. For each protected object, its service uses a suitable data-encryption arrangement and stores the information required for later authorized decryption. Access to the relevant key operations is managed separately from access to the storage objects.

A person who can copy only a protected object should not automatically gain its plaintext. However, an attacker who controls the application identity may be able to request legitimate decryption operations. Storage encryption reduces a particular exposure; it does not remove the need for [[access-control]] on the service and its key permissions.

The academy also checks temporary files, logs, and exports. An encrypted main database is less useful if its debug logs contain the same documents in plaintext. Follow the data rather than assuming the encrypted storage location is the entire system.

## Confidentiality and tamper detection

Encryption alone should not be treated as a general guarantee that an encrypted message cannot be modified undetectably. Authenticated-encryption constructions provide confidentiality and authenticity checks together when used according to their requirements.

[[aes]] is an algorithm name, while a mode and surrounding construction determine how it is applied. Nonces or initialization values can have strict requirements, including uniqueness for particular schemes. Reusing a value incorrectly can undermine an otherwise suitable design. A maintained library or higher-level storage service helps manage these details, but its documented requirements still matter.

## Keep the example separate from an implementation recipe

For a learning exercise, draw plaintext, an encryption operation, ciphertext, and a decryption operation. Mark which parties can use the shared secret. Add a box for key storage and another for authorization. Then explain how a copied ciphertext differs from a compromised application account.

The drawing is a model, not code to deploy. Production choices should follow current guidance and the constraints of the system. Avoid creating a custom encryption format simply because the diagram looks straightforward.

## Plan the entire data lifetime

Now extend the fictional archive by five years. Old records may depend on older keys, while new records use a newer configuration. A rotation process must preserve appropriate access to historical data or migrate it deliberately. Backup restoration may also need the key material and permissions that existed for the recovered records.

This is why encryption, recovery, and retention decisions belong together. Continue with [[asymmetric-encryption]] to see how public-key techniques support different tasks, and [[key-management]] to understand who controls the secrets that make symmetric encryption useful.
