Re: [PATCH] crypto: arm/curve25519 - include

2020-08-24 Thread Herbert Xu
On Mon, Aug 24, 2020 at 11:09:53AM -0300, Fabio Estevam wrote: > Building ARM allmodconfig leads to the following warnings: > > arch/arm/crypto/curve25519-glue.c:73:12: error: implicit declaration of > function 'sg_copy_to_buffer' [-Werror=implicit-function-declaration] > arch/arm/crypto/curve255

[PATCH] crypto: powerpc/crc-vpmsum_test - Fix sparse endianness warning

2020-08-24 Thread Herbert Xu
This patch fixes a sparse endianness warning by changing crc32 to __le32 instead of u32: CHECK ../arch/powerpc/crypto/crc-vpmsum_test.c ../arch/powerpc/crypto/crc-vpmsum_test.c:102:39: warning: cast from restricted __le32 Signed-off-by: Herbert Xu diff --git a/arch/powerpc/crypto/crc-vpmsu

[PATCH] crypto: arm/poly1305 - Add prototype for poly1305_blocks_neon

2020-08-24 Thread Herbert Xu
This patch adds a prototype for poly1305_blocks_neon to slience a compiler warning: CC [M] arch/arm/crypto/poly1305-glue.o ../arch/arm/crypto/poly1305-glue.c:25:13: warning: no previous prototype for `poly1305_blocks_neon' [-Wmissing-prototypes] void __weak poly1305_blocks_neon(void *state, c

[PATCH] crypto: arm64/gcm - Fix endianness warnings

2020-08-24 Thread Herbert Xu
This patch changes a couple u128's to be128 which is the correct type to use and fixes a few sparse warnings. Signed-off-by: Herbert Xu diff --git a/arch/arm64/crypto/ghash-ce-glue.c b/arch/arm64/crypto/ghash-ce-glue.c index da1034867aaa..8536008e3e35 100644 --- a/arch/arm64/crypto/ghash-ce-glu

[PATCH] crypto: arm64/sha - Add declarations for assembly variables

2020-08-24 Thread Herbert Xu
This patch adds declarations for variables only used by assembly code to silence compiler warnings: CC [M] arch/arm64/crypto/sha1-ce-glue.o AS [M] arch/arm64/crypto/sha1-ce-core.o CC [M] arch/arm64/crypto/sha2-ce-glue.o AS [M] arch/arm64/crypto/sha2-ce-core.o CHECK ../arch/arm64/cr

Re: [PATCH 1/2] crypto: stm32/crc32 - include

2020-08-24 Thread Herbert Xu
On Mon, Aug 24, 2020 at 10:58:39AM -0300, Fabio Estevam wrote: > Building ARM allmodconfig leads to the following warnings: > > drivers/crypto/stm32/stm32-crc32.c:128:2: error: implicit declaration of > function 'writel_relaxed' [-Werror=implicit-function-declaration] > drivers/crypto/stm32/stm32

Re: [PATCH] crypto: arm/curve25519 - include

2020-08-24 Thread Jason A. Donenfeld
On Mon, Aug 24, 2020 at 4:13 PM Fabio Estevam wrote: > > Building ARM allmodconfig leads to the following warnings: > > arch/arm/crypto/curve25519-glue.c:73:12: error: implicit declaration of > function 'sg_copy_to_buffer' [-Werror=implicit-function-declaration] > arch/arm/crypto/curve25519-glue.

RE: HMAC test fails for big key using libkcapi

2020-08-24 Thread Bhat, Jayalakshmi Manjunath
Hi Stephen, It worked, thank you so much Regards, Jaya -Original Message- From: Stephan Mueller Sent: Monday, August 24, 2020 9:00 PM To: linux-crypto@vger.kernel.org; Bhat, Jayalakshmi Manjunath Subject: Re: HMAC test fails for big key using libkcapi Am Montag, 24. August 2020, 16:

RE: [PATCH] crypto: mediatek - Fix endianness bugs and sparse warnings

2020-08-24 Thread Van Leeuwen, Pascal
> -Original Message- > From: linux-crypto-ow...@vger.kernel.org > On Behalf Of Herbert Xu > Sent: Friday, August 21, 2020 9:52 AM > To: Ryder Lee ; Linux Crypto Mailing List > > Subject: [PATCH] crypto: mediatek - Fix endianness bugs and sparse warnings > > <<< External Email >>> > This

Re: HMAC test fails for big key using libkcapi

2020-08-24 Thread Stephan Mueller
Am Montag, 24. August 2020, 16:41:13 CEST schrieb Bhat, Jayalakshmi Manjunath: Hi Jayalakshmi, > Hi All, > > I am using libkcapi to execute HMAC tests. One of key size is 229248 bytes. > setsockopt(tfmfd, SOL_ALG, ALG_SET_KEY API fails to set the key. I am not > getting an option to set the buf

Re: [PATCH] crypto: arm/curve25519 - include

2020-08-24 Thread Ard Biesheuvel
On Mon, 24 Aug 2020 at 16:13, Fabio Estevam wrote: > > Building ARM allmodconfig leads to the following warnings: > > arch/arm/crypto/curve25519-glue.c:73:12: error: implicit declaration of > function 'sg_copy_to_buffer' [-Werror=implicit-function-declaration] > arch/arm/crypto/curve25519-glue.c:

HMAC test fails for big key using libkcapi

2020-08-24 Thread Bhat, Jayalakshmi Manjunath
Hi All, I am using libkcapi to execute HMAC tests. One of key size is 229248 bytes. setsockopt(tfmfd, SOL_ALG, ALG_SET_KEY API fails to set the key. I am not getting an option to set the buffer size to higher value. Can you please provide me inputs on how to set the higher buffer size to sock

[PATCH] crypto: arm/curve25519 - include

2020-08-24 Thread Fabio Estevam
Building ARM allmodconfig leads to the following warnings: arch/arm/crypto/curve25519-glue.c:73:12: error: implicit declaration of function 'sg_copy_to_buffer' [-Werror=implicit-function-declaration] arch/arm/crypto/curve25519-glue.c:74:9: error: implicit declaration of function 'sg_nents_for_le

[PATCH 2/2] crypto: stm32/hash - include

2020-08-24 Thread Fabio Estevam
Building ARM allmodconfig leads to the following warnings: drivers/crypto/stm32/stm32-hash.c:492:18: error: implicit declaration of function 'dma_map_sg'; did you mean 'dma_cap_set'? [-Werror=implicit-function-declaration] drivers/crypto/stm32/stm32-hash.c:493:8: error: 'DMA_TO_DEVICE' undeclare

[PATCH 1/2] crypto: stm32/crc32 - include

2020-08-24 Thread Fabio Estevam
Building ARM allmodconfig leads to the following warnings: drivers/crypto/stm32/stm32-crc32.c:128:2: error: implicit declaration of function 'writel_relaxed' [-Werror=implicit-function-declaration] drivers/crypto/stm32/stm32-crc32.c:134:17: error: implicit declaration of function 'readl_relaxed'

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

2020-08-24 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

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

2020-08-24 Thread Herbert Xu
On Mon, Aug 24, 2020 at 03:30:01PM +0200, Ard Biesheuvel wrote: > > +config CRYPTO_USER_ENABLE_OBSOLETE > + bool "Enable obsolete cryptographic algorithms for userspace" > + depends on CRYPTO_USER That should be CRYPTO_USER_API which is the option for af_alg. CRYPTO_USER is the configurati

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

2020-08-24 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

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

2020-08-24 Thread Ard Biesheuvel
On Mon, 24 Aug 2020 at 15:35, Herbert Xu wrote: > > On Mon, Aug 24, 2020 at 03:30:01PM +0200, Ard Biesheuvel wrote: > > > > +config CRYPTO_USER_ENABLE_OBSOLETE > > + bool "Enable obsolete cryptographic algorithms for userspace" > > + depends on CRYPTO_USER > > That should be CRYPTO_USER_AP

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

2020-08-24 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 v2 3/7] SUNRPC: remove RC4-HMAC-MD5 support from KerberosV

2020-08-24 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 v2 1/7] staging/rtl8192e: switch to RC4 library interface

2020-08-24 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 v2 4/7] crypto: n2 - remove ecb(arc4) support

2020-08-24 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 v2 2/7] staging/rtl8192u: switch to RC4 library interface

2020-08-24 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 v2 0/7] crypto: mark ecb(arc4) skcipher as obsolete

2020-08-24 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

Re: Severe performance regression in "net: macsec: preserve ingress frame ordering"

2020-08-24 Thread Andrew Lunn
On Mon, Aug 24, 2020 at 09:07:26AM +, Van Leeuwen, Pascal wrote: > No need to point this out to me as we're the number one supplier of inline > MACsec IP :-) > In fact, the Microsemi PHY solution you mention is ours, major parts of that > design were > even created by these 2 hands here. Oh,

Re: [PATCHv6 2/7] crypto: sa2ul: Add crypto driver

2020-08-24 Thread Tero Kristo
On 22/08/2020 01:17, Nathan Chancellor wrote: On Mon, Jul 13, 2020 at 11:34:22AM +0300, Tero Kristo wrote: From: Keerthy Adds a basic crypto driver and currently supports AES/3DES in cbc mode for both encryption and decryption. Signed-off-by: Keerthy [t-kri...@ti.com: major re-work to fix va

Re: [PATCH 6/6] crypto: cmac - Use cbc skcipher instead of raw cipher

2020-08-24 Thread Herbert Xu
On Mon, Aug 24, 2020 at 11:47:30AM +0200, Ard Biesheuvel wrote: > > OK, so you are using a page size buffer for every request in flight, > and using that as a scratch buffer for the destination of the cbc() > transform? Not necessarily. It'll only allocate the page if the request size exceeds the

Re: [PATCH 6/6] crypto: cmac - Use cbc skcipher instead of raw cipher

2020-08-24 Thread Ard Biesheuvel
On Tue, 18 Aug 2020 at 10:25, Herbert Xu wrote: > > Many architectures provide an accelerated implementation of cbc(aes) > skcipher that is far superior to using the standard cbc template > over an accelerated aes cipher. As cmac uses the raw cipher, it > was not able to benefit from the accelera

RE: Severe performance regression in "net: macsec: preserve ingress frame ordering"

2020-08-24 Thread Van Leeuwen, Pascal
> -Original Message- > From: linux-crypto-ow...@vger.kernel.org > On Behalf Of Andrew Lunn > Sent: Wednesday, August 12, 2020 2:42 PM > To: Van Leeuwen, Pascal > Cc: Sabrina Dubroca ; Scott Dial ; > linux-crypto@vger.kernel.org; Ryan Cox > ; net...@vger.kernel.org; da...@davemloft.net;

[PATCH] crypto/chtls: Fix double free in chtls_pass_accept_request()

2020-08-24 Thread Dan Carpenter
The chtls_recv_sock() function frees "oreq" so the free here is a double free. Fixes: 6abde0b24122 ("crypto/chtls: IPv6 support for inline TLS") Signed-off-by: Dan Carpenter --- drivers/crypto/chelsio/chtls/chtls_cm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers

RE: [PATCH RESEND 04/10] crypto: hisilicon/zip - replace 'sprintf' with 'scnprintf'

2020-08-24 Thread David Laight
From: Yang Shen > Sent: 24 August 2020 04:12 > > Replace 'sprintf' with 'scnprintf' to avoid overrun. > > Signed-off-by: Yang Shen > Reviewed-by: Zhou Wang > --- > drivers/crypto/hisilicon/zip/zip_main.c | 11 +++ > 1 file changed, 7 insertions(+), 4 deletions(-) > > diff --git a/driv