mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
generate DH keys pair per NTCP session
This commit is contained in:
parent
15299aa42d
commit
7bdf52a774
6 changed files with 37 additions and 5 deletions
|
@ -11,6 +11,12 @@ namespace data
|
|||
{
|
||||
#pragma pack(1)
|
||||
|
||||
struct DHKeysPair // transient keys for transport sessions
|
||||
{
|
||||
uint8_t publicKey[256];
|
||||
uint8_t privateKey[256];
|
||||
};
|
||||
|
||||
struct Keys
|
||||
{
|
||||
uint8_t privateKey[256];
|
||||
|
@ -71,6 +77,7 @@ namespace data
|
|||
|
||||
IdentHash CalculateIdentHash (const Identity& identity);
|
||||
Keys CreateRandomKeys ();
|
||||
void CreateRandomDHKeysPair (DHKeysPair * keys); // for transport sessions
|
||||
|
||||
// kademlia
|
||||
struct RoutingKey
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue