I.T. Security and Linux Administration

May 31 2013   1:10PM GMT

The SSH Picaso

Eric Hansen Eric Hansen Profile: Eric Hansen

If you’ve ever created a SSH keypair, you’ve been graced with SSH’s artistic abilities.  You know, that little character map that shows you the key’s fingerprint:

➜  ~  ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/eric/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/eric/.ssh/id_rsa.
Your public key has been saved in /home/eric/.ssh/id_rsa.pub.
The key fingerprint is:
08:48:6e:8a:6a:14:5d:58:d3:10:54:f2:7b:e0:33:0c eric@home
The key's randomart image is:
+--[ RSA 2048]----+
|  . +O=.         |
| o.o. +.         |
| .+..E o         |
|.o.  .+.o        |
|o.    .*S.       |
|o       +        |
|..               |
|.                |
|                 |

I found an article that goes into detail about how this is created, and its rather interesting.  Basically what’s going on behind the scenes is it’s taking the key (in this case: “08:48:6e:8a:6a:14:5d:58:d3:10:54:f2:7b:e0:33:0c”), and converting each pair (“08”, “48”, etc…) into binary.  it then takes each pair, and reads the binary in reverse order (so 08 = 00001000 = 00010000).  After that, its broken off into pairs again (so it is handling either 00, 01, 10 or 11 in binary).

The board you see is basically the board you get.  The concept behind it is to show you how frequent a value exists.  Each character represents a specific frequency at that location:

0 - " "
1 - "."
2 - "o"
3 - "+"
4 - "="
5 - "*"
6 - "B"
7 - "O"
8 - "X"
9 - "@"
10 - "%"
11 - "&"
12 - "#"
13 - "/"
14 - "^"

The S and E you see there stand for where the art generator started and ended.

Now, there’s some mathematics behind how the board sets the position and such, and the analogy that the SSH devs used to explain this is a lot better (drunk bishop).  The article I read that covered this a little bit more than me can be read here: http://pthree.org/2013/05/30/openssh-keys-and-the-drunken-bishop/

 Comment on this Post

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: