replace tunnel encryption to AES-NI

This commit is contained in:
orignal 2014-05-09 19:34:12 -04:00
parent 2cdd3c3c26
commit cc302847a8
3 changed files with 29 additions and 36 deletions

View file

@ -4,6 +4,7 @@
#include <inttypes.h>
#include <sstream>
#include <vector>
#include "aes.h"
#include "RouterInfo.h"
#include "RouterContext.h"
@ -22,7 +23,9 @@ namespace tunnel
bool isGateway, isEndpoint;
TunnelHopConfig * next, * prev;
i2p::crypto::CBCDecryption decryption;
i2p::crypto::ECBDecryption ivDecryption;
TunnelHopConfig (const i2p::data::RouterInfo * r)
{
CryptoPP::RandomNumberGenerator& rnd = i2p::context.GetRandomNumberGenerator ();
@ -38,6 +41,8 @@ namespace tunnel
next = 0;
prev = 0;
decryption.SetKey (replyKey);
decryption.SetIV (replyIV);
}
void SetNextRouter (const i2p::data::RouterInfo * r)