What is encryption?

DEFINITION

Encryption scrambles data with a mathematical key so only someone with the correct key can read it, protecting information in storage and in transit.

Encryption converts readable data, called plaintext, into unreadable ciphertext using an algorithm and a key. Only someone holding the right key can turn it back into plaintext. Symmetric encryption, such as AES, uses the same secret key to encrypt and decrypt and is fast enough for large amounts of data. Asymmetric encryption, such as RSA or elliptic-curve cryptography, uses a public key and a private key pair and is commonly used to exchange keys securely and create digital signatures.

In practice, systems usually combine both: asymmetric methods set up a connection, then symmetric keys protect the data itself.

Why encryption matters

Encryption limits the damage when something else fails. If a laptop is stolen, a backup drive is lost or traffic is intercepted on public Wi-Fi, encrypted data is useless without the key. Privacy laws such as GDPR name encryption as an appropriate safeguard, and some data breach notification rules treat properly encrypted data differently from unprotected data.

Where to apply encryption

Think about data in two states. Data in transit moves between systems and should be protected with TLS, which is what HTTPS provides for websites and APIs. Data at rest sits on disks, databases and backups and should be encrypted with full-disk encryption on laptops and phones, database or storage encryption in the cloud, and encrypted backups. For example, a clinic booking app might use HTTPS for every request, enable encryption on its cloud database and storage buckets, and turn on full-disk encryption for staff laptops. Just as important is key management: store keys in a dedicated key management service, restrict who can use them, and never hard-code them in source code.

Best practices

  • Use HTTPS everywhere, including admin panels, APIs and internal tools.
  • Turn on full-disk encryption on every company laptop and phone.
  • Enable encryption at rest for cloud databases, storage buckets and backups.
  • Keep encryption keys in a key management service and rotate them on a schedule.

Common mistakes

  • Storing encryption keys or API secrets in the same code repository as the data they protect.
  • Building a custom encryption scheme instead of using well-tested standard libraries.
  • Confusing hashing with encryption, or storing passwords with reversible encryption instead of a slow password hash.

Frequently asked questions

What is the difference between encryption and hashing?

Encryption is reversible: with the right key you can recover the original data. Hashing is one-way: it turns data into a fixed fingerprint that cannot be reversed. Passwords should be hashed with a slow, salted algorithm such as bcrypt or Argon2, while files and messages that need to be read later are encrypted.

What is end-to-end encryption?

End-to-end encryption means data is encrypted on the sender's device and only decrypted on the recipient's device. The service in the middle, including its servers, cannot read the content. It is common in messaging apps and some file-sharing tools, and offers stronger privacy than encryption only in transit.

Can encrypted data be hacked?

Modern algorithms like AES-256 are not practically breakable by brute force. Real-world failures usually come from weak passwords protecting keys, stolen keys, outdated protocols, or data being accessed after it has been decrypted, such as through a compromised user account. Strong key management matters as much as the algorithm.

Need help with this?

Cybersecurity by VYZEON — Proteggete la vostra azienda, i vostri dati e i vostri clienti.

Fixed packages from $199. Written scope, no surprises.

See Cybersecurity

Related terms

More Security & cloud terms