Cryptography, Cybersecurity.
ElGamalKeyPairGenerator pGen = new ElGamalKeyPairGenerator (); pGen.Init(new ElGamalKeyGenerationParameters(new SecureRandom(),elParams)); AsymmetricCipherKeyPair pair = pGen.GenerateKeyPair(); To encrypt, we use the public key (pair.Public): ElGamalEngine cryptEng = new ElGamalEngine ();