The block payload hash and generation signature excluded from the block signature.
byte[] data = block.getBytes();
byte[] data2 = new byte[data.length - 64];
System.arraycopy(data, 0, data2, 0, data2.length);
block.blockSignature = Crypto.sign(data2, secretPhrase);
These bytes shouldn't be excluded from the generation signature or the block signature.
The code above, surrounding code, and relevant code in verifyBlockSignature() and verifyGenerationSignature() is fatally flawed.