crypto: nx - Fix timing leak in GCM and CCM decryption

Using non-constant time memcmp() makes the verification of the authentication
tag in the decrypt path vulnerable to timing attacks. Fix this by using
crypto_memneq() instead.

Cc: stable@vger.kernel.org
Signed-off-by: David Gstir <david@sigma-star.at>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
David Gstir 2015-11-15 17:14:41 +01:00 • committed by Herbert Xu
commit cb8affb55c
2 changed files with 3 additions and 2 deletions