mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
use pre-calculated x25519 ephemeral keys for ratchets
This commit is contained in:
parent
1f31fdc257
commit
5f1e66d64b
3 changed files with 50 additions and 17 deletions
|
@ -91,6 +91,9 @@ namespace crypto
|
|||
void SetPrivateKey (const uint8_t * priv, bool calculatePublic = false);
|
||||
void Agree (const uint8_t * pub, uint8_t * shared);
|
||||
|
||||
bool IsElligatorIneligible () const { return m_IsElligatorIneligible; }
|
||||
void SetElligatorIneligible () { m_IsElligatorIneligible = true; }
|
||||
|
||||
private:
|
||||
|
||||
uint8_t m_PublicKey[32];
|
||||
|
@ -101,6 +104,7 @@ namespace crypto
|
|||
BN_CTX * m_Ctx;
|
||||
uint8_t m_PrivateKey[32];
|
||||
#endif
|
||||
bool m_IsElligatorIneligible = false; // true if definitly ineligible
|
||||
};
|
||||
|
||||
// ElGamal
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue