sockscape/server/Encryption/KeyExchange.cs

27 lines
673 B
C#
Raw Normal View History

2017-05-17 21:06:16 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Numerics;
using Square;
2017-05-17 21:06:16 +00:00
namespace CircleScape.Encryption {
class KeyExchange {
private BigInteger Secret;
public BigInteger Generator { get; private set; } = 2;
2017-05-17 21:06:16 +00:00
public BigInteger Modulus { get; private set; }
public BigInteger PrivateKey { get; private set; } = BigInteger.MinusOne;
2017-05-17 21:06:16 +00:00
public KeyExchange() {
Secret = RNG.NextPrime(512 / 8);
Modulus = RNG.NextPrime(512 / 8);
}
2017-05-18 21:03:35 +00:00
2017-05-19 21:02:39 +00:00
public Packet GenerateInitialPacket() {
2017-05-18 21:03:35 +00:00
2017-05-19 21:02:39 +00:00
return
}
2017-05-17 21:06:16 +00:00
}
}