RSA and ElGamal implementations in Java