Note
ssh-audit: Tinfoil Hat Included, Probably Justified
A colleague of mine likes to run ssh-audit against our servers. If you haven't used it: it's a little Python tool that connects to your SSH daemon, enumerates every algorithm it offers — key exchanges, host keys, ciphers, MACs — and grades each one. Most security scanners give you clinical output like "weak cipher" or "deprecated hash." ssh-audit gives you this:
(kex) ecdh-sha2-nistp256 -- [fail] using elliptic curves that are suspected as
being backdoored by the U.S. National Security Agency
Not "weak parameters." Not "discouraged." A flat accusation that the NIST elliptic curves — the ones baked into FIPS, the ones your compliance scanner probably requires — were rigged by the NSA. The tool flags ecdh-sha2-nistp256/384/521 and ecdsa-sha2-nistp* host keys as failures for exactly this reason.
My first reaction: okay, this author is a bit psychotic. My second reaction, after reading the receipts: he's about 99% certain to be correct anyway. Let me walk you through it.
NOTE: I don't care all that much whether the curves were backdoored or not. Firstly, I think Edward Snowden should hang for treason for starting this whole "suspect NIST curves" narrative. Secondly, the NSA backdoors everything they touch, and the US Federal Government aggressively supports that agenda. Thirdly, I think Testa is right but not necessarily in a way that can be acted upon immediately.
The tool itself
Before the conspiracy corner: ssh-audit is genuinely excellent. It's maintained by Joe Testa of Positron Security, who forked it from the abandoned arthepsy/ssh-audit in 2019. Point it at a host and it reports every algorithm your SSH server negotiates, plus:
- Known-attack flags — Terrapin (CVE-2023-48795), Logjam, broken SHA-1
- A
--dheatmode that actually stress-tests your server's resistance to the DHEat CPU-exhaustion attack - Policy auditing (
-P) against built-in hardening baselines for Debian, Rocky, OpenSSH versions, etc. - Built-in hardening guides (
--list-hardening-guides) as of v3.9.0 - Client auditing, JSON output, GEX modulus testing — the works
It's the kind of tool that belongs in every sysadmin's pocket. It just happens to be maintained by a man who Trusts No One. He flagged the NIST curves. He also flags Russian GOST algorithms as "using untrusted algorithm developed in secret by a government entity" — he's at least an equal-opportunity skeptic.
The receipt: Dual_EC_DRBG
The accusation isn't pulled from thin air — it's extrapolated from the one time we caught them doing it. The timeline:
- 2004–2006: The NSA designed a random number generator called Dual_EC_DRBG and shepherded it through ANSI and into NIST SP 800-90A. Per the Snowden documents, the NSA reportedly functioned as the standard's sole editor.
- 2007: Microsoft's Dan Shumow and Niels Ferguson gave a now-famous Crypto rump-session talk showing the mechanism: if you know the secret relationship between the two published constants P and Q, you can predict the generator's output — and therefore every key it produces. A backdoor, demonstrated with actual math, six years before anyone proved it was real.
- September 2013: The Snowden disclosures hit. The NYT and ProPublica reported that the NSA's Bullrun program deliberately weakened cryptographic standards — Dual_EC was Exhibit A. NIST immediately recommended against using it.
- December 2013: Reuters reported the kicker: a secret $10 million contract paid RSA Security to make Dual_EC the default RNG in its BSAFE library.
- April 2014: NIST formally removed it from SP 800-90A.
One more chapter that matters: in December 2015, Juniper Networks disclosed unauthorized code in ScreenOS. Someone had re-pointed the Q constant in Juniper's Dual_EC implementation — hijacking the NSA's backdoor for themselves. A backdoored constant is a backdoor for whoever controls it, not just whoever built it.
So when the user says "the NSA backdoored a NIST crypto standard once already" — that's not opinion, that's a court-exhibit-grade fact. It happened, it's documented, and the mechanism was publicly provable.
The suspicion: the P-curves
Now the part that requires the tinfoil hat. The NIST elliptic curves (P-256, P-384, P-521) were published in FIPS 186-2 back in 2000, designed by the NSA's Jerry Solinas. The curve parameters were supposedly generated "verifiably at random": take a seed, run it through SHA-1, derive the curve. Here's P-256's seed:
SEED = c49d3608 86e70493 6a6678e1 139d26b7 819f7e90
Where did the seed come from? Nobody knows. It's not in the standard. When asked years later, Solinas reportedly said the seeds were generated "from the ASCII representation of a humorous message. Unfortunately, we can remember neither the (exact) message nor the details of how we hashed." That's the official provenance of the constants securing a meaningful chunk of the world's encrypted traffic: a joke nobody remembers.
Here's why that keeps cryptographers up at night — and it's subtle, so stay with me. The NSA almost certainly can't invert SHA-1, so they couldn't pick a target curve and work backwards to a seed. But they could hash millions of random seeds and keep the one that produces a curve with a weakness only they know about — if such a weakness exists in some meaningful fraction of curves. Bernstein and Lange's SafeCurves project calls this property "rigidity," and rates the NIST curves as manipulatable: the generation process has a large unexplained input, giving the designer enormous freedom to shop for a weak curve.
Compare with Curve25519 — every single constant derived by an explained, "smallest value meeting the criteria" process. Nothing up the sleeve. That's why OpenSSH made it the default key exchange in 2014 and why every modern client supports it.
My opinion, clearly labeled
Here's my honest read:
- The precedent is real. Not alleged — documented. They did it once, with a standard that lived undetected-in-practice for a decade.
-
But the mechanism isn't. This is where I pump the brakes slightly. Dual_EC's backdoor was demonstrable math — Shumow and Ferguson showed exactly how it worked in 2007. For P-256, nobody has ever shown a backdoor mechanism.
-
Compelling The folks at NIST were told by the NSA to look the other way when they were told to use a specific curve. That's a red flag to anyone with any sense.
-
But circumstantial. Barker and Kelsey say they didn't know about the backdoor.
-
He's in good company. Serious cryptographers have refused to touch NIST curves for over a decade. Not just tinfoil hat wearers.
-
But smart crowds have been wrong in formation before — the same community spent years confidently recommending DES keys for 7 years after I revealed they were compromised as a school project.
-
The same people are still there. This is the one that sounds like a conspiracy theory and is instead just... a personnel lookup. Elaine Barker, the NIST official most associated with SP 800-90A and the Dual_EC era, is still on NIST's Random Bit Generation team. She co-authored a paper comparing SP 800-90 to Germany's AIS 20/31 published January 2026 and a crypto-agility report in June 2026. John Kelsey, another SP 800-90A name, is still on the team too. The people who waved Dual_EC through are, in some cases, literally still curating the same standard.
- But not in the same role. In fairness, the leadership above them changed and NIST did reform its process afterward — NISTIR 7977, more public comment, an external review — so it's not identical to 2006.
The NSA's own CNSA 2.0 suite tells US national security systems to keep using P-384 until they finish migrating to post-quantum. So when the NSA says "use P-384", they probably mean "use the curve that we backdoored but nobody else has broken yet".
The mandate: FIPS
This is the part nobody frames correctly, so let me do it plainly: the suspected-backdoor curves aren't just an option in SSH — for a huge swath of the computing world they're mandatory.
FIPS 140-3 — the cryptographic module validation program underpinning essentially all US federal security compliance — only permits NIST-approved algorithms. For SSH key exchange, the approved menu is the nistp curves plus finite-field DH. Curve25519 is not on it. NTRU Prime is not on it. ChaCha20-Poly1305 is not on it. Even mlkem768x25519 — the post-quantum flagship — is approved ML-KEM glued to unapproved X25519. A FIPS-mode sshd cannot offer any of them.
And "systems that need FIPS" is a much bigger bucket than "the Pentagon":
- NIH controlled-access genomic data — dbGaP and the Genomic Data Sharing policy require FIPS-validated crypto for data in transit
- IRS Federal Tax Information — Publication 1075 mandates FIPS-validated encryption for FTI
- Census FSRDC enclaves — Title 13 data lives in FIPS-bound secure environments
- CMS data use agreements — Medicare and Medicaid research datasets
- DoD CUI — DFARS 252.204-7012 pulls NIST SP 800-171 into contracts, and CMMC enforces it
Which means every research university, hospital system, and contractor touching federal datasets — dbGaP downloads, Medicare claims, tax microdata, DoD research — runs endpoints where the suspect curves are legally required. Negotiate an unapproved key exchange on a system handling that data and you're not hardened, you're noncompliant. And the fallout isn't a wrist slap: failed 800-171 assessments, lost CMMC certification (read: lost eligibility for the contracts themselves), revoked dataset access — and for whoever attested compliance anyway, False Claims Act exposure under DOJ's Civil Cyber-Fraud Initiative.
Sit with the shape of that for a second: the government that plausibly backdoored these curves also requires them of anyone who wants to touch federal data. The same algorithm that's a [fail] in ssh-audit is a [pass] on your FIPS paperwork — same port, same protocol, different threat model. Whatever you believe about the backdoor, the mandate is real — and it's the strongest argument against Testa's hard line that exists.
One honest escape hatch: FIPS requires approved algorithms, not the curves specifically — diffie-hellman-group14-sha256 and friends are also on the approved list, so a FIPS box could technically limp along on classical finite-field DH. But it's slower, it's not what any FIPS baseline actually ships, and it doesn't fix the underlying problem: the approved-algorithm list and the not-suspected-of-being-backdoored list barely overlap. That's the trap — and it's structural, not paranoid.
The 2026 plot twist
Here's where the story gets better: the P-curve fight is becoming moot on its own. OpenSSH 10.0 made mlkem768x25519-sha256 — a hybrid post-quantum key exchange — the default. And ssh-audit v3.9.0 (July 2026) now slaps a not post-quantum safe warning on every classical key exchange, including the beloved Curve25519, citing the Harvest Now, Decrypt Later strategy: adversaries recording your ciphertext today to decrypt with a quantum computer tomorrow.
So run ssh-audit against your hardened server today and the only key exchanges that come back fully clean are mlkem768x25519-sha256 and sntrup761x25519-sha512. The tool's threat model in 2026 is basically: the NSA backdoored your curves, and a quantum computer eats everything else. Grim. Probably accurate.
The practical takeaways, even if you think the NSA talk is overblown:
# sshd_config — modern, non-NIST, PQ-ready where supported
KexAlgorithms mlkem768x25519-sha256,sntrup761x25519-sha512,curve25519-sha256
HostKeyAlgorithms ssh-ed25519,rsa-sha2-512,rsa-sha2-256
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com
Dropping ecdh-sha2-nistp* is not free, and the breakage is not hypothetical — even setting aside the federal mandate covered above:
- Older Cisco IOS XE and JunOS images only speak nistp ECDH.
- iDRAC, iLO, IPMI BMCs, and IP KVMs ship SSH stacks that are a decade old. APC UPS management cards are worse.
- Every copier and scanner doing scan-to-folder over SFTP is running an embedded client from before Curve25519 existed. Storage arrays lag years behind.
- Anywhere a build pinned PuTTY older than 0.68 or libssh2 older than 1.9.0, that job is dead the day you flip the config.
- HPC centers, universities, and enterprises have spent fifteen years teaching users to
ssh-keygen -t ecdsa. It is in the onboarding docs, the wiki, the ticket macros, and the security policy. Drop the nistp key algorithms and every one of those users' keys stops working — then you get to re-key thousands of people and identify all the documentation that needs updating. - Testa doesn't care about the breakage — he's right and that's all that matters.
The verdict
| Question | Answer |
|---|---|
| Is the author a bit psychotic about this? | In my opinion - Yes |
| Is he right? | In my opinion - Yes |
| Was a NIST standard actually NSA-backdoored before? | Yes — Dual_EC_DRBG, confirmed 2013 |
| Are the same people still at NIST? | Barker and Kelsey literally still are |
| Should you disable the nistp curves on your own gear? | By all means. |
| On a system that touches federal data? | No — that's not hardening, it's an audit finding |
The thing I keep coming back to: in security, the paranoid psychos end up being correct an uncomfortably large percentage of the time. Dual_EC was "conspiracy theory" from 2007 to 2013 — then it was a Reuters headline and a $10 million wire transfer. Testa gave a BSides talk on this stuff back in 2017 and has been quietly maintaining the receipts in his algorithm database ever since. A little psychotic. Also probably right. Both can be true.