4 ms·
How does one even go about getting a 256-bit key? You have to do it on purpose somehow, or it has to be seriously old, in which case you're likely aware somehow
by scrollaway 11y ago
How does one even go about getting a 256-bit key? You have to do it on purpose somehow, or it has to be seriously old, in which case you're likely aware somehow that that's a terrible idea.
Is there outdated ssh keygen software out there that still generates sub-768 keys?
- benjojo12 11y agoTo be honest, I have no idea. I had hack about to get Go's crypto/rsa package to give me a key that size, I really would love to know what can make these keys
- makomk 11y ago256 bits is a perfectly respectable length for an ECDSA key, so I'm guessing people tried to generate those and accidentally created RSA keys instead.
- xorcist 11y agoNo, ssh-keygen won't create that small RSA keys. It is a limitation that's been around since long before OpenSSH (although I believe it used to be 512, the limit now seems to be 768).
- TazeTSchnitzel 11y agoPerhaps someone is on an obscure platform whose only SSH key generator is subpar. Or perhaps someone has a system that generates keys automatically, and it was poorly configured.
- dfox 11y agoI vaguely remember that 10 or 15 years ago I've seen obscure ssh client for relatively obscure platform that could not handle RSA keys that were longer than some X, with X being something like 640. Even then, generating such key with OpenSSH was not something one could do by accident.
- pdw 11y agoAnd where do the odd numbers come from? 1023 bits? 799 bits??
- benjojo12 11y agoSo this one is kinda fun. IIRC PuTTYGen had a bug in it for a very long time that you would ask for a 1024 key, and it would subtract a bit off it. You can see the same with 2047 keys in the data that I will be publishing on the next post.
- mortenlarsen 11y agoSome people use slightly odd key-sizes on purpose, in the hope of buying a little extra time in case something like the Debian OpenSSL bug happens again.
- deleted 11y ago[deleted]
- baby 11y agoSame kind of people who write 1338 instead of 1337, for the lulz
- 88e282102ae2e5b 11y agoThey may have been assuming that appropriate key lengths for AES would work for SSH keys as well.
- Marcus316 11y agoI'm pretty sure the first 256 bit key listed in his output is/was mine. It was a key generated and used as a test (years ago). It has never been used to access my Github account. Also, my account is pretty bare as it is. To be safe, though, I have now removed the key.