crypto: ccp - Add support for valid authsize values less than 16
authorGary R Hook <gary.hook@amd.com>
Tue, 30 Jul 2019 16:05:24 +0000 (16:05 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 2 Aug 2019 04:36:35 +0000 (14:36 +1000)
commit9f00baf74e4b6f79a3a3dfab44fb7bb2e797b551
tree47738606e5449b5f5e705519a23a81f4de1696a1
parent25e44338321af545ab34243a6081c3f0fc6107d0
crypto: ccp - Add support for valid authsize values less than 16

AES GCM encryption allows for authsize values of 4, 8, and 12-16 bytes.
Validate the requested authsize, and retain it to save in the request
context.

Fixes: 36cf515b9bbe2 ("crypto: ccp - Enable support for AES GCM on v5 CCPs")
Cc: <stable@vger.kernel.org>
Signed-off-by: Gary R Hook <gary.hook@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccp/ccp-crypto-aes-galois.c
drivers/crypto/ccp/ccp-ops.c
include/linux/ccp.h