This generates keys consistent for use with ElGamal as described in page 164 of "Handbook of Applied Cryptography".