NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
▲How to find and upgrade SSH and PGP keys using P‑256, ED25519, and Curve25519 (sethmlarson.dev)
dogcow 1 days ago [-]
The more pressing issue is making sure your key exchange algorithm is set to using post-quantum hybrid algos.

The current threat is "store now, decrypt later," so you want to make sure the traffic flow is sufficiently secured.

The SSH keys you use to log in are for authentication only, not encryption. For authentication, there's not a current known threat because someone would have to have a computer capable of cracking your key right now, in real-time.

You can add the following line to your server's sshd_config file to ensure you only accept post-quantum hybrid key exchange algorithms.

  KexAlgorithms mlkem768x25519-sha256,sntrup761x25519-sha512,sntrup761x25519-sha512@openssh.com
Similarly, on your clients, you can add a KexAlgoritms entry under 'Host *' in ~/.ssh/config/
zzq1015 1 days ago [-]
Before doing any of these, please check your sshd version and crypto capabilities. Otherwise, you could lose access to ssh.

  > sshd -V
  OpenSSH_10.6p2, OpenSSL 4.1.1 1 Dec 2026
  > ssh -Q kex
  diffie-hellman-group1-sha1
  diffie-hellman-group14-sha1
  diffie-hellman-group14-sha256
  diffie-hellman-group16-sha512
  diffie-hellman-group18-sha512
  diffie-hellman-group-exchange-sha1
  diffie-hellman-group-exchange-sha256
  ecdh-sha2-nistp256
  ecdh-sha2-nistp384
  ecdh-sha2-nistp521
  mlkem768nistp256-sha256 -> PQ, but NIST P-256 lol
  curve25519-sha256
  curve25519-sha256@libssh.org
  sntrup761x25519-sha512 -> PQ
  sntrup761x25519-sha512@openssh.com -> PQ
  mlkem768x25519-sha256 -> PQ
Check with sshd -t after changing the config.
evil-olive 1 days ago [-]
you can also ssh to a live server with -vv (double verbose is important, single verbose won't give you these full details) to see the actual details of the protocol negotiation.

for example, this is within my homelab, where I know all clients and servers are on the latest OpenSSH so I can lock the options down:

    debug2: KEX algorithms: mlkem768x25519-sha256,sntrup761x25519-sha512,ext-info-c,kex-strict-c-v00@openssh.com
    debug2: host key algorithms: ssh-ed25519
    debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes256-gcm@openssh.com
    debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes256-gcm@openssh.com
    debug2: MACs ctos: hmac-sha2-512-etm@openssh.com
    debug2: MACs stoc: hmac-sha2-512-etm@openssh.com
    debug2: compression ctos: none,zlib@openssh.com
    debug2: compression stoc: none,zlib@openssh.com
zzq1015 1 days ago [-]
Looks good except you can change the line in your config:

  KexAlgorithms mlkem768x25519-sha256,sntrup761x25519-sha512,sntrup761x25519-sha512@openssh.com
sntrup761x25519-sha512@openssh.com has been supported since OpenSSH 8.5 back in March 2021
pavinjoseph 1 days ago [-]
The entire point of having hybrids was to hedge against relatively new and untested PQC algos like ML-KEM/DSA. But now that p256, curve25519, etc. would soon be obsolete I hope these would be swapped out in hybrids with stronger ones.

What a mess!

zzq1015 1 days ago [-]
TBH, OpenSSH is the LEAST messy and most PQ-ready software for now. SNTRUP, a PQ algo, has been supported since March 2021

For a hybrid algorithm you have to break BOTH to decrypt anything

pavinjoseph 1 days ago [-]
But the other pair in the hybrid has to be strong too. Can't have one known-to-be-broken (p256, ed25519) one paired with a relatively new (mldsa) but not yet broken one.

Btw, it's the first time I'm hearing about sntrup. It's not available in OpenSSH 10.6.

    pavin@suse-pc:~> ssh -V
    OpenSSH_10.6p2, OpenSSL 3.5.3 16 Sep 2025
    pavin@suse-pc:~> ssh -Q key
    ssh-ed25519
    ssh-ed25519-cert-v01@openssh.com
    sk-ssh-ed25519@openssh.com
    sk-ssh-ed25519-cert-v01@openssh.com
    ssh-mldsa44-ed25519
    ssh-mldsa44-ed25519-cert
    ecdsa-sha2-nistp256
    ecdsa-sha2-nistp256-cert-v01@openssh.com
    ecdsa-sha2-nistp384
    ecdsa-sha2-nistp384-cert-v01@openssh.com
    ecdsa-sha2-nistp521
    ecdsa-sha2-nistp521-cert-v01@openssh.com
    sk-ecdsa-sha2-nistp256@openssh.com
    sk-ecdsa-sha2-nistp256-cert-v01@openssh.com
    ssh-rsa
    ssh-rsa-cert-v01@openssh.com
    pavin@suse-pc:~>
zzq1015 1 days ago [-]
No, it's ssh -Q kex

KEX = key exchange, OpenSSH definitely has sntrup761x25519-sha512 AND sntrup761x25519-sha512@openssh.com

Also, it's like nobody supports curve448. I wish mlkem1024x448-sha512 were implemented

pavinjoseph 1 days ago [-]
Thanks, I have it. Never had cause to look at the key exchange options before all this!
zzq1015 1 days ago [-]
Also for keys it's

  ssh -Q key-sig
Or

  ssh -Q HostKeyAlgorithms
Because `ssh -Q key` does not list every key type
traceroute66 1 days ago [-]
> KexAlgorithms mlkem768x25519-sha256,sntrup761x25519-sha512,sntrup761x25519-sha512@openssh.com

Might be useful to highlight that you can put ^ at the front of that list, i.e.

KexAlgorithms ^mlkem768x25519-sha256,sntrup761x25519-sha512,sntrup761x25519-sha512@openssh.com

`man sshd_config`:

    If the specified list begins with a ‘^’ character, then the specified ciphers will be placed at the head of the default set.

Also people should not forget to set their ssh_config client-side too. ;)
zzq1015 1 days ago [-]
The ^ trick works client-side. Server-side SSHd is just a list of supported parameters, and only for client-side SSH the order matters.
alfiedotwtf 1 days ago [-]
oh shit… so if we can attack Diffie-Hellman at the initial key exchange, all ephemeral keys will be known, including any tricks like ratcheting? Right??!
angry_octet 1 days ago [-]
Yes. The ratchet is another DH exchange, and equally vulnerable to a passive collector. (Assuming the initial DH exchange was captured.)

