Class RandomArt

java.lang.Object
net.i2p.imagegen.RandomArt

public class RandomArt extends Object
Draw an ASCII-Art representing the fingerprint so human brain can profit from its built-in pattern recognition ability. This technique is called "random art" and can be found in some scientific publications like this original paper: "Hash Visualization: a New Technique to improve Real-World Security", Perrig A. and Song D., 1999, International Workshop on Cryptographic Techniques and E-Commerce (CrypTEC '99) sparrow.ece.cmu.edu/~adrian/projects/validation/validation.pdf The subject came up in a talk by Dan Kaminsky, too. If you see the picture is different, the key is different. If the picture looks the same, you still know nothing. The algorithm used here is a worm crawling over a discrete plane, leaving a trace (augmenting the field) everywhere it goes. Movement is taken from dgst_raw 2bit-wise. Bumping into walls makes the respective movement vector be ignored for this turn. Graphs are not unambiguous, because circles in graphs can be walked in either direction.
Since:
0.9.25
  • Constructor Details

    • RandomArt

      public RandomArt()
  • Method Details

    • gnutls_key_fingerprint_randomart

      public static String gnutls_key_fingerprint_randomart(byte[] dgst_raw, String key_type, int key_size, String prefix, boolean unicode, boolean html)
      Parameters:
      dgst_raw - the data to be visualized, recommend 64 bytes or less
      key_type - output in the first line, recommend 6 chars or less
      key_size - output in the first line
      prefix - if non-null, prepend to every line
    • main

      public static void main(String[] args)