Use this when ChaCha20-Poly1305 is chosen.
ChaCha20
ChaCha20 is a fast stream cipher, usually paired with Poly1305 for authentication (ChaCha20-Poly1305). It is used in TLS 1.3, WireGuard and SSH, especially on devices without AES hardware.
1. ChaCha20-Poly1305: AEAD stream cipher, fast without AES hardware.
2. Used in TLS 1.3, WireGuard, SSH.
3. Unique 96-bit nonce (XChaCha20 for random nonces).
4. Constant-time in software.
5. Good mobile/IoT choice.
key + nonce → ChaCha20 stream + Poly1305 tag
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Common mistakes Narrow the fault
- Reusing nonces with ChaCha20-Poly1305.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
openssl speed -evp chacha20-poly1305— performanceopenssl s_client -connect <host>:443 -ciphersuites TLS_CHACHA20_POLY1305_SHA256 </dev/null— TLS 1.3 testwg show— WireGuard uses ChaCha20-Poly1305
ReferenceWhy it matters1 section · depth on demand
Where it is used
ChaCha20-Poly1305 is an AEAD cipher that is fast in software, so it suits phones and CPUs without AES-NI. It is in TLS 1.3, WireGuard, OpenSSH and QUIC. Like GCM, a nonce must never repeat for the same key.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
ChaCha20 is a modern stream cipher designed by Daniel J. Bernstein, almost always used as ChaCha20-Poly1305 authenticated encryption. It is fast in software on devices without AES hardware acceleration — older phones, embedded systems — and resistant to timing attacks by design.
Where it is used: TLS 1.3 and 1.2 cipher suites, WireGuard (exclusively), SSH (chacha20-poly1305@openssh.com), and some disk/file encryption tools. Servers usually offer both AES-GCM and ChaCha20-Poly1305 and let clients without AES acceleration choose ChaCha20.
As with all stream ciphers, a nonce must never be reused with the same key.
ChaCha20-Poly1305 vs AES-GCM
| ChaCha20-Poly1305 | AES-GCM | |
|---|---|---|
| Speed with AES-NI | Slower | Faster |
| Speed without AES hardware | Faster | Slow |
| Side channels in software | Resistant | Needs constant-time implementation |
| Nonce | 96-bit (XChaCha: 192-bit) | 96-bit |
Both are fine; servers often prefer AES-GCM and let mobile clients choose ChaCha20.
ReferenceConfiguration & state1 section · depth on demand
Configuration examples
# OpenSSH (default list already prefers it)
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com
# WireGuard uses ChaCha20-Poly1305 only
Documented example, not captured output. TLS 1.3 suite: TLS_CHACHA20_POLY1305_SHA256.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Symmetric Cryptography → ChaCha20. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://csrc.nist.gov/pubs/fips/197/final · confidence 94%