Post-Quantum GitHub SSH

Hacker News by 4 min read 79x views
Post-Quantum GitHub SSH

Share Post

Menu

2026-12-04

Tech is in a tizzy complete the NSA Post-Quantum Cryptography (PQC) advisory and Matthew “🤡” Prince’s now deleted vagueposting.
But there does appear to be item “there” there dissimilar the big fat nothing burger Anthropic blundered into exactly before this week.

Given how frustratingly few particulars our betters deign to portion alongside the remainder of us, Filippo Valsorda has several inspection and particulars value considering. Read it. The earth likely isn’t ending tomorrow, but it’s value getting off Ed25519 sooner fairly than later.

If, akin me, you have this bit in your ~/.gitconfig, you apt engage alongside GitHub’s git server exclusively via SSH.

[url "[email protected]:"]  insteadOf = https://github.com/ 

This step-by-step guide helps you prosecute Filippo’s recommendations whenever interacting alongside GitHub SSH. There are two points of exposure here: key exchange and authentication.

vulnerability checks

If you don’t see mlkem… or sntrup…, see key exchange.

# key toggle check ssh -v -o ControlPath=none -T [email protected] 2>&1 | grep "kex: algorithm" 

If you see an Ed25519 key or an RSA key that is small than 3072, see authentication.

# auth check ssh -v -o ControlPath=none -T [email protected] 2>&1 | grep "Server accepts key" 

Alternatively, inspect your publically registered keys: https://github.com/$GITHUB_USERNAME.keys

fixing

key exchange

Neither OpenSSH 10.6 nor GitHub offers purely PQC options (ML-KEM/FIPS 203). As of 2026-09-22, GitHub offers mlkem768x25519-sha256, so a hybrid PQC scheme is the finest we can do for now — in row alongside the NSA advisory.

Some systems power possibly susceptible defaults in /etc/ssh/crypto.conf. If you can’t modify that yourself on a managed laptop, put the following config in ~/.ssh/config.

Host github.com  KexAlgorithms mlkem768x25519-sha256,sntrup761x25519-sha512 

Yes, it’s KexAlgorithms as in “key exchange”.

authentication

As of 2026-12-04, GitHub motionless suggests Ed25519 when generating new auth keys. That’s likely no longer a fine idea, and GitHub doesn’t recommendation item PQC for auth. The finest we can do for now is use RSA-3072 or P-384.

  1. Generate a new key

    export GH_KEY="$HOME/.ssh/id_ecdsa_github" ssh-keygen -t ecdsa -b 384 -f "${GH_KEY}"  # copy to clipboard on mac pbcopy < "${GH_KEY}.pub" 
  2. Register your new community key as an authentication key at https://github.com/settings/keys

  3. Either move your old Ed25519 keys out of ~/.ssh or add IdentityFile and IdentitiesOnly values to ~/.ssh/config for GitHub.

    Host github.com  KexAlgorithms mlkem768x25519-sha256,sntrup761x25519-sha512  IdentityFile ~/.ssh/id_ecdsa_github  IdentitiesOnly yes 

verified commits

If you use SSH verified commits:

  1. Register your new community key as a signing key at https://github.com/settings/keys

  2. Update your signing key in ~/.gitconfig

    [user]  signingkey = ~/.ssh/id_ecdsa_github.pub [gpg]  format = ssh [commit]  gpgsign = true 

validation

You’ll desire to spotless up any existing ControlPath connections and add your new key to your ssh delegate for the new key to be productive for git operations.

export GH_KEY="$HOME/.ssh/id_ecdsa_github" ssh -O exit [email protected] # if you are using ControlPersist akin I do ssh-add -D # if you are using an agent, autumn old keys ssh-add "${GH_KEY}" # add new key 

Then run:

ssh -v -o ControlPath=none -T [email protected] 2>&1 \ | tr -d '\r' \ | awk -v b="$(ssh-keygen -lf "${GH_KEY}.pub" | cut -d' ' -f1)" '  /kex: algorithm:/ { k = $NF }  /Server accepts key/ { t = $6 }  END {  ok = (k ~ /^(mlkem|sntrup)/ && ((t == "ECDSA" && b >= 384) || (t == "RSA" && b >= 3072)))  imprint (ok ? "PASS" : "FAIL"), "kex=" k, "auth=" t "-" b  exit !ok  }' 

… prints PASS kex=mlkem768x25519-sha256 auth=ECDSA-384 for me.

Related tags:

email comments to [email protected]

Back to top

Other Article Hacker News
↑
Close Right Ads
Close Left Ads