Re: [PATCH 4.4] crypto: chacha20poly1305 - set cra_name correctly

2019-05-17 Thread Greg KH
On Fri, May 17, 2019 at 10:50:03AM -0700, Eric Biggers wrote: > From: Eric Biggers > > commit 5e27f38f1f3f45a0c938299c3a34a2d2db77165a upstream. > [Please apply to 4.4-stable.] Now applied, thanks. greg k-h

Re: [PATCH 4.14] crypto: arm64/aes-neonbs - don't access already-freed walk.iv

2019-05-17 Thread Greg KH
On Fri, May 17, 2019 at 10:29:51AM -0700, Eric Biggers wrote: > From: Eric Biggers > > commit 4a8108b70508df0b6c4ffa4a3974dab93dcbe851 upstream. > [Please apply to 4.14-stable.] Now applied, thanks. greg k-h

Re: [PATCH 4.4 2/2] crypto: gcm - fix incompatibility between "gcm" and "gcm_base"

2019-05-17 Thread Greg KH
On Fri, May 17, 2019 at 11:06:10AM -0700, Eric Biggers wrote: > From: Eric Biggers > > commit f699594d436960160f6d5ba84ed4a222f20d11cd upstream. > [Please apply to 4.4-stable.] > > GCM instances can be created by either the "gcm" template, which only > allows choosing the block cipher, e.g. "gcm

Re: [PATCH] crypto: crypto4xx - fix AES CTR blocksize value

2019-05-17 Thread Eric Biggers
Hi Christian, On Fri, May 17, 2019 at 11:15:57PM +0200, Christian Lamparter wrote: > This patch fixes a issue with crypto4xx's ctr(aes) that was > discovered by libcapi's kcapi-enc-test.sh test. > > The some of the ctr(aes) encryptions test were failing on the > non-power-of-two test: > > kcapi-

[PATCH] crypto: crypto4xx - fix AES CTR blocksize value

