distributed icon indicating copy to clipboard operation
distributed copied to clipboard

Can you protect all messages?

Open UnixJunkie opened this issue 6 years ago • 2 comments

i.e. have agents use encryption.

UnixJunkie avatar Jun 14 '18 01:06 UnixJunkie

Hi UnixJunkie, thank you for the interest in the project. It is not currently implemented, but you can encrypt messages between agents. When I get some time I will look into it. In the meantime if you want to do so yourself the following description should help.

The core library (i.e., distributed not distributed-lwt or distributed-uwt) requires a module of type Nonblock_io. You can provide your own implementation of Nonblock_io that uses ssl for connecting two nodes. This will ensure that any messages between two agents on different nodes are encrypted. Messages between two agents on the same node don't go over a socket but are just copied in memory. If you wanted to encrypt these messages as well then in your implementation of Nonblock_io you just need to provide the encryption/decryption in the implementation of create_stream and get.

Currently the two implementations of Nonblock_io just use plain sockets with no encryption. This means that there is no encryption between agents on different nodes. Also the stream related functions do not encrypt messages between agents on the same node.

essdotteedot avatar Jun 15 '18 00:06 essdotteedot

I was just curious, I am not using this library currently.

UnixJunkie avatar Jun 15 '18 00:06 UnixJunkie