๐ŸŸก Intermediate20 min readยทUpdated Feb 18, 2026

Encryption Essentials: Protecting Your Data at Rest and in Transit

Understand encryption from the ground up โ€” symmetric vs. asymmetric, TLS, end-to-end encryption, file encryption, and disk encryption.

Encryption transforms readable data (plaintext) into unreadable data (ciphertext) using a mathematical algorithm and a key. Only someone with the correct key can decrypt it back.

Analogy: Think of a lockbox. Encryption is putting a message in the box and locking it. The key is the only way to open it. The strength of the lock determines how hard it is to break in.

Two fundamental types:

Symmetric encryption (one key):

  • Same key encrypts and decrypts
  • Fast and efficient for large amounts of data
  • Challenge: How do you securely share the key?
  • Examples: AES-256, ChaCha20
  • Asymmetric encryption (two keys):

  • Public key encrypts, private key decrypts (or vice versa for signing)
  • Solves the key-sharing problem
  • Slower, used for small amounts of data or key exchange
  • Examples: RSA-4096, Ed25519, X25519
  • In practice, both are used together: Asymmetric encryption securely exchanges a symmetric key, then symmetric encryption handles the bulk data transfer (this is how TLS/HTTPS works).

    AES-256 (Advanced Encryption Standard):

    • The global standard for symmetric encryption
    • Used by governments, military, and financial institutions
    • 256-bit key = 2^256 possible combinations (more than atoms in the observable universe)
    • Modes matter: AES-GCM (authenticated) > AES-CBC > AES-ECB (never use ECB)
    • ChaCha20-Poly1305:

    • Alternative to AES, designed by Daniel J. Bernstein
    • Faster in software (where hardware AES acceleration isn't available)
    • Used in WireGuard VPN, TLS 1.3, and many modern protocols
    • RSA:

    • Established asymmetric algorithm, minimum 2048-bit keys (4096 recommended)
    • Being gradually replaced by elliptic curve algorithms
    • Still widely used for code signing and CA certificates
    • Elliptic Curve Cryptography (ECC):

    • Smaller keys with equivalent security: 256-bit ECC โ‰ˆ 3072-bit RSA
    • Ed25519 for signatures, X25519 for key exchange
    • Modern standard for SSH keys, TLS, and new protocols
    • Post-Quantum Cryptography:

    • Quantum computers threaten RSA and ECC (Shor's algorithm)
    • NIST standardized ML-KEM (Kyber) and ML-DSA (Dilithium) in 2024
    • Hybrid approaches (traditional + post-quantum) are being deployed now
  • Chrome, Signal, and Cloudflare already use post-quantum key exchange
  • TLS (Transport Layer Security) encrypts data traveling between your browser and a website.

    How TLS works (simplified):

    1. Browser connects to server and says "Hello, I support these ciphers"
    2. Server responds with its certificate and chosen cipher
    3. Browser verifies the certificate against trusted CAs
    4. Both parties perform a key exchange (ECDHE) to create a shared secret
    5. All subsequent data is encrypted with that shared key (AES-GCM or ChaCha20)
    6. TLS versions:

      • TLS 1.3 (current) โ€” Faster handshake, stronger ciphers, no legacy baggage
  • TLS 1.2 โ€” Still acceptable, but 1.3 preferred
  • TLS 1.1/1.0 โ€” Deprecated, insecure
  • SSL โ€” Ancient, completely broken
  • How to verify:

  • Look for the padlock icon in your browser's address bar
  • Click the padlock to view certificate details
  • Use our SSL Certificate Decoder tool to inspect certificate chains
  • The padlock means the connection is encrypted, NOT that the site is trustworthy
  • HTTPS everywhere:

  • Enable HTTPS-Only mode in your browser settings
  • Modern browsers warn you when a site doesn't use HTTPS
  • Let's Encrypt provides free certificates โ€” there's no excuse for HTTP-only sites
  • Data at rest means data stored on disk โ€” files, databases, backups.

    Full-disk encryption (FDE):

    • Windows: BitLocker (Pro/Enterprise) โ€” use AES-256, XTS mode
    • macOS: FileVault 2 โ€” AES-256 XTS, enabled by default on newer Macs
    • Linux: LUKS/dm-crypt โ€” standard for Linux full-disk encryption
    • Mobile: iOS and Android encrypt by default when you set a passcode
    • File-level encryption:

    • 7-Zip: AES-256 encrypted archives (free, open-source)
    • Cryptomator: Encrypts files before uploading to cloud storage
    • VeraCrypt: Create encrypted volumes/containers
    • age: Modern, simple command-line file encryption
    • Cloud storage encryption:

    • Most cloud providers encrypt at rest but hold the keys
    • Zero-knowledge providers: Tresorit, SpiderOak, Proton Drive
    • Encrypt before upload: Use Cryptomator with any cloud provider
    • Backups: Ensure your backup software encrypts with a key you control
    • Database encryption:

    • Transparent Data Encryption (TDE) for SQL Server, PostgreSQL
    • Application-level encryption for sensitive fields (SSN, health data)
  • Key management is the hardest part โ€” use a KMS (AWS KMS, HashiCorp Vault)
  • End-to-end encryption means only the sender and recipient can read the content โ€” not even the service provider.

    How E2EE works:

    1. Each user has a key pair (public + private)
    2. Messages are encrypted with the recipient's public key
    3. Only the recipient's private key can decrypt
    4. The server only sees encrypted blobs โ€” it cannot read content
    5. E2EE messaging:

      • Signal โ€” Gold standard, open-source Signal Protocol
  • WhatsApp โ€” Uses the Signal Protocol (but metadata isn't encrypted)
  • iMessage โ€” E2EE between Apple devices
  • Matrix/Element โ€” Decentralized, open-source E2EE protocol
  • E2EE email:

  • PGP/GPG โ€” The traditional approach, complex key management
  • Proton Mail โ€” Automatic E2EE between Proton users
  • Tuta โ€” Automatic E2EE, open-source
  • E2EE file sharing:

  • Magic Wormhole / Wormhole.app โ€” One-time E2EE file transfers
  • OnionShare โ€” File sharing over Tor
  • Tresorit Send โ€” E2EE file transfer with expiry
  • Limitations of E2EE:

  • Metadata (who talks to whom, when, how often) is often NOT encrypted
  • If your device is compromised, E2EE doesn't help (endpoint security matters)
  • Key verification is important โ€” verify "safety numbers" in Signal
  • Backup encryption must be enabled separately in most apps