mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
common MixHash and MixKey
This commit is contained in:
parent
b2f0278180
commit
9f2a2e44a3
7 changed files with 36 additions and 42 deletions
|
@ -311,6 +311,16 @@ namespace crypto
|
|||
|
||||
void HKDF (const uint8_t * salt, const uint8_t * key, size_t keyLen, const std::string& info, uint8_t * out, size_t outLen = 64); // salt - 32, out - 32 or 64, info <= 32
|
||||
|
||||
// Noise
|
||||
|
||||
struct NoiseSymmetricState
|
||||
{
|
||||
uint8_t m_H[32] /*h*/, m_CK[64] /*[ck, k]*/;
|
||||
|
||||
void MixHash (const uint8_t * buf, size_t len);
|
||||
void MixKey (const uint8_t * sharedSecret);
|
||||
};
|
||||
|
||||
// init and terminate
|
||||
void InitCrypto (bool precomputation);
|
||||
void TerminateCrypto ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue