Kademlia is a UDP-based peer-to-peer communications protocol, a variation on the DHT (distributed hash table). It is distinguished by its use of XOR as a metric.

Kademlia is widely copied. eMule and eDonkey in particular are hugely successful, with millions of users. However, implementations diverge quite widely from the original protocol.

Because the original Kademlia paper was somewhat less than clear on certain aspects, we provide a design specification for the Kademlia protocol. An implementation spec will follow.