Glossary/Detection Engineering/Data Encryption

What Is Data Encryption? Keys, Types, Uses

Data encryption is the process of converting readable plaintext into encoded ciphertext that only a holder of the correct cryptographic key can reverse, protecting the confidentiality of data even if it is accessed.

An attacker dumps a customer database. The export runs clean, the file lands on their machine, and they open it expecting names, emails, and card numbers. Instead they get this: 4f8d2a1c9e... repeated for every field, megabytes of it, with no structure they can read. The data was encrypted at rest. Without the key, the stolen file is noise. The breach happened, but the loss did not, because the thing they took is useless to them.

That is the whole point of data encryption. It does not stop an attacker from reaching data. It makes the data worthless once reached, unless they also hold the key. Encryption is the control that decouples "they got the file" from "they got the data," and that gap is often the difference between an incident and a disaster.

This guide covers what data encryption is, how keys actually work, the difference between symmetric and asymmetric encryption, where encryption applies (at rest versus in transit), the algorithms and standards in use today, and the part defenders underestimate: managing the keys. It is written for blue teamers who have to know not just that data is encrypted, but how, with what, and where the keys live.

What is data encryption?

How data encryption works
Plaintext in, ciphertext out, key required
A public algorithm transforms readable data using a secret key. Reverse it only with the key. The cipher is known; the security is the key.
PLAINTEXT
Readable data
Names, emails, card numbers. Anyone who holds the file can read it.
CIPHER + KEY
Encrypt
A public algorithm (AES) transforms the data with a secret key.
CIPHERTEXT
4f8d2a1c9e...
Meaningless without the key. A stolen copy is noise.
KEY HOLDER
Decrypt
Only the right key reverses ciphertext back to plaintext.
Why it works Encryption does not stop an attacker reaching the data. It makes the data worthless once reached, unless they also hold the key. That gap is the difference between an incident and a disaster.

Data encryption is the process of converting readable data, called plaintext, into an encoded form, called ciphertext, that is unintelligible to anyone without the means to reverse it. The reversal requires a cryptographic key. With the right key, ciphertext decrypts back to the original plaintext. Without it, the ciphertext is meaningless.

The mechanism is a cryptographic algorithm, or cipher, that transforms the data using the key as input. The same algorithm is public knowledge; the security rests entirely on the secrecy of the key, not the secrecy of the method. This is a foundational principle of modern cryptography: a strong cipher is one that stays secure even when an attacker knows exactly how it works and only lacks the key.

Encryption protects one specific property of data: confidentiality. It keeps information secret from anyone not authorized to read it. It is not the same as hashing, which is one-way and used to verify integrity rather than to be reversed, and it is not access control, which decides who may reach the data in the first place. Encryption assumes the attacker may reach the data anyway, and ensures that reaching it is not the same as reading it.

Why encryption matters for defenders

Most controls try to keep attackers out. Encryption accepts that some attacks succeed and limits what success is worth. That makes it one of the highest-leverage controls a defender has, because it works at the point where most other controls have already failed. It sits alongside controls like data loss prevention in a data-protection program: where those controls watch for sensitive data leaving, encryption ensures that data which does leave is unreadable.

  • It neutralizes stolen data. A database exfiltrated in a data breach, a backup tape that goes missing, a laptop left in a taxi: if the data is encrypted and the key is not also taken, the stolen copy is unreadable. The exposure happened; the harm did not.
  • It shrinks regulatory and reporting fallout. Many data protection regimes treat strong encryption as a mitigating factor. Encrypted data that is exposed but not decryptable is often not a reportable loss of personal data in the same way plaintext is, because confidentiality was never actually broken.
  • It protects data in motion. Traffic crossing a network, between a browser and a server or between two services, is readable to anyone positioned to intercept it unless it is encrypted. Encryption in transit is what makes an intercepted packet capture useless to an eavesdropper.
  • It enforces confidentiality independent of the platform. Encrypted data stays protected even if the underlying storage, cloud provider, or third party is compromised, because the protection travels with the data rather than depending on the perimeter around it.

The catch runs through all of these: the protection is only as strong as the secrecy of the key. Encryption does not remove the problem of protecting secrets, it concentrates it. Lose the key and the ciphertext falls open; leak the key alongside the data and you have encrypted nothing. That is why key management, covered below, is where encryption succeeds or fails in practice.

