Re: [PATCH 1/7] crypto: sahara - remove FLAGS_NEW_KEY logic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 01, 2023 at 07:06:19PM +0200, ovidiu.panait@xxxxxxxxxxxxx wrote:
> From: Ovidiu Panait <ovidiu.panait@xxxxxxxxxxxxx>
> 
> Remove the FLAGS_NEW_KEY logic as it has the following issues:
> - the wrong key may end up being used when there are multiple data streams:
>        t1            t2
>     setkey()
>     encrypt()
>                    setkey()
>                    encrypt()
> 
>     encrypt() <--- key from t2 is used
> - switching between encryption and decryption with the same key is not
>   possible, as the hdr flags are only updated when a new setkey() is
>   performed
> 
> With this change, the key is always sent along with the cryptdata when
> performing encryption/decryption operations.
> 
> Fixes: 5de8875281e1 ("crypto: sahara - Add driver for SAHARA2 accelerator.")
> Signed-off-by: Ovidiu Panait <ovidiu.panait@xxxxxxxxxxxxx>
> ---
>  drivers/crypto/sahara.c | 34 +++++++++++++---------------------
>  1 file changed, 13 insertions(+), 21 deletions(-)

All applied.  Thanks.
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux