[zeromq-dev] big endian compatibility ?

Diego Duclos diego.duclos at palmstonegames.com
Wed Oct 2 13:11:53 CEST 2013


NetMQ has fixed this since version 3.3.07, any older versions of NetMQ will
not talk to a newer version, or to any other zmq implementation.


On Wed, Oct 2, 2013 at 11:17 AM, Pieter Hintjens <ph at imatix.com> wrote:

> 1. The nonce is not interpreted in any way by the receiver; it's
> treated as a chunk of memory. The encoding is irrelevant so long as
> the value is unique.
>
> 2. NetMQ got it wrong initially; I believe this was fixed.
>
> On Wed, Oct 2, 2013 at 10:27 AM, Laurent Alebarde <l.alebarde at free.fr>
> wrote:
> > Hi Developpers,
> >
> > Is libzmq supposed to be big-endian compatible ? Or not ? In particular,
> is
> > a big-endian box supposed to be able to talk with a little endian box ?
> >
> > I could find this which says it is compatible in the mailing list
> archive,
> > but it is dated of 2008. In netmq, it looks like 0MQ standard is big
> endian.
> > And here, the opposite. I am confused.
> >
> > For example, in curve, the nonce build process copies a uint64_t
> (cn_nonce)
> > to a uint8_t* (hello_nonce) :
> >
> >     //  Prepare the full nonce
> >     memcpy (hello_nonce, "CurveZMQHELLO---", 16);
> >     memcpy (hello_nonce + 16, &cn_nonce, 8);
> >
> > Here, I think the message will not be encrypted the same on a big endian
> box
> > and in a little endian one, since one will use the nonce, say
> > "CurveZMQHELLO---12345678" and the other "CurveZMQHELLO---87654321". So
> it
> > is not compatible. Elsewhere in libzmq, this kind of serialisation is
> > implemented as a loop of shifts (>>8) and low byte copy, which is endian
> > compatible.
> >
> > What is the status please ?
> >
> > Laurent.
> >
> > _______________________________________________
> > zeromq-dev mailing list
> > zeromq-dev at lists.zeromq.org
> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> >
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20131002/55b05198/attachment.htm>


More information about the zeromq-dev mailing list