Fortunately, Signal upgraded to PQXDH for initial key exchange years ago, and added frequent ML-KEM based ratchets in 1025.

zzq1015 1 days ago [-]
AFAIK, no.

SSH's rekeying generates completely new keys, so probably add this to your config:

  RekeyLimit 128M 10m
Or something much more frequent (default 1G 1h)
angry_octet 1 days ago [-]
SSH rekeying is just another DH, and equally vulnerable. Essentially it is a new session, no ratcheting, so shorter rekeys just make it more likely the listener catches a rekey event.
zzq1015 1 days ago [-]
Breaking keys takes time.

Option A: having 6+ keys in 1 hour, attacks break 1 key to see a slice of the communication

Option B: 1 key exchange at the beginning, betting on the attacker not saving the first handshake packet

Still, switch to post-quantum key exchange ASAP, this is only a bandaid solution.

ojhhhh 23 hours ago [-]
[dead]
quantummagic 1 days ago [-]
The advice to use ssh-agent is only going to list currently loaded keys; better to just scan manually:

       find ~/.ssh -type f -name "*.pub" -exec ssh-keygen -lf {} \;
hnarn 22 hours ago [-]
"Better" is completely subjective. It's not a requirement for public keys to match "*.pub" nor to be located in ~/.ssh, neither of these are a problem when querying ssh-agent and "only" getting the loaded ones.
SoftTalker 18 hours ago [-]
IIRC there have also been vulnerabilites (or at least one) that could expose the default private key (e.g. ~/.ssh/id_rsa at the time). One workaround was to name it something else.
angry_octet 1 days ago [-]
It is deeply frustrating that Ubuntu and Red Hat (and Apple) are still planning to stick with their obsolete versions of OpenSSL and OpenSSH. In fact, even 26.04 doesn't have full ML-KEM support.

I don't want these backported, just provide a way to upgrade to OpenSSL 4.2 and OpenSSH 10.6p2.

zzq1015 1 days ago [-]
Exactly, and I find it even more frustrating despite I use a rolling distro.

For people who don't know, PQ migration is in 2 phases:

1. PQ key exchange (think: how AES/ChaCha20/whatever keys are encrypted and transmitted)

2. PQ authentication (think: digital signatures and certificates)

Most software is only good with phase 1 (PQ kex), but not phase 2 (PQ auth). A list of software:

- OpenSSH 8.5+ (SNTRUP, enable manually), 9.9+ (ML-KEM, check config), 10.6+ (mldsa44+ed25519) which just came out in Oct 2026, and this is pretty much the only PQ auth an average person can use. (Good job OpenBSD I guess)

- OpenSSL 3.5+: ML-KEM PQ kex, ML-DSA/SLH-DSA auth, no public CA root store for PQ keys, no PQ auth for average people

- Chrome: only PQ kex (X25519MLKEM768), but not PQ auth. It even advertises ML-DSA support, but no public PQ root store, you have to wait for MTC

- Firefox: same as Chrome, except you have to turn on ML-DSA manually (security.tls.enable_mldsa = true), also waiting for MTC

- Tor: not even PQ kex, Tor Browser has PQ kex, but otherwise same as Firefox.

- PGP: OpenPGP and GnuPG disagree on the PQ key format, v5 and v6 keys are incompatible with each other

- Various programming languages: PQ kex and auth implemented, no PQ root store, same as OpenSSL

- Bitcoin and other cryptocurrencies: It sounds like they are behind, but they are not. There's no phase 1 for them, only phase 2.

- DNSSEC: I just wonder how it will be done because PQ keys are massive and will easily blow past DNS limits

- WireGuard: no crypto agility, locked-in x25519, the PSK option feels like a hack, and of course no PQ auth. The author plans to have WireGuard v2 but when are we gonna see it?

- Signal: Only PQ kex (PQXDH and SPQR), no PQ auth

- iMessage: Only PQ kex (PQ3), no PQ auth

The AI companies could push the research a few months in the future and we can be more ready. Everything will be done in a hurry. There's nothing to migrate to.

angry_octet 1 days ago [-]
And you know that every byte of tor traffic is getting recorded.
zzq1015 1 days ago [-]
Sure.

I just feel bad for people who live under a non-democracy, TOR usage is heavily fingerprinted and recorded. If you use Tor Browser you're fine to a degree. Even after HNDL they can only see which site you visited, unless you're using a .onion site. Somehow the onion sites are less secure.

I2P has PQ kex but the speed... Authoritarian regimes throttle your speed when traffic crosses the border, which makes the problem even worse.

And lastly, for Chrome there are 2 enterprise policies:

- PreferSlowCiphers: default OR cnsa (Prioritizes AES-256)

- PreferSlowKexAlgorithms: default OR cnsa2 (Adds standalone MLKEM1024, also prioritizes P-384, but key_share is still for X25519MLKEM768 and x25519, so you get 2-RTT TLS 1.3

https://chromeenterprise.google/policies/#PreferSlowKexAlgor...

dralley 20 hours ago [-]
RHEL 10 should have full PQC support? What does RHEL 10 not have that you need?

Or are you talking about RHEL 9 and prior.

RHEL 10.1 already got an OpenSSL version upgrade specifically for PQC (3.2 -> 3.5) which is very atypical. Sequoia is available and used by the package manager to support ML-DSA signed packages, which started being shipped months ago (also mid cycle).

It wouldn't really be that surprising if openssh gets whatever expanded PQC support is added upstream at some point.

angry_octet 12 hours ago [-]
I am referring to RHEL 8 & 9. Many orgs won't upgrade to 10 for several years, some explicitly have n-1 policies, so they won't upgrade until 11 is released.

Red Hat is more likely to just upgrade old packages -- after all, we're paying them a fortune for supporting the old release, and this is a perfect opportunity to demonstrate that value.

Possibly they will just upgrade OpenSSH, and put the OpenSSL libraries under a different name, and not touch other packages.

This is a great opportunity to demonstrate the scaling capability of LLMs at fixing things, but I suspect they are still using vegan coding practices when it comes to release eng.

dralley 8 hours ago [-]
The problem is

A) whatever you do can't break ABI

B) you cannot really just throw LLMs at crypto code, it requires a lot more care than that

C) there's a lot of other software beyond openssl that would need changes

I don't think people will necessarily be a stickler for N-1 policies if classical encryption does keep taking Ls like this. Hardware lifecycles are the bigger issue though.

rlpb 1 days ago [-]
Citation needed. Ubuntu's stable policies have a specific exception to make changes in stable releases for this kind of case. Further, Ubuntu's processes for security updates completely bypasses all this kind of policy when security needs demand it.
angry_octet 21 hours ago [-]
Security updates don't bypass the policy at all, they have a whole new layer of policy. Inertia is baked in to SRU.

They want people to upgrade, so the chance they will upgrade out of cycle is almost nil. Backporting features is explicitly denied in their policy, and anyway I wouldn't trust some monkey patch into crypto code. Besides, they are presently slammed by fixing other bugs and moving to a weekly release cycle.

rlpb 18 hours ago [-]
"Updates that need to be applied to Ubuntu packages to adjust to changes in the environment, server protocols, web services, and similar..."

https://ubuntu.com/project/docs/SRU/reference/requirements/#...

Explicitly permitted.

> Security updates don't bypass the policy at all, they have a whole new layer of policy

Outright wrong. Apparently you have deep misunderstandings about how Ubuntu development works.

angry_octet 12 hours ago [-]
Permitted doesn't mean it will happen. People will moan about having to rebuild libraries that link libSSL. Then they'll have to feature upgrade those packages.

Release cycle politics isn't going to change just because there's a massive problem with every package that uses cryptography.

ojhhhh 23 hours ago [-]
[dead]
regecks 1 days ago [-]
There are a bunch of iOS terminal apps + other hardware keys where the SSH keys are generated on the "Secure Enclave", but P-256 is the only key type supported.

Should we be moving off these as well?

samhclark 1 days ago [-]
fwiw, you can get a P-384 key on the Secure Enclave on macOS today using `sc_auth` but you'll need to (ask your favorite agent to) write a little custom ssh-agent for that key, to expose it as a plain `ecdsa-sha1-nistp384` key instead of the `sk-*` variant. Just did that myself today, worked fine. It's like 200 lines of Swift.

But also, I don't think that's extremely urgent at a personal level. It seems like this still require being targeted and a lot of effort to crack a key.

1 days ago [-]
drum55 1 days ago [-]
Doesn’t really matter where they are if they’re vulnerable, but we don’t really know how vulnerable. If the security is brought down to 90 bits does that matter for most things? Probably not, at least in the medium term. Bitcoin's entire proof of work is in the order of 90 bits, for over 15 years of compute time on dedicated hardware.
bpye 1 days ago [-]
Given that the SE is just software, is there anything stopping Apple adding PQC algorithms on current devices? Sure would be nice given that current YubiKeys etc do not support PQC.
15155 1 days ago [-]
The proposed PQ algorithms use a lot of memory and cycles.
tptacek 1 days ago [-]
MLKEM is faster than ECDH (but much bigger on the wire).
rolosa 1 days ago [-]
I hope termius upgrades it. They support the PQC keys but not in the secure enclave. I hope it's not a hardware limitation
stackghost 1 days ago [-]
Depends on the device, I think. I have an iPhone 17 and the secure enclave supports ML-KEM and ML-DSA (kyber/dilithium) operations.
rolosa 1 days ago [-]
I have an iPhone 18 Pro. Termius lets me generate ML-DSA keys but they aren't generated in the Secure Enclave and can't use faceid for biometric authentication. Using the faceid Secure Enclave generator it doesn't let me choose anything other than EC
stackghost 1 days ago [-]
Termius itself might not be calling the correct APIs. You need iOS 26+ also. I was merely pointing out that it's not a hardware limitation preventing Termius from supporting this on modern iphones.
affluentlabs 1 days ago [-]
[dead]
sscarduzio 1 days ago [-]
We need time for tooling to catch up before we can move to heavier cryptography.

Also, many web apps using JWT tokens embedded in cookies will hit the 8K max header length just because of the humongous signatures

dannyw 1 days ago [-]
FN-DSA / FIPS 206 is still in draft status, and not a cryptographer, but seems promising for more practical PQC without absurd key sizes.

For now, and for my personal security model, I am simply increasing key sizes.

ggm 1 days ago [-]
Maybe THIS will make vlc for android update its algorithms because right now, you cannot login from vlc on android over sftp to any modern OS without a significant downgrade on the receiving host.
0points 1 days ago [-]
Sounds like a rather fringe use case. Save yourself some trouble by setting up a jellyfin instance instead.
ggm 1 days ago [-]
An amusing response when one of the recommended paths for fixing playback in jellyfin and plex on devices like the google streamer, when it fails to handle hdhomerun off air mp2 is .. use vlc as an external player.

Also, i travel a lot. Vlc is good for playing local content on my Android tablet.

