How to find and upgrade SSH and PGP keys using P‑256, ED25519, and Curve25519 (sethmlarson.dev)
84 points by lumpa 3 hours ago
quantummagic 2 hours 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 {} \;regecks 2 hours 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 an hour 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.
rolosa 28 minutes 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
drum55 2 hours 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.
lousken 2 hours 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 an hour ago
A MITM intercepting your public ssh key can then authenticate as you if the curve is broken
wolvoleo an hour 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.
wolvoleo 2 hours 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_ an hour ago
Hope you don't use ssh-agent (I don't)
noodletheworld an hour 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:
nixosbestos an hour ago
wolvoleo an hour ago
drum55 2 hours 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 an hour ago
ninkendo an hour ago
sscarduzio 2 hours 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 9 minutes 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.
zygentoma 5 minutes 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?
wpollock an hour ago
Don't forget about the server's keys! For OpenSSH, look for keys in "/etc/ssh" or "C:\ProgramData\ssh".
prmoustache an hour ago
The article is misleading. you can't upgrade a pgp/ssh key. You create new ones and retire old ones.
binaryturtle 2 hours 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 2 hours 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 2 hours 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 an hour ago
anon7725 2 hours 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.
debayande 2 hours 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 an hour 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 an hour ago
That's a miss on my part as well! Apologies.
SethMLarson an hour ago
0xbadcafebee an hour ago
For ssh it's the key exchange that's the problem right now, not the keys themselves
bigfatkitten 40 minutes 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 31 minutes 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.