Hacker News new | ask | show | jobs
by poopicus 4454 days ago
If you're wondering how he did it, Brad wrote a tool called 'gitbrute'[1] that (as the name suggests) brute-forces the prefix of the hash to whatever you like.

[1]: https://github.com/bradfitz/gitbrute

2 comments

This is a fairly popular thing to do with bitcoin addresses as well; keep generating keys until you get one with a recognizable prefix in the address.
Tor hidden services also do this. (The address of a hidden service is a hash)
Not just for vanity, either - it makes phishing a hidden service harder: if users know the .onion for Agora starts with 'agora', then a phisher has to invest weeks of compute-time just to get a plausible .onion to start his phish with, rather generate than any old .onion in a millisecond.
Neat. I remember Stripe did something similar with their CTF challenge
Yep! There were a bunch of us who wrote GPU "miners" (mostly OpenCL). I was intending to open-source mine at one point but never got around to it.

At the end of the challenge, the network was hashing ten digits (i.e. 000000000 prefix) in just a few seconds. Here's one of the rounds: https://github.com/pushrax/round660/commits/master

I wrote this a little over a year ago, only (for the lulz) in Node rather than Go:

https://github.com/stuartpb/lhc

Mine allows using a custom word list in the commit message for the nonce.

Judging by this commit, I'm guessing gitbrute uses miniscule variations in the commit time instead.

EDIT: yep: https://github.com/bradfitz/gitbrute/blob/master/gitbrute.go