summaryrefslogtreecommitdiff
path: root/internal/stupidgcm/chacha.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/stupidgcm/chacha.go')
-rw-r--r--internal/stupidgcm/chacha.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/stupidgcm/chacha.go b/internal/stupidgcm/chacha.go
index 30d57e3..1117d97 100644
--- a/internal/stupidgcm/chacha.go
+++ b/internal/stupidgcm/chacha.go
@@ -35,6 +35,8 @@ func init() {
// gocryptfs only uses ChaCha20-Poly1305 as a building block for OpenSSL
// XChaCha20-Poly1305. This function is hot because it gets called once for each
// block by XChaCha20-Poly1305.
+//
+// Only 32-bytes keys and 12-byte IVs are supported.
func NewChacha20poly1305(key []byte) *stupidChacha20poly1305 {
if len(key) != chacha20poly1305.KeySize {
log.Panicf("Only %d-byte keys are supported, you passed %d bytes", chacha20poly1305.KeySize, len(key))