[AES-256 VS CHACHA20]
Two excellent ciphers, one practical difference: whether your processor has AES built in.
Last updated
CryptFile.Online lets you encrypt files with either AES-256-GCM or ChaCha20-Poly1305. Both are modern, both protect a large share of the web's traffic through TLS 1.3, and neither has a known practical attack. Choosing between them is about speed and robustness on different devices, not about security level.
This page compares them on the points that actually differ — hardware, timing safety, nonces — and then explains exactly how this site uses each one.
[SIDE BY SIDE]
| AES-256-GCM | ChaCha20-Poly1305 | |
|---|---|---|
| Designed | AES (Rijndael) chosen by NIST in 2001; GCM mode standardised 2007 | ChaCha20 by Daniel J. Bernstein, 2008; the AEAD pairing is RFC 8439 |
| Type | 128-bit block cipher run in counter mode, plus GHASH for the tag | Stream cipher built from add, rotate and XOR, plus Poly1305 for the tag |
| Key | 256 bits | 256 bits |
| Nonce | 96 bits | 96 bits (XChaCha20 variant: 192 bits) |
| Tag | 128 bits | 128 bits |
| Fast when | The CPU has AES instructions (AES-NI on x86, crypto extensions on ARMv8) | Always reasonably fast, including on CPUs without AES instructions |
| Typical users | TLS, BitLocker, FileVault, Wi-Fi (WPA3), IPsec | WireGuard, OpenSSH (chacha20-poly1305@openssh.com), TLS on phones without AES hardware |
[HARDWARE IS THE WHOLE SPEED STORY]
Intel added AES-NI instructions in 2010 (Westmere) and AMD followed in 2011 (Bulldozer). ARMv8 processors — essentially every phone since the 64-bit generation — have optional crypto extensions that most mid-range and flagship chips include. With those instructions, AES-GCM runs at several gigabytes per second per core, faster than most disks can deliver data.
Without them, AES has to be computed in software, and ChaCha20 is then roughly two to three times faster. That gap is why Google introduced ChaCha20-Poly1305 into Chrome and Android TLS around 2014: budget Android phones of the time had no AES hardware, and connections were measurably slower. TLS 1.3 now lists TLS_CHACHA20_POLY1305_SHA256 as one of its standard cipher suites, and servers usually prefer it for clients that signal they lack AES acceleration.
For files on this site, the browser is the bottleneck more than the cipher. Reading the file, building the output and saving it take longer than the encryption itself on any recent laptop, so you will rarely see a difference between the two choices.
[TIMING SAFETY IN SOFTWARE]
A plain software AES implementation uses lookup tables indexed by key-dependent values. How long those lookups take depends on what is in the processor cache, and researchers have repeatedly recovered AES keys by measuring that timing from another process on the same machine (cache-timing attacks, first shown practically by Bernstein and by Osvik, Shamir and Tromer in 2005). Constant-time software AES exists, but it is slow and hard to write.
ChaCha20 uses only additions, rotations and XORs on 32-bit words, which take the same time whatever the data. A simple, readable implementation is timing-safe by construction. That is the main reason protocol designers like it — WireGuard uses ChaCha20-Poly1305 exclusively and offers no cipher negotiation at all.
[NONCES: THE RULE YOU MUST NEVER BREAK]
Both modes need a nonce (a "number used once") for every message encrypted under the same key. Reusing one is catastrophic in both, but GCM fails harder:
- AES-GCM with a repeated nonce leaks the XOR of the two plaintexts and also lets an attacker recover the authentication subkey, after which they can forge messages that pass the integrity check.
- ChaCha20-Poly1305 with a repeated nonce also leaks the XOR of the plaintexts and exposes the one-time Poly1305 key for that message, allowing forgeries under it.
A 96-bit random nonce is fine for a few billion messages per key. Systems that must pick random nonces for enormous numbers of messages use XChaCha20, whose 192-bit nonce makes accidental collisions practically impossible. You do not need to manage any of this on CryptFile.Online — see the next section.
[WHAT CRYPTFILE.ONLINE DOES WITH THEM]
- Fresh values per file. Each file gets a new random 12-byte IV. HKDF-SHA256 then derives a separate cipher key and MAC key from your key, using that IV as the salt, so two files under the same password never share cipher keys.
- 2 MB chunks, distinct nonces. The file is encrypted in 2 MB chunks. Each chunk's nonce is the file IV with the chunk number XORed into its last four bytes, so no two chunks of a file can share a nonce.
- Order and header are bound in. Every chunk authenticates the full 256-byte header plus its own index as associated data, so chunks cannot be reordered and the original filename (stored readably in the header) or the algorithm cannot be edited unnoticed. An HMAC-SHA256 over the header and all ciphertext also catches a truncated file.
- Implementations. AES-GCM comes from your browser's built-in Web Crypto API, which uses the processor's AES instructions where present. ChaCha20-Poly1305 comes from the audited
@noble/ciphersJavaScript library, because browsers do not expose ChaCha20 natively.
The algorithm you pick is written into the file header, and the complete layout is in the .enc format specification.
[WHICH TO CHOOSE]
- Not sure? Use AES-256-GCM. It is the default, it runs on hardware instructions in nearly every current device, and it is the algorithm that compliance policies (FIPS 140, many corporate standards) name.
- Use ChaCha20-Poly1305 on an old or low-end phone, or if you prefer a cipher designed for timing-safe software.
Whoever decrypts the file does not need to know which one you picked: the decrypter reads it from the header.
[WHAT MATTERS MORE THAN THE ALGORITHM]
Both ciphers are far stronger than the password that protects the key. A short or reused password is the realistic weak point: CryptFile.Online slows guessing down with 600,000 rounds of PBKDF2-SHA256 — the figure OWASP recommends — but a six-letter password is still guessable on a graphics card.
Use four or more random words, or let the tool generate a random 256-bit key and keep it in a password manager. That decision does more for your security than the choice of cipher.
[FREQUENTLY ASKED QUESTIONS]
Is AES-256 or ChaCha20 more secure?
Neither, in practice. Both use 256-bit keys and have no known practical attacks. The difference is performance on different hardware and how easy each is to implement without timing leaks.
How do I know whether my processor has AES instructions?
Almost any Intel or AMD processor made since 2011 has AES-NI. On Linux, run grep -m1 -o aes /proc/cpuinfo; on Windows, CPU-Z lists AES under Instructions. Most ARM phone chips from the last several years include the ARMv8 crypto extensions too.
Can quantum computers break them?
Grover's algorithm would roughly halve the effective strength of a symmetric key, leaving 256-bit AES and ChaCha20 with about 128 bits of security, which is still considered secure. The algorithms threatened by quantum computers are public-key ones such as RSA and elliptic-curve schemes.
Why is AES-128 not offered?
AES-128 is secure today, but AES-256 costs very little extra time with hardware support and keeps a larger margin, including against future quantum attacks. Offering one AES size keeps the choice simple.
Do I need to remember which algorithm I used?
No. The algorithm is recorded in the .enc file header and detected automatically when you decrypt.