mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
separate X25519Keys
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include <openssl/bn.h>
|
||||
#include <openssl/evp.h>
|
||||
#include <boost/asio.hpp>
|
||||
#include "Crypto.h"
|
||||
#include "util.h"
|
||||
#include "RouterInfo.h"
|
||||
#include "TransportSession.h"
|
||||
@@ -78,8 +79,8 @@ namespace transport
|
||||
NTCP2Establisher ();
|
||||
~NTCP2Establisher ();
|
||||
|
||||
const uint8_t * GetPub () const { return m_EphemeralPublicKey; };
|
||||
const uint8_t * GetPriv () const { return m_EphemeralPrivateKey; };
|
||||
const uint8_t * GetPub () const { return m_EphemeralKeys.GetPublicKey (); };
|
||||
const uint8_t * GetPriv () const { return m_EphemeralKeys.GetPrivateKey (); };
|
||||
const uint8_t * GetRemotePub () const { return m_RemoteEphemeralPublicKey; }; // Y for Alice and X for Bob
|
||||
uint8_t * GetRemotePub () { return m_RemoteEphemeralPublicKey; }; // to set
|
||||
|
||||
@@ -110,10 +111,8 @@ namespace transport
|
||||
bool ProcessSessionConfirmedMessagePart2 (const uint8_t * nonce, uint8_t * m3p2Buf);
|
||||
|
||||
BN_CTX * m_Ctx;
|
||||
uint8_t m_EphemeralPrivateKey[32], m_EphemeralPublicKey[32], m_RemoteEphemeralPublicKey[32]; // x25519
|
||||
#if OPENSSL_X25519
|
||||
EVP_PKEY * m_EphemeralPkey;
|
||||
#endif
|
||||
i2p::crypto::X25519Keys m_EphemeralKeys;
|
||||
uint8_t m_RemoteEphemeralPublicKey[32]; // x25519
|
||||
uint8_t m_RemoteStaticKey[32], m_IV[16], m_H[32] /*h*/, m_CK[33] /*ck*/, m_K[32] /*k*/;
|
||||
i2p::data::IdentHash m_RemoteIdentHash;
|
||||
uint16_t m3p2Len;
|
||||
|
||||
Reference in New Issue
Block a user