Live data from Hacker News

Fake Linus Torvalds' Key Found in the Wild, No More Short-IDs

lkml.org

11–20 of 131 posts

Re: Fake Linus Torvalds' Key Found in the Wild, No More Short-IDs

#11
post #6

I don't know why more folks don't display keys and fingerprints as Base64; it seems to me that "q68RxlopcLEwq+PEeb4+QwBBGIY=" (Linus's real key) and "D2oUZTLYaa7kOPdLYhGqOwBBGIY=" (Linus's fake key) are pretty easilt-distinguishable, and not terribly verbose.

Is there a reason a hacker couldn't just create a key like "q68RxlopoLEwq+PEeb4+QwBBGIY=" to create a similar problem?

The string is longer so collision is harder to find. btw that's a way .onion addresses are generated, it takes first 80 bytes from the key and outputs base32 from the input.

Re: Fake Linus Torvalds' Key Found in the Wild, No More Short-IDs

#13
post #6

I don't know why more folks don't display keys and fingerprints as Base64; it seems to me that "q68RxlopcLEwq+PEeb4+QwBBGIY=" (Linus's real key) and "D2oUZTLYaa7kOPdLYhGqOwBBGIY=" (Linus's fake key) are pretty easilt-distinguishable, and not terribly verbose.

I've got to say, I think Satoshi picking the Base58[0] subset instead of B64 was a very smart choice for Bitcoin and it would make sense to adopt it elsewhere as well (as far as anywhere that the string needs to be parsed by a human-eye).

[0] https://en.wikipedia.org/wiki/Base58

Re: Fake Linus Torvalds' Key Found in the Wild, No More Short-IDs

#14
post #6

I don't know why more folks don't display keys and fingerprints as Base64; it seems to me that "q68RxlopcLEwq+PEeb4+QwBBGIY=" (Linus's real key) and "D2oUZTLYaa7kOPdLYhGqOwBBGIY=" (Linus's fake key) are pretty easilt-distinguishable, and not terribly verbose.

While it's certainly more easy to tell the difference between two random keys represented in base64, it's probably not that hard to create a similar brute force algorithm that makes the base64 representation look similar.

Odds are 1 in 64 to get the first character as lowercase q, 10 in 64 to get digits in the second spot, once more for the third spot, one in 16 to get a + sign close to where the plus sign is right now (so 1/64 for an exact match, 1/32 for one position off to either side, 1/16 for one position off to the left or right), another 1/16 for the second plus, and finally let's match the last three characters so another 1/(64^3). The padding should always be the same I think.

After, on average, 27.5 billion attempts you'd have a matching base64 output. It's not as great as a 32-bit integer (2 billion attempts on average) but it's in the same ballpark.

This is different from the 32 bit key id because the key id would be an exact match and the "visually similar" base64 string is only similar on first glance, but if you check the base64 carefully you might as well check the fingerprint carefully.

This is why it's recommended to check a few random positions when matching cryptographic hashes by the way.

Re: Fake Linus Torvalds' Key Found in the Wild, No More Short-IDs

#15
post #11

Earlier quoted context omitted.

Is there a reason a hacker couldn't just create a key like "q68RxlopoLEwq+PEeb4+QwBBGIY=" to create a similar problem?

The string is longer so collision is harder to find. btw that's a way .onion addresses are generated, it takes first 80 bytes from the key and outputs base32 from the input.

Rather, it takes the first 80 bits of a SHA1 hash of a 1024-bit RSA public key, then converts it to base32.

Obviously, collisions aren't obscenely expensive.

Re: Fake Linus Torvalds' Key Found in the Wild, No More Short-IDs

#16
post #10
post #6

I don't know why more folks don't display keys and fingerprints as Base64; it seems to me that "q68RxlopcLEwq+PEeb4+QwBBGIY=" (Linus's real key) and "D2oUZTLYaa7kOPdLYhGqOwBBGIY=" (Linus's fake key) are pretty easilt-distinguishable, and not terribly verbose.

You can do what PGPfone did and encode the fingerprint as a series of dictionary words: Real gregkh: 647F28654894E3BD457199BE38DBBDC8 = style tactful newcomers file gallows adored insist flags athletics Fake gregkh: 497C48CE16B926E93F49630127365DEA = jukebox governor fashionable mahogany prepares gobble surprised martha apostles There's even an Internet standard for this: http://tools.ietf.org/html/rfc1751 , although…

This is just turning one hash into another, so would be just as easy to brute force.

Re: Fake Linus Torvalds' Key Found in the Wild, No More Short-IDs

#17
post #14
post #6

I don't know why more folks don't display keys and fingerprints as Base64; it seems to me that "q68RxlopcLEwq+PEeb4+QwBBGIY=" (Linus's real key) and "D2oUZTLYaa7kOPdLYhGqOwBBGIY=" (Linus's fake key) are pretty easilt-distinguishable, and not terribly verbose.

While it's certainly more easy to tell the difference between two random keys represented in base64, it's probably not that hard to create a similar brute force algorithm that makes the base64 representation look similar. Odds are 1 in 64 to get the first character as lowercase q, 10 in 64 to get digits in the second spot, once more for the third spot, one in 16 to get a + sign close to where the plus sign is right n…

It's software, but it seems like some sort of digit-coloring scheme for hashes could make fakes easy to spot by eye. The simplest thing would just be a different color for every character (and and pick very distinct colors for similarly-shpaed characters). Or maybe color groups of 3 digits or something.

Re: Fake Linus Torvalds' Key Found in the Wild, No More Short-IDs

#18
post #16
post #10

Earlier quoted context omitted.

You can do what PGPfone did and encode the fingerprint as a series of dictionary words: Real gregkh: 647F28654894E3BD457199BE38DBBDC8 = style tactful newcomers file gallows adored insist flags athletics Fake gregkh: 497C48CE16B926E93F49630127365DEA = jukebox governor fashionable mahogany prepares gobble surprised martha apostles There's even an Internet standard for this: http://tools.ietf.org/html/rfc1751 , although…

This is just turning one hash into another, so would be just as easy to brute force.

The point is to turn one fairly big hash into a representation where humans can easily spot the differences.

Re: Fake Linus Torvalds' Key Found in the Wild, No More Short-IDs

#19
Personally I like the keybase approach for this of tying GPG keys to a set of accounts.

Generally when I'm talking to someone online I know someone via other sites (e.g. twitter, github), so being able to say "the person who controls the account xxx on github, uses this key" lets me establish a level of initial trust.

Obviously for high trust applications that's not enough, but better than nothing...

Re: Fake Linus Torvalds' Key Found in the Wild, No More Short-IDs

#20
post #16
post #10

Earlier quoted context omitted.

You can do what PGPfone did and encode the fingerprint as a series of dictionary words: Real gregkh: 647F28654894E3BD457199BE38DBBDC8 = style tactful newcomers file gallows adored insist flags athletics Fake gregkh: 497C48CE16B926E93F49630127365DEA = jukebox governor fashionable mahogany prepares gobble surprised martha apostles There's even an Internet standard for this: http://tools.ietf.org/html/rfc1751 , although…

This is just turning one hash into another, so would be just as easy to brute force.

[deleted]
Post reply on HN