I'm not the author of the technique, nor am I an expert on the subject matter, so I can't comment on why this was chosen, other than it seems to be effective while being very simple. Per the algorithm, the room size is a rectangle 17 tiles wide by 9 tiles long. We start off by defining the size of the room. If we represent the grid as a 2D plot of the number of coins in each tile, we get the SSH visual host key! After 64 moves, some tiles will contain no coins, while some will have one or more coins on them. With Peter walking around randomly in a room, he leaves behind coins on tiles he has visited. With that amusing story out of the way, let's analyse how that relates to our little project. Source: The drunken bishop: An analysis of the OpenSSH fingerprint visualization algorithm, D. After 64 steps, just when no coins are left, Peter suddenly wakes up. And after each move, he places a coin on the floor, to remember that he has been there before. When he hits a wall, he moves to the side, which takes him from the black tiles to the white tiles (or vice versa). Well, to be exact, he only makes diagonal steps-just like a bishop on a chess board. His head heavily aching-probably from too much wine he had before-he starts wandering around randomly. The floor is paved with square tiles, strictly alternating between black and white. There are walls on all four sides and apparently there is no exit. Oh, and if you're curious, you can add VisualHostKey yes to your ~/.ssh/config file to enable this in your shell when connecting to other hosts.īefore we delve into the algorithm that draws this ASCII art, let's all sit in a circle while I tell the tale of the Drunken Bishop.īishop Peter finds himself in the middle of an ambient atrium. If you were to mistakenly connect to a machine with a different host key, you'd be more likely to recognize (or rather, fail to recognize) an image of the key and realise your mistake. It was introduced in OpenSSH 5.1 as a way to help humans recognize strings of random characters in a fast and reliable way. That ASCII art is the 16-byte (128-bit) fingerprint of the host key, represented as a procedurally generated image. Enter fullscreen mode Exit fullscreen mode
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |