mirror of
https://github.com/raphaeIl/Novaria.git
synced 2025-12-16 16:34:44 +01:00
fix dh (by plagiarism), refactor pcapparser
This commit is contained in:
@@ -113,18 +113,28 @@ namespace Novaria.GameServer.Controllers.Api
|
||||
Log.Information("RECEIVED client public key: ");
|
||||
Utils.PrintByteArray(clientPublicKey);
|
||||
|
||||
AeadTool.key3 = DiffieHellman.Instance.CalculateKey(clientPublicKey);
|
||||
Console.WriteLine("OLD::");
|
||||
|
||||
Console.WriteLine(new System.Numerics.BigInteger(clientPublicKey.Reverse().ToArray()));
|
||||
|
||||
Console.WriteLine("OLD::");
|
||||
|
||||
//AeadTool.key3 = DiffieHellman.Instance.CalculateKey(clientPublicKey);
|
||||
AeadTool.SetAeadKey(clientPublicKey);
|
||||
Log.Information("KEY3 (chacha20 key) calculated: ");
|
||||
Utils.PrintByteArray(AeadTool.key3);
|
||||
|
||||
byte[] pubKey = AeadTool.GetPubKey();
|
||||
|
||||
IKEResp ikeResponse = new IKEResp()
|
||||
{
|
||||
PubKey = ByteString.CopyFrom(AeadTool.PS_PUBLIC_KEY.Reverse().ToArray()),
|
||||
//PubKey = ByteString.CopyFrom(AeadTool.PS_PUBLIC_KEY.Reverse().ToArray()),
|
||||
PubKey = ByteString.CopyFrom(pubKey),
|
||||
Token = AeadTool.TOKEN
|
||||
};
|
||||
|
||||
Log.Information("Sending ps server public key: ");
|
||||
Utils.PrintByteArray(AeadTool.PS_PUBLIC_KEY);
|
||||
Utils.PrintByteArray(pubKey);
|
||||
|
||||
Packet ikePacket = new Packet()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user