Symmetric and asymmetric encryption

Encryption splits into two families based on how many keys are involved and who holds them. The split is not academic. It determines speed, who can talk to whom, and how the keys have to be distributed.

Symmetric encryption uses a single shared key for both encryption and decryption. The same secret that locks the data unlocks it. Symmetric ciphers are fast and efficient, which is why they do the heavy lifting on bulk data: encrypting a disk, a database, or a large file. The weakness is distribution. Everyone who needs to decrypt must hold the same key, and getting that key to them securely, without it being intercepted, is the hard part. Anyone who obtains the key can read everything it protects. The dominant symmetric algorithm today is AES.

Asymmetric encryption, also called public-key cryptography, uses a mathematically linked key pair: a public key and a private key. Data encrypted with the public key can only be decrypted with the matching private key, and vice versa. The public key can be shared freely, with anyone, with no loss of security, which solves the distribution problem that plagues symmetric encryption. Anyone can encrypt a message to you using your public key, but only you, holding the private key, can decrypt it. The same pairing also underpins digital signatures: data signed with a private key can be verified with the public key, proving who sent it. Asymmetric encryption is slower and more computationally expensive than symmetric, so it is not used for bulk data. The leading asymmetric algorithm is RSA.

In practice, the two are used together. A typical secure connection uses slow asymmetric encryption once, to authenticate the parties and securely exchange a fresh symmetric key, then switches to fast symmetric encryption for the actual data. TLS, the protocol behind HTTPS, works exactly this way. You get the distribution advantage of public-key crypto and the speed of symmetric crypto in one handshake.

DimensionSymmetric encryptionAsymmetric encryption
KeysOne shared secret keyA public/private key pair
Same key encrypts and decrypts?YesNo, paired keys
SpeedFast, efficient on bulk dataSlower, computationally heavier
Key distributionHard, the shared key must be delivered securelyEasy, the public key can be shared openly
Typical useEncrypting disks, databases, large filesKey exchange, digital signatures, small payloads
Example algorithmsAES, ChaCha20, (legacy: DES, 3DES)RSA, ECC

Encryption at rest versus in transit

Data needs protecting in two states, and they call for different mechanisms. A complete posture covers both, because data left unprotected in either state is a gap an attacker will use.

Encryption at rest protects stored data: databases, file servers, object storage, backups, the disk in a laptop. The threat it addresses is someone obtaining the stored copy, by stealing the hardware, dumping the database, or accessing the storage layer, and reading it directly. With encryption at rest, the stored bytes are ciphertext, so a stolen disk or exfiltrated database is unreadable without the key. This is the control behind the opener: the dumped database was ciphertext, so the dump was worthless. It is implemented at several layers, including full-disk encryption, file or folder level, database or column level, and storage or cloud-provider managed encryption.

Encryption in transit protects data moving across a network: between a browser and a web server, between two microservices, between an application and its database. The threat it addresses is interception, an attacker capturing traffic on the wire or sitting in the middle of the connection. Encryption in transit, almost always via TLS, makes the intercepted stream unreadable and detects tampering. This is why an HTTPS session can cross hostile networks safely: the traffic is ciphertext to anyone in the middle.

The two are complementary, not alternatives. Data in transit becomes data at rest the moment it is stored, and protected storage does nothing for data while it travels. A common third state, data in use (held in memory while being processed), is the hardest to protect and is the domain of more specialized techniques; for most defenders, getting at rest and in transit right is the priority that covers the overwhelming majority of exposure.

Encryption standards and algorithms

The strength of encryption comes down to the algorithm and the key length. A few standards dominate, and a few once-standard algorithms are now actively dangerous to use. Knowing which is which matters, because an attacker who finds you running a deprecated cipher has found a weakness, not just an oddity.

  • AES (Advanced Encryption Standard). The symmetric standard, specified in FIPS 197, with key sizes of 128, 192, or 256 bits. AES-256 is the common choice for strong data-at-rest encryption. AES is fast, well-vetted, and the default symmetric cipher for almost everything today.
  • RSA. The widely used asymmetric algorithm, dating to 1977, used for key exchange and digital signatures. Its security depends on using an adequately large key (2048-bit or larger today); short RSA keys are no longer safe.
  • ECC (Elliptic Curve Cryptography). An asymmetric approach that achieves security comparable to RSA with much smaller keys, making it efficient for constrained environments and increasingly common in modern protocols.
  • TLS (Transport Layer Security). Not a cipher but the protocol that combines these primitives to secure data in transit; the current version, TLS 1.3, is defined in RFC 8446 (2018) and is what HTTPS relies on. It is the everyday face of encryption in transit.

