System.arraycopy(this.message, 0, randomBytes, Message.HEADS.length(), randomBytes.length);it should read
System.arraycopy(this.message, Message.HEADS.length(), randomBytes, 0, randomBytes.length);If you do not wish to make the change yourself, you may download the new Message.java or the new zip of all the files.
So if you want to do generateKeyPairForModulus properly, you should generate e as a random number (from a secure source), and calculate the d. This is not very hard, it only requires a small modification to the Cryptix source code. However, since we didn't make this a part of the assignment spec, we'll allow you to handle it the way Cryptix does.