lkml.org 
[lkml]   [2020]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH RESEND 4/9] crypto: caam/jr - add support for more XTS key lengths
    From
    Date
    On 8/6/2020 7:36 PM, Andrei Botila (OSS) wrote:
    > @@ -1790,7 +1792,9 @@ static inline int skcipher_crypt(struct skcipher_request *req, bool encrypt)
    > if (!req->cryptlen)
    > return 0;
    >
    > - if (ctx->fallback && xts_skcipher_ivsize(req)) {
    > + if (ctx->fallback && (xts_skcipher_ivsize(req) ||
    > + (ctx->cdata.keylen != 2 * AES_KEYSIZE_128 &&
    > + ctx->cdata.keylen != 2 * AES_KEYSIZE_256))) {
    Let's avoid doing this check for every request.
    This could be achieved by moving it into the .setkey callback and
    setting a flag in the caam_ctx indicating if the fallback is needed or not
    for this tfm.

    Horia

    \
     
     \ /
      Last update: 2020-08-11 16:37    [W:2.316 / U:0.248 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site