{"article":{"slug":"post-quantum-cryptographic-right-answers","title":"(Post-Quantum) Cryptographic Right Answers","subtitle":null,"summary":"Filippo Valsorda updates the \"Cryptographic Right Answers\" tradition (Percival, Ptacek, Latacora) for the accelerated post-quantum transition, giving developers concrete recommendations for encryption, key exchange, signatures, hashing, passwords, TLS and more.","content_type":"tutorial","language":"en","canonical_url":"https://words.filippo.io/right-answers/","author":{"name":"Filippo Valsorda","url":"https://words.filippo.io/","person_slug":null,"person_url":null},"authored_by":"human","publisher":{"name":"words.filippo.io","url":"https://words.filippo.io/","listing_slug":null,"listing":null},"topics":[{"name":"Security","slug":"security","url":"https://listedarticles.com/topics/security"},{"name":"Cryptography","slug":"cryptography","url":"https://listedarticles.com/topics/cryptography"},{"name":"Programming","slug":"programming","url":"https://listedarticles.com/topics/programming"}],"about_listings":[],"cover_image_url":null,"license":"all-rights-reserved","word_count":4016,"reading_minutes":17,"published_at":"2026-10-12T12:00:27.000Z","added_at":"2026-10-12T14:33:45.906Z","updated_at":"2026-10-12T14:33:45.906Z","added_via":"api","contributor":{"type":"agent","name":"ListedStartups Using Bot","registered":false},"profile_url":"https://listedarticles.com/articles/post-quantum-cryptographic-right-answers","markdown_url":"https://listedarticles.com/articles/post-quantum-cryptographic-right-answers.md","example":false,"citation":"Filippo Valsorda, words.filippo.io. \"(Post-Quantum) Cryptographic Right Answers.\" 12 Oct 2026. https://words.filippo.io/right-answers/ (all-rights-reserved)","access":{"human_view":"preview","full_text_available":true,"source_url":"https://words.filippo.io/right-answers/"},"body_markdown":"Publishing “Cryptographic Right Answers” for developers is a tradition by now. [Colin Percival started in 2009](https://www.daemonology.net/blog/2009-06-11-cryptographic-right-answers.html), [Thomas Ptacek followed up in 2015](https://gist.github.com/tqbf/be58d2d39690c3b366ad), and then [Latacora carried on in 2018](https://www.latacora.com/blog/cryptographic-right-answers/) and [2024](https://www.latacora.com/blog/post-quantum-cryptographic-right-answers/#pqc-right-answers).\n\nIt might feel too soon for an update, but *so much has changed*. The timeline of the post-quantum transition [dramatically shifted in early 2026](https://words.filippo.io/crqc-timeline/), and there is now consensus that it needs to complete by 2029. 2029! We have three years!\n\nThe good news is that, despite what you might have heard, [symmetric cryptography is going to be fine, because Grover does not matter](https://words.filippo.io/128-bits/). The bad news is that all asymmetric answers changed compared to 2018 and most even compared to 2024.\n\nThe answers below assume you are not constrained by any specific compliance regime, although they are mostly compatible with FIPS 140.<sup>[1](#fn:fips140)</sup> If you need to follow something stricter like CNSA 2.0, you’ll know. Just substitute as appropriate.\n\nFinally, remember the other big change of 2026: LLMs are very good at finding bugs now. “Get a review from the best model you can afford” is now firmly a Cryptographic Right Answer, along with the long-time classic “use a memory-safe language.”\n\nIf you’re in a rush, here’s the cheat sheet:\n\n- **Encrypting data** : If you’re in the cloud, KMS. Otherwise, XAES-256-GCM or XChaCha20Poly1305 with random nonces. If you’re encrypting more than a few MB, use Cobblestone-128.\n- **Symmetric key length** : Don’t stress it. 256-bit keys if you need to pick.\n- **Symmetric “signatures”** : HMAC-SHA-256.\n- **Hash algorithm** : SHA-2 is still fine, but use a real multihash (SequenceHash) if needed.\n- **Random IDs** : 32 random bytes, a.k.a. 256-bit random numbers.\n- **Password handling** : Argon2id or scrypt. But have you considered passkeys instead?\n- **Key exchange** : X25519+ML-KEM-768 in a secure, standard protocol.\n- **Asymmetric encryption** : HPKE with (MLKEM768-X25519 a.k.a. X-Wing, HKDF-SHA256, AES-128-GCM), or age with PQ keys.\n- **Asymmetric signatures** : ML-DSA-44.\n- **Website or client-server application security** : If you’re in the cloud, use its ALB/NLB. Otherwise, rustls, Go’s crypto/tls, BoringSSL, AWS-LC, or s2n-tls with a popular, updated ACME client.\n- **Online backups** : restic with a long random password.\n\nNow let’s dive in.\n\n### Encrypting data\n\nIf you’re in the cloud, **KMS**. Otherwise, **XAES-256-GCM** or **XChaCha20Poly1305** with random nonces. If you’re encrypting more than a few MB, use [**Cobblestone-128**](https://c2sp.org/chunked-encryption).\n\n*Percival, 2009*: AES-CTR with HMAC.\n\n*Ptacek, 2015*: NaCl/libsodium default, or ChaCha20Poly1305, or AES-GCM.\n\n*Latacora, 2018*: KMS, or XSalsa20+Poly1305.\n\n*Latacora, 2024*: KMS, or NaCl’s secretbox, or XChaCha20Poly1305.\n\n[Latacora’s reasoning for why and when you’d use your cloud’s KMS](https://www.latacora.com/blog/cryptographic-right-answers/#encrypting-data) is still solid, so start there.\n\nIf you’re encrypting locally, you want an AEAD where you can avoid worrying about tracking nonces or how many messages you encrypted, so you want random nonces of at least 128 bits.[2](#fn:gcm128)\n\nNaCl/libsodium’s secretbox is just a [paper-thin wrapper](https://words.filippo.io/nacl-api/) around a less common AE construction (XSalsa20+Poly1305), so instead I recommend [XAES-256-GCM](https://words.filippo.io/xaes-256-gcm/) or XChaCha20Poly1305. The former is an efficient composition of a standard KDF and AES-GCM, packaged as an extended-nonce AEAD, so even if your library doesn’t provide it under that name you can assemble it from the KDF and AES-GCM APIs.[3](#fn:XAES-256-GCM)\n\nRegular AES-GCM and ChaCha20Poly1305 with random nonces are only ok if you *know for certain* you won’t encrypt more than a billion messages with one key. AES-GCM-SIV is also a good AEAD choice if you happen to have it everywhere you need it, but that’s kinda unlikely. Some even newer options have nice properties like key commitment, but are not commonly available yet.\n\nSince you have an AEAD, consider putting context in the additional data, like the user ID you’re encrypting for, or the version of the protocol. Anything not secret that you will definitely still know at decrypt time.\n\nVery important is how you handle large messages, which KMS will not solve for you. *Do not* pass one large message to an AEAD, or you might be forced to process or store the plaintext before having authenticated it at decrypt time. *Absolutely do not* use unauthenticated stream ciphers. Instead, you should use STREAM (which is not a stream cipher but a way to use AEADs on a stream… I know, I know, terrible name). There are a lot of options—too many, in fact—and shamefully none are the consensus answer. [Tink has one](https://developers.google.com/tink/encrypt-large-files-or-data-streams#streaming_aead), [libsodium has one](https://libsodium.gitbook.io/doc/secret-key_cryptography/secretstream), [the AWS Encryption SDK has one](https://github.com/aws/aws-encryption-sdk-python/blob/a6c0413bb0ddc9bccdefad9f1d2c031e0bc4db29/examples/src/file_streaming_example.py), [FLOE is one](https://c2sp.org/FLOE), age has one, and the list goes on. I recommend [Cobblestone-128](https://c2sp.org/chunked-encryption), which is a STREAM variant derived from TLS, and is available in pyca/cryptography and soon in the Go standard library (and in the meantime at [filippo.io/cobblestone](https://filippo.io/cobblestone)).[4](#fn:Cobblestone)\n\n*Avoid*: unauthenticated modes (CBC, CTR, raw stream ciphers), random 96-bit nonces unless you spent a lot of time thinking about how many messages you encrypt, rolling your own AEAD construction.\n\n### Symmetric key length\n\n**Don’t stress it.** 256-bit keys if you need to pick.\n\n*Percival, 2009*: 256-bit AES keys.\n\n*Ptacek, 2015*: 256-bit keys.\n\n*Latacora, 2018*: 256-bit keys.\n\n*Latacora, 2024*: 256-bit keys.\n\nRemember that Grover doesn’t actually matter and 128-bit brute-force attacks don’t exist. Still, 256-bit keys rule out multi-target attacks, which is nice.\n\nHowever, don’t make other decisions based on this. For example, the recommended Cobblestone suite uses 128-bit keys and that’s fine because it has a careful analysis of multi-target attacks. Likewise, don’t go changing the default cipher suite preferences of your TLS library to enforce 256-bit keys; there’s no need.\n\nAES-256 is slower than AES-128 because unfortunately Rijndael ties the number of rounds to the key size, but this probably won’t matter in practice.\n\n*Avoid*: anything other than 128 or 256 bits, worrying too much about size, keys that are not uniform (e.g. using a password or ASCII hex string directly as a key).\n\n### Symmetric “signatures”\n\n**HMAC-SHA-256**.\n\n*Percival, 2009*: HMAC.\n\n*Ptacek, 2015*: HMAC.\n\n*Latacora, 2018*: HMAC.\n\n*Latacora, 2024*: HMAC.\n\nYay for HMAC.\n\nJust be careful to sidestep canonicalization and parser alignment bugs by always authenticating a verbatim string of bytes, not something you need to recompute.\n\n*Good:*\n\n```\n{\n    \"inner\": \"{\\\"foo\\\":123}\",\n    \"hmac\": \"MbPsZq7QGCllJgDnSSy/cyM10HjqiVu35UO7yyY5d3w=\"\n}\n```\nCheck the HMAC and then process or store or forward just `{\"foo\":123}`.\n\n*Bad:*\n\n```\n{\n    \"foo\": 123,\n    \"hmac\": \"MbPsZq7QGCllJgDnSSy/cyM10HjqiVu35UO7yyY5d3w=\"\n}\n```\nYou can use KMAC or keyed BLAKE3 if you already had a reason to use their underlying hashes. HMAC-SHA-512 is also fine.\n\nRemember to compare tags with dedicated constant-time functions.\n\n*Avoid*: rolling your own [YoloMAC](https://blog.trailofbits.com/2024/08/21/yolo-is-not-a-valid-hash-construction/#yolomac), encrypted hashes, standalone one-time MACs like Poly1305 or GMAC.\n\n### Hash algorithm\n\n**SHA-2** is still fine, but use a real multihash if needed.\n\n*Percival, 2009*: SHA-256 (SHA-2), plan on SHA-3.\n\n*Ptacek, 2015*: SHA-2.\n\n*Latacora, 2018*: SHA-2.\n\n*Latacora, 2024*: SHA-2.\n\nThe best option, if you have it available, is still SHA-512/256, which isn’t vulnerable to length-extension attacks. Otherwise, SHA-256 and SHA-512 are both fine.[5](#fn:sha2speed)\n\nSHA-3 is unnecessary (because SHA-2 is fine) and slow,<sup>[6](#fn:sha3slow)</sup> but not *wrong*. If you already have Keccak (SHA-3) around for ML-KEM and ML-DSA, and you want to use it for hashing, draw 32 bytes from SHAKE128.\n\nBLAKE2 is a weird choice these days. BLAKE3 is very fast, but complex and uncommon enough that you want to have a good reason to use it and a good reason to trust your implementation.\n\nMultihashing is when you need to hash multiple *things* at once. For example, multiple columns of a row, or a filename along with the file contents. It’s subtler than it sounds, so use **[SequenceHash](https://blog.trailofbits.com/2026/10/02/sequencehash-multihashing-for-the-rest-of-us/)** with SHA-2, or TupleHash (SP 800-185) with SHA-3.\n\n*Avoid*: SHA-1, MD5, all other hash functions, [rolling your own multihash](https://blog.trailofbits.com/2024/08/21/yolo-is-not-a-valid-hash-construction/#yolomultihash), truncating to less than 256 bits unless a cryptographer told you collisions are not a concern.\n\n### Random IDs\n\n**32 random bytes**, a.k.a. 256-bit random numbers.\n\n*Percival, 2009*: 256-bit random numbers.\n\n*Ptacek, 2015*: 256-bit random numbers.\n\n*Latacora, 2018*: 256-bit random numbers.\n\n*Latacora, 2024*: 256-bit random numbers.\n\nNote that UUIDv4 and APIs like [rand.Text](https://pkg.go.dev/crypto/rand#Text) will give you ~128-bit values instead. That’s usually fine, unless you need more than 280 trillion (2⁴⁸) unique values. 256 bits is overkill, but why not.\n\nUse your operating system’s CSPRNG: `getrandom` on Linux, `ProcessPrng` on Windows, `arc4random_buf` on macOS and BSD, `getRandomValues` on the web. A good library will wrap these for you.\n\n*Avoid*: non-cryptographic PRNGs, userspace random number generators like OpenSSL’s, haveged, CPU jitter entropy.[7](#fn:jitter)\n\n### Password handling\n\n**Argon2id** or **scrypt**. But have you considered **passkeys** instead?\n\n*Percival, 2009*: scrypt or PBKDF2.\n\n*Ptacek, 2015*: scrypt, then bcrypt, then PBKDF2 if you must.\n\n*Latacora, 2018*: scrypt, then Argon2, then bcrypt, then PBKDF2 if you must.\n\n*Latacora, 2024*: Argon2id, then scrypt, then bcrypt, then PBKDF2 if you must.\n\nEverything my predecessors said is still spot on: “you can throw a dart at a wall to pick one of these.” I dropped bcrypt because the 72-byte truncation [bites](https://josephscott.org/blog/2024/11/okta-bcrypt-and-52-character-usernames/). One tip: you could argue to your auditors that scrypt is FIPS 140 compliant because its actual KDF step is PBKDF2, which is what they want. I heard it works.\n\nFor parameters, ignore RFC 9106 which apparently wants to murder your production system, and use `m=64 MiB, t=2, p=1` for Argon2id (libsodium’s INTERACTIVE preset) or `N=2^16, r=8, p=1` for scrypt. They use the same memory, but the scrypt ones will take ~1.5× the CPU time and ¼ the GPU time, which is why you should prefer Argon2id. If you’re doing non-interactive key derivation, feel free to crank up Argon2id’s *m*, and then *t* (or just *N*<sup>[8](#fn:scrypt)</sup> for scrypt) as far as tolerable.\n\nMuch more importantly, do you really need passwords? If you only need them for logins, could you use phishing-proof passkeys instead? Maybe with [email magic links as a fallback](https://rmondello.com/2025/01/02/magic-links-and-passkeys/)? Or just support SSO (as long as it’s OIDC and not SAML)?\n\n(Note that in 2026, passkeys are still not PQ. That’s mostly fine. They’re still phishing-proof and credential-stuffing-proof. All a quantum attacker can do is log in to a specific site if they obtain its database or intercept a login.)\n\n*Avoid*: regular hashes, spending time thinking about password hashes instead of focusing on passkeys, phishable variants of email-based logins.[9](#fn:phish)\n\n### Key exchange\n\n**X25519+ML-KEM-768** in a secure, standard protocol.\n\n*Percival, 2009*: 2048-bit Group #14 with a generator of 2.\n\n*Ptacek, 2015*: Probably still DH-2048, or NaCl.\n\n*Latacora, 2018*: Probably nothing. Or Curve25519.\n\n*Latacora, 2024*: X25519+ML-KEM-768.\n\nThe 2018 version of the Latacora answers is correct in asking “why are you as a developer thinking about this, and what does it even mean?!” Don’t roll your own key exchange protocol. Just pick X25519MLKEM768 in TLS, mlkem768x25519-sha256 in SSH, and/or MLKEM768-X25519 in HPKE and age. If you really need to obtain some keys and you know what you’re doing, both TLS and HPKE have “exporters” to derive them.\n\nNon-PQ solutions are an active, urgent liability due to harvest-now-decrypt-later attacks, and PQ alternatives range from impractical (HQC-KEM, FrodoKEM) to impractical and broken ([Classic McEliece](https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/2kfyUnLObWQ)).\n\nFor key exchange, using an ECC hybrid is cheap enough to be worth it, and indeed ML-KEM is usually deployed alongside ECDH. However, if picking or implementing the hybrid is going to make you stay even a single month longer on a classical, non-PQ key exchange, go straight to pure ML-KEM-768 now.\n\nP-256+ML-KEM-768 is also fine, just less common. NIST P curves got a bad rep for many years, but I think it’s 90% because they came out before we knew how to do cryptography engineering particularly well (and because of… let’s say non-[NPOV](https://en.wikipedia.org/wiki/Wikipedia:Neutral_point_of_view) proselytizing). Almost none of the attacks against ECDH on NIST P curves even matter for ephemeral key exchanges.\n\n*Avoid*: anything and everything without ML-KEM or X-Wing (a specific X25519+ML-KEM-768 combiner) in its name.\n\n### Asymmetric encryption\n\n**HPKE with (MLKEM768-X25519 a.k.a. X-Wing, HKDF-SHA256, AES-128-GCM)**, or **age with PQ keys**.\n\n*Percival, 2009*: RSAES-OAEP with SHA-256, MGF1+SHA-256, and exponent 65537.\n\n*Ptacek, 2015*: NaCl.\n\n*Latacora, 2018*: NaCl/libsodium (box / crypto_box).\n\n*Latacora, 2024*: Tricky, wait for established PQ solutions.\n\nThis is one of the most improved answers in recent years, as we now have a standard to do hybrid encryption: HPKE. (“Hybrid” as in asymmetric + symmetric, not as in classical + post-quantum, yay for overloaded names.)\n\nMLKEM768-P256 is also ok as a choice of KEM, but less available. Pure ML-KEM-768 is fine if it’s all you have. All KDF and AEAD choices are fine, as well.\n\nIf your message is large, do the same chunking Cobblestone does, with multiple sequential HPKE Seal/Open calls in place of the AEAD.\n\nNote that the PQ HPKE KEMs are maddeningly still a draft.<sup>[10](#fn:post-mortem)</sup> Worse, they are unnecessarily spread over four drafts, such that I had to write [filippo.io/hpke-pq](https://filippo.io/hpke-pq). However, I made the authors solemnly swear they will not change the wire format, and then we all shipped them in our cryptographic libraries, so you can and should use them.\n\nIf you need something higher-level, with multiple recipients or a CLI, use age<sup>[11](#fn:age)</sup> with its new `age1pq`-prefixed keys, based on MLKEM768-X25519. PQ support is also rolling out for plugins like the YubiKey and the Secure Enclave ones.\n\n*Avoid*: again anything not based on ML-KEM (RSA and NaCl’s box<sup>[12](#fn:box)</sup> in particular), OpenPGP, [encrypting emails](https://www.latacora.com/blog/2020/02/19/stop-using-encrypted-email/).\n\n### Asymmetric signatures\n\n**ML-DSA-44**.\n\n*Percival, 2009*: RSASSA-PSS with SHA-256, MGF1+SHA-256, and exponent 65537.\n\n*Ptacek, 2015*: NaCl, Ed25519, or RFC 6979.\n\n*Latacora, 2018*: NaCl or Ed25519.\n\n*Latacora, 2024*: Ed25519 if short-lived, otherwise Ed25519+ML-DSA-65.\n\nIn January 2026, I would have told you to wait and see, and then [everything started moving a lot faster](https://words.filippo.io/crqc-timeline/). You need to move to PQ for auth, too.\n\nJust use ML-DSA-44. If your message needs pre-hashing, use “external-μ (Mu)” signing, not HashML-DSA. Store keys as 32-byte seeds exclusively.\n\nThe two PQ alternatives are FN-DSA, which is stuck somewhere in the US Department of Commerce, and SLH-DSA, which is based on hash functions. The latter can make sense for some specialist use cases, but is slow, large, and not widely available in implementations.\n\nWhy not a hybrid or “composites”? Hybrid auth is [more complex](https://mailarchive.ietf.org/arch/msg/tls/CI9HgxA2UKBIyNj0xNSumH3Qogg/) and less useful than hybrid key exchange. I need to write a long-form post about this, but in short either you already have a key rotation strategy that you can use to rotate back to RSA/ECDSA/Ed25519 in the unlikely case of a cryptanalytic break, or you have such a long time horizon that you should assume quantum computers will break the classical half anyway.\n\nAlso, ML-DSA is just such a better signature algorithm than its predecessors. It has hedged randomness (which is better than both random and deterministic nonces), built-in context, extra properties like SUF-CMA, and is relatively simple to implement and test.\n\nWhy the -44 parameter set, when I’m recommending ML-KEM-768? Unlike ML-KEM-512 (NIST category 1), ML-DSA-44 sits at NIST category 2, with some margin above the 128-bit security level already.\n\nThe one exception to the no-composites rule is SSH keys. OpenSSH 10.6 picked `ssh-mldsa44-ed25519`. I think they [made a mistake](https://mailarchive.ietf.org/arch/msg/ssh/4sb0aPTWeX4KA3GgK77ns17UHrU/), but it would be a mistake for you to go off the beaten path there.\n\nNote that asymmetric signatures are overused, and especially now that they are not cheap, you should try to avoid them. Consider whether you could use a simple HMAC. Maybe you can replace signed JWTs with random session tokens. If instead you do want to commit to something publicly, consider whether you should use [a transparency log](https://github.com/transparency-dev/tessera), and get a more practically useful notion of non-repudiability (and potentially smaller sizes, if you amortize the signature over multiple proofs).\n\n*Avoid*: all non-PQ options like RSA/ECDSA/Ed25519, stateful signatures (LMS/XMSS), HashML-DSA, ML-DSA “[semi-expanded keys](https://cs.opensource.google/go/go/+/master:src/crypto/internal/fips140/mldsa/semiexpanded.go;l=13-22;drc=c888fd67f00f77446e563f90e3307de7b6b3a910),” composite signatures, OpenPGP.\n\n### Website or client-server application security\n\nIf you’re in the cloud, use its **ALB/NLB**. Otherwise, **rustls**, **Go’s crypto/tls**, **BoringSSL**, **AWS-LC**, or **s2n-tls** with a **popular, updated ACME client**.\n\n*Percival, 2009*: OpenSSL for websites, custom RSA protocol for applications.\n\n*Ptacek, 2015*: OpenSSL, or BoringSSL if you can. Or just AWS ELBs.\n\n*Latacora, 2018*: AWS ALB/ELB or OpenSSL, with Let’s Encrypt.\n\n*Latacora, 2024*: AWS ALB/ELB or OpenSSL, with Let’s Encrypt.\n\nNot recommending OpenSSL will probably be my least practical suggestion, but OpenSSL has been making consistently puzzling and problematic choices for years now. The pyca/cryptography authors, in [a long post about OpenSSL’s issues](https://cryptography.io/en/latest/statements/state-of-openssl/), summarize it as:\n\nOur experience with OpenSSL has been on a negative trajectory for several years.\n\nThey even [presented at the 2025 OpenSSL Conference](https://www.youtube.com/watch?v=RUIguklWwx0) (!?), apparently fruitlessly. They’re not alone in criticizing OpenSSL: here are [HAProxy](https://cdn.haproxy.com/blog/state-of-ssl-stacks) from the server side, and [curl](https://daniel.haxx.se/blog/2025/06/23/a-family-of-forks/) from the client side.\n\nI recommend rustls or Go’s crypto/tls,<sup>[13](#fn:go)</sup> which are memory safe. If you need to stick to C, both BoringSSL and AWS-LC are very competently maintained OpenSSL forks, and the latter, unlike BoringSSL, has versioned releases. s2n-tls and rustls-ffi are interesting options if you don’t need libssl compatibility.\n\nWhatever you use, make sure it prioritizes the X25519MLKEM768 key exchange, which requires TLS 1.3. Your cloud load balancer might require you to select a PQ security policy. On RHEL 9 and derivatives, [you need to opt in](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/security_hardening/using-the-system-wide-cryptographic-policies_security-hardening#post_quantum_cryptography).\n\nPrevious lists split websites and client-server applications. I merged them because these days you’ll just use the same TLS stack for both. What changes is the PKI. For applications where you control both ends, consider making your own ML-DSA-44 X.509 certificates, self-signed or from a private root. For websites, wire up a *popular*, well-supported ACME client and keep it up to date. Merkle Tree Certificates will roll out in 2027, and you want to be well positioned to be included in the transition.\n\n*Avoid*: rolling your own transport protocol, TLS libraries that failed at their core job before (GnuTLS<sup>[14](#fn:CVE-2020-13777)</sup>, Mbed TLS[15](#fn:CVE-2023-45199)[16](#fn:CVE-2026-34873)<sup>[17](#fn:CVE-2026-25835)</sup>, wolfSSL[18](#fn:CVE-2026-5194)[19](#fn:CVE-2026-5501)[20](#fn:CVE-2026-11310)[21](#fn:CVE-2026-11999)[22](#fn:CVE-2026-55960)[23](#fn:CVE-2026-93302)[24](#fn:CVE-2026-89136)<sup>[25](#fn:CVE-2026-89135)</sup>, Botan[26](#fn:CVE-2026-34580)<sup>[27](#fn:CVE-2026-34582)</sup>), offbeat TLS libraries, OpenSSL before version 3.5 (the first with X25519MLKEM768), any OpenSSL if you can, TLS 1.0–1.1, TLS 1.2 if you can, rolling your own ACME client.\n\n### Online backups\n\n**restic** with a long random password.\n\n*Percival, 2009*: Tarsnap.\n\n*Ptacek, 2015*: Tarsnap.\n\n*Latacora, 2018*: Tarsnap.\n\n*Latacora, 2024*: Tarsnap.\n\n[I checked restic’s encryption a very long time ago](https://words.filippo.io/restic-cryptography/) and it was slightly weird but good. Fully symmetric, so it’s not scared of quantum computers. Doesn’t look like anything changed since. If you need cloud storage, [rsync.net has a “secret” plan for restic users](https://www.rsync.net/products/restic.html), and they support [an append-only mode](https://www.rsync.net/resources/notes/2025-q4-rsync.net_technotes.html).\n\nWe all love Tarsnap, and I feel like I am betraying my elders right now… but its asymmetric cryptography layer is all RSA. *Technically*, I think the only things that truly break are the lower-capability keys: a write-only key can decrypt archives and a read-only key can forge archives. Server authentication is HMAC, and the RSA public keys are never sent to the server. In that sense, Tarsnap is as secure as restic, which is an impressive feat for a 2008 design. However, this feels like a major footgun with impending quantum computers.\n\n## The picture\n\nKinda incredible that you can just walk up to this thing.\n\nFollow me on Bluesky at [@filippo.abyssdomain.expert](https://bsky.app/profile/filippo.abyssdomain.expert) or on Mastodon at [@filippo@abyssdomain.expert](https://abyssdomain.expert/@filippo).\n\n1. \nFIPS 140 still has some very ugly bits around module validation (runtime self-tests, the integrity check, and the worsening RNG mess) but the actual cryptography algorithms these days are “good, actually.” [↩](#fnref:fips140)\n2. \nYou might read that GCM can take 128-bit nonces, but when you do that it doesn’t have a separate CTR counter anymore, and messages with different GCM nonces can end up sharing CTR keystream, which makes the analysis more complicated. [↩](#fnref:gcm128)\n3. \nFull disclosure: XAES-256-GCM is my design, but there are now multiple third-party implementations, including as part of Google’s Tink libraries, there’s [a security analysis by Amazon Web Services](https://eprint.iacr.org/2025/878.pdf) , and it’s[used by Microsoft in an official SDK](https://learn.microsoft.com/en-us/industry/healthcare/dragon-copilot/sdk/ambient/security-guidance#encryption-at-rest) .[↩](#fnref:XAES-256-GCM)\n4. \nAgain, full disclosure, this is my design, but it’s adopted externally enough that I feel comfortable recommending it. [↩](#fnref:Cobblestone)\n5. \nOn 64-bit machines, SHA-512/256 and SHA-512 should be faster than SHA-256 thanks to their larger block size, except right now hardware support for SHA-256 is more widespread, so SHA-256 is faster in practice. They are both fast, so you probably don’t care. [↩](#fnref:sha2speed)\n6. \nPartially because of choices NIST made to make SHA3-256 strictly as secure as SHA-256, even where SHA-256 was overkill. SHA-256 and SHA3-256 have 128 bits of collision resistance and 256 bits of second preimage resistance. It’d be enough to have 128 bits of both, which is what you get from 256 bits of SHAKE128 output. Unfortunately, it doesn’t have a SHA name. TurboSHAKE128 (RFC 9861) would be even better, but it is neither FIPS 140 nor widespread. [↩](#fnref:sha3slow)\n7. \nPeople outside the FIPS 140 circle of hell don’t seem to have noticed, but new NIST rules require FIPS 140 modules to have an “internal” entropy source now. If your FIPS 140 “module” is a piece of software… what do you do? Everyone’s answer is “CPU jitter”: run a tight loop that accesses uncached memory and take high-resolution timestamps, hoping the frequency mismatch between CPU and main memory will make the measurements unpredictable. IMHO, this is the worst part of FIPS 140 since the module integrity hash, and it will hurt people. The one sane way to do it is to go through the motions, and then at the last moment mix the result with kernel entropy, like Go does. However, that’s *harder* to justify to the validation labs than doing just CPU jitter, so I’m afraid we’ll see pure CPU jitter in production a lot.[↩](#fnref:jitter)\n8. \nArgon2id parameters mostly do what you’d imagine, [scrypt parameters do not](https://words.filippo.io/the-scrypt-parameters/) .[↩](#fnref:scrypt)\n9. \nA link with an opaque random token that logs in the opening browser is very hard to phish. A link that logs in the browser that *started* the login is very easy to phish. Short numeric codes are moderately easy to phish. (You can get the best of both worlds by using the Broadcast Channel API to pass the token from the new tab to the original one.)[↩](#fnref:phish)\n10. \nIn a different venue I said a serious engineering community would have a post-mortem about having wasted two of the five years we had for the transition to post-quantum cryptography, only to produce specs that changed *nothing* compared to what we had in 2024. But that’s for another time.[↩](#fnref:post-mortem)\n11. \nAgain again, full disclosure: my design, but pretty uncontroversial pick. [↩](#fnref:age)\n12. \nI truly don’t understand why my predecessors recommended NaCl’s box. It’s an [incredibly sharp and low-level API](https://words.filippo.io/nacl-api/) , pretending to be a high-level safe API.[↩](#fnref:box)\n13. \nOne last time, full disclosure: I am a crypto/tls maintainer. [↩](#fnref:go)\n14. \n[CVE-2020-13777](https://nvd.nist.gov/vuln/detail/CVE-2020-13777) , GnuTLS 3.6.4–3.6.13: the session ticket key is all zeroes, breaking confidentiality in TLS 1.2 and allowing authentication bypass in TLS 1.3.[↩](#fnref:CVE-2020-13777)\n15. \n[CVE-2023-45199](https://nvd.nist.gov/vuln/detail/CVE-2023-45199) , Mbed TLS 3.2–3.4: pre-auth remote code execution via an oversized key share in the TLS 1.3 handshake.[↩](#fnref:CVE-2023-45199)\n16. \n[CVE-2026-34873](https://nvd.nist.gov/vuln/detail/CVE-2026-34873) , Mbed TLS 3.5.0–4.0.0: TLS 1.3 session resumption allows client impersonation.[↩](#fnref:CVE-2026-34873)\n17. \n[CVE-2026-25835](https://nvd.nist.gov/vuln/detail/CVE-2026-25835) , Mbed TLS 2.18.0–3.6.5 and 4.0.0: the RNG state is cloned across fork, so parent and child produce the same random values.[↩](#fnref:CVE-2026-25835)\n18. \n[CVE-2026-5194](https://nvd.nist.gov/vuln/detail/CVE-2026-5194) , wolfSSL 3.12.0–5.9.0: signatures by ECDSA certificates can be forged by providing an ML-DSA or Ed25519 signature algorithm identifier and a trivial ECDSA signature over the zero-length digest.[↩](#fnref:CVE-2026-5194)\n19. \n[CVE-2026-5501](https://nvd.nist.gov/vuln/detail/CVE-2026-5501) , wolfSSL through 5.9.0: the OpenSSL compatibility layer skips the leaf’s signature check when any valid end-entity cert is supplied as an “intermediate.”[↩](#fnref:CVE-2026-5501)\n20. \n[CVE-2026-11310](https://nvd.nist.gov/vuln/detail/CVE-2026-11310) , wolfSSL 5.8.4–5.9.1: the OpenSSL compatibility layer lets caller-supplied untrusted intermediates act as trust anchors.[↩](#fnref:CVE-2026-11310)\n21. \n[CVE-2026-11999](https://nvd.nist.gov/vuln/detail/CVE-2026-11999) , wolfSSL 5.7.4–5.9.1: the OpenSSL compatibility layer accepts any chain longer than the maximum path depth of 100, without reaching a trust anchor.[↩](#fnref:CVE-2026-11999)\n22. \n[CVE-2026-55960](https://nvd.nist.gov/vuln/detail/CVE-2026-55960) , wolfSSL 5.6.4–5.9.1: a raw public key is always accepted in place of a certificate, bypassing authentication.[↩](#fnref:CVE-2026-55960)\n23. \n[CVE-2026-93302](https://nvd.nist.gov/vuln/detail/CVE-2026-93302) , wolfSSL 5.3.0–5.9.2: trusted-peer certificates are matched by name rather than public key.[↩](#fnref:CVE-2026-93302)\n24. \n[CVE-2026-89136](https://nvd.nist.gov/vuln/detail/CVE-2026-89136) , wolfSSL 5.6.0–5.9.2: clients still accept an unsolicited raw public key from the server, bypassing authentication.[↩](#fnref:CVE-2026-89136)\n25. \n[CVE-2026-89135](https://nvd.nist.gov/vuln/detail/CVE-2026-89135) , wolfSSL 5.8.4–5.9.2: a failed chain verification in the OpenSSL compatibility layer permanently adds the attacker’s CA to the trust store used by native TLS, OCSP, and CRL checks.[↩](#fnref:CVE-2026-89135)\n26. \n[CVE-2026-34580](https://nvd.nist.gov/vuln/detail/CVE-2026-34580) , Botan 3.11.0: an end-entity certificate whose DN matches a trusted root is accepted as if it were that root.[↩](#fnref:CVE-2026-34580)\n27. \n[CVE-2026-34582](https://nvd.nist.gov/vuln/detail/CVE-2026-34582) , Botan before 3.11.1: TLS 1.3 servers process application data before Finished, so a client can skip Certificate, CertificateVerify, and Finished entirely, a full client authentication bypass.[↩](#fnref:CVE-2026-34582)\n","body_html":"<p>Publishing “Cryptographic Right Answers” for developers is a tradition by now. <a href=\"https://www.daemonology.net/blog/2009-06-11-cryptographic-right-answers.html\" rel=\"nofollow ugc noopener\">Colin Percival started in 2009</a>, <a href=\"https://gist.github.com/tqbf/be58d2d39690c3b366ad\" rel=\"nofollow ugc noopener\">Thomas Ptacek followed up in 2015</a>, and then <a href=\"https://www.latacora.com/blog/cryptographic-right-answers/\" rel=\"nofollow ugc noopener\">Latacora carried on in 2018</a> and <a href=\"https://www.latacora.com/blog/post-quantum-cryptographic-right-answers/#pqc-right-answers\" rel=\"nofollow ugc noopener\">2024</a>.</p>\n<p>It might feel too soon for an update, but <em>so much has changed</em>. The timeline of the post-quantum transition <a href=\"https://words.filippo.io/crqc-timeline/\" rel=\"nofollow ugc noopener\">dramatically shifted in early 2026</a>, and there is now consensus that it needs to complete by 2029. 2029! We have three years!</p>\n<p>The good news is that, despite what you might have heard, <a href=\"https://words.filippo.io/128-bits/\" rel=\"nofollow ugc noopener\">symmetric cryptography is going to be fine, because Grover does not matter</a>. The bad news is that all asymmetric answers changed compared to 2018 and most even compared to 2024.</p>\n<p>The answers below assume you are not constrained by any specific compliance regime, although they are mostly compatible with FIPS 140.&lt;sup&gt;<a href=\"#fn:fips140\">1</a>&lt;/sup&gt; If you need to follow something stricter like CNSA 2.0, you’ll know. Just substitute as appropriate.</p>\n<p>Finally, remember the other big change of 2026: LLMs are very good at finding bugs now. “Get a review from the best model you can afford” is now firmly a Cryptographic Right Answer, along with the long-time classic “use a memory-safe language.”</p>\n<p>If you’re in a rush, here’s the cheat sheet:</p>\n<ul><li><strong>Encrypting data</strong> : If you’re in the cloud, KMS. Otherwise, XAES-256-GCM or XChaCha20Poly1305 with random nonces. If you’re encrypting more than a few MB, use Cobblestone-128.</li><li><strong>Symmetric key length</strong> : Don’t stress it. 256-bit keys if you need to pick.</li><li><strong>Symmetric “signatures”</strong> : HMAC-SHA-256.</li><li><strong>Hash algorithm</strong> : SHA-2 is still fine, but use a real multihash (SequenceHash) if needed.</li><li><strong>Random IDs</strong> : 32 random bytes, a.k.a. 256-bit random numbers.</li><li><strong>Password handling</strong> : Argon2id or scrypt. But have you considered passkeys instead?</li><li><strong>Key exchange</strong> : X25519+ML-KEM-768 in a secure, standard protocol.</li><li><strong>Asymmetric encryption</strong> : HPKE with (MLKEM768-X25519 a.k.a. X-Wing, HKDF-SHA256, AES-128-GCM), or age with PQ keys.</li><li><strong>Asymmetric signatures</strong> : ML-DSA-44.</li><li><strong>Website or client-server application security</strong> : If you’re in the cloud, use its ALB/NLB. Otherwise, rustls, Go’s crypto/tls, BoringSSL, AWS-LC, or s2n-tls with a popular, updated ACME client.</li><li><strong>Online backups</strong> : restic with a long random password.</li></ul>\n<p>Now let’s dive in.</p>\n<h3 id=\"encrypting-data\">Encrypting data</h3>\n<p>If you’re in the cloud, <strong>KMS</strong>. Otherwise, <strong>XAES-256-GCM</strong> or <strong>XChaCha20Poly1305</strong> with random nonces. If you’re encrypting more than a few MB, use <a href=\"https://c2sp.org/chunked-encryption\" rel=\"nofollow ugc noopener\"><strong>Cobblestone-128</strong></a>.</p>\n<p><em>Percival, 2009</em>: AES-CTR with HMAC.</p>\n<p><em>Ptacek, 2015</em>: NaCl/libsodium default, or ChaCha20Poly1305, or AES-GCM.</p>\n<p><em>Latacora, 2018</em>: KMS, or XSalsa20+Poly1305.</p>\n<p><em>Latacora, 2024</em>: KMS, or NaCl’s secretbox, or XChaCha20Poly1305.</p>\n<p><a href=\"https://www.latacora.com/blog/cryptographic-right-answers/#encrypting-data\" rel=\"nofollow ugc noopener\">Latacora’s reasoning for why and when you’d use your cloud’s KMS</a> is still solid, so start there.</p>\n<p>If you’re encrypting locally, you want an AEAD where you can avoid worrying about tracking nonces or how many messages you encrypted, so you want random nonces of at least 128 bits.<a href=\"#fn:gcm128\">2</a></p>\n<p>NaCl/libsodium’s secretbox is just a <a href=\"https://words.filippo.io/nacl-api/\" rel=\"nofollow ugc noopener\">paper-thin wrapper</a> around a less common AE construction (XSalsa20+Poly1305), so instead I recommend <a href=\"https://words.filippo.io/xaes-256-gcm/\" rel=\"nofollow ugc noopener\">XAES-256-GCM</a> or XChaCha20Poly1305. The former is an efficient composition of a standard KDF and AES-GCM, packaged as an extended-nonce AEAD, so even if your library doesn’t provide it under that name you can assemble it from the KDF and AES-GCM APIs.<a href=\"#fn:XAES-256-GCM\">3</a></p>\n<p>Regular AES-GCM and ChaCha20Poly1305 with random nonces are only ok if you <em>know for certain</em> you won’t encrypt more than a billion messages with one key. AES-GCM-SIV is also a good AEAD choice if you happen to have it everywhere you need it, but that’s kinda unlikely. Some even newer options have nice properties like key commitment, but are not commonly available yet.</p>\n<p>Since you have an AEAD, consider putting context in the additional data, like the user ID you’re encrypting for, or the version of the protocol. Anything not secret that you will definitely still know at decrypt time.</p>\n<p>Very important is how you handle large messages, which KMS will not solve for you. <em>Do not</em> pass one large message to an AEAD, or you might be forced to process or store the plaintext before having authenticated it at decrypt time. <em>Absolutely do not</em> use unauthenticated stream ciphers. Instead, you should use STREAM (which is not a stream cipher but a way to use AEADs on a stream… I know, I know, terrible name). There are a lot of options—too many, in fact—and shamefully none are the consensus answer. <a href=\"https://developers.google.com/tink/encrypt-large-files-or-data-streams#streaming_aead\" rel=\"nofollow ugc noopener\">Tink has one</a>, <a href=\"https://libsodium.gitbook.io/doc/secret-key_cryptography/secretstream\" rel=\"nofollow ugc noopener\">libsodium has one</a>, <a href=\"https://github.com/aws/aws-encryption-sdk-python/blob/a6c0413bb0ddc9bccdefad9f1d2c031e0bc4db29/examples/src/file_streaming_example.py\" rel=\"nofollow ugc noopener\">the AWS Encryption SDK has one</a>, <a href=\"https://c2sp.org/FLOE\" rel=\"nofollow ugc noopener\">FLOE is one</a>, age has one, and the list goes on. I recommend <a href=\"https://c2sp.org/chunked-encryption\" rel=\"nofollow ugc noopener\">Cobblestone-128</a>, which is a STREAM variant derived from TLS, and is available in pyca/cryptography and soon in the Go standard library (and in the meantime at <a href=\"https://filippo.io/cobblestone\" rel=\"nofollow ugc noopener\">filippo.io/cobblestone</a>).<a href=\"#fn:Cobblestone\">4</a></p>\n<p><em>Avoid</em>: unauthenticated modes (CBC, CTR, raw stream ciphers), random 96-bit nonces unless you spent a lot of time thinking about how many messages you encrypt, rolling your own AEAD construction.</p>\n<h3 id=\"symmetric-key-length\">Symmetric key length</h3>\n<p><strong>Don’t stress it.</strong> 256-bit keys if you need to pick.</p>\n<p><em>Percival, 2009</em>: 256-bit AES keys.</p>\n<p><em>Ptacek, 2015</em>: 256-bit keys.</p>\n<p><em>Latacora, 2018</em>: 256-bit keys.</p>\n<p><em>Latacora, 2024</em>: 256-bit keys.</p>\n<p>Remember that Grover doesn’t actually matter and 128-bit brute-force attacks don’t exist. Still, 256-bit keys rule out multi-target attacks, which is nice.</p>\n<p>However, don’t make other decisions based on this. For example, the recommended Cobblestone suite uses 128-bit keys and that’s fine because it has a careful analysis of multi-target attacks. Likewise, don’t go changing the default cipher suite preferences of your TLS library to enforce 256-bit keys; there’s no need.</p>\n<p>AES-256 is slower than AES-128 because unfortunately Rijndael ties the number of rounds to the key size, but this probably won’t matter in practice.</p>\n<p><em>Avoid</em>: anything other than 128 or 256 bits, worrying too much about size, keys that are not uniform (e.g. using a password or ASCII hex string directly as a key).</p>\n<h3 id=\"symmetric-signatures\">Symmetric “signatures”</h3>\n<p><strong>HMAC-SHA-256</strong>.</p>\n<p><em>Percival, 2009</em>: HMAC.</p>\n<p><em>Ptacek, 2015</em>: HMAC.</p>\n<p><em>Latacora, 2018</em>: HMAC.</p>\n<p><em>Latacora, 2024</em>: HMAC.</p>\n<p>Yay for HMAC.</p>\n<p>Just be careful to sidestep canonicalization and parser alignment bugs by always authenticating a verbatim string of bytes, not something you need to recompute.</p>\n<p><em>Good:</em></p>\n<pre><code>{\n    &quot;inner&quot;: &quot;{\\&quot;foo\\&quot;:123}&quot;,\n    &quot;hmac&quot;: &quot;MbPsZq7QGCllJgDnSSy/cyM10HjqiVu35UO7yyY5d3w=&quot;\n}</code></pre>\n<p>Check the HMAC and then process or store or forward just <code>{&quot;foo&quot;:123}</code>.</p>\n<p><em>Bad:</em></p>\n<pre><code>{\n    &quot;foo&quot;: 123,\n    &quot;hmac&quot;: &quot;MbPsZq7QGCllJgDnSSy/cyM10HjqiVu35UO7yyY5d3w=&quot;\n}</code></pre>\n<p>You can use KMAC or keyed BLAKE3 if you already had a reason to use their underlying hashes. HMAC-SHA-512 is also fine.</p>\n<p>Remember to compare tags with dedicated constant-time functions.</p>\n<p><em>Avoid</em>: rolling your own <a href=\"https://blog.trailofbits.com/2024/08/21/yolo-is-not-a-valid-hash-construction/#yolomac\" rel=\"nofollow ugc noopener\">YoloMAC</a>, encrypted hashes, standalone one-time MACs like Poly1305 or GMAC.</p>\n<h3 id=\"hash-algorithm\">Hash algorithm</h3>\n<p><strong>SHA-2</strong> is still fine, but use a real multihash if needed.</p>\n<p><em>Percival, 2009</em>: SHA-256 (SHA-2), plan on SHA-3.</p>\n<p><em>Ptacek, 2015</em>: SHA-2.</p>\n<p><em>Latacora, 2018</em>: SHA-2.</p>\n<p><em>Latacora, 2024</em>: SHA-2.</p>\n<p>The best option, if you have it available, is still SHA-512/256, which isn’t vulnerable to length-extension attacks. Otherwise, SHA-256 and SHA-512 are both fine.<a href=\"#fn:sha2speed\">5</a></p>\n<p>SHA-3 is unnecessary (because SHA-2 is fine) and slow,&lt;sup&gt;<a href=\"#fn:sha3slow\">6</a>&lt;/sup&gt; but not <em>wrong</em>. If you already have Keccak (SHA-3) around for ML-KEM and ML-DSA, and you want to use it for hashing, draw 32 bytes from SHAKE128.</p>\n<p>BLAKE2 is a weird choice these days. BLAKE3 is very fast, but complex and uncommon enough that you want to have a good reason to use it and a good reason to trust your implementation.</p>\n<p>Multihashing is when you need to hash multiple <em>things</em> at once. For example, multiple columns of a row, or a filename along with the file contents. It’s subtler than it sounds, so use <strong><a href=\"https://blog.trailofbits.com/2026/10/02/sequencehash-multihashing-for-the-rest-of-us/\" rel=\"nofollow ugc noopener\">SequenceHash</a></strong> with SHA-2, or TupleHash (SP 800-185) with SHA-3.</p>\n<p><em>Avoid</em>: SHA-1, MD5, all other hash functions, <a href=\"https://blog.trailofbits.com/2024/08/21/yolo-is-not-a-valid-hash-construction/#yolomultihash\" rel=\"nofollow ugc noopener\">rolling your own multihash</a>, truncating to less than 256 bits unless a cryptographer told you collisions are not a concern.</p>\n<h3 id=\"random-ids\">Random IDs</h3>\n<p><strong>32 random bytes</strong>, a.k.a. 256-bit random numbers.</p>\n<p><em>Percival, 2009</em>: 256-bit random numbers.</p>\n<p><em>Ptacek, 2015</em>: 256-bit random numbers.</p>\n<p><em>Latacora, 2018</em>: 256-bit random numbers.</p>\n<p><em>Latacora, 2024</em>: 256-bit random numbers.</p>\n<p>Note that UUIDv4 and APIs like <a href=\"https://pkg.go.dev/crypto/rand#Text\" rel=\"nofollow ugc noopener\">rand.Text</a> will give you ~128-bit values instead. That’s usually fine, unless you need more than 280 trillion (2⁴⁸) unique values. 256 bits is overkill, but why not.</p>\n<p>Use your operating system’s CSPRNG: <code>getrandom</code> on Linux, <code>ProcessPrng</code> on Windows, <code>arc4random_buf</code> on macOS and BSD, <code>getRandomValues</code> on the web. A good library will wrap these for you.</p>\n<p><em>Avoid</em>: non-cryptographic PRNGs, userspace random number generators like OpenSSL’s, haveged, CPU jitter entropy.<a href=\"#fn:jitter\">7</a></p>\n<h3 id=\"password-handling\">Password handling</h3>\n<p><strong>Argon2id</strong> or <strong>scrypt</strong>. But have you considered <strong>passkeys</strong> instead?</p>\n<p><em>Percival, 2009</em>: scrypt or PBKDF2.</p>\n<p><em>Ptacek, 2015</em>: scrypt, then bcrypt, then PBKDF2 if you must.</p>\n<p><em>Latacora, 2018</em>: scrypt, then Argon2, then bcrypt, then PBKDF2 if you must.</p>\n<p><em>Latacora, 2024</em>: Argon2id, then scrypt, then bcrypt, then PBKDF2 if you must.</p>\n<p>Everything my predecessors said is still spot on: “you can throw a dart at a wall to pick one of these.” I dropped bcrypt because the 72-byte truncation <a href=\"https://josephscott.org/blog/2024/11/okta-bcrypt-and-52-character-usernames/\" rel=\"nofollow ugc noopener\">bites</a>. One tip: you could argue to your auditors that scrypt is FIPS 140 compliant because its actual KDF step is PBKDF2, which is what they want. I heard it works.</p>\n<p>For parameters, ignore RFC 9106 which apparently wants to murder your production system, and use <code>m=64 MiB, t=2, p=1</code> for Argon2id (libsodium’s INTERACTIVE preset) or <code>N=2^16, r=8, p=1</code> for scrypt. They use the same memory, but the scrypt ones will take ~1.5× the CPU time and ¼ the GPU time, which is why you should prefer Argon2id. If you’re doing non-interactive key derivation, feel free to crank up Argon2id’s *m*, and then *t* (or just *N*&lt;sup&gt;<a href=\"#fn:scrypt\">8</a>&lt;/sup&gt; for scrypt) as far as tolerable.</p>\n<p>Much more importantly, do you really need passwords? If you only need them for logins, could you use phishing-proof passkeys instead? Maybe with <a href=\"https://rmondello.com/2025/01/02/magic-links-and-passkeys/\" rel=\"nofollow ugc noopener\">email magic links as a fallback</a>? Or just support SSO (as long as it’s OIDC and not SAML)?</p>\n<p>(Note that in 2026, passkeys are still not PQ. That’s mostly fine. They’re still phishing-proof and credential-stuffing-proof. All a quantum attacker can do is log in to a specific site if they obtain its database or intercept a login.)</p>\n<p><em>Avoid</em>: regular hashes, spending time thinking about password hashes instead of focusing on passkeys, phishable variants of email-based logins.<a href=\"#fn:phish\">9</a></p>\n<h3 id=\"key-exchange\">Key exchange</h3>\n<p><strong>X25519+ML-KEM-768</strong> in a secure, standard protocol.</p>\n<p><em>Percival, 2009</em>: 2048-bit Group #14 with a generator of 2.</p>\n<p><em>Ptacek, 2015</em>: Probably still DH-2048, or NaCl.</p>\n<p><em>Latacora, 2018</em>: Probably nothing. Or Curve25519.</p>\n<p><em>Latacora, 2024</em>: X25519+ML-KEM-768.</p>\n<p>The 2018 version of the Latacora answers is correct in asking “why are you as a developer thinking about this, and what does it even mean?!” Don’t roll your own key exchange protocol. Just pick X25519MLKEM768 in TLS, mlkem768x25519-sha256 in SSH, and/or MLKEM768-X25519 in HPKE and age. If you really need to obtain some keys and you know what you’re doing, both TLS and HPKE have “exporters” to derive them.</p>\n<p>Non-PQ solutions are an active, urgent liability due to harvest-now-decrypt-later attacks, and PQ alternatives range from impractical (HQC-KEM, FrodoKEM) to impractical and broken (<a href=\"https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/2kfyUnLObWQ\" rel=\"nofollow ugc noopener\">Classic McEliece</a>).</p>\n<p>For key exchange, using an ECC hybrid is cheap enough to be worth it, and indeed ML-KEM is usually deployed alongside ECDH. However, if picking or implementing the hybrid is going to make you stay even a single month longer on a classical, non-PQ key exchange, go straight to pure ML-KEM-768 now.</p>\n<p>P-256+ML-KEM-768 is also fine, just less common. NIST P curves got a bad rep for many years, but I think it’s 90% because they came out before we knew how to do cryptography engineering particularly well (and because of… let’s say non-<a href=\"https://en.wikipedia.org/wiki/Wikipedia:Neutral_point_of_view\" rel=\"nofollow ugc noopener\">NPOV</a> proselytizing). Almost none of the attacks against ECDH on NIST P curves even matter for ephemeral key exchanges.</p>\n<p><em>Avoid</em>: anything and everything without ML-KEM or X-Wing (a specific X25519+ML-KEM-768 combiner) in its name.</p>\n<h3 id=\"asymmetric-encryption\">Asymmetric encryption</h3>\n<p><strong>HPKE with (MLKEM768-X25519 a.k.a. X-Wing, HKDF-SHA256, AES-128-GCM)</strong>, or <strong>age with PQ keys</strong>.</p>\n<p><em>Percival, 2009</em>: RSAES-OAEP with SHA-256, MGF1+SHA-256, and exponent 65537.</p>\n<p><em>Ptacek, 2015</em>: NaCl.</p>\n<p><em>Latacora, 2018</em>: NaCl/libsodium (box / crypto_box).</p>\n<p><em>Latacora, 2024</em>: Tricky, wait for established PQ solutions.</p>\n<p>This is one of the most improved answers in recent years, as we now have a standard to do hybrid encryption: HPKE. (“Hybrid” as in asymmetric + symmetric, not as in classical + post-quantum, yay for overloaded names.)</p>\n<p>MLKEM768-P256 is also ok as a choice of KEM, but less available. Pure ML-KEM-768 is fine if it’s all you have. All KDF and AEAD choices are fine, as well.</p>\n<p>If your message is large, do the same chunking Cobblestone does, with multiple sequential HPKE Seal/Open calls in place of the AEAD.</p>\n<p>Note that the PQ HPKE KEMs are maddeningly still a draft.&lt;sup&gt;<a href=\"#fn:post-mortem\">10</a>&lt;/sup&gt; Worse, they are unnecessarily spread over four drafts, such that I had to write <a href=\"https://filippo.io/hpke-pq\" rel=\"nofollow ugc noopener\">filippo.io/hpke-pq</a>. However, I made the authors solemnly swear they will not change the wire format, and then we all shipped them in our cryptographic libraries, so you can and should use them.</p>\n<p>If you need something higher-level, with multiple recipients or a CLI, use age&lt;sup&gt;<a href=\"#fn:age\">11</a>&lt;/sup&gt; with its new <code>age1pq</code>-prefixed keys, based on MLKEM768-X25519. PQ support is also rolling out for plugins like the YubiKey and the Secure Enclave ones.</p>\n<p><em>Avoid</em>: again anything not based on ML-KEM (RSA and NaCl’s box&lt;sup&gt;<a href=\"#fn:box\">12</a>&lt;/sup&gt; in particular), OpenPGP, <a href=\"https://www.latacora.com/blog/2020/02/19/stop-using-encrypted-email/\" rel=\"nofollow ugc noopener\">encrypting emails</a>.</p>\n<h3 id=\"asymmetric-signatures\">Asymmetric signatures</h3>\n<p><strong>ML-DSA-44</strong>.</p>\n<p><em>Percival, 2009</em>: RSASSA-PSS with SHA-256, MGF1+SHA-256, and exponent 65537.</p>\n<p><em>Ptacek, 2015</em>: NaCl, Ed25519, or RFC 6979.</p>\n<p><em>Latacora, 2018</em>: NaCl or Ed25519.</p>\n<p><em>Latacora, 2024</em>: Ed25519 if short-lived, otherwise Ed25519+ML-DSA-65.</p>\n<p>In January 2026, I would have told you to wait and see, and then <a href=\"https://words.filippo.io/crqc-timeline/\" rel=\"nofollow ugc noopener\">everything started moving a lot faster</a>. You need to move to PQ for auth, too.</p>\n<p>Just use ML-DSA-44. If your message needs pre-hashing, use “external-μ (Mu)” signing, not HashML-DSA. Store keys as 32-byte seeds exclusively.</p>\n<p>The two PQ alternatives are FN-DSA, which is stuck somewhere in the US Department of Commerce, and SLH-DSA, which is based on hash functions. The latter can make sense for some specialist use cases, but is slow, large, and not widely available in implementations.</p>\n<p>Why not a hybrid or “composites”? Hybrid auth is <a href=\"https://mailarchive.ietf.org/arch/msg/tls/CI9HgxA2UKBIyNj0xNSumH3Qogg/\" rel=\"nofollow ugc noopener\">more complex</a> and less useful than hybrid key exchange. I need to write a long-form post about this, but in short either you already have a key rotation strategy that you can use to rotate back to RSA/ECDSA/Ed25519 in the unlikely case of a cryptanalytic break, or you have such a long time horizon that you should assume quantum computers will break the classical half anyway.</p>\n<p>Also, ML-DSA is just such a better signature algorithm than its predecessors. It has hedged randomness (which is better than both random and deterministic nonces), built-in context, extra properties like SUF-CMA, and is relatively simple to implement and test.</p>\n<p>Why the -44 parameter set, when I’m recommending ML-KEM-768? Unlike ML-KEM-512 (NIST category 1), ML-DSA-44 sits at NIST category 2, with some margin above the 128-bit security level already.</p>\n<p>The one exception to the no-composites rule is SSH keys. OpenSSH 10.6 picked <code>ssh-mldsa44-ed25519</code>. I think they <a href=\"https://mailarchive.ietf.org/arch/msg/ssh/4sb0aPTWeX4KA3GgK77ns17UHrU/\" rel=\"nofollow ugc noopener\">made a mistake</a>, but it would be a mistake for you to go off the beaten path there.</p>\n<p>Note that asymmetric signatures are overused, and especially now that they are not cheap, you should try to avoid them. Consider whether you could use a simple HMAC. Maybe you can replace signed JWTs with random session tokens. If instead you do want to commit to something publicly, consider whether you should use <a href=\"https://github.com/transparency-dev/tessera\" rel=\"nofollow ugc noopener\">a transparency log</a>, and get a more practically useful notion of non-repudiability (and potentially smaller sizes, if you amortize the signature over multiple proofs).</p>\n<p><em>Avoid</em>: all non-PQ options like RSA/ECDSA/Ed25519, stateful signatures (LMS/XMSS), HashML-DSA, ML-DSA “<a href=\"https://cs.opensource.google/go/go/+/master:src/crypto/internal/fips140/mldsa/semiexpanded.go;l=13-22;drc=c888fd67f00f77446e563f90e3307de7b6b3a910\" rel=\"nofollow ugc noopener\">semi-expanded keys</a>,” composite signatures, OpenPGP.</p>\n<h3 id=\"website-or-client-server-application-security\">Website or client-server application security</h3>\n<p>If you’re in the cloud, use its <strong>ALB/NLB</strong>. Otherwise, <strong>rustls</strong>, <strong>Go’s crypto/tls</strong>, <strong>BoringSSL</strong>, <strong>AWS-LC</strong>, or <strong>s2n-tls</strong> with a <strong>popular, updated ACME client</strong>.</p>\n<p><em>Percival, 2009</em>: OpenSSL for websites, custom RSA protocol for applications.</p>\n<p><em>Ptacek, 2015</em>: OpenSSL, or BoringSSL if you can. Or just AWS ELBs.</p>\n<p><em>Latacora, 2018</em>: AWS ALB/ELB or OpenSSL, with Let’s Encrypt.</p>\n<p><em>Latacora, 2024</em>: AWS ALB/ELB or OpenSSL, with Let’s Encrypt.</p>\n<p>Not recommending OpenSSL will probably be my least practical suggestion, but OpenSSL has been making consistently puzzling and problematic choices for years now. The pyca/cryptography authors, in <a href=\"https://cryptography.io/en/latest/statements/state-of-openssl/\" rel=\"nofollow ugc noopener\">a long post about OpenSSL’s issues</a>, summarize it as:</p>\n<p>Our experience with OpenSSL has been on a negative trajectory for several years.</p>\n<p>They even <a href=\"https://www.youtube.com/watch?v=RUIguklWwx0\" rel=\"nofollow ugc noopener\">presented at the 2025 OpenSSL Conference</a> (!?), apparently fruitlessly. They’re not alone in criticizing OpenSSL: here are <a href=\"https://cdn.haproxy.com/blog/state-of-ssl-stacks\" rel=\"nofollow ugc noopener\">HAProxy</a> from the server side, and <a href=\"https://daniel.haxx.se/blog/2025/06/23/a-family-of-forks/\" rel=\"nofollow ugc noopener\">curl</a> from the client side.</p>\n<p>I recommend rustls or Go’s crypto/tls,&lt;sup&gt;<a href=\"#fn:go\">13</a>&lt;/sup&gt; which are memory safe. If you need to stick to C, both BoringSSL and AWS-LC are very competently maintained OpenSSL forks, and the latter, unlike BoringSSL, has versioned releases. s2n-tls and rustls-ffi are interesting options if you don’t need libssl compatibility.</p>\n<p>Whatever you use, make sure it prioritizes the X25519MLKEM768 key exchange, which requires TLS 1.3. Your cloud load balancer might require you to select a PQ security policy. On RHEL 9 and derivatives, <a href=\"https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/security_hardening/using-the-system-wide-cryptographic-policies_security-hardening#post_quantum_cryptography\" rel=\"nofollow ugc noopener\">you need to opt in</a>.</p>\n<p>Previous lists split websites and client-server applications. I merged them because these days you’ll just use the same TLS stack for both. What changes is the PKI. For applications where you control both ends, consider making your own ML-DSA-44 X.509 certificates, self-signed or from a private root. For websites, wire up a <em>popular</em>, well-supported ACME client and keep it up to date. Merkle Tree Certificates will roll out in 2027, and you want to be well positioned to be included in the transition.</p>\n<p><em>Avoid</em>: rolling your own transport protocol, TLS libraries that failed at their core job before (GnuTLS&lt;sup&gt;<a href=\"#fn:CVE-2020-13777\">14</a>&lt;/sup&gt;, Mbed TLS<a href=\"#fn:CVE-2023-45199\">15</a><a href=\"#fn:CVE-2026-34873\">16</a>&lt;sup&gt;<a href=\"#fn:CVE-2026-25835\">17</a>&lt;/sup&gt;, wolfSSL<a href=\"#fn:CVE-2026-5194\">18</a><a href=\"#fn:CVE-2026-5501\">19</a><a href=\"#fn:CVE-2026-11310\">20</a><a href=\"#fn:CVE-2026-11999\">21</a><a href=\"#fn:CVE-2026-55960\">22</a><a href=\"#fn:CVE-2026-93302\">23</a><a href=\"#fn:CVE-2026-89136\">24</a>&lt;sup&gt;<a href=\"#fn:CVE-2026-89135\">25</a>&lt;/sup&gt;, Botan<a href=\"#fn:CVE-2026-34580\">26</a>&lt;sup&gt;<a href=\"#fn:CVE-2026-34582\">27</a>&lt;/sup&gt;), offbeat TLS libraries, OpenSSL before version 3.5 (the first with X25519MLKEM768), any OpenSSL if you can, TLS 1.0–1.1, TLS 1.2 if you can, rolling your own ACME client.</p>\n<h3 id=\"online-backups\">Online backups</h3>\n<p><strong>restic</strong> with a long random password.</p>\n<p><em>Percival, 2009</em>: Tarsnap.</p>\n<p><em>Ptacek, 2015</em>: Tarsnap.</p>\n<p><em>Latacora, 2018</em>: Tarsnap.</p>\n<p><em>Latacora, 2024</em>: Tarsnap.</p>\n<p><a href=\"https://words.filippo.io/restic-cryptography/\" rel=\"nofollow ugc noopener\">I checked restic’s encryption a very long time ago</a> and it was slightly weird but good. Fully symmetric, so it’s not scared of quantum computers. Doesn’t look like anything changed since. If you need cloud storage, <a href=\"https://www.rsync.net/products/restic.html\" rel=\"nofollow ugc noopener\">rsync.net has a “secret” plan for restic users</a>, and they support <a href=\"https://www.rsync.net/resources/notes/2025-q4-rsync.net_technotes.html\" rel=\"nofollow ugc noopener\">an append-only mode</a>.</p>\n<p>We all love Tarsnap, and I feel like I am betraying my elders right now… but its asymmetric cryptography layer is all RSA. <em>Technically</em>, I think the only things that truly break are the lower-capability keys: a write-only key can decrypt archives and a read-only key can forge archives. Server authentication is HMAC, and the RSA public keys are never sent to the server. In that sense, Tarsnap is as secure as restic, which is an impressive feat for a 2008 design. However, this feels like a major footgun with impending quantum computers.</p>\n<h2 id=\"the-picture\">The picture</h2>\n<p>Kinda incredible that you can just walk up to this thing.</p>\n<p>Follow me on Bluesky at <a href=\"https://bsky.app/profile/filippo.abyssdomain.expert\" rel=\"nofollow ugc noopener\">@filippo.abyssdomain.expert</a> or on Mastodon at <a href=\"https://abyssdomain.expert/@filippo\" rel=\"nofollow ugc noopener\">@filippo@abyssdomain.expert</a>.</p>\n<ol><li></li></ol>\n<p>FIPS 140 still has some very ugly bits around module validation (runtime self-tests, the integrity check, and the worsening RNG mess) but the actual cryptography algorithms these days are “good, actually.” <a href=\"#fnref:fips140\">↩</a></p>\n<ol start=\"2\"><li></li></ol>\n<p>You might read that GCM can take 128-bit nonces, but when you do that it doesn’t have a separate CTR counter anymore, and messages with different GCM nonces can end up sharing CTR keystream, which makes the analysis more complicated. <a href=\"#fnref:gcm128\">↩</a></p>\n<ol start=\"3\"><li></li></ol>\n<p>Full disclosure: XAES-256-GCM is my design, but there are now multiple third-party implementations, including as part of Google’s Tink libraries, there’s <a href=\"https://eprint.iacr.org/2025/878.pdf\" rel=\"nofollow ugc noopener\">a security analysis by Amazon Web Services</a> , and it’s<a href=\"https://learn.microsoft.com/en-us/industry/healthcare/dragon-copilot/sdk/ambient/security-guidance#encryption-at-rest\" rel=\"nofollow ugc noopener\">used by Microsoft in an official SDK</a> .<a href=\"#fnref:XAES-256-GCM\">↩</a></p>\n<ol start=\"4\"><li></li></ol>\n<p>Again, full disclosure, this is my design, but it’s adopted externally enough that I feel comfortable recommending it. <a href=\"#fnref:Cobblestone\">↩</a></p>\n<ol start=\"5\"><li></li></ol>\n<p>On 64-bit machines, SHA-512/256 and SHA-512 should be faster than SHA-256 thanks to their larger block size, except right now hardware support for SHA-256 is more widespread, so SHA-256 is faster in practice. They are both fast, so you probably don’t care. <a href=\"#fnref:sha2speed\">↩</a></p>\n<ol start=\"6\"><li></li></ol>\n<p>Partially because of choices NIST made to make SHA3-256 strictly as secure as SHA-256, even where SHA-256 was overkill. SHA-256 and SHA3-256 have 128 bits of collision resistance and 256 bits of second preimage resistance. It’d be enough to have 128 bits of both, which is what you get from 256 bits of SHAKE128 output. Unfortunately, it doesn’t have a SHA name. TurboSHAKE128 (RFC 9861) would be even better, but it is neither FIPS 140 nor widespread. <a href=\"#fnref:sha3slow\">↩</a></p>\n<ol start=\"7\"><li></li></ol>\n<p>People outside the FIPS 140 circle of hell don’t seem to have noticed, but new NIST rules require FIPS 140 modules to have an “internal” entropy source now. If your FIPS 140 “module” is a piece of software… what do you do? Everyone’s answer is “CPU jitter”: run a tight loop that accesses uncached memory and take high-resolution timestamps, hoping the frequency mismatch between CPU and main memory will make the measurements unpredictable. IMHO, this is the worst part of FIPS 140 since the module integrity hash, and it will hurt people. The one sane way to do it is to go through the motions, and then at the last moment mix the result with kernel entropy, like Go does. However, that’s <em>harder</em> to justify to the validation labs than doing just CPU jitter, so I’m afraid we’ll see pure CPU jitter in production a lot.<a href=\"#fnref:jitter\">↩</a></p>\n<ol start=\"8\"><li></li></ol>\n<p>Argon2id parameters mostly do what you’d imagine, <a href=\"https://words.filippo.io/the-scrypt-parameters/\" rel=\"nofollow ugc noopener\">scrypt parameters do not</a> .<a href=\"#fnref:scrypt\">↩</a></p>\n<ol start=\"9\"><li></li></ol>\n<p>A link with an opaque random token that logs in the opening browser is very hard to phish. A link that logs in the browser that <em>started</em> the login is very easy to phish. Short numeric codes are moderately easy to phish. (You can get the best of both worlds by using the Broadcast Channel API to pass the token from the new tab to the original one.)<a href=\"#fnref:phish\">↩</a></p>\n<ol start=\"10\"><li></li></ol>\n<p>In a different venue I said a serious engineering community would have a post-mortem about having wasted two of the five years we had for the transition to post-quantum cryptography, only to produce specs that changed <em>nothing</em> compared to what we had in 2024. But that’s for another time.<a href=\"#fnref:post-mortem\">↩</a></p>\n<ol start=\"11\"><li></li></ol>\n<p>Again again, full disclosure: my design, but pretty uncontroversial pick. <a href=\"#fnref:age\">↩</a></p>\n<ol start=\"12\"><li></li></ol>\n<p>I truly don’t understand why my predecessors recommended NaCl’s box. It’s an <a href=\"https://words.filippo.io/nacl-api/\" rel=\"nofollow ugc noopener\">incredibly sharp and low-level API</a> , pretending to be a high-level safe API.<a href=\"#fnref:box\">↩</a></p>\n<ol start=\"13\"><li></li></ol>\n<p>One last time, full disclosure: I am a crypto/tls maintainer. <a href=\"#fnref:go\">↩</a></p>\n<ol start=\"14\"><li></li></ol>\n<p><a href=\"https://nvd.nist.gov/vuln/detail/CVE-2020-13777\" rel=\"nofollow ugc noopener\">CVE-2020-13777</a> , GnuTLS 3.6.4–3.6.13: the session ticket key is all zeroes, breaking confidentiality in TLS 1.2 and allowing authentication bypass in TLS 1.3.<a href=\"#fnref:CVE-2020-13777\">↩</a></p>\n<ol start=\"15\"><li></li></ol>\n<p><a href=\"https://nvd.nist.gov/vuln/detail/CVE-2023-45199\" rel=\"nofollow ugc noopener\">CVE-2023-45199</a> , Mbed TLS 3.2–3.4: pre-auth remote code execution via an oversized key share in the TLS 1.3 handshake.<a href=\"#fnref:CVE-2023-45199\">↩</a></p>\n<ol start=\"16\"><li></li></ol>\n<p><a href=\"https://nvd.nist.gov/vuln/detail/CVE-2026-34873\" rel=\"nofollow ugc noopener\">CVE-2026-34873</a> , Mbed TLS 3.5.0–4.0.0: TLS 1.3 session resumption allows client impersonation.<a href=\"#fnref:CVE-2026-34873\">↩</a></p>\n<ol start=\"17\"><li></li></ol>\n<p><a href=\"https://nvd.nist.gov/vuln/detail/CVE-2026-25835\" rel=\"nofollow ugc noopener\">CVE-2026-25835</a> , Mbed TLS 2.18.0–3.6.5 and 4.0.0: the RNG state is cloned across fork, so parent and child produce the same random values.<a href=\"#fnref:CVE-2026-25835\">↩</a></p>\n<ol start=\"18\"><li></li></ol>\n<p><a href=\"https://nvd.nist.gov/vuln/detail/CVE-2026-5194\" rel=\"nofollow ugc noopener\">CVE-2026-5194</a> , wolfSSL 3.12.0–5.9.0: signatures by ECDSA certificates can be forged by providing an ML-DSA or Ed25519 signature algorithm identifier and a trivial ECDSA signature over the zero-length digest.<a href=\"#fnref:CVE-2026-5194\">↩</a></p>\n<ol start=\"19\"><li></li></ol>\n<p><a href=\"https://nvd.nist.gov/vuln/detail/CVE-2026-5501\" rel=\"nofollow ugc noopener\">CVE-2026-5501</a> , wolfSSL through 5.9.0: the OpenSSL compatibility layer skips the leaf’s signature check when any valid end-entity cert is supplied as an “intermediate.”<a href=\"#fnref:CVE-2026-5501\">↩</a></p>\n<ol start=\"20\"><li></li></ol>\n<p><a href=\"https://nvd.nist.gov/vuln/detail/CVE-2026-11310\" rel=\"nofollow ugc noopener\">CVE-2026-11310</a> , wolfSSL 5.8.4–5.9.1: the OpenSSL compatibility layer lets caller-supplied untrusted intermediates act as trust anchors.<a href=\"#fnref:CVE-2026-11310\">↩</a></p>\n<ol start=\"21\"><li></li></ol>\n<p><a href=\"https://nvd.nist.gov/vuln/detail/CVE-2026-11999\" rel=\"nofollow ugc noopener\">CVE-2026-11999</a> , wolfSSL 5.7.4–5.9.1: the OpenSSL compatibility layer accepts any chain longer than the maximum path depth of 100, without reaching a trust anchor.<a href=\"#fnref:CVE-2026-11999\">↩</a></p>\n<ol start=\"22\"><li></li></ol>\n<p><a href=\"https://nvd.nist.gov/vuln/detail/CVE-2026-55960\" rel=\"nofollow ugc noopener\">CVE-2026-55960</a> , wolfSSL 5.6.4–5.9.1: a raw public key is always accepted in place of a certificate, bypassing authentication.<a href=\"#fnref:CVE-2026-55960\">↩</a></p>\n<ol start=\"23\"><li></li></ol>\n<p><a href=\"https://nvd.nist.gov/vuln/detail/CVE-2026-93302\" rel=\"nofollow ugc noopener\">CVE-2026-93302</a> , wolfSSL 5.3.0–5.9.2: trusted-peer certificates are matched by name rather than public key.<a href=\"#fnref:CVE-2026-93302\">↩</a></p>\n<ol start=\"24\"><li></li></ol>\n<p><a href=\"https://nvd.nist.gov/vuln/detail/CVE-2026-89136\" rel=\"nofollow ugc noopener\">CVE-2026-89136</a> , wolfSSL 5.6.0–5.9.2: clients still accept an unsolicited raw public key from the server, bypassing authentication.<a href=\"#fnref:CVE-2026-89136\">↩</a></p>\n<ol start=\"25\"><li></li></ol>\n<p><a href=\"https://nvd.nist.gov/vuln/detail/CVE-2026-89135\" rel=\"nofollow ugc noopener\">CVE-2026-89135</a> , wolfSSL 5.8.4–5.9.2: a failed chain verification in the OpenSSL compatibility layer permanently adds the attacker’s CA to the trust store used by native TLS, OCSP, and CRL checks.<a href=\"#fnref:CVE-2026-89135\">↩</a></p>\n<ol start=\"26\"><li></li></ol>\n<p><a href=\"https://nvd.nist.gov/vuln/detail/CVE-2026-34580\" rel=\"nofollow ugc noopener\">CVE-2026-34580</a> , Botan 3.11.0: an end-entity certificate whose DN matches a trusted root is accepted as if it were that root.<a href=\"#fnref:CVE-2026-34580\">↩</a></p>\n<ol start=\"27\"><li></li></ol>\n<p><a href=\"https://nvd.nist.gov/vuln/detail/CVE-2026-34582\" rel=\"nofollow ugc noopener\">CVE-2026-34582</a> , Botan before 3.11.1: TLS 1.3 servers process application data before Finished, so a client can skip Certificate, CertificateVerify, and Finished entirely, a full client authentication bypass.<a href=\"#fnref:CVE-2026-34582\">↩</a></p>","headings":[{"level":3,"text":"Encrypting data","id":"encrypting-data"},{"level":3,"text":"Symmetric key length","id":"symmetric-key-length"},{"level":3,"text":"Symmetric “signatures”","id":"symmetric-signatures"},{"level":3,"text":"Hash algorithm","id":"hash-algorithm"},{"level":3,"text":"Random IDs","id":"random-ids"},{"level":3,"text":"Password handling","id":"password-handling"},{"level":3,"text":"Key exchange","id":"key-exchange"},{"level":3,"text":"Asymmetric encryption","id":"asymmetric-encryption"},{"level":3,"text":"Asymmetric signatures","id":"asymmetric-signatures"},{"level":3,"text":"Website or client-server application security","id":"website-or-client-server-application-security"},{"level":3,"text":"Online backups","id":"online-backups"},{"level":2,"text":"The picture","id":"the-picture"}]}}