1a) Log in with steam:
- Use steam API to verify ownership.
- There is no key in this case.
1b) Log in with key:
- Connect to auth.blockland.us, receive 32 passphrases (long strings)
- Pick correct pass phrase based on 6th character of the key
- Calculate hash of pass phrase and the last 12 characters of your key
- Send hash to auth server together with your blid
- Auth server loads key for your blid, does the same, logs you in if it matches
- Repeat every 10 minutes or so to stay logged in
2) Joining a server:
- Send connect request to server, containing your name
- Server sends name + ip to auth server for verification
- Receives your blid on success
Now, the keys are randomly generated when you buy them, so it's not possible to create a keygen.
If you want to play on official servers, you need to buy one.
You could make an unofficial master+auth server... but that'd be a bunch of work for no reason.
There aren't many people that would care about it and you'd constantly have trolls on your pirate servers.