Reptur 1 days ago [-]
good luck with that, i tried to fix issues with their REST API and they were hostile to people joining their site to report issues / submit pull requests.
thresh 1 days ago [-]
Sorry about that experience. We do require an explicit user confirmation due to an enormous amount of spam accounts.
Tepix 1 days ago [-]
Hoping something like this OpenSSH PR https://github.com/djmdjm/openssh-portable-wip/pull/14 "Implement ssh-mldsa87-p384 and certificate format" (not mine) lands soon.
wpollock 1 days ago [-]
Don't forget about the server's keys! For OpenSSH, look for keys in "/etc/ssh" or "C:\ProgramData\ssh".
brnt 1 days ago [-]
I see there are multiple keys there, including deprecated ones and ones with too few bits.

Is there a way to change this for the better, in addition to change them? I.e. do I really need all types? This seems to be default `ssh-keygen -A` behaviour, but also seems undesirable?

wpollock 1 days ago [-]
My understanding is there are all those keys for compatibility with outdated clients. For safety reasons I would just remove the insecure ones, and put them back if your testing shows something stopped working (and you cannot update such software).

Hopefully an expert will confirm or refute this.

lousken 1 days ago [-]
Why would you upgrade from ed25519 ssh key? It is not used in encryption but for auth

For auth they are perfectly fine - it's like saying 17 character passwords are no longer good enough...

dist-epoch 1 days ago [-]
A MITM intercepting your public ssh key can then authenticate as you if the curve is broken
wolvoleo 1 days ago [-]
Yes true but in order to do that they first need to get to the point of being able to MITM and then break the server key to be able to identify as it.

I don't really see that happening on my stuff which is a very low value target.

what 1 days ago [-]
They don’t need to MITM anything. The entire point of a public key is that it’s PUBLIC. Anyone can view the public keys you use on GitHub, for example.
wolvoleo 1 days ago [-]
Only if you're storing those on github. I certainly don't.

I don't think SSH Auth keys are necessarily meant to be public. It uses asymmetric crypto and inherits the vocabulary. But keeping them private is a good mitigation.

dns_snek 1 days ago [-]
You don't use github over ssh?

Go to: https://github.com/USERNAME.keys

wolvoleo 23 hours ago [-]
No I don't use github at all ever.

If I did I would use different keys than I'd use for my own servers though, I don't trust Microsoft at all.

SoftTalker 1 days ago [-]
Yes until (possibly) now SSH public keys were meant to be public.
1 days ago [-]
manbash 1 days ago [-]
If it's low value to you, then sure don't bother about encrypting your traffic.
wolvoleo 1 days ago [-]
It's not even about encryption in this case, it's about authentication.
cromka 1 days ago [-]
That's false equivalency
what 1 days ago [-]
You don’t need a MITM. Your public key is PUBLIC. All the public keys for every GitHub user viewable, and not by accident.
wolvoleo 1 days ago [-]
Yes, as the attacker normally won't have the public part of the key pair, they have nothing to crack.

I would stop publishing them on eg GitHub etc but I've never done that anyway.

sva_ 1 days ago [-]
Hope you don't use ssh-agent (I don't)
noodletheworld 1 days ago [-]
It depends; you don't reuse ssh keys right? That would be lazy and bad.

If you did for example, use the same key for github and login, anyone could access your public keys on this unauthenticated url:

https://github.com/yourname.keys

nixosbestos 1 days ago [-]
I have a hard time seeing this sub-thread conversation as viable or worth anyone's time. If some people think hiding a pubkey is their salvation out of this, I don't see any point in engaging.
wolvoleo 1 days ago [-]
I don't use github at all. And not much cloud. I'm not a dev, I only use my keys on my own servers.
globular-toast 23 hours ago [-]
Almost everyone I know, including those who should know better, have a single SSH keypair they use for everything. People have laughed at me for generating a new keypair per service...
voakbasda 17 hours ago [-]
Clearly those people that think they know better, don’t.
drum55 1 days ago [-]
Github has always published all keys for all users though, it's the source of some really stupid vulnerabilities that they seem to think "public key" means "should be public".
dunham 1 days ago [-]
"tangled.org" also publishes public keys in ATProto (that might be necessary to coordinate with storage servers). I've dropped my p256 key. It's not yet clear to me if ed25519 has be weakened or not.
ninkendo 1 days ago [-]
Please elaborate. What vulnerabilities?
drum55 1 days ago [-]
You can discover what SSH servers are owned by what people by abusing GitHub. They publish the public keys, you have a target SSH server and you send the hashes of the keys you scraped to the server, it tells you which GitHub user has access there. Reverse way, you have a targets keys and you send them to every SSH server on IPv4, and it tells you what servers they own. This is because SSH supports just telling you if a hash of a public key would give you access to an account, meaning you don't need to enter the password for all keys in ~/.ssh sequentially for every server.
wolvoleo 1 days ago [-]
You're acting like everyone who uses SSH uses GitHub.
elric 23 hours ago [-]
The intersection of those two groups is very large. I don't understand what point you're trying to make?
cortesoft 1 days ago [-]
Ideally, you should be using a unique key for every service.
drum55 1 days ago [-]
Yes you should, it's a little fiddly because SSH supports a maximum of 11 keys before you need to manually define them for each connection.

