[nanomsg] Re: nanomsg: the big picture

  • From: Martin Sustrik <sustrik@xxxxxxxxxx>
  • To: nanomsg@xxxxxxxxxxxxx
  • Date: Sun, 08 Sep 2013 08:49:18 +0200

On 07/09/13 12:36, Alex Elsayed wrote:
On Saturday, September 07, 2013 01:03:32 PM Paul Colomiets wrote:
Hi Martin,

On Thu, Sep 5, 2013 at 10:07 AM, Martin Sustrik <sustrik@xxxxxxxxxx> wrote:
 From user's perspective nanomsg is basically done. Although the
implementation is not perfect yet, the conceptual framework (sockets,
scalability protocols, topologies, etc.) is unlikely to change in the
future.

Any plans for encryption?

Part of the issue here is defining what people expect in terms of encryption.

For instance, using TLS would encrypt below the SP level, and thus would still
allow SP devices to see the raw messages. However, it would block any
eavesdropper that couldn't authenticate properly (TLS can do mutual
authentication, even though it's not commonly used on the wider internet) and
so would be sufficient for a number of cases. Also, using something other than
certificates is possible via a number of shared-secret authentication
mechanisms.

Encrypting in SP itself for end-to-end is possible, but would basically
require rolling a new protocol - and cryptographic protocols are a nightmare
to get right, especially for multiparty communication, and ESPECIALLY if it's
potentially unidirectional.

The dynamic nature makes it even more difficult, because someone may join at
any time - thus, encoding the symmetric key with the public key of each
recipient and then using symmetric encryption for the data (PGP-style) is not
an option.

Broadcast encryption techniques might be a possibility; an example of a
broadcast encryption scheme in widespread use is AACS (used in Blu-Ray), and a
good explanation of the core technique it uses (Subset-Difference) is
http://forum.doom9.org/showpost.php?p=955660&postcount=2

(I'll note that while it was "cracked" the encryption scheme itself was not
broken - key material was simply recovered from where it was being kept in
players)

Encryption is a complex topic and I don't feel competent to comment on it. Fortunately, it's largely decoupled from the core nanomsg functionality and thus can be experimented with freely.

The only implication for core library, as far as I can say, is the format of pub/sub messages. We may want to separate the topic from the body formally so that the former can be in plaintext and the latter can be encrypted.

Martin


Other related posts: