How Password Encryption Works (AES) and When to Use It
Security · Published October 18, 2026 · Updated October 24, 2026 · 3 min read
Written by Akinrinmade Michael · General information, not professional advice
Encryption scrambles data so that only someone with the right password can read it. If you send a message or store a file somewhere you don't fully trust, encrypting it first means a stranger who finds it sees only noise.
What AES is
AES is the standard way to encrypt data. It's used by banks, messaging apps, Wi-Fi and governments. The version here, AES-256, uses a 256-bit key. There's no practical way to guess a key that size, so the weak point is never AES itself. It's the password you choose.
From a password to a key
A password is too short and too predictable to be used as a key directly. So it's run through a function called PBKDF2, which mixes it with a random value called a salt and repeats the work hundreds of thousands of times. That makes each guess slow for an attacker, and the salt means the same password never gives the same key twice. The AES Encryption tool uses 600,000 rounds.
What happens when you encrypt
- A random salt is made.
- Your password and the salt go through PBKDF2 to make a 256-bit key.
- A random starting value, the IV, is made for this one message.
- The data is encrypted with AES-256 in GCM mode.
- The salt, IV and the encrypted data, with its check value, are packed into one result.
What the tool adds for safety
- A fresh random salt and a fresh random IV every time, so encrypting the same text twice gives different results.
- GCM mode, which also adds a check value. If even one character of the result is changed, decrypting fails instead of giving you altered text.
- A wrong password gives a clear error and no partial output.
Choosing the password
Use at least 12 characters, and preferably a few random words or a generated password. A short or common password can be guessed even with slow key making, because an attacker who has your encrypted file can try passwords offline for as long as they like.
| Password | Verdict |
|---|---|
| A common word with a number | Cracked quickly from lists |
| 8 random characters | Fair, but not for anything important |
| 12 random characters | Good |
| 5 or 6 random words | Good, and easy to type |
| 20 random characters in a password manager | Excellent |
The Password Generator can make a long random one or a passphrase that's easier to remember.
Encryption, hashing and signing
| Encryption | Hashing | |
|---|---|---|
| Reversible | Yes, with the key | No |
| Purpose | Keep data secret | Fingerprint or check data, store passwords |
| Needs a key | Yes | No, unless it's an HMAC |
| Example | AES | SHA-256, bcrypt |
What you can't do
- Recover the data if you forget the password. Nobody can, including us, because we never see it.
- Hide that something is encrypted. Anyone can see that the data is scrambled.
- Protect a message after you've shared the password in the same chat or email as the data. Send the password a different way, such as a phone call.
- Protect a computer that already has malware, which can read the password as you type.
A simple way to share a private file
- Encrypt the file with a strong password.
- Send the encrypted file by email, chat or a cloud link.
- Give the password by a different route, such as a phone call.
- Ask the person to confirm they can open it, and then delete your copy if it's no longer needed.
Check that a file arrived unchanged
Encryption protects secrecy. To check that a copy of a file is identical to the original, compare checksums with the Hash Generator. Used together, the two tell you the file is private and also unchanged. The guide to hash functions explains how checksums work.