crypto: caam - improve key inlining
authorHoria Geantă <horia.geanta@nxp.com>
Tue, 22 Nov 2016 13:44:06 +0000 (15:44 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 28 Nov 2016 13:23:22 +0000 (21:23 +0800)
commit4cbe79ccb5233c52b291d53200e75f8db19c6a14
treeebb04a7fdf2e6d6accbdc8f3a8eacd180100493a
parent488ebc3a41260d62b24c18271356abc1f3ffdb63
crypto: caam - improve key inlining

For authenc / stitched AEAD algorithms, check independently
each of the two (authentication, encryption) keys whether inlining
is possible.
Prioritize the inlining of the authentication key, since the length
of the (split) key is bigger than that of the encryption key.

For the other algorithms, compute only once per tfm the remaining
available bytes and decide whether key inlining is possible
based on this.

Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caamalg.c
drivers/crypto/caam/desc_constr.h