Lines Matching defs:kad
160 // if kad never run, no point in checking anything except for ed2k encryption
166 bool kad = false;
173 // kad packet with NodeID as key
174 kad = true;
183 kad = false;
191 // kad packet with ReceiverKey as key
192 kad = true;
208 } while (value != MAGICVALUE_UDP_SYNC_CLIENT && tries > 0); // try to decrypt as ed2k as well as kad packet if needed (max 3 rounds)
215 // DebugLog(_T("Received obfuscated UDP packet from clientIP: %s with wrong key marker bits (kad packet, ed2k bit)"), ipstr(dwIP));
217 // DebugLog(_T("Received obfuscated UDP packet from clientIP: %s with wrong key marker bits (kad packet, nodeid key, recvkey bit)"), ipstr(dwIP));
219 // DebugLog(_T("Received obfuscated UDP packet from clientIP: %s with wrong key marker bits (kad packet, recvkey key, nodeid bit)"), ipstr(dwIP));
236 if (kad) {
262 // clientHashOrKadID == NULL && kad && receiverVerifyKey != 0 -> receiverVerifyKey
264 int CEncryptedDatagramSocket::EncryptSendClient(uint8_t **buf, int bufLen, const uint8_t *clientHashOrKadID, bool kad, uint32_t receiverVerifyKey, uint32_t senderVerifyKey)
266 wxASSERT(theApp->GetPublicIP() != 0 || kad);
269 wxASSERT((receiverVerifyKey == 0 && senderVerifyKey == 0) || kad);
272 const uint32_t cryptHeaderLen = padLen + CRYPT_HEADER_WITHOUTPADDING + (kad ? 8 : 0);
280 if (kad) {
316 semiRandomNotProtocolMarker = kad ? (semiRandomNotProtocolMarker & 0xFE) : (semiRandomNotProtocolMarker | 0x01); // set the ed2k/kad marker bit
317 if (kad) {
318 // set the ed2k/kad and nodeid/recvkey markerbit
321 // set the ed2k/kad marker bit
361 if (kad) {