[PATCH 2/2] crypto: cbc - Remove cbc.h

2020-08-31 Thread Herbert Xu
Now that crypto/cbc.h is only used by the generic cbc template, we can merge it back into the CBC code. Signed-off-by: Herbert Xu diff --git a/crypto/cbc.c b/crypto/cbc.c index e6f6273a7d39..0d9509dff891 100644 --- a/crypto/cbc.c +++ b/crypto/cbc.c @@ -6,7 +6,6 @@ */ #include -#include #

[PATCH 1/2] crypto: arm/aes-neonbs - Use generic cbc encryption path

2020-08-31 Thread Herbert Xu
Since commit b56f5cbc7e08ec7d31c42fc41e5247677f20b143 ("crypto: arm/aes-neonbs - resolve fallback cipher at runtime") the CBC encryption path in aes-neonbs is now identical to that obtained through the cbc template. This means that it can simply call the generic cbc template instead of doing its o

[PATCH v3 6/7] net: wireless: drop bogus CRYPTO_xxx Kconfig selects

2020-08-31 Thread Ard Biesheuvel
Drop some bogus Kconfig selects that are not entirely accurate, and unnecessary to begin with, since the same Kconfig options also select LIB80211 features that already imply the selected functionality (AES for CCMP, ARC4 and ECB for TKIP) Signed-off-by: Ard Biesheuvel --- drivers/net/wireless/i

[PATCH v3 1/7] staging/rtl8192e: switch to RC4 library interface

2020-08-31 Thread Ard Biesheuvel
Switch to the ARC4 library interface, to remove the pointless dependency on the skcipher API, from which we will hopefully be able to drop ecb(arc4) skcipher support. Signed-off-by: Ard Biesheuvel Acked-by: Greg Kroah-Hartman --- drivers/staging/rtl8192e/Kconfig | 4 +- drivers/sta

[PATCH v3 5/7] crypto: bcm-iproc - remove ecb(arc4) support

2020-08-31 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel --- drivers/crypto/bcm/cipher.c | 96 +--- drivers/crypto/bcm/cipher.h | 1 - drivers/crypto/bcm/spu.c| 23 + drivers/crypto/bcm/spu.h| 1 - drivers/crypto/bcm/spu2.c | 12 +-- drivers/crypto/bcm/spu2.h | 1 - 6 files changed, 6 ins

[PATCH v3 4/7] crypto: n2 - remove ecb(arc4) support

2020-08-31 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel --- drivers/crypto/n2_core.c | 46 1 file changed, 46 deletions(-) diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c index d8aec5153b21..8c8e17d5fb20 100644 --- a/drivers/crypto/n2_core.c +++ b/drivers/crypto/n2_core.c @@ -662,7 +

[PATCH v3 7/7] crypto: arc4 - mark ecb(arc4) skcipher as obsolete

2020-08-31 Thread Ard Biesheuvel
Cryptographic algorithms may have a lifespan that is significantly shorter than Linux's, and so we need to start phasing out algorithms that are known to be broken, and are no longer fit for general use. RC4 (or arc4) is a good example here: there are a few areas where its use is still somewhat ac

[PATCH v3 2/7] staging/rtl8192u: switch to RC4 library interface

2020-08-31 Thread Ard Biesheuvel
Switch to the ARC4 library interface, to remove the pointless dependency on the skcipher API, from which we will hopefully be able to drop ecb(arc4) skcipher support. Signed-off-by: Ard Biesheuvel Acked-by: Greg Kroah-Hartman --- drivers/staging/rtl8192u/Kconfig | 1 +

[PATCH v3 0/7] crypto: mark ecb(arc4) skcipher as obsolete

2020-08-31 Thread Ard Biesheuvel
RC4 hasn't aged very well, and is a poor fit for the skcipher API so it would be good if we could get rid of the ecb(arc4) drivers in the kernel at some point in the future. This prevents new users from creeping in, and allows us to improve the skcipher API without having to care too much about obs

[PATCH v3 3/7] SUNRPC: remove RC4-HMAC-MD5 support from KerberosV

2020-08-31 Thread Ard Biesheuvel
The RC4-HMAC-MD5 KerberosV algorithm is based on RFC 4757 [0], which was specifically issued for interoperability with Windows 2000, but was never intended to receive the same level of support. The RFC says The IETF Kerberos community supports publishing this specification as an informational

[PATCH] hwrng: imx-rngc - add quality to use it as kernel entropy pool

2020-08-31 Thread Marco Felsch
The RM describes the RNGB as follow: 8< The RNGB uses the True Random Number Generator (TRNG) and a Pseudo-Random Number Generator (PRNG) to achieve a true randomness and cryptographic strength. 8<--

Re: [PATCH] crypto: qat - aead cipher length should be block multiple

2020-08-31 Thread Ard Biesheuvel
On Fri, 28 Aug 2020 at 12:24, Giovanni Cabiddu wrote: > > On Sat, Aug 22, 2020 at 02:04:10PM +0100, Ard Biesheuvel wrote: > > On Sat, 22 Aug 2020 at 09:29, Giovanni Cabiddu > > wrote: > > > > > > From: Dominik Przychodni > > > > > > Include an additional check on the cipher length to prevent und

Re: [PATCH v2 3/3] crypto: sun4i-ss - add the V3s variant of SS

2020-08-31 Thread Corentin Labbe
On Mon, Aug 31, 2020 at 09:31:01AM +0200, Martin Cerveny wrote: > Like A33 "sun4i-ss" has a difference, it give SHA1 digest > directly in BE. So add new compatible. > > Tested-by: Martin Cerveny > Signed-off-by: Martin Cerveny > --- > drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c | 7 ++

[PATCH v2] crypto: qat - check cipher length for aead AES-CBC-HMAC-SHA

2020-08-31 Thread Giovanni Cabiddu
From: Dominik Przychodni Return -EINVAL for authenc(hmac(sha1),cbc(aes)), authenc(hmac(sha256),cbc(aes)) and authenc(hmac(sha512),cbc(aes)) if the cipher length is not multiple of the AES block. This is to prevent an undefined device behaviour. Fixes: d370cec32194 ("crypto: qat - Intel(R) QAT cr

Re: [PATCH v34 04/12] LRNG - add switchable DRNG support

2020-08-31 Thread kernel test robot
Hi "Stephan, Thank you for the patch! Yet something to improve: [auto build test ERROR on char-misc/char-misc-testing] [also build test ERROR on cryptodev/master crypto/master v5.9-rc3 next-20200828] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch

Re: [PATCH v34 01/12] Linux Random Number Generator

2020-08-31 Thread kernel test robot
Hi "Stephan, Thank you for the patch! Yet something to improve: [auto build test ERROR on char-misc/char-misc-testing] [also build test ERROR on cryptodev/master crypto/master v5.9-rc3 next-20200828] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch

[PATCH v1] crypto: caam - use traditional error check pattern

2020-08-31 Thread Andy Shevchenko
Use traditional error check pattern ret = ...; if (ret) return ret; ... instead of checking error code to be 0. Signed-off-by: Andy Shevchenko --- drivers/crypto/caam/ctrl.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers

[PATCH v2 3/3] crypto: sun4i-ss - add the V3s variant of SS

2020-08-31 Thread Martin Cerveny
Like A33 "sun4i-ss" has a difference, it give SHA1 digest directly in BE. So add new compatible. Tested-by: Martin Cerveny Signed-off-by: Martin Cerveny --- drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/crypto/allwinner/sun4

[PATCH v2 1/3] dt-bindings: crypto: add new compatible for V3s

2020-08-31 Thread Martin Cerveny
Like A33 "sun4i-ss" has a difference, it give SHA1 digest directly in BE. So add new compatible. Tested-by: Martin Cerveny Signed-off-by: Martin Cerveny --- .../bindings/crypto/allwinner,sun4i-a10-crypto.yaml | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Docu

[PATCH v2 2/3] ARM: dts: sun8i: v3s: Enable crypto engine

2020-08-31 Thread Martin Cerveny
V3s contains crypto engine that is compatible with "sun4i-ss". Tested-by: Martin Cerveny Signed-off-by: Martin Cerveny --- arch/arm/boot/dts/sun8i-v3s.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-v3s.dtsi b/arch/arm/boot/dts/sun8i-v3s.dtsi index e

[PATCH v2 0/3] crypto: sun4i-ss: add support for V3s

2020-08-31 Thread Martin Cerveny
Add support for "sun4i-ss" (crypto engine) for Allwinner V3s. Simmilar problem like A33. Changes since v1: - splited to patch series Martin Cerveny (3): dt-bindings: crypto: add new compatible for V3s ARM: dts: sun8i: v3s: Enable crypto engine crypto: sun4i-ss - add the V3s variant of SS