Upgrade Your SSH Key to Ed25519 (2018)
medium.com
medium.com
It's closer to 16 years, for OpenSSH [1].
> Open up your terminal and type the following command to generate a new SSH key that uses Ed25519 algorithm:
> Generate SSH key with Ed25519 key type
That's broken in an amusing way. But speaking of broken things, gnome-keyring didn't support ECC for SSH the last time I've checked (a few years ago), and was/is breaking GPG too [2]. Then there are servers with old systems not supporting Ed25519 (it was added in OpenSSH version 6.5, just in 2014 [3]). The situation with smart card support wasn't quite clear the last I've checked, either.
Besides, ECC was thought to be more resistant to quantum computing attacks, but not anymore (and seems to be an easier target at regular key sizes, actually) [4], so it lost some of the appeal.
Ed25519 still seems nice, but perhaps one shouldn't hurry to switch to it -- especially if the software support isn't great, and/or there are other difficulties.
[1] https://www.openssh.com/txt/release-4.2
[2] https://wiki.gnupg.org/GnomeKeyring
[3] https://www.openssh.com/txt/release-6.5
[4] https://en.wikipedia.org/wiki/Elliptic-curve_cryptography#Qu...
The much nicer part about Ed25519 is that you can realistically type it out over a serial console or over a monitor-keyboard without access to copy-paste directly. They're small and fast and convenient.
In addition to that, the cryptography behind Ed25519 is much simpler to implement than RSA without causing massive side channel leaks, so that is one less thing to worry about.
In terms of Anti-QC Resistance, I wouldn't worry about it until we complete the current qc-resistant crypto competition, which should give us a nice set of primitives to use.
Pray tell?
I'll usually go with the same order of the preference in the article, Ed25519 then ECDSA then RSA. I haven't yet seen a server not support RSA. But fairly recently I had to register an RSA 4096 on a Bitbucket Server because it did not support both elliptical curve algorithms.
So yeah, it's definitely lacking a lot of software support, but I'll use it if possible.
https://webcache.googleusercontent.com/search?q=cache:FHJoDX...
https://docs.microsoft.com/en-us/troubleshoot/azure/virtual-...
Sure in that national level entities could in theory crack 1024 RSA. They would be stupid to tie up such a valuable resource for a year or so on breaking a single SSH connection. They would instead use it on something that got them thousands or even millions of connections.
>If it has 3072 or 4096-bit length, then you’re good. Less than that, you probably want to upgrade it.
There is zero evidence that anyone will ever break 2048 bit RSA short of some sort of huge breakthrough. I don't know where these claims are coming from...
It's about being cautious. If we want secure systems for the masses, we need to advance cryptographic defenses faster than we have proofs the attackers are advancing.
Most crypto we consider broken today "had zero evidence that anyone would ever break it" before it actually happened...
The inherent uncertainty of cryptography seems to cause people to want to do something, anything, in an attempt to decrease the uncertainty, even if there is no rational reason behind the approach.
The only role your SSH key plays (which is why you can use Ed25519) is to make signatures. So, if the government discovers next Thursday how to break my archaic RSA key, they don't magically get to read transcripts of SSH sessions they recorded, they only get some sort of attack that could help them to impersonate me on fresh connections after Thursday.
Essentially the authentication step goes like this:
You: I know the private key corresponding to this public key 123456, does that help?
Server: (Examines authorized_keys list) That would work, prove you know that key
You: <Signature of SSH setup transcript using private key>
Server: Welcome southerntofu
All this is happening inside an encrypted session. Your client (and remote servers) automatically negotiate the safest mutually intelligible session key agreement and encryption to set that up, independent from stuff like your personal keys.
If you design software, then yes you should put mechanisms in place to replace older and less secure ciphers with new ones, and prefer and limit the ones you chose for some who are considered safe at the moment. But I don't think we should put red flags all over a cipher or a hashing functions because someone with unlimited resources and money managed to fool it once.
And use the primitives advised by the organization you trust the most
Even if the underlying ciphers have not changed, the value of a stolen key will decay when there is a planned sunset. In the lack of a rotation strategy, a stolen key is a gift that keeps on giving.
OpenBSD introduced the signify command, and a 6-month key rotation, that will allow trust when the OS is downloaded over insecure channels (cleartext FTP and http).
https://www.openbsd.org/papers/bsdcan-signify.html
Debian is migrating to the conceptually-similar aptsign.
https://blog.jak-linux.org/2021/06/20/migrating-away-apt-key...
Additionally some major openpgp packages (notably Golangs) does (or did not) support ED25519 at the time of writing either.[0]
This caused the death of a bit of software I was working on because one engineer insisted on using his ED25519 key which my software could not cope with and I was not smart enough to fix it in the upstream module.
[0]: https://debian.pkgs.org/9/debian-main-amd64/gnupg_2.1.18-8~d...
[1]: https://centos.pkgs.org/7/centos-x86_64/gnupg2-2.0.22-5.el7_...
Microsoft Azure, for instance, doesn't support them. Pure idiocy.
BTW Ed25519 is not even quantum safe :-)
Nobody ever claimed that ecdsa/eddsa was quantum safe, it obviously isn't.
OpenSSH quietly adopted the tinyssh approach as an experimental feature. Some time later, after interaction with DJB, the OpenSSH algorithm for NTRU was changed, and tinyssh followed suit.
If you want quantum-secure Ed25519, then enable sntrup761x25519 on a supported client and server.