create and handle short tunnel build reply

This commit is contained in:
orignal 2021-07-12 19:40:40 -04:00
parent dbe427d5eb
commit 2c129b6d39
7 changed files with 65 additions and 57 deletions

View file

@ -260,5 +260,13 @@ namespace tunnel
nonce[4] = index; // nonce is index
i2p::crypto::ChaCha20 (record, SHORT_TUNNEL_BUILD_RECORD_SIZE, replyKey, nonce, record);
}
uint64_t ShortECIESTunnelHopConfig::GetGarlicKey (uint8_t * key) const
{
uint64_t tag;
memcpy (&tag, m_CK, 8);
memcpy (key, m_CK + 32, 32);
return tag;
}
}
}