Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The nonce can just be opaque bytes. The block counter is tricky, as noted in the issue. The "obvious" choice is little-endian, as that is consistent with the philosophy of the designer (as I understand it), but that is not anything more than a guess. Absent strong evidence that big-endian is a better choice, I'm going to err on the side of not making a substantive change here. But I think that we need a consensus call to support that viewpoint. Closes #2171.
- Loading branch information
55ec704
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you say this is beyond what is specified here, with test vectors?
https://tools.ietf.org/id/draft-agl-tls-chacha20poly1305-03.html
55ec704
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. That (now RFC 8439, as cited in this spec), specifies block counters as a number. It doesn't specify how that number might be derived from a sequence of bytes.