4 ms·
Huh. Anyone know why the nonce isn't baked into the box upon sealing? It's the same in the original: https://nacl.cr.yp.to/secretbox.html https://nacl.cr.yp.to
by tommiegannert 2y ago
Huh. Anyone know why the nonce isn't baked into the box upon sealing?
It's the same in the original: https://nacl.cr.yp.to/secretbox.html https://nacl.cr.yp.to/secretbox.html
- compressedgas 2y agoThe operation doesn't dictate how the nonce is to be conveyed to the recipient.
- tommiegannert 2y agoYes, but since you never want to reuse the nonce (at least not with the same key; and no one stores nonces for later use), they are 1:1 to the message, suggesting it would have been less error-prone to encode it in the box. I had the impression NaCL was about being highly opinionated, so this choice surprised me.