diff options
author | Pascal van Leeuwen <pascalvanl@gmail.com> | 2019-08-30 09:52:30 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-09-05 06:37:29 +0200 |
commit | 3e450886ec573cb9d7cb1758317b5e4e0f308b52 (patch) | |
tree | 7299e7a6ee67da108c6c56b0d6ac6ac39c6986a2 /drivers/crypto/inside-secure/safexcel.c | |
parent | crypto: inside-secure - Minor code cleanup and optimizations (diff) | |
download | linux-3e450886ec573cb9d7cb1758317b5e4e0f308b52.tar.xz linux-3e450886ec573cb9d7cb1758317b5e4e0f308b52.zip |
crypto: inside-secure - Added support for basic AES-GCM
This patch adds support for the basic AES-GCM AEAD cipher suite.
Signed-off-by: Pascal van Leeuwen <pvanleeuwen@verimatrix.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/inside-secure/safexcel.c')
-rw-r--r-- | drivers/crypto/inside-secure/safexcel.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/crypto/inside-secure/safexcel.c b/drivers/crypto/inside-secure/safexcel.c index 25285d664581..46cdcbeb122b 100644 --- a/drivers/crypto/inside-secure/safexcel.c +++ b/drivers/crypto/inside-secure/safexcel.c @@ -715,7 +715,8 @@ inline int safexcel_rdesc_check_errors(struct safexcel_crypto_priv *priv, } else if (rdesc->result_data.error_code & BIT(9)) { /* Authentication failed */ return -EBADMSG; - } + } else if (!rdesc->result_data.error_code) + return 0; /* All other non-fatal errors */ return -EINVAL; @@ -1005,6 +1006,7 @@ static struct safexcel_alg_template *safexcel_algs[] = { &safexcel_alg_authenc_hmac_sha384_ctr_aes, &safexcel_alg_authenc_hmac_sha512_ctr_aes, &safexcel_alg_xts_aes, + &safexcel_alg_gcm, }; static int safexcel_register_algorithms(struct safexcel_crypto_priv *priv) |