/// <summary> /// Creates the private key. /// </summary> /// <param name="publicKey">The public key.</param> /// <returns></returns> public DiffieHellmanKey CreatePrivateKey(DiffieHellmanKey publicKey) { BigInteger yother = new BigInteger(publicKey.ToByteArray()); return new DiffieHellmanKey(_prime, _g, yother.ModPow(_secret, _prime)); }
/// <summary> /// Creates the private key. /// </summary> /// <param name="publicKey">The public key.</param> /// <returns></returns> public DiffieHellmanKey CreatePrivateKey(DiffieHellmanKey publicKey) { BigInteger yother = new BigInteger(publicKey.ToByteArray()); return(new DiffieHellmanKey(_prime, _g, yother.ModPow(_secret, _prime))); }