It's an another attack vector too though, if you SSH to my server you send me all of your public keys in ~/.ssh by default (or at least the hashes of them), and I can compare them to GitHub to find out your real identify. Github is just making this trivial by needlessly exposing them.

elric 23 hours ago [-]
You should absolutely define them manually, otherwise you've just moved the problem from "anyone who looks at my github keys can fingerprint me" to "every server I connect to can fingerprint me".

My ssh config has many manually configured hosts with dedicated keys, and a bunch of wildcard groupings.

novafunc 1 days ago [-]
I made a script that accidentally solves that problem.

The script can change the active identity file by commenting out all the other ones listed. I also have multiple git config files, and it creates a symlink to the active version. And it does all that without me having to restart my terminal session or anything weird, just instant.

It's nice because it lets me separate my personal identity and dumb username identity. And it could be used to use different keys for different services.

drum55 1 days ago [-]
You don't need to do that, you can just specify a key for each host in your config.

Host dddd IdentityFile xxx

floralhangnail 1 days ago [-]
> You don't need to do that, you can just specify a key for each host in your config. Host dddd IdentityFile xxx

Yes, but I believe if you connect to the server, and that key you specified fails, because you hadn't unlocked it yet or your ssh agent wasn't working right, that it just moves down the list and tries all the rest of your ssh keys unless you also have IdentitiesOnly yes set in your ~/.ssh/config. I also remember setting that line globally causes problems when using gvfs with file managers.

drum55 1 days ago [-]
If they are defined for the host as I showed, they aren't searched and presented. You a test this with ssh -vv, look for the line with "explicit" in it, and there will only be one.

debug1: Will attempt key: xxxx ED25519 SHA256:xxx explicit

floralhangnail 1 days ago [-]
Interesting. IdentityFile "/home/redacted/.ssh/yubikey-1" for that host, and when I unplug my yubikey to force failure, I get "Will attempt key" for all of the keys in ~/.ssh/ What distro are you using?
drum55 1 days ago [-]
Interesting, I haven't seen that before. I'm using OpenSSH_10.3p1, LibreSSL 3.3.6 on OSX.
floralhangnail 1 days ago [-]
Might be something funny with my agent, time for a deep dive.
tveita 23 hours ago [-]
Yes, but also ideally, GitHub shouldn't expose any information at all about people's private GitHub authentication setup, a behavior which has no good use and seems to surprise every person that learns about it.
mscdex 1 days ago [-]
As an SSH server, there's nothing stopping you from always rejecting (or always allowing) those public key checks and only doing any work when sent the full public key authentication request (with the signature).
drum55 1 days ago [-]
The software doesn’t do that now though, at least openssh doesn’t. It would break a lot of people’s setups to change that assumption out of the blue.
mscdex 1 days ago [-]
If you accepted all public key checks it shouldn't break anything. It's just an optimization for the client as the server needs to handle full public key authentication requests anyway.

Besides, there are additional (server-side) safeguards to prevent someone from doing these sorts of mass public key checks using anyone's public key, including (but not limited to) IP whitelisting and port knocking.

drum55 1 days ago [-]
It would break the client, they would be asked for every key password sequentially.
zygentoma 1 days ago [-]
> "ECDSA-SK, Ed25519 and Ed25519-SK keys have a fixed length and the -b flag will be ignored."

WTF?!?

Why would this be ignored instead of failing the command?

debayande 1 days ago [-]
> Seems that my PGP key is using RSA-4096 which is not a concern for today.

Am I reading this wrong, or is the author's example showing an Ed25519 key?

SethMLarson 1 days ago [-]
That's an SSH key! My PGP key returned no hits, but I can see why that section is confusing. I'll fix that to be clearer :)
debayande 1 days ago [-]
That's a miss on my part as well! Apologies.
SethMLarson 1 days ago [-]
Just pushed a fix, thanks for raising that issue. I think it's much clearer now :)
zzq1015 1 days ago [-]
FYI, OpenPGP (v6) and GnuPG (v5) had a huge fight over the post-quantum key format. Their v5 and v6 keys are incompatible.

