Implementation of the Mainline DHT (BEP #5 and the security extension BEP #42)