EB-BENCH v1.0 · OPEN EMPIRICAL LAB

AES-256-GCM vs. ChaCha20-Poly1305

Both AES-256-GCM and ChaCha20-Poly1305 provide authenticated encryption with associated data (AEAD) under TLS 1.3. Their operational gap in browser and backend systems stems from hardware silicon support versus constant-time software ergonomics and nonce safety.

1. Live Browser Head-to-Head Runner

Run deterministic seeded encryption/decryption comparisons in an isolated Web Worker on your CPU (connect-src 'none'). WebCrypto runs native hardware AES instructions; ChaCha20-Poly1305 runs audited pure-ESM arithmetic.

Ready. Executes locally in Web Worker.
Primitive Runtime Throughput Median Jitter (CV)
AES-256-GCM (Encrypt) WebCrypto (Ref) 1,200 – 3,800 MB/s ~0.03 ms < 5%
ChaCha20-Poly1305 (Encrypt) Pure-ESM (Ref) 8 – 22 MB/s ~5.2 ms < 5%

2. Silicon Acceleration vs. Constant-Time ARX

Property AES-256-GCM ChaCha20-Poly1305 (RFC 8439)
Hardware Extensions x86 AES-NI + PCLMULQDQ; ARMv8 Crypto None dedicated; fast via AVX2 / ARM NEON SIMD
Browser WebCrypto API Native SubtleCrypto across 100% browsers Not exposed in SubtleCrypto (JS/WASM required)
Software Timing Side Channels S-box implementations risk cache-timing leaks without AES-NI Pure Add-Rotate-XOR (ARX) runs inherently constant-time
Authentication Tag GHASH over GF(2¹²⁸) Poly1305 over mod 2¹³⁰ - 5

3. Nonce Limits & Operational Fragility

Both standard AES-GCM and RFC 8439 ChaCha20-Poly1305 specify a 96-bit (12-byte) nonce. Reusing a key+nonce pair under AES-GCM recovers the secret GHASH authentication key immediately and allows arbitrary ciphertext forgery. While nonce misuse under ChaCha20-Poly1305 also leaks the XOR of plaintexts, XChaCha20-Poly1305 extends nonces to 192 bits (24 bytes), making CSPRNG collisions statistically negligible over petabytes of independent messages.

4. Engineering Decision Matrix

  • Default for Browser, Cloud & Modern ARM64/x86: Choose AES-256-GCM via WebCrypto or BoringSSL/OpenSSL with monotonic chunk counters (matching EncryptBench's EB2 STREAM format) or per-message fresh keys.
  • Default for Pure Software / Non-AES Silicon / Random Nonces: Choose XChaCha20-Poly1305 when hardware AES instructions are unavailable, timing safety without hardware is critical, or stateless random nonces are required.

5. Cite This Monograph (BibTeX & Markdown)

BibTeX
@techreport{encryptbench2026aead,
  title       = {AES-256-GCM vs. ChaCha20-Poly1305: Browser AEAD Throughput, Nonce Safety \& Hardware Trade-Offs},
  author      = {{EncryptBench Empirical Lab}},
  year        = {2026},
  month       = nov,
  institution = {EncryptBench},
  note        = {EB-Bench v1.0 Monograph CMP-01, zero-upload connect-src none harness},
  url         = {https://encryptbench.com/compare/aes-gcm-vs-chacha20/}
}
Markdown
[AES-256-GCM vs. ChaCha20-Poly1305: Browser AEAD Throughput, Nonce Safety & Hardware Trade-Offs](https://encryptbench.com/compare/aes-gcm-vs-chacha20/) — *EncryptBench Empirical Lab* (EB-Bench v1.0 Monograph CMP-01, Nov 2026).