ECDSA and PRGN stuff.

This commit is contained in:
momo5502
2016-02-08 14:27:15 +01:00
parent ebc784c51d
commit 4d36a0b9ed
8 changed files with 116 additions and 8 deletions

View File

@ -28,7 +28,7 @@ namespace Components
Logger::Print("Starting local server discovery...\n");
Discovery::DiscoveryContainer.Challenge = Utils::VA("%d", Game::Com_Milliseconds());
Discovery::DiscoveryContainer.Challenge = Utils::VA("%d", Utils::Cryptography::Rand::GenerateInt());
//Network::BroadcastAll("discovery\n");
unsigned int minPort = Dvar::Var("net_discoveryPortRangeMin").Get<unsigned int>();

View File

@ -224,7 +224,7 @@ namespace Components
download.maxParts = download.buffer.size() / PACKET_SIZE;
if (download.buffer.size() % PACKET_SIZE) download.maxParts++;
download.challenge = Utils::VA("%X", Game::Com_Milliseconds());
download.challenge = Utils::VA("%X", Utils::Cryptography::Rand::GenerateInt());
Download::Container::AckRequest request;
request.id = id;

View File

@ -317,7 +317,7 @@ namespace Components
count++;
dedi.lastTime = Game::Com_Milliseconds();
dedi.challenge = Utils::VA("%d", dedi.lastTime);
dedi.challenge = Utils::VA("%d", Utils::Cryptography::Rand::GenerateInt());
dedi.state = Node::STATE_QUERYING;
Logger::Print("Verifying dedi %s...\n", dedi.address.GetString());

View File

@ -28,7 +28,7 @@ namespace Components
Party::Container.AwaitingPlaylist = false;
Party::Container.JoinTime = Game::Com_Milliseconds();
Party::Container.Target = target;
Party::Container.Challenge = Utils::VA("%X", Party::Container.JoinTime);
Party::Container.Challenge = Utils::VA("%X", Utils::Cryptography::Rand::GenerateInt());
Network::Send(Party::Container.Target, Utils::VA("getinfo %s\n", Party::Container.Challenge.data()));

View File

@ -500,7 +500,7 @@ namespace Components
SendServers--;
server->SendTime = Game::Com_Milliseconds();
server->Challenge = Utils::VA("%d", server->SendTime);
server->Challenge = Utils::VA("%d", Utils::Cryptography::Rand::GenerateInt());
ServerList::RefreshContainer.SentCount++;