[noise] Incrementing nonces

Jonathan Rudenberg jonathan at titanous.com
Wed Jul 22 17:05:55 PDT 2015


> On Jul 22, 2015, at 7:23 PM, Trevor Perrin <trevp at trevp.net> wrote:
> 
> On Wed, Jul 22, 2015 at 3:23 PM, Jonathan Rudenberg
> <jonathan at titanous.com> wrote:
>> Currently the ENCRYPT/DECRYPT and GETKEY functions are supposed to “increment the nonce.” This appears to contradict Section 5.1 which says "The session nonce n is incremented after every encryption or decryption operation.”
> 
> That sentence in 5.1 was intended to reiterate the earlier
> explanation.  I'm not sure how you're reading it as contradictory?

I read "operation" as interchangeable with “function call.”

It seems unnecessary to do the increment *inside* the ciphersuite function implementation which requires passing in a pointer to the nonce and incrementing it or returning a new nonce value in addition to the result bytes, when this could be done just as easily in the session implementation without duplication. But maybe I’m missing the rationale behind this choice.

Jonathan


More information about the Noise mailing list