<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>openssh on Daniel Fedick</title>
    <link>https://blog.fedick.net/tags/openssh/</link>
    <description>Recent content in openssh on Daniel Fedick</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 08 Oct 2026 09:08:00 -0400</lastBuildDate>
    <atom:link href="https://blog.fedick.net/tags/openssh/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Assume the Math Will Move: Crypto-Agility After Vitalik&#39;s AI Warning</title>
      <link>https://blog.fedick.net/posts/crypto-agility-vitalik/</link>
      <pubDate>Thu, 08 Oct 2026 09:08:00 -0400</pubDate>
      <guid>https://blog.fedick.net/posts/crypto-agility-vitalik/</guid>
      <description>Vitalik Buterin says AI-accelerated math could shrink crypto security margins, including for lattices. I agree, and I think the answer is crypto-agility: hybrids, swappable algorithms, and migrations you have rehearsed before you need them.</description>
      <content:encoded><![CDATA[<p>On October 7, Vitalik Buterin <a href="https://x.com/VitalikButerin/status/2107976296320106851">posted a long note on X</a> that I keep rereading. He was responding to Justin Drake&rsquo;s call for a crypto <a href="https://cointelegraph.com/news/justin-drake-urges-crypto-bunker-mode-as-ai-could-break-wallet-security-within-months">&ldquo;bunker mode&rdquo;</a>, and his opening line sets the tone: &ldquo;I don&rsquo;t recommend anyone scramble to move their funds to new wallets today. But we should take the risks to cryptography from AI-accelerated math seriously, and minimize our exposure to not just quantum-vulnerable cryptography, but also potentially AI-vulnerable cryptography.&rdquo;</p>
<p>That is a sober take, and most of it is right. Where I land is one word: agility. If the math under our feet can move faster than we planned, the winning property of a system is how quickly and safely it can change what it runs on. Picking the perfect algorithm matters less than that.</p>
<aside class="plain">
<h2 id="in-plain-english">In plain English</h2>
<p>Encryption is a lock on your data. Every lock can eventually be picked, and the tools for picking digital locks keep getting better, now with help from AI. So the smart move is not to hunt for one perfect lock. Use two different locks at once, so a thief has to beat both, and set things up so you can swap in a new lock quickly when an old one starts to look weak. That ability to swap is called crypto-agility, and the rest of this post explains how to build it.</p>

</aside>

<p>This is my first post here, so a quick note on where I come from. I&rsquo;m a cypherpunk at heart. Privacy is a right, your keys are your data, and math beats promises. Don&rsquo;t trust, verify. That applies to Vitalik&rsquo;s argument too, so let&rsquo;s take it seriously.</p>
<h2 id="the-threat-ai-as-cryptanalyst">The threat: AI as cryptanalyst</h2>
<p>Vitalik&rsquo;s threat model is clean. Factoring naively takes 2^(n/2) time, but decades of work produced the number field sieve and cut that to 2^O(n^(1/3)), &ldquo;which is why RSA keys and signatures need to be ~400 bytes (and not 64 bytes).&rdquo; His question: what if there are similar &ldquo;skeletons in the closet&rdquo; for elliptic curves and lattices that humans haven&rsquo;t found, but AI soon will?</p>
<p>He goes further than most people are willing to: &ldquo;So far most people have been in the mode of thinking &rsquo;elliptic curves broken, hashes safe, lattices safe&rsquo;. But there is a good chance that the concrete security of lattices will take serious hits from the next two years of AI math.&rdquo; He also notes AI is another reason ECDSA &ldquo;might fall even faster than expected.&rdquo;</p>
<p>To be clear about what this is: an informed estimate, which he labels as his &ldquo;own personal views.&rdquo; No known attack breaks ML-KEM or ML-DSA today. But I don&rsquo;t need a known attack to act. Cryptanalysis only ever gets better, and the record shows margins shrinking in steps, not smoothly. If AI compresses research timelines, the rational move is to assume your margins erode faster than your roadmap assumed, and to plan for it.</p>
<p>We already have a fresh example that has nothing to do with AI. On September 29, Germany&rsquo;s BSI published <a href="https://www.bsi.bund.de/SharedDocs/Downloads/EN/BSI/Crypto/Notes_Classic_McEliece.pdf?__blob=publicationFile&amp;v=2">notes on Classic McEliece</a>, one of the oldest public-key schemes around, saying it &ldquo;should currently no longer be used in new developments&rdquo; after new cryptanalysis lowered key-recovery estimates. BSI is clear the results &ldquo;do not enable a practical attack&rdquo; on the recommended parameters. Still, a scheme with nearly five decades of scrutiny got repriced in a few months. BSI drew the same lesson I do: the results &ldquo;underline how important it is to pay attention to crypto-agility during the migration because cryptanalytic advances can never be ruled out.&rdquo;</p>
<h2 id="agility-beats-monoculture">Agility beats monoculture</h2>
<p>Here is where I add a layer to Vitalik&rsquo;s view rather than disagree with it. For Ethereum, he backs the lean roadmap&rsquo;s &ldquo;hash-only&rdquo; direction: &ldquo;no lattices, no ML-DSA, no Falcon,&rdquo; with signatures that are &ldquo;all hash-based, either WOTS or SPHINCS-.&rdquo; For lattices you can&rsquo;t avoid, he suggests being &ldquo;much more paranoid on param sizes,&rdquo; and floats multiplying key sizes by 10 for anything meant to be long-term secure.</p>
<p>For signatures, that reasoning is strong, and the rest of the world isn&rsquo;t starting from zero. Hash-based signatures already have a federal standard: <a href="https://csrc.nist.gov/pubs/fips/205/final">FIPS 205 (SLH-DSA)</a>, based on SPHINCS+, published August 13, 2024 alongside <a href="https://csrc.nist.gov/pubs/fips/203/final">FIPS 203 (ML-KEM)</a> and <a href="https://csrc.nist.gov/pubs/fips/204/final">FIPS 204 (ML-DSA)</a>.</p>
<p>But Vitalik himself names the limit: &ldquo;The bigger challenge is for <em>public-key encryption</em>,&rdquo; and there are long-standing results showing it &ldquo;cannot be done with hashes alone.&rdquo; Key exchange needs some structured trapdoor: groups, lattices, codes, or something newer. So for most of us running TLS, SSH, VPNs, and messaging, hash-only is not an option for the part that protects data in transit.</p>
<p>That&rsquo;s why I won&rsquo;t bet everything on one family, lattice or anything else. Monoculture is the mistake we made with RSA and ECC, and it&rsquo;s why this migration is so painful. The hedge is twofold:</p>
<ol>
<li><strong>Hybrids.</strong> Combine a post-quantum scheme with a classical one so an attacker has to break both. BSI says this approach &ldquo;has proven its worth&rdquo;: a hybrid with a weakened Classic McEliece still gives at least classical security, and ML-KEM, FrodoKEM, and HQC aren&rsquo;t affected by the new results. HQC matters here because it&rsquo;s code-based, a different family from the lattice schemes.</li>
<li><strong>Swappable crypto.</strong> Design so that changing an algorithm is a config change and a rollout, not a rewrite. If lattices take a hit, you want to raise parameters or switch families in weeks.</li>
</ol>
<h2 id="migrations-are-where-pqc-actually-fails">Migrations are where PQC actually fails</h2>
<p>The line from Vitalik&rsquo;s post I&rsquo;d put on a poster:</p>
<blockquote>
<p>&ldquo;be careful about migrations; I personally have lost more money in botched migrations than I have lost in all hacks combined.&rdquo;</p>
</blockquote>
<p>Anyone who has run real infrastructure knows exactly what he means. Algorithms rarely fail in production. Operations fail. The certificate nobody knew about expires. A hardcoded cipher list sits in a library three dependencies deep. A rotation script runs for the first time during an incident. A key gets moved and its backup doesn&rsquo;t.</p>
<p>Deadlines are now real for a lot of us. NSA <a href="https://www.nsa.gov/Press-Room/Press-Releases-Statements/Press-Release-View/Article/4615285/nsa-announces-post-quantum-cryptography-measures-to-safeguard-national-security/">announced on October 1</a> that under CNSSP 15, &ldquo;starting in 2027, all new commercial NSS must be capable of supporting quantum-resistant algorithms,&rdquo; and legacy systems that can&rsquo;t are &ldquo;to be phased out by 2030.&rdquo; Whatever sector you&rsquo;re in, the work is the same: know where your crypto lives, make it swappable, and practice the swap until it&rsquo;s boring.</p>
<h2 id="how-to-crypto-agility-you-can-start-this-week">How-To: crypto-agility you can start this week</h2>
<p>Every command below is real and was checked against official docs or release notes. Try them on lab systems first.</p>
<h3 id="1-inventory-find-out-what-youre-actually-negotiating">1. Inventory: find out what you&rsquo;re actually negotiating</h3>
<p>You can&rsquo;t migrate what you can&rsquo;t see. Start with TLS. With OpenSSL 3.5 or later, <code>s_client</code> reports the negotiated key exchange group:</p>

<figure class="code" data-lang="bash">
<figcaption><span class="lang">bash</span><button class="copy" type="button">Copy</button></figcaption><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">openssl version
</span></span><span class="line"><span class="cl"><span class="nb">echo</span> <span class="p">|</span> openssl s_client -connect example.com:443 -servername example.com -brief 2&gt;<span class="p">&amp;</span><span class="m">1</span> <span class="se">\
</span></span></span><span class="line"><span class="cl">  <span class="p">|</span> grep <span class="s2">&#34;Negotiated TLS1.3 group&#34;</span></span></span></code></pre></div>
</figure><p>A hybrid endpoint shows <code>Negotiated TLS1.3 group: X25519MLKEM768</code>. To check whether a server supports the hybrid at all, offer only that group with <code>-groups X25519MLKEM768</code>. If the handshake fails, it doesn&rsquo;t.</p>
<p>For SSH, list the host key types your servers present, and see which key exchange your client actually picks:</p>

<figure class="code" data-lang="bash">
<figcaption><span class="lang">bash</span><button class="copy" type="button">Copy</button></figcaption><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">ssh-keyscan host.example.com
</span></span><span class="line"><span class="cl">ssh -v host.example.com <span class="nb">exit</span> 2&gt;<span class="p">&amp;</span><span class="m">1</span> <span class="p">|</span> grep <span class="s2">&#34;kex: algorithm&#34;</span></span></span></code></pre></div>
</figure><p>Script these across your fleet and write the results down. That list is your migration map.</p>
<h3 id="2-openssh-confirm-hybrid-key-exchange-then-test-hybrid-signatures">2. OpenSSH: confirm hybrid key exchange, then test hybrid signatures</h3>
<p>Check your version with <code>ssh -V</code>. Since <a href="https://www.openssh.com/releasenotes.html">OpenSSH 10.0</a>, the hybrid <code>mlkem768x25519-sha256</code> is the default key exchange. If you manage <code>KexAlgorithms</code> explicitly, make sure it leads the list. In <code>ssh_config</code> or <code>sshd_config</code>, a leading <code>^</code> places your choice at the head of the default set:</p>

<figure class="code" data-lang="text">
<figcaption><span class="lang">text</span><button class="copy" type="button">Copy</button></figcaption><pre tabindex="0"><code>KexAlgorithms ^mlkem768x25519-sha256</code></pre>
</figure><p><code>ssh -Q kex</code> lists what your build supports. Since 10.1 the client warns when a connection negotiates non-post-quantum key agreement, and 10.6 adds the same <code>WarnWeakCrypto</code> logging on the server, on by default. Leave those warnings on. They&rsquo;re free inventory.</p>
<p>OpenSSH 10.6, released October 6, enables the hybrid <code>ssh-mldsa44-ed25519</code> signature algorithm (ML-DSA-44 plus Ed25519). Try it somewhere low-stakes:</p>

<figure class="code" data-lang="bash">
<figcaption><span class="lang">bash</span><button class="copy" type="button">Copy</button></figcaption><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">ssh-keygen -t mldsa44-ed25519 -f ~/.ssh/id_mldsa44_ed25519
</span></span><span class="line"><span class="cl">ssh -i ~/.ssh/id_mldsa44_ed25519 -o <span class="nv">IdentitiesOnly</span><span class="o">=</span>yes lab-host.example.com</span></span></code></pre></div>
</figure><p>Add the <code>.pub</code> to <code>authorized_keys</code> on a 10.6 lab host first. One gotcha from the release notes: keys made with the earlier experimental support &ldquo;must be regenerated and/or removed,&rdquo; because the algorithm name dropped its <code>@openssh.com</code> suffix. That&rsquo;s a small migration in itself. Treat it as practice.</p>
<h3 id="3-tls-prefer-hybrid-groups-where-you-can">3. TLS: prefer hybrid groups where you can</h3>
<p>OpenSSL 3.5 supports <code>X25519MLKEM768</code>, and on my test box it&rsquo;s what a 3.5 client negotiated by default against a hybrid-capable server. For nginx built against OpenSSL 3.5 or later, the <a href="https://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_ecdh_curve"><code>ssl_ecdh_curve</code></a> directive sets the groups the server supports, in order:</p>

<figure class="code" data-lang="nginx">
<figcaption><span class="lang">nginx</span><button class="copy" type="button">Copy</button></figcaption><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-nginx" data-lang="nginx"><span class="line"><span class="cl"><span class="k">ssl_protocols</span> <span class="s">TLSv1.3</span> <span class="s">TLSv1.2</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"><span class="k">ssl_ecdh_curve</span> <span class="s">X25519MLKEM768:X25519:prime256v1</span><span class="p">;</span></span></span></code></pre></div>
</figure><p>Hybrid first, classical fallback for older clients. Then verify with the <code>s_client</code> check from step 1. Don&rsquo;t trust the config. Trust the handshake.</p>
<h3 id="4-keep-algorithm-choices-in-config">4. Keep algorithm choices in config</h3>
<p>Swapping algorithms should be a config change, not a code change. Grep your codebase for hardcoded curve names, cipher suites, key sizes, and <code>KexAlgorithms</code> strings. Move them into config that&rsquo;s version-controlled, reviewed, and deployed like any other change. The <code>^</code>, <code>+</code>, and <code>-</code> prefixes in OpenSSH and the colon-separated group lists in OpenSSL exist for this reason. If raising a parameter set or dropping a family means a code release in five repos, your agility exists only on paper.</p>
<h3 id="5-rehearse-rotation-with-short-lived-credentials">5. Rehearse rotation with short-lived credentials</h3>
<p>The best way to make rotation safe is to do it so often it stops being an event. Let&rsquo;s Encrypt <a href="https://letsencrypt.org/2026/10/07/64-day-certs">announced on October 7</a> that starting February 10, 2027, its default certificate lifetime drops to 64 days, with 45-day defaults coming in 2028. Its advice: if your renewals are hard-coded to a date from expiration, &ldquo;update them to renew at approximately ⅔ of the lifetime instead,&rdquo; and &ldquo;grep for common hardcoded numbers like 83, 80 or 60 in cron jobs, wrapper scripts and runbooks.&rdquo; If your ACME client supports ACME Renewal Info (ARI), the CA can tell it when to renew.</p>
<p>Do that, and extend the idea past web certs. Short-lived SSH certificates instead of long-lived keys. Automated reload and deploy. Alerting on renewal failure. Then run a game day: rotate a key or swap an algorithm on purpose, on a schedule, and see what breaks. Every rotation you rehearse now is one you won&rsquo;t botch during an incident.</p>
<h2 id="the-close">The close</h2>
<p>Vitalik is right to take AI-accelerated cryptanalysis seriously, right that hash-based signatures are the conservative choice where they fit, and right that migrations hurt more than hacks. My addition is that none of us knows which assumption breaks next. It could be ECDSA, a lattice parameter set, or a code-based scheme that already survived nearly fifty years, as McEliece just showed.</p>
<p>So don&rsquo;t bet the house on one family. Run hybrids. Keep algorithms in config. Know where every key lives. Rotate often enough that it&rsquo;s boring. Math over promises, and operations over hope.</p>
<p><em>Views are my own and do not represent my employer. Nothing here is financial advice.</em></p>
]]></content:encoded>
    </item>
  </channel>
</rss>
