replace tunnel encryption to AES-NI
This commit is contained in:
13
Tunnel.h
13
Tunnel.h
@@ -8,8 +8,6 @@
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <mutex>
|
||||
#include <cryptopp/modes.h>
|
||||
#include <cryptopp/aes.h>
|
||||
#include "Queue.h"
|
||||
#include "TunnelConfig.h"
|
||||
#include "TunnelPool.h"
|
||||
@@ -51,20 +49,11 @@ namespace tunnel
|
||||
uint32_t GetNextTunnelID () const { return m_Config->GetFirstHop ()->tunnelID; };
|
||||
const i2p::data::IdentHash& GetNextIdentHash () const { return m_Config->GetFirstHop ()->router->GetIdentHash (); };
|
||||
|
||||
private:
|
||||
|
||||
void LayerDecrypt (const uint8_t * in, size_t len, const uint8_t * layerKey,
|
||||
const uint8_t * iv, uint8_t * out);
|
||||
void IVDecrypt (const uint8_t * in, const uint8_t * ivKey, uint8_t * out);
|
||||
|
||||
private:
|
||||
|
||||
TunnelConfig * m_Config;
|
||||
TunnelPool * m_Pool; // pool, tunnel belongs to, or null
|
||||
bool m_IsEstablished, m_IsFailed;
|
||||
|
||||
CryptoPP::ECB_Mode<CryptoPP::AES>::Decryption m_ECBDecryption;
|
||||
CryptoPP::CBC_Mode<CryptoPP::AES>::Decryption m_CBCDecryption;
|
||||
bool m_IsEstablished, m_IsFailed;
|
||||
};
|
||||
|
||||
class OutboundTunnel: public Tunnel
|
||||
|
Reference in New Issue
Block a user