2019-05-17 Thread Christian Lamparter
This patch fixes a issue with crypto4xx's ctr(aes) that was discovered by libcapi's kcapi-enc-test.sh test. The some of the ctr(aes) encryptions test were failing on the non-power-of-two test: kcapi-enc - Error: encryption failed with error 0 kcapi-enc - Error: decryption failed with error 0 [FAI

[PATCH 4.4 1/2] crypto: gcm - Fix error return code in crypto_gcm_create_common()

2019-05-17 Thread Eric Biggers
From: Wei Yongjun commit 9b40f79c08e81234d759f188b233980d7e81df6c upstream. [Please apply to 4.4-stable.] Fix to return error code -EINVAL from the invalid alg ivsize error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: Herbert Xu Sig

[PATCH 4.4 2/2] crypto: gcm - fix incompatibility between "gcm" and "gcm_base"

2019-05-17 Thread Eric Biggers
From: Eric Biggers commit f699594d436960160f6d5ba84ed4a222f20d11cd upstream. [Please apply to 4.4-stable.] GCM instances can be created by either the "gcm" template, which only allows choosing the block cipher, e.g. "gcm(aes)"; or by "gcm_base", which allows choosing the ctr and ghash implementa

[PATCH 4.4] crypto: chacha20poly1305 - set cra_name correctly

2019-05-17 Thread Eric Biggers
From: Eric Biggers commit 5e27f38f1f3f45a0c938299c3a34a2d2db77165a upstream. [Please apply to 4.4-stable.] If the rfc7539 template is instantiated with specific implementations, e.g. "rfc7539(chacha20-generic,poly1305-generic)" rather than "rfc7539(chacha20,poly1305)", then the implementation na

[PATCH 4.4,4.9] crypto: arm/aes-neonbs - don't access already-freed walk.iv

2019-05-17 Thread Eric Biggers
From: Eric Biggers commit 767f015ea0b7ab9d60432ff6cd06b664fd71f50f upstream. [Please apply to 4.9-stable and earlier.] If the user-provided IV needs to be aligned to the algorithm's alignmask, then skcipher_walk_virt() copies the IV into a new aligned buffer walk.iv. But skcipher_walk_virt() ca

[PATCH 4.14] crypto: arm64/aes-neonbs - don't access already-freed walk.iv

2019-05-17 Thread Eric Biggers
From: Eric Biggers commit 4a8108b70508df0b6c4ffa4a3974dab93dcbe851 upstream. [Please apply to 4.14-stable.] If the user-provided IV needs to be aligned to the algorithm's alignmask, then skcipher_walk_virt() copies the IV into a new aligned buffer walk.iv. But skcipher_walk_virt() can fail afte

[PATCH 4.4,4.9,4.14] crypto: salsa20 - don't access already-freed walk.iv

2019-05-17 Thread Eric Biggers
From: Eric Biggers commit edaf28e996af69222b2cb40455dbb5459c2b875a upstream. [Please apply to 4.14-stable and earlier.] If the user-provided IV needs to be aligned to the algorithm's alignmask, then skcipher_walk_virt() copies the IV into a new aligned buffer walk.iv. But skcipher_walk_virt() c

Re: [PATCH 00/35] crypto: ccree: features and bug fixes for 5.2

2019-05-17 Thread Greg KH
On Sun, Apr 21, 2019 at 11:52:55AM +0300, Gilad Ben-Yossef wrote: > On Thu, Apr 18, 2019 at 4:39 PM Gilad Ben-Yossef wrote: > > > > A set of new features, mostly support for CryptoCell 713 > > features including protected keys, security disable mode and > > new HW revision indetification interface

Re: [PATCH 2/3] crypto: caam: print debug messages at debug level

2019-05-17 Thread Sascha Hauer
On Fri, May 17, 2019 at 11:29:04AM +0200, Sascha Hauer wrote: > The CAAM driver used to put its debug messages inside #ifdef DEBUG and > then prints the messages at KERN_ERR level. Replace this with proper > functions printing at KERN_DEBUG level. The #ifdef DEBUG gets > unnecessary when the right

[PATCH 2/3] crypto: caam: print debug messages at debug level

2019-05-17 Thread Sascha Hauer
The CAAM driver used to put its debug messages inside #ifdef DEBUG and then prints the messages at KERN_ERR level. Replace this with proper functions printing at KERN_DEBUG level. The #ifdef DEBUG gets unnecessary when the right functions are used. This replaces: - print_hex_dump(KERN_ERR ...) in

[PATCH 3/3] crypto: caam: print messages in caam_dump_sg at debug level

2019-05-17 Thread Sascha Hauer
caam_dump_sg() is only compiled in when DEBUG is defined, hence the messages are debug messages. Remove the @level argument from caam_dump_sg() and print all messages at debug level. Signed-off-by: Sascha Hauer --- drivers/crypto/caam/caamalg.c | 8 drivers/crypto/caam/caamalg_qi.c

[PATCH 1/3] crypto: caam: remove unused defines

2019-05-17 Thread Sascha Hauer
The CAAM driver defines its own debug() macro, but it is unused. Remove it. Signed-off-by: Sascha Hauer --- drivers/crypto/caam/caamalg.c | 7 --- drivers/crypto/caam/caamhash.c | 8 2 files changed, 15 deletions(-) diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/

[PATCH 0/3] crypto: CAAM: Print debug messages at debug level

2019-05-17 Thread Sascha Hauer
The CAAM driver has most of its debug messages inside #ifdef DEBUG and then prints them at KERN_ERR level. Do this properly and print the messages at DEBUG_LEVEL as they are supposed to. With this we can get rid of a lot of ifdefs in the code. Sascha Sascha Hauer (3): crypto: caam: remove unuse

Re: ctr(aes) broken in CAAM driver

2019-05-17 Thread Sascha Hauer
On Wed, May 15, 2019 at 01:35:16PM +, Horia Geanta wrote: > On 5/15/2019 4:22 PM, Sascha Hauer wrote: > > Hi Fabio, > > > > On Wed, May 15, 2019 at 10:17:19AM -0300, Fabio Estevam wrote: > >> Hi Sascha, > >> > >> On Wed, May 15, 2019 at 10:09 AM Sascha Hauer > >> wrote: > >>> > >>> Hi, > >>>