The Big Nothing

Reverse-engineering GitHub's identicon algorithm

I made a thing, I think it’s pretty cool: kashav.github.io/identicon.

It let’s you play around with pixels to choose a Github avatar pattern and then finds all user ids that hash to that pattern.

It started with this blog post, but the author couldn’t recall much, so it was mostly built on the backs of stewartlord/identicon.js and dgraham/identicon. They’re ports of the algorithm by former(?) Github employees. Only the second one gets the colours correct, so I only followed that one.

There’s a detailed breakdown of the algorithm and how the reversal works (with examples and everything) in the readme. It also talks about bits and nibbles and md5 and some other really cool things.

My favourite avatar, as you may have guessed, is the empty avatar: github.com/catsbyfella. I call it The Big Nothing.

Anyways, the code is on GitHub, feel free to star it or leave a comment or do whatever it is you normally do with other open source projects.