lowhash

This is an experiment in collecting magical sentences which produce low SHA256 hashes.

To give you an idea, take the SHA256 hash of this sentence - "Have her shimmering papers pose under evening sky." -- it's really low. Printing the hash in hex reveals eight leading zeros: "00000000 d3e86b2d 7e200b18 ea4a38e2 162af58b 86d92f3a 639b97af e31d9dcd". We would expect to encounter a hash with eight leading zeros at a rate of less than 1/168.

I wrote a simple Go (golang.org) program to find low hashes quickly. It generates random sentences and checks the SHA256. When a low hash is encountered, the program will upload the find to this website. You can download the program to participate in the search:

The source code is at Github. Feel free to fork and modify as you please.

You may have noticed that this challenge is not so different from Bitcoin mining or similar. With the Bitcoin block chain, the messages contain a link to the previous message by including the hash of the previous block. If you wanted to "win" at lowhash, you could just repost blocks from Bitcoin (though they would not be likely to render into a readable utf8 text string...). Adapting existing bitcoin mining software/hardware for searching for sentences would be a good strategy if you wanted to search faster.

If you are interested in creating your own grammar for generating unique sentences, have a look at this example. To use a custom grammar, place it in the same directory that contains program and name the text file "lowhash.txt". On each line, put alternate words. Sentences are generated by selecting a single word from each line, starting with the first line and going to the end. Underscores are used to represent spaces.

If you would like to post or check a phrase from the command line, you can use cURL or similar:
curl lowhash.com/sagebird -d msg='hello world'

For questions & suggestions: @williamsharkey on Twitter. And if you know anyone with a stash of lower hashes, please let me know!