use HKDF for NTCP2 key derivation data phase

This commit is contained in:
orignal 2019-12-18 20:48:30 -05:00
parent 599ec62bb0
commit db84be2488

View File

@ -450,7 +450,7 @@ namespace transport
memcpy (h, m_Establisher->GetH (), 32);
memcpy (h + 32, "siphash", 7);
i2p::crypto::HKDF (master, h, 39, "", master, 32); // sip_master = HKDF(ask_master, h || "siphash")
i2p::crypto::HKDF (master, nullptr, 0, "", k, 64); // sipkeys_ab, sipkeys_ba = HKDF(sip_master, zerolen)
i2p::crypto::HKDF (master, nullptr, 0, "", k); // sipkeys_ab, sipkeys_ba = HKDF(sip_master, zerolen)
memcpy (m_Sipkeysab, k, 32); memcpy (m_Sipkeysba, k + 32, 32);
}