Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Learning from others #57

Open
dennis-tra opened this issue Jul 7, 2023 · 3 comments
Open

Learning from others #57

dennis-tra opened this issue Jul 7, 2023 · 3 comments

Comments

@dennis-tra
Copy link
Contributor

dennis-tra commented Jul 7, 2023

To avoid falling for the "Not invented here" syndrome I want to use this issue as a dumping ground for take-aways from other DHT implementations and specifications. Some I want to look at

  1. Theseus - https://wootfish.github.io/theseus.dht/
  2. BitTorrent Mainline DHT
  3. Ethereum discv5

I'll update this top-level issue comment whenever I have found the time to look into any of the above.


Theseus

Interesting bit on traffic obfuscation:

All protocol traffic is indistinguishable from random noise. Length-prefixing schemes are used on both protocol ciphertexts and plaintexts, and messages may be padded to any degree. This allows arbitrary message chunking, which is essential for traffic obfuscation.

Instead of a SHA256, they use Argon2id for Sybil resistance. They claim that Argon2id was "designed to render [brute-force attacks] extremely computationally expensive." This, together with peer ID expirations form the basis for Sybil resistance

Node IDs are generated by running a timestamp and a random bytestring through a state-of-the-art memory-hard cryptographic hash function, Argon2id. The result is trimmed and used. The node ID is always distributed along with its preimage, so that remote peers may verify that the two match. The timestamp is used to enforce an expiration date on node IDs.

@iand
Copy link
Contributor

iand commented Jul 11, 2023

Also see rust-libp2p kademlia implementation

@iand
Copy link
Contributor

iand commented Jul 19, 2023

Adding https://iroh.computer/design/dsht/ which has some thinking on improvements that can be made

@guillaumemichel
Copy link
Contributor

I like the idea of using Argon2id for identity generation for mitigating Sybil attacks. If we are to change the key generation process, we may also want to get a balanced trie.
For the IPFS network, it would be a protocol change, so ideally we could group it with another protocol breaking change (such as Composable DHT).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants