I deliberately used redundant variables because otherwise the code becomes
too hard to follow. I'd used a single peer key, then switched to this
afterwards. It saves a few bytes but costs too much in legibility.
On Sep 5, 2013 9:37 AM, "lalebarde" <notifications@github.com> wrote:

> In src/curve_codec.c:
>
> > -    //  Server connection properties
> > -    byte cookie_key [32];       //  Server cookie key
> > -    byte cn_client [32];        //  Client's short-term public key
> > -    byte client_key [32];       //  Client long-term public key
> > -
> > -    //  Client connection properties
> > -    byte server_key [32];       //  Server long-term public key
> > -    byte cn_server [32];        //  Server's short-term public key
> > -    byte cn_cookie [96];        //  Connection cookie from server
> > +    curve_keypair_t
> > +        *permanent;             //  Our permanent key
> > +    curve_keypair_t
> > +        *transient;             //  Our transient key
> > +    byte precomputed [32];      //  Precomputed key
> > +
> > +    byte peer_transient [32];   //  Peer transient public key
>
> Instead of :
> byte client_key [32]; // Client permanent public key
> byte server_key [32]; // Server permanent public key
>
> We need only :
> byte peer_permanent [32]; // Peer permanent public key
>
> In the continuity of "byte peer_transient [32]; // Peer transient public
> key " - symmetry makes coding simplier.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/zeromq/libcurve/pull/9/files#r6175439>
> .
>