Two legacy algorithms should never be used for new protection:

  • DES (Data Encryption Standard). A 1970s symmetric cipher with a 56-bit key, broken by brute force long ago and unfit for any protective use.
  • 3DES (Triple DES / TDEA). A stopgap that applied DES three times to extend its life. NIST withdrew the standard for it (SP 800-67 Rev. 2) effective January 1, 2024, so it is disallowed for federal protection and should be migrated away from everywhere. Finding 3DES still in use is a migration item, not a configuration to keep.

The practical reading: standardize on AES (typically AES-256) for data at rest, use TLS 1.3 for data in transit, rely on RSA or ECC for key exchange and signatures, and treat any sighting of DES or 3DES as something to replace.

Key management: where encryption succeeds or fails

Strong algorithms are not the hard part. The hard part is the keys. Encryption converts the problem of protecting a large amount of data into the problem of protecting a small key, and if the key is mishandled, the encryption was theatre.

The failure modes are consistent and they are operational, not mathematical:

  • Keys stored with the data. If the decryption key sits on the same server, in the same backup, or in the same dump as the ciphertext, an attacker who takes the data takes the key too. The protection is zero. Keys must be isolated from what they protect.
  • Weak or hardcoded keys. Keys committed to source code, embedded in config files, reused across systems, or generated with poor randomness are findable and reusable. A hardcoded key in a public repository is found by automated scanners within minutes.
  • No rotation or revocation. A key that never changes means one compromise exposes everything it ever protected, indefinitely. Keys need a lifecycle: generation, rotation, and revocation when compromised.
  • Lost keys. The flip side of losing a key to an attacker is losing it entirely. A lost key means the data it protected is unrecoverable, which is its own kind of data loss. Backup and escrow of keys matter as much as their secrecy.

This is why mature environments push keys into dedicated systems: a key management service (KMS) or a hardware security module (HSM) that generates, stores, and controls access to keys separately from the data, enforces rotation, and logs every use. The goal is that compromising the data and compromising the keys are two separate problems, so a single breach does not hand the attacker both. Encryption without disciplined key management gives the appearance of protection without the substance, which is arguably worse than none, because it invites misplaced confidence.

Frequently asked questions

What is data encryption in simple terms?

Data encryption is the process of converting readable data (plaintext) into an unreadable encoded form (ciphertext) using a cryptographic algorithm and a key. Only someone with the correct key can reverse the process and recover the original data. The purpose is confidentiality: even if an unauthorized party obtains the encrypted data, they cannot read it without the key, so the data stays secret.

What is the difference between symmetric and asymmetric encryption?

Symmetric encryption uses one shared secret key for both encrypting and decrypting, which makes it fast and well suited to bulk data, but it requires delivering that shared key securely to everyone who needs it. Asymmetric encryption uses a public/private key pair: the public key can be shared openly to encrypt data, and only the matching private key can decrypt it. Asymmetric is slower, so in practice the two are combined, asymmetric to exchange a key, symmetric to encrypt the data.

What is the difference between encryption at rest and in transit?

Encryption at rest protects stored data, such as databases, backups, and disks, so that a stolen or exfiltrated copy is unreadable without the key. Encryption in transit protects data moving across a network, such as a browser talking to a web server, so that intercepted traffic cannot be read or tampered with. They address different threats (theft of stored data versus interception of moving data) and a complete posture uses both.

Is AES-256 encryption secure?

Yes. AES is the current symmetric encryption standard (specified in FIPS 197), and AES-256, using a 256-bit key, is considered strong and is widely used for protecting sensitive data at rest. Its security in practice depends far more on how the keys are generated, stored, and managed than on the algorithm itself, which has no practical break. Poor key management undermines even the strongest cipher.

