mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
replace tunnel encryption to AES-NI
This commit is contained in:
parent
2cdd3c3c26
commit
cc302847a8
3 changed files with 29 additions and 36 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue