modifying the keygen part of the latex paper