public SecureSocket(BigInteger key, X9ECParameters parameters, AddressFamily addressFamily, SocketType socketType, ProtocolType protocolType) : base(addressFamily, socketType, protocolType) { this.key = key; this.parameters = parameters; }
public new void Connect(EndPoint remoteEP) { base.Connect(remoteEP); parameters = X9ECParameters.GetByName(ReceiveString(this)); if (parameters == null) { base.Disconnect(false); return; } SendPoint(this, parameters.G * key); secret = ReceivePoint(this) * key; byte[] tmp = secret.X.ToBigInteger().ToByteArray(); Array.Resize<byte>(ref tmp, 16); cipher = new Rijndael(tmp); initializationVector = secret.Y.ToBigInteger().ToByteArray(); Console.WriteLine(secret); }
public SecureSocket(BigInteger key, X9ECParameters parameters) : this(key, parameters, AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp) { }