While fiddling with the NaCl implementation in Go, specifically SecretBox, a general crypto question came up after reading the documentation.
Quote:
Package secretbox encrypts and authenticates small messages.
I haven't seen this before. Is there a maximum size? What constitutes as a small message?
I've looked for some paper or documentation explaining that line, and I even went through the source, but I can't find any related information anywhere which explains the noted limit when it comes to the size of the message.
Practically, I just successfully encrypted hundreds of megabytes of data. So, I am really puzzled as to why the docs say it was specified for small messages only. Currently, I am guessing that there is a cryptographic reason for this which I simply may not be able to find.
So – to recap – what I'm asking is: in Salsa20, is there a limit to the message size that is possible? If there is, can you additionally provide a hint where I can find a related reference/paper for me to look at?
Update:
The issue that I opened has been resolved, and the documentation updated to clarify the limits.
Seal()
function does not mention any limit. It appears to be a “small” mistake. I would suggest filing an issue on Go's GitHub issue tracker, requesting clarification. $\endgroup$