Add keygen code.
Remove requirement that the key length be a power of 2. Completely unnecessary.
Add build instructions.