Re: [RFC PATCH 1/4] X.509: Parse public key parameters from x509 for akcipher

2019-02-27 Thread Herbert Xu
On Thu, Feb 28, 2019 at 10:04:49AM +0300, Vitaly Chikunov wrote: > > It seems that you insist on set_params to be removed and both key and > params to be passed into set_{pub,priv}_key. This means reworking all > existing RSA drivers and callers, right? Can you please confirm that > huge rework to

Re: [RFC PATCH 1/4] X.509: Parse public key parameters from x509 for akcipher

2019-02-27 Thread Vitaly Chikunov
On Thu, Feb 28, 2019 at 10:04:49AM +0300, Vitaly Chikunov wrote: > Herbert, > > On Thu, Feb 28, 2019 at 02:14:44PM +0800, Herbert Xu wrote: > > On Sun, Feb 24, 2019 at 09:48:40AM +0300, Vitaly Chikunov wrote: > > > > > > If we pass SubjectPublicKeyInfo into set_pub_key itself (making > > > set_pa

Re: [RFC PATCH 1/4] X.509: Parse public key parameters from x509 for akcipher

2019-02-27 Thread Vitaly Chikunov
Herbert, On Thu, Feb 28, 2019 at 02:14:44PM +0800, Herbert Xu wrote: > On Sun, Feb 24, 2019 at 09:48:40AM +0300, Vitaly Chikunov wrote: > > > > If we pass SubjectPublicKeyInfo into set_pub_key itself (making > > set_params not needed) we will break ABI and compatibility with RSA > > drivers, beca

Re: [PATCH 08/12] crypto: add missing of_node_put after of_device_is_available

2019-02-27 Thread Herbert Xu
On Sat, Feb 23, 2019 at 02:20:39PM +0100, Julia Lawall wrote: > Add an of_node_put when a tested device node is not available. > > The semantic patch that fixes this problem is as follows > (http://coccinelle.lip6.fr): > > // > @@ > identifier f; > local idexpression e; > expression x; > @@ > >

Re: [PATCH] crypto: cavium/zip - fix collision with generic cra_driver_name

2019-02-27 Thread Herbert Xu
On Sat, Feb 23, 2019 at 12:23:23AM -0800, Eric Biggers wrote: > From: Eric Biggers > > The cavium/zip implementation of the deflate compression algorithm is > incorrectly being registered under the generic driver name, which > prevents the generic implementation from being registered with the > c

Re: [PATCH 0/2] crypto: arm64/chacha - fix for big endian

2019-02-27 Thread Herbert Xu
On Fri, Feb 22, 2019 at 10:54:06PM -0800, Eric Biggers wrote: > I ran the crypto self-tests on big endian arm and arm64 kernels in QEMU. > The arm64 implementation of ChaCha (and XChaCha) is failing, so this > series fixes it. > > Please consider sending to Linus for v5.0 if there's time, as this

Re: [PATCH v4 0/3] add AES support for Exynos5433

2019-02-27 Thread Herbert Xu
On Fri, Feb 22, 2019 at 01:21:41PM +0100, Kamil Konieczny wrote: > Add slimSSS node to DT and crypto AES support for Exynos5433. Tested on > Exynos5433 board with crypto run-time self tests and with tcrypt with > command insmod tcrypt.ko mode=500 sec=1 > > Changes since v3: > - moved bindings docu

Re: [PATCH v2] crypto: caam - remove redundant likely/unlikely annotation

2019-02-27 Thread Herbert Xu
On Wed, Feb 20, 2019 at 06:49:18PM +0800, Chengguang Xu wrote: > unlikely has already included in IS_ERR(), so just > remove redundant likely/unlikely annotation. > > Signed-off-by: Chengguang Xu > --- > v1->v2: > - Fix subject typo and format. > > drivers/crypto/caam/caamalg_qi.c | 6 +++--- >

Re: [PATCH v2] crypto: s5p: update iv after AES-CBC op end

2019-02-27 Thread Herbert Xu
On Tue, Feb 19, 2019 at 05:02:32PM +0100, Kamil Konieczny wrote: > Fix bug "s5p-sss crypto driver doesn't set next AES-CBC IV". While at this, > fix also AES-CTR mode. Tested on Odroid U3 with Eric Biggers branch > "iv-out-testing". > > Signed-off-by: Kamil Konieczny > Reported-by: Eric Biggers

Re: [PATCH] crypto: af_alg - use struct_size() in sock_kfree_s()

2019-02-27 Thread Herbert Xu
On Thu, Feb 21, 2019 at 12:04:23PM -0600, Gustavo A. R. Silva wrote: > Make use of the struct_size() helper instead of an open-coded version > in order to avoid any potential type mistakes, in particular in the > context in which this code is being used. > > So, change the following form: > > siz

Re: [PATCH] crypto: x86/poly1305 - Clear key material from stack in SSE2 variant

2019-02-27 Thread Herbert Xu
On Tue, Feb 19, 2019 at 05:45:54PM +0200, Tommi Hirvola wrote: > 1-block SSE2 variant of poly1305 stores variables s1..s4 containing key > material on the stack. This commit adds missing zeroing of the stack > memory. Benchmarks show negligible performance hit (tested on i7-3770). > > Signed-off-b

Re: [PATCH 0/3] crypto: caam/jr - DMA API fixes

2019-02-27 Thread Herbert Xu
On Tue, Feb 19, 2019 at 04:56:54PM +0200, Horia Geantă wrote: > This patch set fixes issues uncovered when testing the Job Ring interface > with CONFIG_DMA_API_DEBUG=y. > > First patch ("crypto: caam - fix hash context DMA unmap size") has to be > sent to -stable, according to "Fixes" tag. > > Fr

Re: [PATCH] hwrng: bcm2835 - fix probe as platform device

2019-02-27 Thread Herbert Xu
On Tue, Feb 19, 2019 at 01:16:08PM +0100, Jonas Gorski wrote: > BCM63XX (MIPS) does not use device tree, so there cannot be any > of_device_id, causing the driver to fail on probe: > > [0.904564] bcm2835-rng: probe of bcm63xx-rng failed with error -22 > > Fix this by checking for match data o

Re: [PATCH] crypto: s5p-sss - Use AES_BLOCK_SIZE define instead of number

2019-02-27 Thread Herbert Xu
On Tue, Feb 19, 2019 at 01:01:03PM +0100, Krzysztof Kozlowski wrote: > Replace hard coded AES block size with define. > > Signed-off-by: Krzysztof Kozlowski > --- > drivers/crypto/s5p-sss.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) Patch applied. Thanks. -- Email: Herbert

Re: [PATCH] crypto: stm32 - drop pointless static qualifier in stm32_hash_remove()

2019-02-27 Thread Herbert Xu
On Mon, Feb 18, 2019 at 10:49:00PM +0800, Mao Wenan wrote: > There is no need to have the struct stm32_hash_dev *hdev static > since new value always be assigned before use it. > > Signed-off-by: Mao Wenan > --- > drivers/crypto/stm32/stm32-hash.c | 2 +- > 1 file changed, 1 insertion(+), 1 dele

Re: [PATCH] crypto/chelsio/chcr: Fixed Traffic Stall

2019-02-27 Thread Herbert Xu
On Mon, Feb 18, 2019 at 02:04:37AM -0800, Atul Gupta wrote: > Fixed Traffic Stall caused by > - Subcommands except last should have more bit set > - For esn case subcommand is required for linear skb only > - Also Optimized is_eth_imm usage > > Signed-off-by: Atul Gupta > --- > drivers/crypto/ch

Re: [PATCH -next] crypto: marvell - Remove set but not used variable 'ivsize'

2019-02-27 Thread Herbert Xu
On Mon, Feb 18, 2019 at 08:59:47AM +, YueHaibing wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/crypto/marvell/cipher.c: In function 'mv_cesa_skcipher_dma_req_init': > drivers/crypto/marvell/cipher.c:325:15: warning: > variable 'ivsize' set but not used [-Wunused-but-set-

Re: [RFC PATCH 1/4] X.509: Parse public key parameters from x509 for akcipher

2019-02-27 Thread Herbert Xu
On Sun, Feb 24, 2019 at 09:48:40AM +0300, Vitaly Chikunov wrote: > > If we pass SubjectPublicKeyInfo into set_pub_key itself (making > set_params not needed) we will break ABI and compatibility with RSA > drivers, because whole SubjectPublicKeyInfo is not expected by the This compatibility does n

[GIT] Crypto Fixes for 5.0

2019-02-27 Thread Herbert Xu
Hi Linus: This push fixes a compiler warning introduced by a previous fix, as well as two crash bugs on ARM. Please pull from git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git linus Ard Biesheuvel (2): crypto: sha256/arm - fix crash bug in Thumb2 build crypto:

Re: [PATCH v5 04/10] crypto: akcipher - new verify API for public key algorithms

2019-02-27 Thread Vitaly Chikunov
On Wed, Feb 27, 2019 at 06:28:37PM -0500, Mimi Zohar wrote: > > On Sun, 2019-02-24 at 09:08 +0300, Vitaly Chikunov wrote: > > Previous akcipher .verify() just `decrypts' (using RSA encrypt which is > > using public key) signature to uncover message hash, which was then > > compared in upper level

Re: [PATCH v5 04/10] crypto: akcipher - new verify API for public key algorithms

2019-02-27 Thread Mimi Zohar
Hi Vitaly, On Sun, 2019-02-24 at 09:08 +0300, Vitaly Chikunov wrote: > Previous akcipher .verify() just `decrypts' (using RSA encrypt which is > using public key) signature to uncover message hash, which was then > compared in upper level public_key_verify_signature() with the expected > hash valu