Encryption is the process of turning readable plaintext into unreadable ciphertext with a mathematical algorithm and a key, so only someone with the right key can read it. Symmetric encryption uses one shared key and is fast, while asymmetric encryption uses a public and private key pair to share keys safely. Most real systems combine both: asymmetric encryption protects a random symmetric session key, and the symmetric cipher protects the data.
Key takeaways
- Encryption protects confidentiality by making data unreadable without the key; it does not by itself prove who sent a message or that it was not changed.
- Symmetric encryption is fast and uses one shared key, while asymmetric encryption uses a key pair and solves the key-sharing problem.
- Most failures come from weak keys, poor key management and old algorithms, not from breaking AES or RSA mathematics.
Every time you log in to your bank, send a message, or back up a laptop, encryption is doing quiet work in the background. It turns readable data into a scrambled form that only the right key can unlock, so a thief who steals the data still cannot read it.
What is encryption?
Encryption is the process of turning readable data, called plaintext, into unreadable data, called ciphertext, using a mathematical algorithm and a key. Only someone with the right key can reverse the process and read the original data again.
Think of it as a lock with a very specific key. The algorithm is the lock design, and the key is the secret that opens it. Anyone can see the locked box, but without the key they cannot see what is inside. Change the key, and the same algorithm produces completely different ciphertext.
Encryption protects confidentiality: it stops unauthorised people reading data. It does not by itself prove who sent a message, or that the message was not changed in transit. Those jobs need digital signatures and message authentication, which are often built on top of encryption.
How does encryption work?
Encryption takes three inputs: plaintext, a key and an algorithm, also called a cipher. The cipher mixes the plaintext with the key in a series of mathematical steps, producing ciphertext that looks random and reveals nothing about the original data.
Decryption reverses those steps with the right key, turning ciphertext back into plaintext. With the wrong key, decryption produces gibberish. With no key, the only general attack is to try every possible key, which is called brute force.
Modern ciphers are designed so brute force is impractical. AES-256 has 2 to the power of 256 possible keys, a number so large that trying every key with current computers would take far longer than the age of the universe. That is why attackers go after keys, passwords and software flaws instead.
What is symmetric encryption?
Symmetric encryption uses the same secret key to encrypt and decrypt. The sender and receiver share that key in advance, and both use it to protect and read the message. It is fast and efficient, which is why it protects disks, databases, backups and the data inside network sessions.
The Advanced Encryption Standard, AES, is the dominant symmetric cipher. NIST selected it in 2001 from the Rijndael submission by two Belgian cryptographers, and published it as FIPS 197. AES uses 128-bit blocks and keys of 128, 192 or 256 bits, with 10, 12 or 14 rounds of mixing respectively.
AES-256 is the standard for protecting classified US government information, and it is considered secure for decades. Its predecessor, DES, used a 56-bit key and was publicly broken by brute force in 1998. Triple DES, which applied DES three times, has been retired by NIST, with its use for encryption disallowed after 2023.
The main weakness of symmetric encryption is key distribution: how do you share the secret key safely in the first place? If you send the key in the clear, anyone who intercepts it can read everything. That problem is what asymmetric encryption solves.
What is asymmetric encryption?
Asymmetric encryption, also called public-key cryptography, uses a key pair: a public key you can share with anyone, and a private key you keep secret. What one key encrypts, only the other can decrypt.
To send you a secret message, someone encrypts it with your public key. Only your private key can decrypt it, so even the sender cannot read it again afterwards. To prove a message came from you, you can sign it with your private key, and anyone can verify the signature with your public key.
RSA, named after Rivest, Shamir and Adleman, is the most widely deployed asymmetric algorithm. Elliptic-curve cryptography offers similar security with shorter keys and is common on mobile devices. Asymmetric encryption is slower than symmetric encryption, so it is rarely used for bulk data on its own.
Real systems combine both in a hybrid design. Asymmetric encryption establishes or protects a random symmetric session key, and the fast symmetric cipher encrypts the bulk data. That is how TLS, the protocol behind HTTPS, works on every secure website visit.
| Symmetric encryption | Asymmetric encryption | |
|---|---|---|
| Keys | One shared secret key | Public and private key pair |
| Speed | Fast, suits bulk data | Slower, suits keys and signatures |
| Key sharing | Hard: both sides need the same secret | Easy: public key can be shared openly |
| Main examples | AES, ChaCha20 | RSA, elliptic-curve cryptography |
| Typical use | Disk, file, database and session encryption | Key exchange, digital signatures, certificates |
| Weakness | Key distribution and key storage | Slower; private key must stay secret |
Encryption vs hashing: what is the difference?
Encryption and hashing are often confused, but they do opposite jobs. Encryption is reversible with the right key: you encrypt data because you need to read it again later. Hashing is one-way: you hash data to check it later without storing the original.
A hash function turns any input into a fixed-length fingerprint. Change one character of the input and the fingerprint changes completely. You cannot turn a hash back into the original data, which is why websites store password hashes instead of passwords.
When you log in, the site hashes the password you typed and compares it with the stored hash. If they match, you typed the right password, and the site never needed to store the password itself. Good password hashing also adds a random salt and uses a slow, purpose-built function so stolen hashes are hard to crack.
Encryption, hashing and digital signatures often work together. A signed, encrypted message can be confidential, authenticated and tamper-evident at the same time, but only if each piece is done correctly.
What are the main types of encryption?
Encryption is usually described by what it protects: data at rest, data in transit, or data in use. Each type uses similar ciphers but faces different key-management problems.
Data at rest is data stored on a disk, in a database or in a backup. Full-disk encryption, file encryption and database encryption protect it if the device is stolen or the disk is removed. The key must be stored separately from the data, or the protection is an illusion.
Data in transit is data moving across a network. TLS protects web traffic, VPNs protect network traffic, and end-to-end encrypted messaging protects chats. Without it, anyone on the same network path can read or change the data.
End-to-end encryption is a stronger form of data-in-transit protection. Only the sender and the intended recipient hold the keys, so the service provider in the middle cannot read the messages. That matters for messaging apps, but it also means the provider cannot recover your messages if you lose your device.
How does encryption protect a website visit?
When you visit a site over HTTPS, your browser and the server run a TLS handshake. They agree on a cipher, the server proves its identity with a certificate, and they use asymmetric encryption to agree a random symmetric session key. Then they switch to symmetric encryption for the rest of the visit.
That handshake is why the padlock appears in your browser. It means the connection is encrypted and the certificate matches the site name, not that the site is honest. A phishing site can also use HTTPS, so check the domain name, not just the padlock.
You can check a site certificate and TLS setup yourself with our free SSL checker, which shows the certificate, issuer and expiry date. Expired or mismatched certificates are a common cause of browser warnings and broken integrations.
Certificates themselves rely on public-key infrastructure. A certificate authority signs the server public key, your browser trusts the authority, and that chain of trust is what lets you know you are talking to the real site and not an impostor.
NIST published AES as FIPS 197, and CISA publishes encryption guidance for organisations. See the NIST FIPS 197 standard for the official AES specification.
CISA also publishes practical encryption guidance for organisations. See CISA encryption guidance for its recommendations.
What can encryption not do?
Encryption cannot protect data from someone who already has the key, the password, or access to an unlocked device. If malware runs on your computer, it can read files after you decrypt them, capture keystrokes, and steal session tokens.
Encryption cannot prove a website is trustworthy, stop phishing, or fix weak passwords. An encrypted connection to a scam site is still a scam site. And encryption cannot help if you lose the key: encrypted data with no key is effectively destroyed, which is why key backup and recovery matter as much as encryption itself.
Encryption also does not hide metadata by default. An observer may not read your message, but they can often see who you contacted, when, and how much data moved. That is why privacy tools combine encryption with other protections, and why you should check what a tool actually hides before you rely on it.
What are the most common encryption mistakes?
The most common mistake is inventing your own cipher or key handling. Use well-tested libraries and standard algorithms, not code you wrote from a tutorial. Cryptography is easy to get subtly wrong and hard to test.
Other common mistakes include hard-coding keys in source code, reusing the same key for many purposes, using short or predictable passwords as keys, and never rotating keys after staff leave or a breach. Each one turns strong mathematics into weak protection.
Old algorithms are another trap. DES, 3DES and RC4 are retired or broken, and early TLS versions have known flaws. Keep software updated, disable old protocols, and follow current NIST guidance on key sizes and algorithm status. You can learn more about the wider controls that surround encryption in our small business cybersecurity checklist.
The bottom line
Encryption is a lock, not a magic shield. Use AES-256 for data at rest, TLS for data in transit, and end-to-end encryption where only the sender and recipient should read a message. Then protect the keys as carefully as the data itself.
Start with the basics: turn on full-disk encryption, use HTTPS everywhere, and check your site certificate with the free SSL checker. Strong encryption with weak key management is still weak security.
Frequently asked questions
What is encryption in simple terms?
Encryption scrambles readable data into unreadable ciphertext with a key. Only someone with the right key can unscramble it back into readable plaintext. Without the key, the scrambled data looks random and reveals nothing about the original message.
How does encryption work?
Encryption takes plaintext, a key and an algorithm, and produces ciphertext. Decryption reverses the process with the right key. Symmetric encryption uses the same key both ways, while asymmetric encryption uses a public key to encrypt and a private key to decrypt.
What is the difference between symmetric and asymmetric encryption?
Symmetric encryption uses one shared secret key for both encryption and decryption, so it is fast but needs a safe way to share the key. Asymmetric encryption uses a public key anyone can use to encrypt and a private key only the owner holds to decrypt, which solves key sharing but is slower.
What is AES encryption?
AES, the Advanced Encryption Standard, is the dominant symmetric cipher. NIST selected it in 2001 and published it as FIPS 197. It uses 128-bit blocks and keys of 128, 192 or 256 bits, and AES-256 is the standard for protecting classified US government information.
What is end-to-end encryption?
End-to-end encryption means only the sender and the intended recipient can read a message, because the service provider in the middle cannot decrypt it. The keys stay on the sender and recipient devices, so a server breach or a legal request to the provider does not expose the message content.
Is encryption the same as hashing?
No. Encryption is reversible with the right key, while hashing is a one-way function that turns data into a fixed-length fingerprint. You hash passwords to check them later without storing them, and you encrypt data you need to read again.
Can encryption be broken?
Strong modern encryption such as AES-256 cannot be broken by brute force with current computers in any practical time. Attacks usually succeed by stealing keys, exploiting weak passwords, using old algorithms, or finding flaws in how software implements encryption, not by breaking the cipher itself.
Does HTTPS use encryption?
Yes. HTTPS uses TLS, which combines asymmetric encryption to agree a session key and symmetric encryption to protect the data in transit. The padlock in your browser means the connection to that site is encrypted, not that the site itself is trustworthy.
Sources
The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.
Checked against NIST FIPS 197 and SP 800-57, CISA encryption guidance, and the Rapid7 and TechTarget explainers on symmetric and asymmetric encryption.
How we write and fact-check →