Why is key management so important in encryption?

Because encryption only moves the problem: instead of protecting all the data, you now have to protect the key that unlocks it. If the key is stored alongside the data, hardcoded, never rotated, or weak, an attacker who reaches the data can also reach or guess the key, and the encryption provides no protection. Dedicated systems such as a key management service (KMS) or hardware security module (HSM) keep keys isolated from the data, enforce rotation, and log use, so compromising one does not mean compromising both.

Does encryption prevent data breaches?

No, and that is not its job. Encryption does not stop an attacker from accessing systems or copying data; access controls and detection do that. What encryption does is make the data useless once it is taken, provided the key is not taken with it. So a breach can still occur, but encrypted data that is exfiltrated without its key represents little real loss of confidentiality, which is why encryption is a critical layer in defense in depth rather than a standalone shield.

The bottom line

Data encryption converts readable plaintext into ciphertext that only the right key can reverse, and its value is precise: it makes data useless to anyone who reaches it without the key. It does not keep attackers out, it makes getting in worth less. Symmetric encryption (AES) is fast and protects bulk data at rest; asymmetric encryption (RSA, ECC) solves key distribution and enables signatures; TLS combines both to protect data in transit. Standardize on AES-256 and TLS 1.3, retire DES and 3DES on sight, and recognize that the algorithm is the easy part. Encryption lives or dies on key management. Keep the keys isolated from the data, rotate them, and store them in a KMS or HSM, and a stolen database stays the noise the attacker did not want. Mishandle the keys and you have encrypted nothing.

Frequently asked questions

What is data encryption in simple terms?

<p>Data encryption is the process of converting readable data (plaintext) into an unreadable encoded form (ciphertext) using a cryptographic algorithm and a key. Only someone with the correct key can reverse the process and recover the original data. The purpose is confidentiality: even if an unauthorized party obtains the encrypted data, they cannot read it without the key, so the data stays secret.</p>

What is the difference between symmetric and asymmetric encryption?

<p>Symmetric encryption uses one shared secret key for both encrypting and decrypting, which makes it fast and well suited to bulk data, but it requires delivering that shared key securely to everyone who needs it. Asymmetric encryption uses a public/private key pair: the public key can be shared openly to encrypt data, and only the matching private key can decrypt it. Asymmetric is slower, so in practice the two are combined, asymmetric to exchange a key, symmetric to encrypt the data.</p>

What is the difference between encryption at rest and in transit?

<p>Encryption at rest protects stored data, such as databases, backups, and disks, so that a stolen or exfiltrated copy is unreadable without the key. Encryption in transit protects data moving across a network, such as a browser talking to a web server, so that intercepted traffic cannot be read or tampered with. They address different threats (theft of stored data versus interception of moving data) and a complete posture uses both.</p>

Is AES-256 encryption secure?

<p>Yes. AES is the current symmetric encryption standard (specified in FIPS 197), and AES-256, using a 256-bit key, is considered strong and is widely used for protecting sensitive data at rest. Its security in practice depends far more on how the keys are generated, stored, and managed than on the algorithm itself, which has no practical break. Poor key management undermines even the strongest cipher.</p>

Why is key management so important in encryption?

<p>Because encryption only moves the problem: instead of protecting all the data, you now have to protect the key that unlocks it. If the key is stored alongside the data, hardcoded, never rotated, or weak, an attacker who reaches the data can also reach or guess the key, and the encryption provides no protection. Dedicated systems such as a key management service (KMS) or hardware security module (HSM) keep keys isolated from the data, enforce rotation, and log use, so compromising one does not mean compromising both.</p>

Does encryption prevent data breaches?

<p>No, and that is not its job. Encryption does not stop an attacker from accessing systems or copying data; access controls and detection do that. What encryption does is make the data useless once it is taken, provided the key is not taken with it. So a breach can still occur, but encrypted data that is exfiltrated without its key represents little real loss of confidentiality, which is why encryption is a critical layer in defense in depth rather than a standalone shield.</p>

Practice track
SOC Analyst Tier 1
Build your foundational skills to monitor, detect, and escalate security alerts. This track includes essential tools, basic log analysis, and introductory incident response labs.
Browse SOC Analyst Tier 1 Labs โ†’