For TPMs, the performance is even more relevant. TPMs don't use ssh-keygen, but the efficiency of ECC over RSA is what's behind the general preference.
And by "affected" I mean your CPU will die when you switch from 2048 bits to 4096.
Of course the security bits of e.g. ED25519 are up in the air now, but it (used to) offers 128 bits of security at vastly better performance.
See for yourself on your own hardware:
$ openssl speed rsa2048 rsa4096 ed25519
Is 2000 handshake operations per CPU core per second good enough (RSA 2048)? Is 300 (RSA 4096)? Do you need 30000 (ED25519)?
Google will have a different opinion than the operator of a cat picture website. OTOH, if the cat picture website is hosted on a Raspberry Pi, its operator might greatly care as well - those numbers are a lot smaller.
No they aren't.
You're literally doing a Chicken Little dance based on literal Twitter rumors.
Get a grip on yourselves.
$ openssl speed rsa2048 rsa3072 rsa4096 ed25519
version: 4.1.1
compiler: clang -fPIC -arch arm64 -O3 -Wall -DL_ENDIAN -DOPENSSL_PIC -D_REENTRANT -DNDEBUG
sign verify encrypt decrypt sign/s verify/s encr./s decr./s
rsa 2048 bits 0.000388s 0.000010s 0.000011s 0.000401s 2579.3 96744.6 92710.2 2491.6
rsa 3072 bits 0.001144s 0.000023s 0.000023s 0.001189s 873.8 44050.7 42779.9 841.3
rsa 4096 bits 0.002573s 0.000040s 0.000039s 0.002676s 388.7 25145.2 25657.7 373.7
sign verify sign/s verify/s
253 bits EC (Ed25519) 0.0000s 0.0001s 42380.3 15407.3
keygen encaps decaps keygens/s encaps/s decaps/s
rsa2048 0.030000s 0.000012s 0.000417s 33.3 85885.1 2400.8
rsa3072 0.132237s 0.000024s 0.001210s 7.6 41227.7 826.3
rsa4096 0.326129s 0.000042s 0.002684s 3.1 24088.8 372.6
keygen signs verify keygens/s sign/s verify/s
rsa2048 0.030772s 0.000417s 0.000011s 32.5 2395.8 91357.5
rsa3072 0.107021s 0.001214s 0.000023s 9.3 823.7 43087.0
rsa4096 0.328387s 0.002680s 0.000039s 3.0 373.1 25317.0Recently experimented with other types of keys, that now turn out to be problematic… and it didn't made any difference really from the performance perspective.
This should be our first question and, as a follow-up, why did OpenSSH steer default algorithms away from large (3072/4096) RSA in the first place ?
Who among us is handling thousands of SSH connections per minute ? Who among us is handling multi-gigabit streams of SSH traffic ? If so, you know what you're doing and can make good selections based on your unique and interesting use-cases.
Meanwhile, how many personal/home/small/sensitive users were shunted away from RSA over the last decade for no good reason ?
You don't have to be handling thousands of SSH connections per minute, you just have to have regular internet port scanners knocking on your SSH port and your server will be wasting substantial CPU proving its identity to them if it's got an RSA4096 host key.
The gigabits don't actually matter, since it's a one-time cost per connection establishment.