AES-256 is the encryption standard used by banks, governments, and every major HTTPS connection you make. When Signal says your messages are "end-to-end encrypted," AES is doing the heavy lifting. This article explains the cipher from the ground up โ blocks, rounds, key derivation โ and shows exactly how ToollyX implements it in your browser.
AES: The Block Cipher
AES (Advanced Encryption Standard) is a block cipher โ it encrypts data in fixed 128-bit (16-byte) blocks. The "256" in AES-256 refers to the key length: 256 bits. AES-128 uses a 128-bit key and 10 rounds; AES-256 uses a 256-bit key and 14 rounds.
More rounds = more mixing = harder to break. The extra rounds in AES-256 provide a meaningful security margin even against theoretical future quantum computers (Grover's algorithm halves the effective key length, leaving AES-256 with ~128-bit quantum security).
What Happens Inside Each Round
Each of the 14 rounds applies four transformations to the 4ร4 byte state matrix:
- SubBytes: Each byte is replaced using a substitution table (S-box) derived from the multiplicative inverse in GF(2โธ). This adds nonlinearity.
- ShiftRows: Each row of the 4ร4 matrix is cyclically shifted left by 0, 1, 2, and 3 positions respectively. This spreads bytes across columns.
- MixColumns: Each column is multiplied by a fixed polynomial in GF(2โธ). This diffuses each byte's influence across four output bytes.
- AddRoundKey: Each byte is XORed with the round key, derived from the original key via the key schedule.
GCM Mode: Why Mode Matters as Much as the Cipher
AES-256-GCM is what ToollyX uses โ not just AES-256. GCM (Galois/Counter Mode) adds two critical properties:
- Confidentiality โ CTR mode within GCM encrypts the data using a counter, making it a stream cipher wrapper around AES. Each plaintext block is XORed with an AES-encrypted counter value.
- Authenticity (AEAD) โ GCM produces a 128-bit authentication tag that detects any tampering with the ciphertext. If an attacker flips a single bit in the encrypted output, decryption fails with an authentication error. This is Authenticated Encryption with Associated Data (AEAD).
From Passphrase to 256-bit Key: PBKDF2
You don't enter a 256-bit key directly โ you type a passphrase. AES-256-GCM requires a key derived from it. Here's the exact process in ToollyX's implementation:
1. Generate random 16-byte salt (crypto.getRandomValues)
2. Generate random 12-byte IV (Initialisation Vector)
3. PBKDF2(passphrase, salt, 100,000 iterations, SHA-256) โ 256-bit key
4. AES-256-GCM encrypt(plaintext, key, IV) โ ciphertext + auth tag
5. Concatenate: [salt (16) | IV (12) | ciphertext+tag] โ Base64 encode โ outputThe salt ensures two encryptions of the same text with the same passphrase produce different ciphertext. The IV ensures the same key produces different output for identical messages. The 100,000 PBKDF2 iterations make brute-forcing the passphrase computationally expensive.
The ToollyX AES Encrypt/Decrypt Tool
The AES Encrypt tool has two modes โ ๐ Encrypt and ๐ Decrypt:
- Encrypt mode: Enter your text, type a passphrase, click Encrypt. Output is Base64-encoded ciphertext you can share safely.
- Decrypt mode: Paste the ciphertext, enter the same passphrase, click Decrypt. Wrong passphrase returns "Decryption failed โ wrong passphrase or corrupted ciphertext."
- Show/Hide passphrase: Toggle visibility of the passphrase field for entering without revealing to onlookers.
- All processing is client-side: The passphrase and plaintext never leave your browser. ToollyX servers never see them.
What AES-256 Can't Protect Against
AES-256 is cryptographically unbreakable โ but the implementation around it matters:
- Weak passphrases: "password123" weakens any encryption. Use a strong, random passphrase โ generate one with the Password Generator.
- Passphrase exposure: If the receiver's device is compromised, the key is compromised regardless of cipher strength.
- Metadata: AES encrypts content, not context. An adversary may still know who communicated with whom, file sizes, and timestamps.
When to Use ToollyX AES vs Other Security Tools
| Need | Tool |
|---|---|
| Encrypt a secret message or note | AES Encrypt |
| Generate a strong passphrase | Password Generator |
| Verify file integrity without encryption | Hash Generator |
| Decode a JWT to read its claims | JWT Decoder |
PBKDF2 key derivation. 100,000 iterations. Client-side only.