On 26 October 2015 at 23:52, Damien Miller <[email protected]> wrote:
> On Mon, 26 Oct 2015, Mike Belopuhov wrote:
>
>> OK?
>
> Will this get the nonce right on BE systems?
>

nonce is a uint8_t array, so of course yes, it's endian agnostic because
you address memory byte by byte.

>> +     /* initial counter is 1 */
>> +     ctx->nonce[0] = 1;
>> +     memcpy(ctx->nonce + CHACHA20_CTR, key + CHACHA20_KEYSIZE,
>> +         CHACHA20_SALT);

Reply via email to