SSH Artwork

(github.com)

180 points | by barrettondricka 7 months ago ago

32 comments

  • yccs27 7 months ago

    The fact that this works means that comparing keys visually by their artwork is insecure, since it allows you to generate a key pair which looks very similar to a target public key. I guess visual fingerprints might not have enough entropy.

    • dloss 7 months ago

      A very easy way to find such "visual" collisions is described in section 4.2 of our drunken bishop paper: http://www.dirk-loss.de/sshvis/drunken_bishop.pdf

    • clysm 7 months ago

      Where's the proof that this works?

      It's a brute forcing tool with the goal of finding the desired fingerprint, but there's no demonstration of it actually working.

      • tasuki 7 months ago

        It's enough to find a fingerprint that's visually similar enough. It doesn't have to be exactly the same. That's many orders of magnitude easier than finding an exact match!

    • doctoboggan 7 months ago

      > and kill the artist when patience is depleted.

      This is the key part. You probably have to have _a lot_ of patience to get anything reasonable.

    • tayiorrobinson 7 months ago

      It's probably still more secure than trying to compare the regular old string representations (who checks more than the last 5 characters from the end?)

      And plus, you still have to brute force it to get one that looks close

    • simlevesque 7 months ago

      > means that comparing keys visually by their artwork is insecure

      I'm not sure if this goal is achievable.

    • MitPitt 7 months ago

      Comparing visually wasn't safe in the first place for the same reason, this changes nothing

    • 7 months ago
      [deleted]
    • remram 7 months ago

      Here's my key's [1] art:

        +------[RSA]------+
        |    .+.+ oE+=oo  |
        |     .B.O.o=+B . |
        |     o.O +*.o.=  |
        |    . = ++ = . . |
        |     + +S.  o .  |
        |    . *. .   .   |
        |     o o         |
        |        .        |
        |                 |
        +-----[SHA256]----+
      
      After 10,000,000 iterations (150 hours CPU time or so), this is the closest I got:

        +------[RSA]------+
        |     o+*B*=+Bo   |
        |    o.+.*X=O o   |
        |     = +*+* o o  |
        |    E = += + o   |
        |     + =S . +    |
        |    o . .    .   |
        |     .           |
        |                 |
        |                 |
        +-----[SHA256]----+
      
      [1]: https://github.com/remram44.keys
  • patchtopic 7 months ago

    "kill the artist when patience is depleted"

    drastic!

  • thepuppet33r 7 months ago

    > Once visualization is introduced, so is aesthetics. This feature presents a great opportunity to fight against truly random key generation in order to trade security for arbitrary human desires.

    If this person made this tool specifically for the satire opportunity, that's hilarious.

    • Cheer2171 7 months ago

      I can't believe no one in this thread doesn't see this. This project is a critique of the openssh visual hash

    • 7 months ago
      [deleted]
  • H8crilA 7 months ago

    I wish Bitcoin produced at least something like that.

    • everfree 7 months ago

      Vanity addresses are a similar idea.

      • sbassi 7 months ago

        yes, when I tried this some years ago I only could set the first 3 o 4 characters, after that, it took more time I was willing to wait. I don't know how is it today.

    • j0hnyl 7 months ago

      You can always artify the qr code.

  • tasn 7 months ago

    This is cool as a project, but relying on humans to do pixel-perfect matching for security is probably a bad idea (well, glyph-perfect).

    • crtasm 7 months ago

      On the other hand - when ssh warns you the host key has changed but the art looks unchanged to your eye, you know something serious has happened.

    • dleink 7 months ago

      Yes.

  • remram 7 months ago

    benjojo has an article on this, with another (Golang) implementation: https://blog.benjojo.co.uk/post/ssh-randomart-how-does-it-wo...

    Includes example results, as well as an explanation for the randomart algorithm.

  • pfoof 7 months ago

    And imagine how Facebook got lucky with their .onion address

    • AlyssaRowan 7 months ago

      I mean, that brute-forceability was a reason for the newer v3 addresses; the v2 ones just weren't long enough.

      (As told to me by Alec, they bruteforced the first bit, but found a very coincidentally attractive one for a backronym among the candidates and chose that.)

      They did the first 8 characters of the v3.

  • 0x0 7 months ago

    I guess if you use this, then the security of your key is only as strong as for how many minutes the bruteforce took (since anyone else could also run the tool and generate their own key matching the desired fingerprint in the same amount of minutes you needed - or less).

    • desumeku 7 months ago

      I don't think the idea is to use the visual representation of the SSH key as a security mechanism but rather to have an SSH key that looks cool when you visualize it.

      • 0x0 7 months ago

        Isn't the whole point of VisualHostKey in ssh to act as a security mechanism, i.e. "yes this looks like the correct server key" on first use on a new client that doesn't already have the key in known_hosts?

    • remram 7 months ago

      That's not how randomness works. The expected duration of the attack is only determined by how close they want to get to your artwork.

      For example, if you pick the first key you generate, it obviously doesn't mean the attacker can get the same art in one try.

    • tayiorrobinson 7 months ago

      so the exact same as any other crypto key?

    • idunnoman1222 7 months ago

      The number of minutes being greater than the heat death of the universe

      • 0x0 7 months ago

        Is the runtime of this application "a number of minutes greater than the heat death of the universe" to find something that could pass off as matching the target visualhostkey?

    • 7 months ago
      [deleted]