]> Cypherpunks repositories - gostls13.git/commit
crypto/cipher: always zero dst buffer on GCM authentication failure.
authorAdam Langley <agl@golang.org>
Sun, 10 Jan 2016 02:31:35 +0000 (18:31 -0800)
committerAdam Langley <agl@golang.org>
Sun, 10 Jan 2016 19:03:42 +0000 (19:03 +0000)
commit13eabea0f744e1d7c23459d3478158d7c4aa8b07
tree27bfd1ccdbec8d962b5481f59529897bb422bb35
parent30919fe978fccae450ea5c4ff8c4019f240d2d1e
crypto/cipher: always zero dst buffer on GCM authentication failure.

The AESNI GCM code decrypts and authenticates concurrently and so
overwrites the destination buffer even in the case of an authentication
failure.

This change updates the documentation to make that clear and also
mimics that behaviour in the generic code so that different platforms
act identically.

Fixes #13886

Change-Id: Idc54e51f01e27b0fc60c1745d50bb4c099d37e94
Reviewed-on: https://go-review.googlesource.com/18480
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Adam Langley <agl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/crypto/cipher/gcm.go
src/crypto/cipher/gcm_test.go