mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
lookup ECIESX25519AEADRatchet session by static key
This commit is contained in:
parent
dc9da69509
commit
b6800dd125
6 changed files with 48 additions and 25 deletions
|
@ -74,6 +74,7 @@ namespace garlic
|
|||
if (isStatic)
|
||||
{
|
||||
// static key, fs is apk
|
||||
memcpy (m_StaticKey, fs, 32);
|
||||
GetOwner ()->Decrypt (fs, sharedSecret, nullptr); // x25519(bsk, apk)
|
||||
i2p::crypto::HKDF (m_CK, sharedSecret, 32, "", keyData); // keydata = HKDF(chainKey, sharedSecret, "", 64)
|
||||
memcpy (m_CK, keyData, 32); // chainKey = keydata[0:31]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue