The best symmetric encryption algorithm for most uses is AES-256-GCM: it is NIST-approved, FIPS 197 standardised, hardware-accelerated on modern servers and phones, and provides authenticated encryption that detects tampering. ChaCha20-Poly1305 is the best alternative on hardware without AES instructions, such as mobile and embedded devices.
Key takeaways
- AES-256-GCM is the default for most systems; ChaCha20-Poly1305 wins on hardware without AES acceleration.
- Always use an authenticated mode such as GCM or Poly1305 — never ECB, and never CBC or CTR without a message authentication code.
- Never reuse a nonce under the same key, and retire DES, 3DES and RC4: NIST has deprecated or disallowed them for new use.
Symmetric encryption is the workhorse of modern security: one shared key encrypts and decrypts your data, fast enough for files, databases and every TLS connection on the internet. The choice is not really between dozens of algorithms. It is between two good defaults — AES-256-GCM and ChaCha20-Poly1305 — and a handful of specialist options for specific constraints.
How did we choose these symmetric encryption algorithms?
We ranked algorithms on NIST approval status, authenticated encryption, hardware and library support, nonce safety, and real-world use in TLS 1.3 and major libraries. Algorithms that are deprecated, broken or unauthenticated were excluded from the recommended list and covered separately as ones to avoid.
Our criteria were: NIST or IETF standardisation, authenticated encryption (AEAD) by default, key size and security margin, performance with and without hardware acceleration, and support in OpenSSL, libsodium, Go, Rust and the Web Crypto API. No benchmark numbers here are our own; throughput figures come from the cited OpenSSL and libsodium benchmark summaries.
If you only remember one rule, make it this: use an AEAD, never reuse a nonce under one key, and use a well-tested library rather than implementing the algorithm yourself.
Which symmetric encryption algorithm is best?
AES-256-GCM is the best symmetric encryption algorithm for most systems, and ChaCha20-Poly1305 is the best alternative on hardware without AES acceleration. The table below compares all seven.
| Algorithm | Best for | Key size | Authenticated | NIST approved | Nonce |
|---|---|---|---|---|---|
| AES-256-GCM | Default for most systems | 256-bit | Yes (AEAD) | Yes, FIPS 197 | 96-bit |
| AES-128-GCM | Legacy and constrained systems | 128-bit | Yes (AEAD) | Yes, FIPS 197 | 96-bit |
| ChaCha20-Poly1305 | Mobile and IoT, TLS 1.3 | 256-bit | Yes (AEAD) | Used in TLS 1.3 | 96-bit |
| XChaCha20-Poly1305 | Random nonces at high volume | 256-bit | Yes (AEAD) | No, libsodium | 192-bit |
| AES-256-GCM-SIV | Nonce-misuse resistance | 256-bit | Yes (AEAD) | Yes, RFC 8452 | 96-bit |
| AES-256-CBC + HMAC | Legacy compatibility only | 256-bit | Only with HMAC | Yes, with care | 128-bit IV |
| XSalsa20-Poly1305 | libsodium legacy systems | 256-bit | Yes (AEAD) | No | 192-bit |
The 7 best symmetric encryption algorithms in 2026
Each entry covers what the algorithm is, where it is used, its strengths and limits, and who should pick it. Key sizes, nonce sizes and standards are from NIST and IETF documents cited in the sources.
1. AES-256-GCM — best overall
AES-256-GCM combines the Advanced Encryption Standard with Galois/Counter Mode. It encrypts with a 256-bit key and a 96-bit nonce, and produces a 128-bit authentication tag that detects any tampering with the ciphertext.
- Key features: NIST-approved under FIPS 197, with GCM defined in NIST SP 800-38D; hardware-accelerated via AES-NI on modern Intel and AMD CPUs; required by CNSA 2.0 for national security systems; supported by the Web Crypto API, OpenSSL, Go and Rust.
- Pros: fastest on server hardware with AES-NI; widely audited; the default in TLS 1.3, disk encryption and cloud storage.
- Cons: slower in software without AES-NI; nonce reuse is catastrophic; a single key is limited to about 2^32 encryptions with random nonces under NIST SP 800-38D.
- Best for: data at rest, TLS session encryption, and any system running on modern servers or phones.
Who should pick it: almost everyone building a new system, unless the target hardware lacks AES instructions.
2. AES-128-GCM — best for legacy and constrained systems
AES-128-GCM is the same mode with a 128-bit key. It is faster than AES-256 on some hardware and is still NIST-approved, with 128 bits of security that NIST expects to remain secure for decades.
- Key features: same AEAD properties as AES-256-GCM; slightly higher throughput in benchmarks; FIPS 197 approved.
- Pros: fast, standard and widely supported; adequate for most data with a normal lifetime.
- Cons: only about 64 bits of post-quantum security under Grover's algorithm, so it is a weaker choice for data that must stay secret for decades.
- Best for: systems already using AES-128, and constrained devices where the extra margin of AES-256 is not needed.
Who should pick it: teams maintaining an existing AES-128 system, or new systems where a smaller key is a deliberate, documented trade-off.
3. ChaCha20-Poly1305 — best for mobile and IoT
ChaCha20-Poly1305 is a stream cipher with a Poly1305 authenticator, standardised in IETF RFC 8439 and used as a TLS 1.3 cipher suite in RFC 8446. It uses a 256-bit key and a 96-bit nonce.
- Key features: very fast in software without hardware acceleration; about three times faster than software AES according to RFC 8439; not exposed to the cache-timing attacks that affect many software AES implementations; supported in OpenSSL, libsodium, Go and Rust.
- Pros: best choice on ARM mobile and embedded hardware; simple to implement correctly; strong TLS 1.3 support.
- Cons: slower than AES-256-GCM on servers with AES-NI; not NIST-approved as a standalone algorithm, though it is an IETF standard used in TLS 1.3; not in the Web Crypto API.
- Best for: mobile apps, IoT devices, and TLS on hardware without AES instructions.
Who should pick it: anyone shipping to phones, embedded devices or software-only environments.
4. XChaCha20-Poly1305 — best for random nonces at high volume
XChaCha20-Poly1305 extends ChaCha20-Poly1305 with a 192-bit nonce, which makes random nonces safe at high volume. It is available in libsodium and Go's x/crypto package, and is specified in an expired IETF draft rather than a final RFC.
- Key features: 192-bit nonce allows safe random nonce generation; same 256-bit key and AEAD properties as ChaCha20-Poly1305.
- Pros: removes the need for a nonce counter; good for systems that encrypt many messages under one key.
- Cons: not a final IETF standard; not NIST-approved; not in the Web Crypto API, so it needs a library.
- Best for: messaging, file encryption and any system where a counter is hard to maintain safely.
Who should pick it: teams using libsodium that need random nonces without the 2^32 limit of 96-bit GCM nonces.
5. AES-256-GCM-SIV — best for nonce-misuse resistance
AES-256-GCM-SIV is a variant of GCM that tolerates nonce reuse: if a nonce is reused, it reveals only that two plaintexts are identical, rather than breaking authentication. It is defined in RFC 8452 and is NIST-approved.
- Key features: nonce-misuse resistance; same 256-bit key and AEAD properties; hardware-accelerated via AES-NI.
- Pros: forgiving of implementation mistakes; ideal for deterministic encryption of database fields.
- Cons: slightly slower than GCM; less widely supported than GCM; not in the Web Crypto API.
- Best for: database field encryption, where the same value may be encrypted many times and nonce management is hard.
Who should pick it: teams encrypting database columns or building a system where nonce reuse is a realistic risk.
6. AES-256-CBC with HMAC — legacy compatibility only
AES-256-CBC is a block cipher mode that encrypts only; it needs a separate HMAC to authenticate the ciphertext, in an encrypt-then-MAC construction. Without that MAC, it is vulnerable to padding-oracle attacks.
- Key features: NIST-approved as a mode; widely supported in older systems and libraries; 128-bit IV.
- Pros: compatible with legacy systems that cannot move to GCM yet.
- Cons: no authentication on its own; easy to implement unsafely; slower than GCM on modern hardware.
- Best for: maintaining compatibility with an existing CBC system while you plan a migration to GCM.
Who should pick it: nobody building a new system. Use it only where a legacy system requires it, with encrypt-then-MAC and a migration plan.
7. XSalsa20-Poly1305 — best for libsodium legacy systems
XSalsa20-Poly1305 is the older stream cipher in libsodium's secretbox construction, with a 256-bit key and a 192-bit nonce. It predates ChaCha20-Poly1305 in libsodium and is still used in existing systems.
- Key features: AEAD construction; 192-bit nonce; well-tested in libsodium.
- Pros: proven in production; safe random nonces at volume.
- Cons: superseded by XChaCha20-Poly1305 in new libsodium work; not an IETF or NIST standard.
- Best for: maintaining an existing libsodium secretbox system.
Who should pick it: teams already using libsodium secretbox who do not need to change. New systems should use XChaCha20-Poly1305 instead.
AES-256-GCM vs ChaCha20-Poly1305: what is the difference?
Both are AEADs with 256-bit keys, 96-bit nonces and 128-bit tags, and both are TLS 1.3 cipher suites. The difference is performance and standardisation, not security: either is a sound choice.
Choose AES-256-GCM when the CPU has AES instructions, which covers most servers and modern phones, or when you need a FIPS 140-validated, NIST-approved algorithm for compliance. Choose ChaCha20-Poly1305 when the CPU lacks AES instructions, or when you want the simplest software implementation. In practice, TLS 1.3 negotiates the best option for each connection, so many systems support both and let the handshake decide.
If you work with hashes as well as encryption, you can experiment with common algorithms using our free hash generator.
Benchmark summaries from OpenSSL and libsodium show AES-256-GCM at about 4.2 GB/s on a server with AES-NI, against about 2.8 GB/s for ChaCha20-Poly1305 on the same hardware, with the gap reversing on mobile hardware without AES-NI. Those figures are indicative, not a guarantee for your workload; measure on your own hardware if throughput is a deciding factor.
How do you choose a symmetric encryption algorithm?
Start with the platform, not the algorithm. If your code runs in a browser, the Web Crypto API supports AES-GCM and AES-CBC, but not ChaCha20, so AES-256-GCM is the practical default. If you run in Go, Rust or Python with libsodium, both AES-GCM and ChaCha20 are available, so choose by hardware.
Key management matters more than the algorithm. A 256-bit key is only as strong as the way it is generated, stored and rotated. Generate keys with a cryptographically secure random number generator, store them in a hardware security module or a managed key service where possible, and rotate them before you reach the nonce limit for a single key.
When you need to inspect encoded data while debugging, our free Base64 decoder can help you see what a token actually contains.
Also plan for the long term. Symmetric keys are more quantum-resistant than asymmetric ones, but long-lived data encrypted today could be stored now and decrypted later. For data that must stay secret for decades, AES-256 is the safer choice over AES-128, and asymmetric key exchange should be migrated to post-quantum algorithms such as ML-KEM under FIPS 203.
Which symmetric encryption algorithms should you avoid?
Retire DES, 3DES and RC4 from all new deployments, and do not use ECB mode for any data. DES has a 56-bit key that is feasible to brute-force, 3DES was formally deprecated by NIST for new applications in 2019 and is vulnerable to the Sweet32 attack on its 64-bit block size, and RC4 has known biases that break its security.
ECB mode encrypts each block independently, so identical plaintext blocks produce identical ciphertext blocks, leaking patterns in the data. It is the classic textbook example of how a good cipher can be used badly. CBC without a MAC and CTR without a MAC have the same problem in a different form: they encrypt but do not authenticate, so an attacker can modify the ciphertext without detection.
If you inherit a system using one of these, do not try to patch it with a quick fix. Plan a migration to AES-256-GCM or ChaCha20-Poly1305, re-encrypt the data under the new algorithm, and retire the old keys. The OWASP Cryptographic Storage Cheat Sheet, linked in our sources, is a good checklist for that migration.
The bottom line
For most systems, AES-256-GCM is the best symmetric encryption algorithm: NIST-approved, hardware-accelerated and authenticated. On hardware without AES instructions, ChaCha20-Poly1305 is the best alternative, and AES-256-GCM-SIV is the best choice when nonce reuse is a realistic risk.
Whichever you pick, use a tested library, never reuse a nonce, and treat key management as the real work. The OWASP Cryptographic Storage Cheat Sheet is a good checklist for that work.
You can check how a site you use handles its own cryptography with the free SSL checker.
Frequently asked questions
What is symmetric encryption?
Symmetric encryption uses the same key to encrypt and decrypt data. It is fast, so it handles bulk data such as files, databases and network traffic, while asymmetric encryption is used to exchange or agree that shared key securely.
What is the best symmetric encryption algorithm?
AES-256-GCM is the best choice for most systems. It is NIST-approved, widely supported in hardware and libraries, and provides authenticated encryption. ChaCha20-Poly1305 is the best alternative on hardware without AES instructions, such as many mobile and embedded devices.
Is AES-256 better than AES-128?
AES-256 has a larger security margin, including against future quantum attacks, and is the CNSA 2.0 requirement for national security systems. AES-128 is still NIST-approved and expected to stay secure for decades, so AES-256 buys margin rather than fixing a weakness in AES-128.
What is the difference between AES-GCM and AES-CBC?
AES-GCM is an authenticated mode: it encrypts and produces a tag that detects tampering. AES-CBC only encrypts, so it needs a separate message authentication code, and it is vulnerable to padding-oracle attacks if implemented without one. Use GCM for new systems.
Is ChaCha20 better than AES?
ChaCha20-Poly1305 is faster than AES in software without hardware acceleration, running about three times faster than software AES according to RFC 8439, and it avoids cache-timing attacks that affect some software AES implementations. On hardware with AES-NI, AES-256-GCM is usually faster.
What is a nonce, and why must it never be reused?
A nonce is a unique number used once with a key for each encryption. Reusing a nonce under the same key reveals the XOR of the two plaintexts and, for GCM, can open the door to tag forgery. Use a counter, or a 192-bit random nonce with XChaCha20-Poly1305 at high volume.
Is symmetric encryption quantum-safe?
Symmetric algorithms are more quantum-resistant than asymmetric ones: Grover's algorithm roughly halves the effective key size, so AES-256 retains about 128 bits of post-quantum security. That is why AES-256 is preferred over AES-128 for long-lived data, and why asymmetric keys need post-quantum migration first.
Sources
The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.
Checked against NIST FIPS 197 and SP 800-38D, IETF RFC 8439 and RFC 8446, and the OWASP Cryptographic Storage Cheat Sheet.
How we write and fact-check →