]> Cypherpunks repositories - gostls13.git/commit
crypto/cipher: enforce message size limits for GCM.
authorAdam Langley <agl@golang.org>
Thu, 1 Sep 2016 23:00:25 +0000 (16:00 -0700)
committerAdam Langley <agl@golang.org>
Fri, 2 Sep 2016 16:23:15 +0000 (16:23 +0000)
commit210ac4d5e0fea2bfd4287b0865104bdaaeaffe05
tree19241ed2fc2df67ec806d20021a48bc668caee9a
parent03cff2e115277951108d3e00298ae1cb0b0b7fb6
crypto/cipher: enforce message size limits for GCM.

The maximum input plaintext for GCM is 64GiB - 64. Since the GCM
interface is one-shot, it's very hard to hit this in Go (one would need
a 64GiB buffer in memory), but we should still enforce this limit.

Thanks to Quan Nguyen for pointing it out.

Change-Id: Icced47bf8d4d5dfbefa165cf13e893205c9577b8
Reviewed-on: https://go-review.googlesource.com/28410
Run-TryBot: Adam Langley <agl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
src/crypto/aes/aes_gcm.go
src/crypto/cipher/gcm.go