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