A couple of websites have recently been setup to find x.
Elliot Kembler tries to name x the Kembler Identity which might be a little arrogant, but the idea is explained best on his site.
The MD5 Game site keeps a highscore of who is winning the search using the longest common substring. Cool idea - but of course if you are leading this scoreboard it doesn't mean you are any closer to finding x than anyone else.
So here is some Perl to help you find an input to MD5 that gives you an output with a certain (configurable) substring length:
#!/usr/bin/perl
use strict;
use warnings;
use Digest::MD5 qw(md5_hex);
use String::LCSS_XS qw(lcss);
my $start = q(dd91217c39ac3b9e54846de064d40c62);
my $last = $start;
while (1) {
my $cur = md5_hex($last);
my $long = lcss($last, $cur);
if (length($long) > 5) {
print "md5('$last') == '$cur'\n";
print "$long\n";
if ($cur eq $last) {
print "^^^^ I found it! ZOMG!!!!\n";
last;
}
}
$last = $cur;
}
See the 5 in there? Change that to a higher number when you start getting serious about finding really long, common substrings. As an example, here is the output of the above, changing the loop from while (1) to for (1..150000)
md5(dd91217c39ac3b9e54846de064d40c62) => ac3b9e54846de4358d0d460572f128fb
ac3b9e54846de
md5(df08ba8cb16042270ed7f0f4385f0d60) => ad06535b0cd9265d3727dcb1604fa4f4
cb1604
md5(6489123acf277017783b9cc5882121d0) => d052d008f277015cc2fc01f8e41e0574
f27701
md5(29d91a801c36d15f6d393fadce1ed2ce) => 3fadce5dfaf11cfbd4bd0a19838dfa31
3fadce
md5(90253bc725066b48977fc5fd287ac873) => c45ef485c3cd87ac8781698b9b6cbb3b
87ac87
md5(13ab98420d2d390220661bc27cdd01d5) => faccf5f92d098420d41c5b7bcac9f9d3
98420d
Why use dd91217c39ac3b9e54846de064d40c62 as the starting hash? Because that's the one that is currently leading the MD5 Game website (at the time of this post.) You should change it.
You will note that my Perl just uses the MD5 hash of the previous attempt as its new try. This is a novel idea. You could (should?) use a randomly generated hash or just increment your way through the whole space if you like... of course this will take up a fairly large portion of time ;-)
Django Python 960.gs Git Vim NetBSD Nginx
This is the blog of Brad Willis, a software engineer living in Brisbane.
Help
Latest entries
*BSD Agile Apache Apple apt Athletics Best-Practice Censorship Chrome Comedy Cool Crosswords Deployment Django English Exim Firefox Git Hardcore Health irssi Javascript Jira Languages Linux Makefile Mathematics Mobile Broadband Mutt MySQL NetBSD nginx Nokia OpenVZ OSX Perl Postfix Privacy Python Rant Requirements rsync Ruby Shell Slackware SQL SQLite SSH Standards Subversion Television Testing ThisBlog Vim VMWare (Fusion) VPN X zsh
gvim - Always open new files as new tabs
crontab - escape % (percentage)
OSX Google Chrome - start in incognito mode
SQLite date arithmetic
Postfix - delete message in mailq
Checking for exceptions in doctests
Homer's Curling Speech
retry in Python
Vim Makefile tabs
Centos (or RH) IPTables
Converting ssh2 public keys to openssh
Vim comment hints
Context managers in Perl
Dish rotation
Git - fixing commit user
apt stuff
Using shell variables in AWK
Linux - Too many open files
Tell gvim to save and quit... remotely
Vim - automatically remove whitespace at EOL
Python - relative paths from within modules
TV Aspect Ratios
Git - Which commits are in your branch only?
Subversion setup cheat sheet
Force detach a screen session
Modify sudo's use of environment variables
Install all Perl modules
Mutt - delete old messages
OpenVZ VPS and swap space
fail2ban on NetBSD for ssh
NetBSD - Using sup
Python - testing for a sys.exit
Python Best Practice Link Dump
Python script names
Perl - Using an expensive module
Speed of git clone
Perl Modules with Custom Prefix
Perl: tr vs. s
Brilliant sysadmin Reference
Why is GRUB better than LILO?