PostHeaderIcon Ahhhh… the Roy Identity.

Well… I had this genius idea of creating a hash, that would hash to itself.  In other words, when you hash a phrase, say… “pizza” you get this hash “7cf2db5ec261a0fa27a502d3196a6f60″.  Well… what if I hash an md5 looking hash, for example, “895c2552b864e9ded89e7644f7cb6173″ instead of pizza.  The result would be “2173035550e007f7a3ee82c69b0dd223″ which is, of course different.

Taking that into consideration, wouldn’t there be at least just one single md5 hash that would return itself?  Saying the input is “b0d5b22dcaa2184bb866a10267d2066c” and the output would be “b0d5b22dcaa2184bb866a10267d2066c” as well?

md5(string)=(string);//?

I wanted to find that hash, and I thought I was going to be the first by writing some super efficient code to find it.  Well.. upon googling… I found out that someone else beat me too the punch. So instead, I’m supporting his cause.  It’s called “The Kember Identity” and it surprisingly has a large following.

Shit… I wanted a number named after ME!

DAMN YOU!!!!

You can find the details of the project here: http://elliottkember.com/kember_identity.html

There is a Source Code page with several scripts in several different languages that you can use.  I have included the Source (Was written by Chris Dahlberg) and the .EXE of the one that I’m using.  Good luck!!!  There is a cash prize, but you have to pay/contribute to be eligible.

roy_kember_identity.zip

using System;
using System.Security.Cryptography;

namespace KemberIdentity
{
    class Program
    {
        static void Main()
        {
            Int32 longestMatchLength = 0;
            Byte[] longestMatchOriginal = new Byte[16];
            Byte[] longestMatchHash = new Byte[16];

            Byte[] original = new Byte[16];
            Byte[] hash;

            MD5 md5 = MD5.Create();
            Random random = new Random();

            while (true)
            {
                for (Int32 i = 0; i < 16; i++)
                {
                    original[i] = (Byte)random.Next(0, 255);
                }

                hash = md5.ComputeHash(original);

                for (Int32 i = 0; i < 16; i++)
                {
                    if (original[i] != hash[i])
                        break;

                    if (i + 1 > longestMatchLength)
                    {
                        longestMatchLength = i + 1;

                        System.Console.WriteLine("Longest match: {0} bytes", longestMatchLength);
                        System.Console.WriteLine(" Original: {0}", BitConverter.ToString(original));
                        System.Console.WriteLine(" Hash: {0}", BitConverter.ToString(hash));
                        System.Console.WriteLine();

                        if (longestMatchLength == 16)
                        {
                            System.Console.WriteLine("*** EXECUTION COMPLETE!");
                            System.Console.WriteLine("*** Write down the number, then press any key to quit.");
                            System.Console.ReadKey();
                            return;
                        }
                    }
                }
            }
        }
    }
}
Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Fark
  • Reddit
  • StumbleUpon
  • TwitThis
  • Yahoo! Buzz
If you enjoyed this post, make sure you subscribe to my RSS feed!

Related posts:

  1. Where Can I Get Tuck Tech Coupons? How Can I Use Tuck Tech Coupon Codes?
  2. Wii Emulator – DolphinEmu
  3. Ashen’s Tech Dump – God’s Source Code
  4. Tech Beat: Watching Tiger’s return in 3D

One Response to “Ahhhh… the Roy Identity.”

Leave a Reply

Twitter
Follow @SirTwat (10317 followers)