fastfn / dendrite

Dendrite is a Go package that implements distributed hash table (DHT) based on Chord Protocol.
Other
30 stars 6 forks source link

dendrite: add some kind of security for inter communication between nodes #1

Closed whatisgravity closed 8 years ago

whatisgravity commented 8 years ago

I'm interested in building distributed applications in golang and have been looking for a potential DHT library. This appears to be a very good option out of the available choices.

Do you plan on finishing this feature? dendrite: add some kind of security for inter communication between nodes

I could start working on this feature. Do you have any opinions on how it should be implemented?

scyth commented 8 years ago

I'm honestly not sure what would be the best approach. If a shared private key is acceptable, then we could possibly just encrypt the data before sending it to the wire. On the other hand, we could further explore 0mq protocol capabilities regarding authentication and encryption (see CurveMQ). Current dendrite implementation is done with ZeroMQ for networking, but it is pluggable and other transport methods can be written. If CurveMQ is to be implemented, it will be kinda coupled with ZeroMQ implementation and won't work with basic HTTPS implementation one day (if someone decides to implement it). Option 1: use shared private key to encrypt and sign the data messages on top of plain ZMQ. Option 2: implement CurveMQ for ZMQ transport implementation. Option 3: use some other generic approach for all transports involved.

whatisgravity commented 8 years ago

I'm trying to make a basic example of usage of the library and I was basing it off your usage example but I get the following error:

not enough arguments in call to dendrite.InitZMQTransport

Is the usage example out of date?

scyth commented 8 years ago

Yes. Just pass the nil as a third argument to that call. It allows custom loggers to be used. I'll update the readme.

whatisgravity commented 8 years ago

Yeah, I noticed it was a logger but I wasn't sure what to pass, thanks for the tip with passing nil. Sorry I'm new to golang too so I'm still stumbling a little. I appreciate your patience with explaining my issue.