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

Swappable hash alogirithm for DHT keys? #39

Closed
jMyles opened this issue Nov 10, 2017 · 1 comment
Closed

Swappable hash alogirithm for DHT keys? #39

jMyles opened this issue Nov 10, 2017 · 1 comment

Comments

@jMyles
Copy link
Contributor

jMyles commented Nov 10, 2017

What's the feasibility of making the SHA1 algorithm swappable so that users can implement, for example, BLAKE2?

I know that SHA1 is in the "basic kademlia" spec, but it doesn't look to me like using BLAKE2 will break anything, and for our purposes, we'd like to make it more difficult to create collisions.

@bmuller
Copy link
Owner

bmuller commented Nov 12, 2017

Hey @jMyles - my thoughts here are pretty much the same as for all extensibility requests. I'd like the lib to provide an implementation of the kademlia spec by default, but be highly extensible so that it can be used as a base for all kinds of different applications. Some thoughts around how the current code could be modified to specifically support a different hash function -

  1. I think this could be done by adding a class method to Node for digesting
  2. You could have a NodeFactory class that makes Nodes that is set in Server

Might take some refactoring, but I'm happy to look at any PRs or talk though implementation options before any work starts

@bmuller bmuller closed this as completed Nov 12, 2017
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

2 participants