# Encryption

> Locking data with a key. Only someone with the key can read it.

**Field:** Software Development  
**Category:** Security  
**Also known as:** Encrypt, Encrypted, Data Encryption

## Think of it like

Think of it like a locked box. Only the person with the key can open it and read the note.

## Definition

Encryption scrambles data with a key, so only someone with the right key can read it. Without the key, the data looks like random noise. Unlike hashing, it can be undone, which is the whole point. Data is encrypted in transit, like HTTPS on the web, and at rest, like a phone's storage. AES and RSA are two of the most used methods.

## Example

Emma's laptop is stolen from a café. Its disk is encrypted, so the thief sees only noise without her password.

## Why it matters

Your data travels over wires you do not own, and it can be stolen. Locked data stays private.

## Common mistake

Making up your own way to lock data. Use a tested library; home-made ones nearly always fail.

## Three principles

- **A key locks and unlocks.** Reversible.
- **In transit and at rest.** On the wire and on disk.
- **Never roll your own.** Use tested libraries.

## Related terms

- [Hashing (Cryptography)](https://learn.benibix.com/term/development/hashing)
- [HyperText Transfer Protocol Secure (HTTPS)](https://learn.benibix.com/term/infrastructure/https)
- [Transport Layer Security (TLS)](https://learn.benibix.com/term/infrastructure/tls)
- [Secrets Management](https://learn.benibix.com/term/development/secrets-management)
- [Virtual Private Network (VPN)](https://learn.benibix.com/term/infrastructure/vpn)
- [Public-Key Cryptography](https://learn.benibix.com/term/development/public-key-cryptography)

## Told apart from

- [Hashing vs Encryption](https://learn.benibix.com/compare/hashing-vs-encryption): Hashing and encryption both scramble data, but only encryption can be undone. Encryption uses a key, so someone with the key can read the data again. A hash is a one-way fingerprint. It has no key and no way back. Use encryption for data you need to read later. Use hashing to check files or store passwords.
- [Digital Signature vs Encryption](https://learn.benibix.com/compare/digital-signature-vs-encryption): People think a digital signature hides a message, and it does not. Encryption scrambles a message so only the right key can read it. A signature leaves the message open to read. It proves who sent it and that nobody changed it. Many systems use both, one to keep secrets and one to build trust.
- [Base64 vs Encryption](https://learn.benibix.com/compare/base64-vs-encryption): People think Base64 hides data, and it does not. Base64 only writes bytes with 64 safe letters and signs, so they can travel as text. It has no key, and anyone can turn it back in one step. Encryption locks data with a key. Without the key, the bytes cannot be read. Use Base64 to carry data, and encryption to keep it secret.

---

Source: https://learn.benibix.com/term/development/encryption
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
