mirror of
https://github.com/raphaeIl/Novaria.git
synced 2025-12-13 15:04:36 +01:00
pcap loader, first login packet
This commit is contained in:
@@ -24,7 +24,15 @@ namespace Novaria.Common.Crypto
|
||||
BigInteger clientPubKeyInt = new BigInteger(clientPubKey.Reverse().ToArray());
|
||||
|
||||
//Cpub**Spriv mod p
|
||||
return BigInteger.ModPow(clientPubKeyInt, spriv, p).ToByteArray(true, true)[..32];
|
||||
Console.WriteLine(clientPubKeyInt.ToString());
|
||||
|
||||
var result = BigInteger.ModPow(clientPubKeyInt, spriv, p);
|
||||
if (result < 0)
|
||||
{
|
||||
result += p; // Make the result non-negative, causes error if -
|
||||
}
|
||||
|
||||
return result.ToByteArray(true, true)[..32];
|
||||
}
|
||||
|
||||
// this is for manual pcap parsing use only, officalServerPubKey is in the first IKE response, client priv will be in frida
|
||||
|
||||
Reference in New Issue
Block a user