true story: years ago I worked in an industry where it was very common to do dat...

@jbcrawford@hachyderm.io

true story: years ago I worked in an industry where it was very common to do data interchange over SFTP, and part of my job was doing the legwork with clients to get those connections set up. Usually this meant asking the client for a public key so they could authenticate to our SFTP broker, and surprisingly often it would be a huge headache to find someone in the client org who knew what a "public key" even was.

But one time I got an interesting twist: the client sent me a public key, absolutely insisted that it was what their own broker gave them when they clicked "export public key," but I couldn't make heads or tails of it.

With a hex editor and no small amount of head scratching, I figured out that it was indeed an RSA key but expressed in a very legacy file format that (memory a little hazy here) I think dated back to an early version of the commercial SSH implementation from SSH Inc. This only really clicked for me because the format was very simple, and after staring at it for a while it suddenly clicked that it was just the exponent, then a null, then the modulus, then another null, or something along those lines.

This was easy to tell because the exponent was 3. 3 was, at the time and to some extent today, a very popular choice of RSA exponent. There are known problems with RSA keys with exponent 3, although modern implementations have mitigations for them.

Newer RSA keys tend to use exponent 65537 to avoid those issues entirely. It may seem weird to use a fixed exponent, but it has a lot of practical advantages over coming up with a random one.

The nagging question about this has always been whether or not a state actor like the NSA could accelerate attacks on RSA by precomputing and storing factor tables for common exponents. I don't know if there's ever been a satisfactory answer to this concern, meaning whether it is a valid problem or whether it is actually being done.

None of this is exactly related to Today's Big News but there are some loose connections: weird encryption keys of mysterious origin, and the problem of small numbers being amenable to precomputation.