KDF and encryption for SessionRequest

This commit is contained in:
orignal 2022-02-10 14:03:09 -05:00
parent 61ec873842
commit 04388325a8
2 changed files with 44 additions and 1 deletions

View file

@ -28,10 +28,19 @@ namespace transport
std::shared_ptr<const i2p::data::RouterInfo::Address> addr = nullptr, bool peerTest = false);
~SSU2Session ();
private:
void SendSessionRequest ();
void EncryptHeader (i2p::crypto::ChipherBlock& header);
void CreateHeaderMask (const uint8_t * kh1, const uint8_t * nonce1, const uint8_t * kh2, const uint8_t * nonce2);
private:
std::shared_ptr<i2p::crypto::X25519Keys> m_EphemeralKeys;
std::unique_ptr<i2p::crypto::NoiseSymmetricState> m_NoiseState;
std::shared_ptr<const i2p::data::RouterInfo::Address> m_Address;
i2p::crypto::ChipherBlock m_HeaderMask;
};
}
}