Short Answer Data encryption turns readable information into scrambled text that only the right key can unlock. If someone steals encrypted files, they see nonsense instead of names, card numbers or business plans. Businesses use it to protect data stored on laptops, servers and the cloud, and data sent across the internet.
What is Data Encryption?
Data encryption is a way of hiding information so that only the right people can read it. A math formula, called a cipher, mixes up the data. To do this, it uses a secret code called a key. The result looks like random letters and numbers.
Think of it like a locked mailbox. Anyone can see the box, but only the person with the key can open it and read the letters inside. Encryption does the same thing for files, emails and databases.
Encryption is one of the main tools of data security. If a thief takes encrypted data, they cannot read it.
Key Words to Know
- Plaintext: the normal, readable data, such as a customer list.
- Ciphertext: the scrambled version that nobody can read without the key.
- Key: a long, random code that locks and unlocks the data. Owners keep most keys secret.
- Cryptography: the science of keeping information secret with codes like these.
How Does Data Encryption Work?
Every encryption system follows the same basic steps, whatever tool you use.
- Start with plaintext: You have readable data, such as a file of staff salaries.
- Encrypt it: A cipher uses a key to scramble the data into ciphertext.
- Store or send it: The ciphertext can sit on a disk or travel over the internet. Anyone who grabs it sees only scrambled text.
- Decrypt it: The person with the right key runs the cipher in reverse, and the readable data comes back.

The strength of encryption depends on the key. A longer key has many more possible combinations, so even the fastest computers would take too long to guess it. So attackers try to steal keys instead, and keeping keys safe is just as important as the encryption. People call the work of looking after keys, from making them to storing and replacing them, key management.
What is the Difference Between Encryption and Decryption?
Encryption and decryption are two halves of the same process. Encryption locks the data by turning plaintext into ciphertext. Decryption unlocks it by turning ciphertext back into plaintext.
Both steps need a key. In some systems the same key does both jobs. In others, one key locks and a different key unlocks. The next section explains both types.
What Are the Types of Data Encryption?
There are two main types of encryption. They differ in how many keys they use.
Symmetric Encryption
Symmetric encryption uses one shared key to both lock and unlock the data. It is fast, so companies use it for large amounts of data, such as whole disks and databases. The hard part is sharing the key safely, because anyone who has it can read everything.
The most common symmetric cipher is AES, short for Advanced Encryption Standard. The US standards body NIST approved it in 2001, and people around the world use it today. AES keys come in three sizes: 128, 192 and 256 bits. A bit is the smallest unit of computer data, so a bigger number means a longer, stronger key.
Asymmetric Encryption
Asymmetric encryption uses a pair of keys to protect data. Anyone can have the public key, which locks the data. However, the owner keeps the private key secret, and only that key can unlock it. People also call this public key encryption.
It works like a mailbox with a slot. Anyone can drop a letter through the slot, but only the owner has the key to open the box. RSA is a well-known example of this type. Asymmetric encryption is slower. So systems often use it for one small job: sending a symmetric key safely. The faster symmetric key then locks the rest of the data.

| Aspect | Symmetric | Asymmetric |
|---|---|---|
| Keys | One shared key | A public key and a private key |
| Speed | Fast | Slower |
| Common examples | AES | RSA |
| Typical use | Encrypting disks, files and databases | Secure websites and sharing keys safely |
| Main challenge | Sharing the key safely | Needs more computing power |
What is Encryption at Rest and in Transit?
At any moment, data is doing one of three things: sitting in storage, moving across a network, or being used. Each needs its own protection.
- Data at rest is stored somewhere, such as on a laptop, a server or in cloud storage. Encryption at rest protects that data if a device is lost or a disk is stolen. On Windows laptops, Microsoft BitLocker can encrypt the whole drive.
- Data in transit is moving across a network, such as when you send an email or open a website. Encryption in transit stops anyone from reading the data on the way. The padlock in your web browser means the site uses TLS, short for Transport Layer Security, to encrypt the connection. A VPN (virtual private network) does a similar job for everything sent between a laptop and the office network.
- Data in use is open in an app, such as a spreadsheet you are editing. It usually has to be decrypted first, which makes this the hardest state to protect. Newer methods, such as confidential computing, keep data protected even while it is being processed.
Major cloud storage services, such as Amazon S3 on AWS (Amazon Web Services) and Azure Storage, encrypt stored data by default. If you want to control the keys yourself, AWS Key Management Service (KMS) and Azure Key Vault let you create and manage them. Our guide to cloud security explains which parts the provider protects and which parts you protect.
Talk to an ExpertWant to check which of your data is encrypted? Talk to our team about protecting it at rest and in transit.What is the Difference Between Encryption and Hashing?
Data encryption is a two-way process. You lock the data, and later you unlock it with the key. Hashing is a one-way process. It turns data into a short code called a hash. The hash is always the same length, and there is no key to turn it back.
Websites use hashing to store passwords. When you log in, the site hashes what you type and checks it against the stored hash. So the site never needs to keep your real password. Hashing also shows whether a file has been changed, because even a tiny change gives a completely different hash.
| Aspect | Encryption | Hashing |
|---|---|---|
| Direction | Two-way: can be reversed with the key | One-way: cannot be reversed |
| Uses a key | Yes | No |
| Size of the result | Grows with the size of the data | Always the same length |
| Main purpose | Keeping data secret | Checking data has not changed, storing passwords |
| Common examples | AES, RSA | SHA-256 (a common hashing method) |
What is the Difference Between Encryption and Data Masking?
Data masking hides real data by swapping it for fake but realistic values. For example, a real customer name becomes a made-up name, and a card number shows only its last four digits. The fake data keeps the same shape, so apps and tests still work.
The main difference is that encryption can be reversed with a key, while masked data usually cannot be turned back. Teams use masking when people need data that looks real but do not need the real thing. Common cases are software testing, training and reports. Teams use encryption when someone must read the real data again later.
A close cousin of masking is tokenization. It swaps sensitive data, such as a card number, for a random stand-in called a token. Instead, a separate, tightly guarded system keeps the real value.
What is Data Encryption Used For?
Here are common ways people use encryption every day.
- Lost or stolen laptops: With full-disk encryption, a thief who takes a laptop cannot read the files on it.
- Online banking and shopping: TLS encrypts your card details and passwords as they travel to the bank or shop.
- Cloud storage: Cloud providers encrypt files and databases on disk, so a stolen drive is unreadable. Access controls still decide who can open them.
- Email and messaging: Many messaging apps use end-to-end encryption, so only the sender and receiver can read messages.
- Backups: Encrypted backups stay safe even if an attacker copies them.
- Meeting the rules: Many data protection laws expect businesses to encrypt personal data.
Encryption also limits the harm of a data breach. If attackers steal encrypted data and the company keeps the keys safe, they cannot read it. To stop sensitive data from leaving the business in the first place, teams pair encryption with data loss prevention tools. Our guide to data security best practices shows how these fit together.
What is the Data Encryption Standard (DES)?
The Data Encryption Standard, or DES, was one of the first widely used ciphers. The US government adopted it in 1977. It is a symmetric cipher with a short 56-bit key.
As computers got faster, that key became too short. In 1998, a specially built machine found a DES key in about two days. NIST withdrew DES as a standard in 2005, and AES replaced it. A stronger version, Triple DES, ran DES three times in a row. It has now been retired too.
Future quantum computers, a new kind of very powerful machine, could one day break some of today’s asymmetric ciphers, such as RSA. For this reason, experts are designing new ciphers to stand up to them. Our guide to post-quantum cryptography explains what is changing.
Frequently Asked Questions
Can encrypted data be hacked?
What is an encryption key?
What is end-to-end encryption?
Is encryption the same as password protection?
What is AES-256?
Does encryption slow down computers?
What happens if you lose the encryption key?
Is data encryption required by law?
References
- The AES standard: NIST FIPS 197, Advanced Encryption Standard (AES)
- Looking after keys: NIST SP 800-57 Part 1 Rev. 5, Recommendation for Key Management
- Encryption in the cloud: Microsoft Learn, Azure Encryption Overview
Get the Latest Terms & Insights.
New encyclopedia terms, threat intelligence, and architecture decisions, by email.
