1
0

crypto: chcr - Add fallback for AEAD algos

Fallback to sw when
    I AAD length greater than 511
    II Zero length payload
    II No of sg entries exceeds Request size.

Signed-off-by: Harsh Jain <harsh@chelsio.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Este cometimento está contido em:
Harsh Jain
2017-04-10 18:24:01 +05:30
cometido por Herbert Xu
ascendente 72a56ca97d
cometimento 0e93708dab
3 ficheiros modificados com 150 adições e 74 eliminações

Ver ficheiro

@@ -41,7 +41,7 @@
#define CCM_B0_SIZE 16
#define CCM_AAD_FIELD_SIZE 2
#define T5_MAX_AAD_SIZE 512
#define T6_MAX_AAD_SIZE 511
/* Define following if h/w is not dropping the AAD and IV data before
@@ -188,6 +188,7 @@ struct chcr_aead_ctx {
__be32 key_ctx_hdr;
unsigned int enckey_len;
struct crypto_skcipher *null;
struct crypto_aead *sw_cipher;
u8 salt[MAX_SALT];
u8 key[CHCR_AES_MAX_KEY_LEN];
u16 hmac_ctrl;