Currently stuck with GnuPG 2.4.9, and stuck with classical keys:(

What a mess.

0xbadcafebee 1 days ago [-]
For ssh it's the key exchange that's the problem right now, not the keys themselves
gitremote 1 days ago [-]
GitHub already supports hybrid post-quantum key exchange since 2025.

https://blog.github.com/engineering/platform-security/post-q...

zamalek 1 days ago [-]
Remember to upgrade any KEKs (especially SOPS users, especially age SOPS users). I use a single KEK in my (publicly visible) nix repo to decrypt other keys, and I initially rotated the "others" only. Spent another 30min rotating again /facepalm
prmoustache 1 days ago [-]
The article is misleading. you can't upgrade a pgp/ssh key. You create new ones and retire old ones.
yoy0721 1 days ago [-]
[dead]
oniconnect 1 days ago [-]
[dead]
imrehg 1 days ago [-]
> This is ~100 days (a very short timespan for anything that affects "all CAs") and would affect ~25% of all web traffic, *which is not something one would do for no reason.*

Emphasis at the end is mine: that is true, however we live in the timeline where the obvious reason is way too often not the real reason. So giving the benefit of the doubt to people requiring others to do a bunch amount of heavy lifting, based on unknown motivations, is getting old very quickly...

I'm not at all saying that this cannot be a good reason. Just that "this is hard for many, so they must mean it" doesn't pass the current climate's sniff test (for me).

binaryturtle 1 days ago [-]
So ssh-ed25519 is bad too? I just "upgraded" my RSA keys to that. I guess it's going back to RSA for now? Yikes. :)

(I wonder how many others waste their time like me with this "security" theatre and miss-information/ half-information)

cogman10 1 days ago [-]
> So ssh-ed25519 is bad too?

Currently, no. But there's a lot of speculation going around that it likely has some vulnerability that's on the precipice of being disclosed. The NSA "Move to post quantum crypto now" notice and Anthropic's research into lattice crypto has people spooked.

binaryturtle 1 days ago [-]
My understanding from this was that in a OpenSSH context the "key exchange" was the most critical part. With my rusty OpenSSH 9.x it's already using some "sntrup761x25519-sha512@openssh.com" when connecting to my server which supposedly is "quantum safe".

The ssh keys are only used for auth (like a HUGE A** password), and if you don't share your public keys with random 3rd parties (like you wouldn't share your password hashes either) it should be relatively safe, I think.

But it's all very confusing now for sure.

cogman10 1 days ago [-]
> when connecting to my server which supposedly is "quantum safe".

So it's less about being quantum safe IMO and more about there being potential vulnerabilities within the algorithm.

> The ssh keys are only used for auth (like a HUGE A* password)

It's better than that. You can give out a public key which your server uses to encrypt the handshake. Only your private key is capable of decrypting things encrypted with your public key. The key for 25519 isn't particularly long.

The potential risk is that there is a way to reverse or generate a private key from that public key. It could be that the search space is a lot smaller than expected.

jess-sch 24 hours ago [-]
> if you don't share your public keys with random 3rd parties

I mean, yeah, who would do that? (Except every single GitHub user - see https://github.com/torvalds.keys)

binaryturtle 17 hours ago [-]
The time I learned about this —many, many years ago— was the point when I started to strictly use a separate key per service. It's a pain-in-the-butt to manage in ssh's config, of course. Same concept as you should use a different password for each account (preferable a different e-mail too).

I personally consider my GitHub key setup permanently compromised.

adrian_b 18 hours ago [-]
The worst possible thing that could have happened is that there is a faster algorithm that works against all elliptic curves and it reduces their level of security from N/2 to N/3, so that curves with 256-bits or less are vulnerable and curves with 384-bits or more are safe.

Except for the privileged, nobody knows for sure whether this is true, or the attack works only against some restricted class of elliptic curves.

It is more prudent to assume that the worst case is true, because this matches the NSA recommendations, in which case all elliptic curves of 256-bits or less must be abandoned, including ED25519.

Curve448 would be a better replacement for ED25519, but this is a choice possible only in some protocols like IPsec, because OpenSSH supports only the NIST curves P-384 and P-521.

RSA keys with 3072 bits or 4096 bits appear to be safe for now, but they are inefficient enough so that following the NSA recommendations and switching to a hybrid algorithm is better, if you have an up-to-date OpenSSH at both communication ends.

The quantum-resistant ssh-mldsa44-ed25519 available for host keys and client keys in OpenSSH 10.6 is not considered good enough by NSA, which demands a hybrid algorithm combining ML-DSA-87 with P-384, which will probably be available in a future OpenSSH version, in a few months (there is a draft RFC for this).

anon7725 1 days ago [-]
IMO as an individual without particular security concerns, it’s best to a) figure out what you’ve got now and b) make any upgrades like Ubuntu 24 lts to 26 lts like the article mentions and c) pay attention as new capabilities are rolled out.
seba_dos1 1 days ago [-]
For all we know, P-256 is likely theoretically weaker than previously assumed. Anything else is pure speculation and/or fearmongering at this point.
dboreham 18 hours ago [-]
Sounds like we need to plan for a few more FAA ground stop days ahead.
mdayan 22 hours ago [-]
[dead]
palstable_team 22 hours ago [-]
[dead]
beyondpeaksstud 1 days ago [-]
[dead]
Iris86901 1 days ago [-]
[dead]
zuhrunezz 1 days ago [-]
[dead]
OrderShift 1 days ago [-]
[dead]
leoliu_builds 1 days ago [-]
[dead]
macote 1 days ago [-]
[dead]
portShrub688 1 days ago [-]
[dead]
bigfatkitten 1 days ago [-]
If you’ve got static keys widely spread around the place, you’ve already made some poor life choices irrespective of recent developments.

You shouldn’t be doing this, and you should move to short-lived SSH certificates instead; a feature that has been available since 2010 to avoid this very issue (and to solve many others.)

cortesoft 1 days ago [-]
Even if you use signed SSH certificates, you are still leaving a 'static key' around. Either way, you are placing a static public key on the server; either the signing key's public key or the SSH key's public key. They are the exact same type of key, too.

If the issue is that there is some way to factor a private key from a public key, it doesn't matter if that public key is the signing key or the authorized key itself. The attacker could just sign their own key at that point, anyway.

Don't get me wrong, using temporary signed keys for access instead of a static key has other benefits, but it does not help this particular issue.

bigfatkitten 1 days ago [-]
The main issue here is one of key management, not of the risk of keys getting factored.

If you're a hobbyist with a couple of servers that only you access, then static keys (ideally stored on a Yubikey, Secure Enclave or similar) are fine.

If you're not, then having a proliferation of non-expiring keys belonging to numerous people, with potentially unlimited privileges, with no guarantees as to how they are stored, that you have no effective way of tracking, rotating or revoking is a much more serious issue than the mostly theoretical attack the author is concerned about.

If you have a well-resourced state adversary in your threat model, that adversary probably has cheaper and faster methods of getting what they need than an extremely resource intensive cryptographic attack that is quite likely not even possible today.

The advantage of SSH certificates is that you have one private key that you can store in hardware, on a well-hardened piece of infrastructure that you can use to issue short-lived, tightly-scoped certificates that permit authorised users to access specific target systems from approved source addresses for a limited time. This greatly limits the damage an adversary could cause if they were to compromise your workstation and steal private key material.

If you need to rotate that CA keypair, it's extremely easy to do using the configuration automation tool of your choice. If you need to know where it's in use, that's easy too -- just look at TrustedUserCAKeys in the sshd configuration. You don't need to go hunting through .ssh/authorized_files across your fleet.

waynesonfire 1 days ago [-]
Nothing wrong with ed25519
zzq1015 1 days ago [-]
Depends on the scenario:

A: Only NIST P-256/secp256r1 is weakened. secp256k1 and curve25519 are still safe

B: All 256-bit ECC are weakened, so P-256, secp256k1, curve25519 or whatever using 256-bit ECC, are all unsafe

C: P=BQP, RSA, DH, ECC, all broken (doesn't look like it)

KingOfCoders 1 days ago [-]
I asked Claude.
rfgplk 24 hours ago [-]
Yea, this will fall on deaf ears again; but roll your own crypto. I don't mean "roll your own impl of existing algs" but come up with your own algorithms. It really isn't hard, you can even have frontier LLMs to assist you and run cryptanalysis on it. For internal stuff you'll be effectively untouchable because coming up with breaks takes FAR FAR longer than it does to roll a new alg. All my ssh runs through a custom alg + key exchange.
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 09:34:31 GMT+0000 (Coordinated Universal Time) with Vercel.