What broke when I enabled PQC for Git and SSH

(nordlenord.github.io)

104 points | by tukHelix 5 hours ago

15 comments

  • bloopernova 36 minutes ago
    I set up gnupg with signing and auth subkeys on my yubikey just yesterday. Gemini Neon was very helpful.

    So my git commits are signed via the yubikey. My git pushes and pulls are authenticated using the yubikey via gpg-agent with ssh support enabled. I also have this forwarded over ssh to my headless Linux box, so I can sign, push, and pull there too.

    The yubikey doesn't support post quantum keys, so I've set mine to rotate and expire. I'm going to write a tracking site for all the pieces of PQ cryptography used in this setup, so I get a pretty picture of where things are at any given point.

    • NavinF 9 minutes ago
      Do you touch the yubikey for every commit? These days half my messages to an AI agent results in a commit so that would be way too often.

      Also seems more practical to just use whatever hardware comes with your laptop. fTPM, Apple Secure Enclave, etc. That also gets you biometric 2fa for free. I use yubikey for login only because it’s physically easier to stash than a phone/laptop with a passkey

      • aaronmdjones 5 minutes ago
        This is configurable. You can set the touch policy for the slot when generating/importing the key, and, if you have not set it to require a touch every time by force (known as a fixed touch policy), you can change it later. If you did fix the policy, you have to erase the private key and generate/import it again to change it.

             $ ykman openpgp info
            [...]
            Require PIN for signature:  Once
            Touch policies:            
              Signature key:      On (fixed)
              Encryption key:     On (fixed)
              Authentication key: On (fixed)
  • a012 3 hours ago
    Apple ships stable but old softwares. I use brew to install new packages and update PATH then forget those default binaries.
    • politelemon 26 minutes ago
      > stable but old softwares

      This is now considered a liability.

      • sigmoid10 9 minutes ago
        There is no such thing as stable and new. There is just stable and maintained or stable without continued support. Apple falls heavily into the latter with their release and EOL schedules.
  • whacked_new 3 hours ago
    I'm about to start this journey so this is good information. Based on this report, reflexively, my gut feeling is to nix-pin everywhere and call it a day, hopefully?
  • Tepix 2 hours ago
    Related: This OpenSSH PR https://github.com/djmdjm/openssh-portable-wip/pull/14 "Implement ssh-mldsa87-p384 and certificate format" looks promising. (Not mine)
  • doyoon_123 30 minutes ago
    the apple one is nasty. one new sig algorithm name in a shared ssh config and apple's /usr/bin/ssh just aborts, for every host. anything hardcoding /usr/bin/ssh keeps doing that even after you install 10.6p2 too. git was easy by comparison, conda-forge build w/ openssl 3.6.5
  • pknerd 3 hours ago
    A dumb question, all this crypto saga going on, as a developer, is it an opportunity to learn something related to quantum thing or all this crypto thing is being taken care by big tech firms only?

    My point is, is it an opportunity to learn a skill, offer it to individuals and make money?

    • bawolff 2 hours ago
      There is always an opportunity to learn new things.

      However the current situation doesn't change much. We dont know the nature of the break, and even if we did, it probably wouldnt matter much, as PQC already has about a decade of effort behind it.

      If you want to learn new things, by all means, learn new things. However nothing is manifestly different in terms of what you should learn compared to a month ago.

      As far as big tech goes - big tech is made up of people. You could always be one of them. There are also plenty of academics in this area not working for big tech.

      If you just mean, be some sort of PQC transition consultant, i'm doubtful. In a few months most of this transition is going to be run apt-get upgrade and maybe regenerate your ssh key. There are jobs in more complex areas, but its definitely not a get rich quick sort of thing.

    • dingdongditchme 1 hour ago
      A great place to start is "The Code Book" by Simon Singh. Easy read and gives historical context without dwelling too much on the math. Must read for any software developer imho. Once you've been through that you can choose what topics to focus on in more depth.
    • edoceo 3 hours ago
      For the advanced crypto part of this, like the maths, it's a steep hill.

      For a time there may be opportunity for the scan/audit, update, test, deploy to live sys-admin work. However, I think many will depend on their existing vendors to sort this, like they do many other things (PHP, log4j, whatever thing we had in 2016, etc).

    • whilenot-dev 2 hours ago
      As a developer, there's always the opportunity to learn about cryptography and any modern textbook has at least one chapter on PQC.

      I found Secret Key Cryptography[0] to be aimed at developers, as it contains very little math. Then there's Serious Cryptography[1] with some math, its accompanying book Crypto Dictionary[2] could be helpful as well. And then there are some more math heavier introductions like Introduction to Cryptographic Definitions[3], which are more about cryptographic security.

      Like the sibling comment already said, learning more about crypto makes you more comfortable in sys admin tasks around its handling and auditing.

      [0]: https://www.manning.com/books/secret-key-cryptography

      [1]: https://nostarch.com/serious-cryptography-2nd-edition

      [2]: https://nostarch.com/crypto-dictionary

      [3]: https://link.springer.com/book/10.1007/978-3-031-91969-5

    • magnio 3 hours ago
      You think the AI models that find multiple breakthroughs in cryptography in a month can't help individuals change their SSH keys?
      • pknerd 3 hours ago
        no, I think that not every individual has capability and domain knowledge to use AI.
        • 0c3ca83 3 hours ago
          Why do you believe they're knowledgeable enough to ask you, but not knowledgeable enough to ask an AI?
          • pknerd 2 hours ago
            The existence of tech companies in different niches and lame SaaS apps makes me believe so. It's kind of weird to think that laymen know all this stuff when even many CSS people have no idea about it
          • klabetron 19 minutes ago
            Flashback to my first IT gig: installing Y2K patches for a local business. (I wasn’t even in high school yet… so a small business knew they needed to do something but were cheap enough to hire a kid.)

            “Oh, you should ask Matt, he’s good at computering.”

    • medellin 2 hours ago
      Figure it out yourself
      • dingdongditchme 1 hour ago
        Although your comment is a snide comment, I too feel that the question is poorly phrased:

        > My point is, is it an opportunity to learn a skill, offer it to individuals and make money?

        The answer is obviously yes, you can make money peddling the most basic shit. It rarely has to do with super great expertise. Software developers (myself included) sometimes have this weird preconception that they have to be the greatest algorithmic slinging mastermind to provide a service to the world that people are willing to pay for.

      • pknerd 1 hour ago
        Ok boomer
  • dreamcompiler 1 hour ago
    But what about Git's own hash algorithm for commits? They're moving to SHA-256 but I read the NSA notice as suggesting SHA-256 should be replaced too.
  • raphinou 2 hours ago
    Maybe I'm not well awake yet, but what key exchange is there in git?
    • Dagonfly 53 minutes ago
      Git over SSH: SSH uses a ephemeral session key when establishing a connection to the server. Just like TLS.

      > ssh -v git@github.com 2>&1 | grep -i "kex"

      Should show MLKEM.

      That's different from your identity key, which is the one used for authN.

    • dns_snek 2 hours ago
      Git over HTTPS, so regular TLS.
      • zzq1015 1 hour ago

          curl -v https://github.com/robots.txt |& grep "SSL connection"
          * SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256 / x25519 / id-ecPublicKey
        
        At least GitHub doesn't have PQ key exchange, let alone PQ auth. Oops

        Strangely, GitHub has git over SSH support and has PQ key exchange.

    • arionmiles 2 hours ago
      GPG signing for commits?
      • progval 2 hours ago
        Commit signatures don't use a key exchange. Only a PKI, which is external to Git.
      • Zizizizz 2 hours ago
        You can sign with ssh too (just fyi)
  • globular-toast 2 hours ago
    There's a line break setting that breaks randomly mid-word without hyphenation? Is this a hipster thing? I would check the source but I'm in my phone.
    • rkangel 39 minutes ago
      It's also doing some strange unnecessary breaks halfway through things like conda-forge.
    • aquasync 1 hour ago
      Seems to be `word-wrap: break-word`. Not seen it before either.
      • cubefox 1 hour ago
        Asian websites use it (they don't do the hyphenation thing over there), but the setting is clearly wrong for English.
    • cpach 1 hour ago
      Yeah that looks really weird. Never seen this before.
  • listinglens 45 minutes ago
    [dead]
  • charan345 3 hours ago
    [dead]
  • oniconnect 4 hours ago
    [dead]
  • mahmoudrabea 1 hour ago
    [dead]
  • irishcoffee 4 hours ago
    Tl;dr: Apple and Ubuntu. What a shocker.
    • madduci 3 hours ago
      Apple still shipping also Bash 3.2 is quite bonkers
      • LoganDark 3 hours ago
        They won't ship a newer version because the license changed from GPLv2 to GPLv3. Apple avoids GPLv3 completely. This is almost certainly why they switched to Zsh instead.

        The leading theories on why are either the anti-tivoization clause or the patent grant. Apple allows alternative operating systems only on Mac, and they don't want any risk of their patent portfolio being compromised.

        • dingdongditchme 1 hour ago
          Allowing alternative operating systems on Mac is awesome! But why do they do that in the first place would be my question?