6 ms·
What is the randomart image for?
- graderjs 4y agoI loved this! Thank you for this: and it turns out it worked! For example, I've started seeing the GitHub fingerprint (above) as something like the Statue of Liberty if it were a cat (don't ask why; that's just how my brain sees it) Lol I’m switching this thing on!
- folli 4y agoTangentially related: does any one know any nice libraries/tools to generate images (PNGs or whatever, doesn't need to be terminal compatible, colors even preferred) from hashes?
- isoprophlex 4y agoYou're looking for an Identicon, probably https://en.m.wikipedia.org/wiki/Identicon https://en.m.wikipedia.org/wiki/Identicon See some github repos: https://github.com/topics/identicon-generator https://github.com/topics/identicon-generator
- folli 4y agoRight on, that's very close to what I'm looking for! Thanks!
- 3-cheese-sundae 4y agoI know of robohash: https://robohash.org https://robohash.org
- kaoD 4y ago> and see if I started to be able to recognize the randomart images in the way the manual implies I'd be able to, and it turns out it worked! How computationally expensive is it to generate a key with randomart that kinda-resembles a known randomart? I've always ignored randomart since I always assumed it's easy to get a close-enough "collision". EDIT: algorithm explained here https://pthree.org/2013/05/30/openssh-keys-and-the-drunken-bishop/ https://pthree.org/2013/05/30/openssh-keys-and-the-drunken-b...
- eat_veggies 4y agoSeems to be pretty doable ("collisions" in the last section): https://blog.benjojo.co.uk/post/ssh-randomart-how-does-it-work-art https://blog.benjojo.co.uk/post/ssh-randomart-how-does-it-wo...
- Drakim 4y agoThe same question goes for how computationally expensive it is to generate a key that kinda-resembles a known key? If you are just eyeballing the key "yeah that looks like Github's key" when the terminal ask you, you might fall for a fake one that merely begins with the same characters. The neat trick is that it's others of magnitude harder to find a key that kinda-resembles a known key and kinda-resmbles it's randomart, so if both are presented at the same time, you'd be safer.
- RamRodification 4y ago> All in all, I think I'd recommend doing this. Even if the keys never change, it's pleasing to see the art show up in your terminal. If someone uses "the keys never change" as an argument against this, I think they have completely missed the point. (Not saying OP has).
- cmeacham98 4y agoThe real argument is that if the keys change, you'll know about it, because OpenSSH will yell very loudly about it. The random art is intended for _first time_ connections, where OpenSSH has to trust your judgement of the key's legitimacy because it has never connected to that host before. It's not like it will hurt anything, but turning it on for every connection doesn't make a security difference.
- xp84 4y agoyeah, i guess syncing around your known_hosts file to everyplace you originate an ssh connection from, would make more of a difference. So that way you minimize the making of first-time connections as much as possible.
- csears 4y agoIs it safe to publicly post the randomart visualization of keys like this?
- demodifier 4y agoGood question. I would assume that with the visualization being defined by the public-key of the server, this cannot be use to reverse-engineer the private key. Also, the linked paper (I just read the summary) does try to attempt this and partially succeeds and talks more about the implication.
- coldpie 4y agoI think you should treat it as posting the key itself. In other words, it's probably possible to transform from the randart back to the key (else it wouldn't be unique per key, right?). So for a public key that is intended to be public, yes, it should be fine. For keys which you do not want public, it's probably not a good idea to post it publicly.
- duskwuff 4y agoIt's not even a representation of the public key itself; it's the SHA256 fingerprint of the key. There's no practical way to transform that back into the key -- and, in any case, the server will send that key to any client that connects, so it's not like recovering it from a screenshot accomplishes anything.
- Darkphibre 4y agoI suppose the argument would be that the key search space is reduced. Statistically speaking, you know the weights of certain binary pairs if the image is not evenly distributed. But I'm guessing that it'd only drop the average search space by... two or three powers of two for most keys?
- duskwuff 4y agoAgain: the randomart image is based on a hash of the public key. If you want to know what that key is, all you have to do is ask the server. You don't need to launch a sophisticated, expensive cryptographic attack to obtain it.
- jrm4 4y agoI always understood the option, but seems like a little color would go a LONG way in making them much more usable? I never got around to paying attention to them and I think that's why.
- jhbadger 4y agoMaybe they could use something like Chernoff faces (a method in which data is converted into images of a human face on the grounds that people are better at distinguishing faces than other images). https://en.wikipedia.org/wiki/Chernoff_face https://en.wikipedia.org/wiki/Chernoff_face
- dark-star 4y agoHow much of a face would you recognize if it is rendered with ASCII on a console though? Which is probably the default use-case for SSH for 99% of people.
- Darkphibre 4y agoHeh... as someone with prosopagnosia, this wouldn't help too much. But I agree it'd help most people!!
- comefho 4y agoWhat's the point when the server, if it's one you're logging into regularly (or even just more than once), will already be in your known_hosts file? Let the computer do the checking for you.
- coldpie 4y agoGood question. Perhaps it's useful if you're logging in from many machines/users without populated known_hosts? So if you spin up a new machine and push to Github, you can recognize it visually by its randart which you saw many times before on other machines.
- Eduard 4y agoShowing the random art can help to notice if you connected to the wrong server by accident, e.g. Incorrectly connecting to staging.example.com when you actually wanted to connect to live.example.com
- vmoore 4y agoNeeds this for SHA256 sums I often compare SHA256 sums of software and have to trust my eyes that the two hashes are the same. Most of the time I just look at the first 5 characters, alongside the last five characters, but I don't look at the middle, and I really should. Some hashes could deliberately look the same but have 2-3 characters different, and I wouldn't know, unless I look at each character individually, but who does that?
- r1ch 4y agoMalware that replaces crypto addresses on webpages is already aware of this - they try to generate addresses with similar starting and ending characters since most people aren't checking the whole thing.
- coldpie 4y agoIt is a bit of effort, but you can make the computer do the verification for you by writing (or generating) a simple text file. Using Perl shasum because I'm on a mac at the moment, but Linux sha256sum works the same: $ echo hi > some_file $ shasum -a 256 some_file > check $ cat check 98ea6e4f216f2fb4b69fff9b3a44842c38686ca685f3f55dc48c5d3fb1107be4 some_file $ shasum -a 256 -c check some_file: OK $ echo $? 0 $ echo bye > some_file $ shasum -a 256 -c check some_file: FAILED shasum: WARNING: 1 computed checksum did NOT match $ echo $? 1 Edit: Oh cool, at least perl's shasum allows reading from stdin so you can even skip the file if you're just copying some check file off the software's website: $ shasum -a 256 -c - <<EOF > 98ea6e4f216f2fb4b69fff9b3a44842c38686ca685f3f55dc48c5d3fb1107be4 some_file > EOF some_file: OK
- saul_goodman 4y agoIn my head I've always read that as rando-mart. I have a mental image of a small high-density city street shop with anything you could possibly want to buy including small ascii art images of my ssh keys.
- Joker_vD 4y agoReminds me of a slide from one of Peter Gutmann's lectures on PKI and related stuff: a mock up of a title page for a proposed conference paper, titled "Do SSH Fingerprints Increase Security?", with abstract consisting of just "No." Yes, it follows other slides that describe precisely the attack in TFA, only for traditional SSH fingerprints, and the real world surveys on the "how many users have called or emailed to verify the SSH key fingerprint whenever the key changed?" question (answer: literally zero), so it seems sadly accurate.
- syntheticcorp 4y agoFound it, pg 47 https://www.cs.auckland.ac.nz/~pgut001/pubs/defending.pdf https://www.cs.auckland.ac.nz/~pgut001/pubs/defending.pdf
- 2b3a51 4y agoSlackware displays the randomart images for some kind of public key when you boot. I always wondered what these were, so thanks for posting.
- lagniappe 4y agoI just want a random art that has shallow minerals, low savagery, and a temperate climate.
- DoItToMe81 4y agoI want high savagery and lots of giant animals, so I don't have to rely on elves.