I2P: End-to-End encrypted and anonymous Internet https://i2pd.website/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
707 B

6 years ago
#ifndef NTCP2_H__
#define NTCP2_H__
#include <inttypes.h>
#include <memory>
#include "RouterInfo.h"
#include "TransportSession.h"
namespace i2p
{
namespace transport
{
class NTCP2Session: public TransportSession, public std::enable_shared_from_this<NTCP2Session>
{
public:
NTCP2Session (std::shared_ptr<const i2p::data::RouterInfo> in_RemoteRouter = nullptr); // TODO
~NTCP2Session ();
private:
bool KeyDerivationFunction (const uint8_t * rs, const uint8_t * pub, uint8_t * derived);
6 years ago
void CreateEphemeralKey (uint8_t * pub);
void SendSessionRequest (const uint8_t * iv, const uint8_t * rs);
6 years ago
private:
uint8_t m_ExpandedPrivateKey[64]; // x25519 ephemeral key
};
}
}
#endif