]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb000f66fd3e5e0b99b3738698105d95c8e016833
treeebb04a7fdf2e6d6accbdc8f3a8eacd180100493a
parent326ad5809a9441022916a773775845ec25e6c217
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