archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <>
To: "Horia Geantă" <>
Cc: "David S. Miller" <>,
	Aymen Sghaier <>,
	Valentin Ciocoi Radulescu <>,, NXP Linux Team <>
Subject: Re: [PATCH v2] crypto: caam/qi2 - fix chacha20 data size error
Date: Fri, 6 Mar 2020 12:51:49 +1100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Fri, Feb 28, 2020 at 08:51:23AM +0200, Horia Geantă wrote:
> HW generates a Data Size error for chacha20 requests that are not
> a multiple of 64B, since algorithm state (AS) does not have
> the FINAL bit set.
> Since updating req->iv (for chaining) is not required,
> modify skcipher descriptors to set the FINAL bit for chacha20.
> [Note that for skcipher decryption we know that ctx1_iv_off is 0,
> which allows for an optimization by not checking algorithm type,
> since append_dec_op1() sets FINAL bit for all algorithms except AES.]
> Also drop the descriptor operations that save the IV.
> However, in order to keep code logic simple, things like
> S/G tables generation etc. are not touched.
> Cc: <> # v5.3+
> Fixes: 334d37c9e263 ("crypto: caam - update IV using HW support")
> Signed-off-by: Horia Geantă <>
> ---
>  drivers/crypto/caam/caamalg_desc.c | 14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)

Patch applied.  Thanks.
Email: Herbert Xu <>
Home Page:
PGP Key:

      parent reply	other threads:[~2020-03-06  1:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-28  6:51 [PATCH v2] crypto: caam/qi2 - fix chacha20 data size error Horia Geantă
2020-02-28 11:04 ` Valentin Ciocoi Radulescu
2020-03-06  1:51 ` Herbert Xu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).