curve_tun icon indicating copy to clipboard operation
curve_tun copied to clipboard

Provide properties in the initiate (vouch) message

Open krestenkrab opened this issue 9 years ago • 0 comments

Hi,

I've been studying http://curvezmq.org/page:read-the-docs, which is another CurveCP-based protocol. It's quite similar to curve_tun.

The one thing that I like is that it provides for sending a set of metadata (key-value pairs) in the initiate/vouch message.

As this is the first time when a server has a decent chance to reject a connection (also the first time the server learns the client's permanent public key) it is a good time to also consider other properties in order to choose to reject/accept a connection. Hence, metadata.

Things that could be relevant are:

  • intended protocol to speak inside the channel
  • proof that the client's permanent public key is signed by some trusted 3rd party.

Thus, I think it would be good to allow for an optional set of K/Vs in the initiate/vouch message.

Could be as simple as

   << Count:16/unsigned >> 
   ++ << << bytesize(Key):16, Key/binary, bytesize(Value):16, Value:Binary >>
              || {Key,Value} <- KVs >>

krestenkrab avatar Mar 24 '15 01:03 krestenkrab