r/git • • 9h ago

support post-quantum encryption

NSA advisory about changing to post-quantum encryption. Does git have anything specific for ssh we can use to comply? Also, since I use github, I hope they are on the same page with it.

Thanks.

0 Upvotes

9 comments sorted by

38

u/waterkip detached HEAD 9h ago

Thats openssh's job. Not git.

-52

u/wjrasmussen 9h ago

So you don't know. My bad, I assumed someone might have dealt with this and had a solution and wouldn't be a punk about it.

31

u/waterkip detached HEAD 9h ago edited 8h ago

No, git has nothing to do with the transport layer. You can configure custom commands via core.sshCommand to add options to the default invocation of how git calls your ssh client. However, openssh needs to be able to understand that (or whatever your ssh client is, but I'm assuming openssh in any normal environment).

But, if you teach your ssh to use post quantum sshkeys, and the forges can deal with those kind of keys, you don't need to do anything special with git.

Therefore: me telling you that it is another layer that is responsible for it has nothing to do with me (not) knowing it.

14

u/JustAnAverageGuy 6h ago

lol wow. Take about 10% off the top there bud. You seem to be the one here who doesn't know, and you're the one being a punk about it.

Git does not manage or implement security for you. Encryption issuing authorities, like OpenSSH, are responsible for this.

You should already have a _basic_ understanding of this if you're in IT.

9

u/quarethalion 6h ago

Are you conflating commit SHAs with cryptography?

17

u/Rimrul 9h ago

 Does git have anything specific for ssh we can use to comply?

Does your ssh implementation have anything you can use to comply? If so, that.

9

u/latkde 9h ago edited 9h ago

There are two aspects here: the long-lived keys for authenticating yourself to an SSH server, and the concrete SSH session, which involves negotiating of a session key for the actual encryption. For SSH sessions, PQC is already common.

No Git-level changes are needed, this all depends on the SSH client library and the servers you connect to. The GH blog post shows how you can check your SSH connections.

Similarly, PQC is already common for HTTPS connections.

Long-lived PQC keys (for authentication/signing) aren't common though. While OpenSSH supports the hybrid mldsa44-ed25519 key type, it's not yet widely supported in other libraries – but expect the ecosystem to catch up quickly over the next few months. GitHub doesn't currently support it, but there's a community feedback ticket about this:

The situation here is less urgent. Authentication is interactive, so there's no collect-now-decrypt-later threat scenario. We should move to PQC authentication before ECC and RSA are broken, but there's no plausible indication that they're already broken. For the foreseeable future, current keys are still secure for authentication.

2

u/Motor-Concentrate788 5h ago

Openssh already has post-quantum encryption.

1

u/Broad-Promise6954 ancient 1h ago

Worth mentioning: not only does Git specifically not do any ssh or https style encryption (those are foisted off onto ssh and libcurl respectively), it doesn't even do its own work for commit and tag signing. The signing, if any, is done with an external program (usually pgp/gpg).

If you're concerned about spoofing SHA-1 or even SHA-256 hash IDs, that's another matter, but that's quite separate from the ssh/pgp/gpg issues.