{"slug": "codex-cli-on-macos-doesn-t-use-post-quantum", "title": "Codex CLI on macOS doesn't use post quantum", "summary": "OpenAI's Codex CLI v0.173.0 on macOS falls back to TLS 1.2 and never offers post-quantum key exchange, according to a Greywatch analysis by security firm Greyhaven that logged 625 such requests to OpenAI/ChatGPT endpoints. Greywatch recorded 7,884 connections across 435 destinations in 24 hours, with 84% post-quantum (X25519MLKEM768), 15% insufficient (P-256 or X25519) and under 1% interim secure; the Codex CLI gap stems from the reqwest Rust crate defaulting to native-tls, which uses Apple's deprecated Secure Transport API frozen at TLS 1.2. Greyhaven filed GitHub issue 65611 asking OpenAI to prefer rustls with prefer-post-quantum enabled, since the company does not accept external pull requests.", "body_md": "# Is my computer post-quantum ready?\n\nThe internet has been [freaking](https://x.com/eastdakota/status/2128329678633287903) [out](https://x.com/elonmusk/status/2128358091607642482) [over](https://x.com/i2cjak/status/2128344520987467995) the recent NSA [directive](https://www.nsa.gov/Press-Room/Press-Releases-Statements/Press-Release-View/Article/4662430/nsa-advises-immediate-transition-to-post-quantum-cryptography-to-protect-nation/) on the need to immediately transition to Post-Quantum cryptography. This was later followed by a [joint statement](https://openai.com/index/joint-statement-post-quantum-cryptography/) between OpenAI, Apple, Cloudflare, Google, Microsoft and Oracle, in strong support.  \n\nThe information and fear around this process was exacerbated by an [ill timed release](https://github.com/anthropics/formal-math/tree/main/lattices) of a theoretical attack on certain module-lattice cryptography including ones similar to ML-KEM and ML-DSA (the current NIST standards for structured-lattice PQC) which was [deemed not to be practical](https://cirg.org/statements/1/).\n\nCryptography engineer (and fellow [Recurse](https://recurse.com) alum) Filippo Valsorda quickly wrote [his take](https://words.filippo.io/nsa-advisory/) on the NSA advisory.  I've distilled his recommendations to three categories: post-quantum ready, interim solutions, and insufficient ones. For TLS the recommendations are: `X25519MLKEM768` hybrid encryption if you can, and `RSA-3072/P-384` if you aren't able to.  Any classical keys smaller than that should be replaced immediately.  According to Cloudflare Radar [~72.8% of the traffic they monitor](https://radar.cloudflare.com/post-quantum) is post-quantum ready.\n\nAt Greyhaven, we've been using our kernel-level visibility tool [Greywatch](https://greywatch.co/) to understand the ground truth of what network calls agents and their sub processes are *actually* making on our machines.  When we read this NSA directive we quickly extended the tool to analyze all TLS client connections on our devices and find out what services we're using are really ready.\n\nAfter running Greywatch for the last 24 hours on my machine, the numbers locally look slightly better.  Out of 7,884 connections, across 435 destinations, 84% of connections are post-quantum (`X25519MLKEM768`), 15% are insufficient (` P-256` or `X25519`), and less than 1% are interim secure (14 requests to VSCode-related Microsoft destinations were `P-384`).\n\nThings started to get more interesting when we dug into the insufficient requests.\n\nML-KEM requests were offered to 71 of the 84 hosts, and denied. Connections in this category included requests to Github, fly.io, Apple, and NPM. For 13 of the hosts, clients running on my device never even offered a post-quantum scheme. This category ironically enough included 625 requests to OpenAI/ChatGPT endpoints. My initial thought was that we may have misconfigured something when adding the additional ClientHello peeking to our Greywatch endpoint client, however after further investigation all of these requests originated from the codex-cli (v0.173.0), and it's open-source, so we were able to easily understand why this was happening.\n\nWhile the OpenAI servers support TLS 1.3 and `X25519MLKEM768`, the Codex CLI defaults uses the `reqwest` rust crate with [default features](https://github.com/openai/codex/blob/rust-v0.173.0/codex-rs/Cargo.toml#L484).  This means that it defaults to the `native-tls` rust crate.  This crate uses Apple's [deprecated Secure Transport TLS API](https://developer.apple.com/documentation/security/secure-transport), which is frozen at TLS 1.2.  So regardless of upstream support, the cli on macOS falls back to TLS 1.2 which does not contain the new post-quantum exchange.  We've opened a [issue](https://github.com/openai/codex/issues/65611) in codex (as they don't accept external PRs) to prefer rustls as the tls backend for `reqwest` with `prefer-post-quantum` enabled.\n\nSo what are the take aways after this experiment? Well anecdotally, post-quantum TLS adoption is higher than we expected, but the biggest take away is that updating your servers is not enough to be post-quantum TLS ready. You must also look at all clients connecting to your servers and ensure they are updated to support these new protocols as well.\n\nAre you interested in learning more about what services are running on your devices and what you can do to stay secure? Give us a [shout](mailto:info@greyhaven.co).\n\nSoftware engineer and artist building at the edge of privacy, security, and open source.", "url": "https://wpnews.pro/news/codex-cli-on-macos-doesn-t-use-post-quantum", "canonical_source": "https://greyhaven.co/insights/is-my-computer-post-quantum-ready", "published_at": "2026-12-04 14:54:03+00:00", "updated_at": "2026-12-04 15:18:02.129308+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "ai-tools"], "entities": ["OpenAI", "Codex CLI", "Greyhaven", "Greywatch", "Apple", "Filippo Valsorda", "NSA", "Cloudflare"], "also_reported_by": [], "takeaway": "Codex CLI v0.173.0 on macOS uses reqwest's default native-tls backend, which relies on Apple's deprecated Secure Transport API frozen at TLS 1.2, so it never offers X25519MLKEM768 even though OpenAI's servers support it; switching to rustls with prefer-post-quantum fixes it.", "recommendation": {"advice": "Audit your agent's TLS backend: if it uses reqwest's default native-tls on macOS, switch to rustls with prefer-post-quantum enabled, since native-tls caps at TLS 1.2 and drops post-quantum key exchange.", "playbook": "agent-security", "playbook_url": "https://wpnews.pro/playbooks/agent-security"}, "alternates": {"html": "https://wpnews.pro/news/codex-cli-on-macos-doesn-t-use-post-quantum", "markdown": "https://wpnews.pro/news/codex-cli-on-macos-doesn-t-use-post-quantum.md", "text": "https://wpnews.pro/news/codex-cli-on-macos-doesn-t-use-post-quantum.txt", "jsonld": "https://wpnews.pro/news/codex-cli-on-macos-doesn-t-use-post-quantum.jsonld"}}