Use Game of Life to Generate 256 bit Hash

game.of.life.256.bit.hash

One of the most fascinating aspects of Game of Life is that it illustrates so well how a completely deterministic process can be so unpredictable. Use a fixed starting pattern and run. Watch the result. Use the same starting pattern but change a single cell somewhere. The new result can be as different from the old as night and day.

Absolute determinism plus unpredictability are precisely the two things you look for in a hash algorithm. When you store passwords on a server you don’t store the passwords themselves but their hashes, calculated using some hash algorithm like for example MD5, SHA-256 or Whirlpool.

A user authenticating himself on the server inputs his password and the server hashes the password to see if the hash corresponds to the hash stored on the server.

For a hacker getting hold of the stored hashes, or for the system administrator, there is no way to run the hash algorithms backwards to retrieve the real passwords. The only way to break a hash is to systematically hash every possible password (out of zillions) and see if the hash matches.

I made this Javascript application to illustrate the idea of using Game of Life to generate hash values. The application is not using Conways standard B3/S23-rules but instead B23/S23-rules.

Try to hash different words or sentences differing only by a single letter adjacent in the alphabet and watch how the hash value changes. You can also try to hash some text but before you click on the ”Run 200 steps” click somewhere on the gird with the mouse pointer to change a single bit.

Annonser

One thought on “Use Game of Life to Generate 256 bit Hash

Kommentera

Fyll i dina uppgifter nedan eller klicka på en ikon för att logga in:

WordPress.com Logo

Du kommenterar med ditt WordPress.com-konto. Logga ut / Ändra )

Twitter-bild

Du kommenterar med ditt Twitter-konto. Logga ut / Ändra )

Facebook-foto

Du kommenterar med ditt Facebook-konto. Logga ut / Ändra )

Google+ photo

Du kommenterar med ditt Google+-konto. Logga ut / Ändra )

Ansluter till %s