- Notifications
You must be signed in to change notification settings - Fork1
esote/dht
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
DHT is a distributed hash table based on the Kademlia paper:https://pdos.csail.mit.edu/~petar/papers/maymounkov-kademlia-lncs.pdf.It also uses the S/Kademlia extension "crypto puzzles" to impede Eclipse andSybil attacks (see the PROTOCOL, section 14 "Node ID Generation" for details).S/Kademlia paper:https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.68.4986&rep=rep1&type=pdfDHT also includes many other security measures:- Node IDs are Ed25519 keypairs.- All messages are signed by the node's private key.- All messages are encrypted with the recipient's public key.- Fixed-size (UDP) messages are padded to avoid leaking message type.The network is completely decentralized. For more details read the PROTOCOL.To operate a node:1. Install golang: golang.org/dlOn Linux distributions like Ubuntu, Fedora, etc. you should be able to install a"golang" package through your package manager.2. Download dht with:go get -u github.com/esote/dht/cmd/dhtThis will create a "dht" executable in your go/bin folder. Add ~/go/bin to PATH.3. Create a working directory, for examplemkdir /tmp/dht3. Start a nodedht /tmp/dht start PORTThe program will ask for a password to encrypt the node's private key.4. Stop a nodedht /tmp/dht stop5. Bootstrap another nodedht /tmp/dht bootstrap ID IP:PORTBootstrap a node, ID must be full base64 code, IP must be anIPv4 or IPv6 address (hostnames not allowed).6. Store a file on the networkdht /tmp/dht store /PATH/TO/FILE7. Load a file from the networkdht /tmp/dht load KEY /PATH/TO/OUTPUTKEY must be full base64 code.