Re: [PATCH v2] hwrng: core - move add_early_randomness() out of rng_mutex

2019-10-14 Thread Marek Szyprowski
Hi On 12.10.2019 14:09, Herbert Xu wrote: > On Fri, Oct 11, 2019 at 03:47:24PM +0200, Laurent Vivier wrote: >> add_early_randomness() is called every time a new rng backend is added >> and every time it is set as the current rng provider. >> >> add_early_randomness() is called from functions locki

Re: [PATCH] crypto: powerpc - convert SPE AES algorithms to skcipher API

2019-10-14 Thread Ard Biesheuvel
Hi Eric, On Sat, 12 Oct 2019 at 04:32, Eric Biggers wrote: > > From: Eric Biggers > > Convert the glue code for the PowerPC SPE implementations of AES-ECB, > AES-CBC, AES-CTR, and AES-XTS from the deprecated "blkcipher" API to the > "skcipher" API. > > Tested with: > > export ARCH=powerp

[PATCH v5 0/2] BLAKE2b generic implementation

2019-10-14 Thread David Sterba
The patchset adds blake2b refrerence implementation and test vectors. V5: - removed return 0 and switched to void in blake2 functions - reordered shash_alg definition so that .base.* are first (this seems to be the preferred ordering from what I saw in recent patches in the mailinglist) - add

[PATCH v5 1/2] crypto: add blake2b generic implementation

2019-10-14 Thread David Sterba
The patch brings support of several BLAKE2 variants (2b with various digest lengths). The keyed digest is supported, using tfm->setkey call. The in-tree user will be btrfs (for checksumming), we're going to use the BLAKE2b-256 variant. The code is reference implementation taken from the official

[PATCH v5 2/2] crypto: add test vectors for blake2b

2019-10-14 Thread David Sterba
Test vectors for blake2b with various digest sizes. As the algorithm is the same up to the digest calculation, the key and input data length is distributed in a way that tests all combinanions of the two over the digest sizes. Based on the suggestion from Eric, the following input sizes are tested

Re: [RFT PATCH 0/3] crypto: s390 - convert to skcipher API

2019-10-14 Thread Harald Freudenberger
On 12.10.19 22:18, Eric Biggers wrote: > This series converts the glue code for the S390 CPACF implementations of > AES, DES, and 3DES modes from the deprecated "blkcipher" API to the > "skcipher" API. This is needed in order for the blkcipher API to be > removed. > > I've compiled this patchset,

Re: [PATCH v4 00/11] crypto: add sun8i-ce driver for Allwinner crypto engine

2019-10-14 Thread Maxime Ripard
Hi, On Sat, Oct 12, 2019 at 08:48:41PM +0200, Corentin Labbe wrote: > Hello > > This patch serie adds support for the Allwinner crypto engine. > The Crypto Engine is the third generation of Allwinner cryptogaphic offloader. > The first generation is the Security System already handled by the > sun

[bug report] crypto: dh - Add DH software implementation

2019-10-14 Thread Dan Carpenter
Hello Salvatore Benedetto, The patch 802c7f1c84e4: "crypto: dh - Add DH software implementation" from Jun 22, 2016, leads to the following static checker warning: crypto/dh_helper.c:99 crypto_dh_decode_key() warn: potential overflow crypto/dh_helper.c 68 int crypto_dh_decode

[PATCH] hwrng: core - Fix use-after-free warning in hwrng_register()

2019-10-14 Thread Laurent Vivier
Commit daae28debcb0 has moved add_early_randomness() out of the rng_mutex and tries to protect the reference of the new rng device by incrementing the reference counter. But in hwrng_register(), the function can be called with a new device that is not set as the current_rng device and the referenc

[PATCH] hwrng: omap - Fix RNG wait loop timeout

2019-10-14 Thread Sumit Garg
Existing RNG data read timeout is 200us but it doesn't cover EIP76 RNG data rate which takes approx. 700us to produce 16 bytes of output data as per testing results. So configure the timeout as 1000us to also take account of lack of udelay()'s reliability. Fixes: 383212425c92 ("hwrng: omap - Add d

[PATCH 12/25] crypto: cavium/cpt - switch to skcipher API

2019-10-14 Thread Ard Biesheuvel
Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing

[PATCH 09/25] crypto: atmel-tdes - switch to skcipher API

2019-10-14 Thread Ard Biesheuvel
Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing

[PATCH 04/25] crypto: ccp - switch from ablkcipher to skcipher

2019-10-14 Thread Ard Biesheuvel
Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing

[PATCH 08/25] crypto: atmel-aes - switch to skcipher API

2019-10-14 Thread Ard Biesheuvel
Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing

[PATCH 11/25] crypto: nitrox - remove cra_type reference to ablkcipher

2019-10-14 Thread Ard Biesheuvel
Setting the cra_type field is not necessary for skciphers, and ablkcipher will be removed, so drop the assignment from the nitrox driver. Signed-off-by: Ard Biesheuvel --- drivers/crypto/cavium/nitrox/nitrox_skcipher.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/crypto/cavium/nitr

[PATCH 10/25] crypto: bcm-spu - switch to skcipher API

2019-10-14 Thread Ard Biesheuvel
Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing

[PATCH 18/25] crypto: picoxcell - switch to skcipher API

2019-10-14 Thread Ard Biesheuvel
Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing

[PATCH 03/25] crypto: virtio - switch to skcipher API

2019-10-14 Thread Ard Biesheuvel
Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing

[PATCH 02/25] crypto: virtio - deal with unsupported input sizes

2019-10-14 Thread Ard Biesheuvel
Return -EINVAL for input sizes that are not a multiple of the AES block size, since they are not supported by our CBC chaining mode. While at it, remove the pr_err() that reports unsupported key sizes being used: we shouldn't spam the kernel log with that. Fixes: dbaf0624ffa5 ("crypto: add virtio

[PATCH 25/25] crypto: qat - switch to skcipher API

2019-10-14 Thread Ard Biesheuvel
Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing

[PATCH 21/25] crypto: rockchip - switch to skcipher API

2019-10-14 Thread Ard Biesheuvel
Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing

[PATCH 20/25] crypto: stm32 - switch to skcipher API

2019-10-14 Thread Ard Biesheuvel
Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing

[PATCH 14/25] crypto: hifn - switch to skcipher API

2019-10-14 Thread Ard Biesheuvel
Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing

[PATCH 00/25] crypto: convert h/w accelerator driver to skcipher API

2019-10-14 Thread Ard Biesheuvel
This series converts all drivers for h/w accelerators that produce the ablkcipher API to the skcipher API, so that we can finally retire the long deprecated blkcipher code. Patches #1, #2 are fixes for the virtio driver, which need to be applied first so that they can be backported Patches #3 and

[PATCH 23/25] crypto: niagara2 - switch to skcipher API

2019-10-14 Thread Ard Biesheuvel
Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing

[PATCH 16/25] crypto: mxs - switch to skcipher API

2019-10-14 Thread Ard Biesheuvel
Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing

[PATCH 01/25] crypto: virtio - implement missing support for output IVs

2019-10-14 Thread Ard Biesheuvel
In order to allow for CBC to be chained, which is something that the CTS template relies upon, implementations of CBC need to pass the IV to be used for subsequent invocations via the IV buffer. This was not implemented yet for virtio-crypto so implement it now. Fixes: dbaf0624ffa5 ("crypto: add v

[PATCH 07/25] crypto: s5p - switch to skcipher API

2019-10-14 Thread Ard Biesheuvel
Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing

[PATCH 17/25] crypto: mediatek - switch to skcipher API

2019-10-14 Thread Ard Biesheuvel
Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing

[PATCH 22/25] crypto: qce - switch to skcipher API

2019-10-14 Thread Ard Biesheuvel
Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing

[PATCH 24/25] crypto: talitos - switch to skcipher API

2019-10-14 Thread Ard Biesheuvel
Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing

[PATCH 06/25] crypto: ux500 - switch to skcipher API

2019-10-14 Thread Ard Biesheuvel
Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing

[PATCH 13/25] crypto: chelsio - switch to skcipher API

2019-10-14 Thread Ard Biesheuvel
Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing

[PATCH 19/25] crypto: sahara - switch to skcipher API

2019-10-14 Thread Ard Biesheuvel
Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing

[PATCH 05/25] crypto: omap - switch to skcipher API

2019-10-14 Thread Ard Biesheuvel
Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing

[PATCH 15/25] crypto: ixp4xx - switch to skcipher API

2019-10-14 Thread Ard Biesheuvel
Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") dated 20 august 2015 introduced the new skcipher API which is supposed to replace both blkcipher and ablkcipher. While all consumers of the API have been converted long ago, some producers of the ablkcipher remain, forcing

Re: [PATCH] hwrng: omap - Fix RNG wait loop timeout

2019-10-14 Thread Daniel Thompson
On Mon, Oct 14, 2019 at 05:32:45PM +0530, Sumit Garg wrote: > Existing RNG data read timeout is 200us but it doesn't cover EIP76 RNG > data rate which takes approx. 700us to produce 16 bytes of output data > as per testing results. So configure the timeout as 1000us to also take > account of lack o

Re: [PATCH] crypto: padlock-aes - convert to skcipher API

2019-10-14 Thread Ard Biesheuvel
On Sun, 13 Oct 2019 at 06:19, Eric Biggers wrote: > > From: Eric Biggers > > Convert the VIA PadLock implementations of AES-ECB and AES-CBC from the > deprecated "blkcipher" API to the "skcipher" API. This is needed in > order for the blkcipher API to be removed. > > Signed-off-by: Eric Biggers

Re: [PATCH 1/4] crypto: nx - don't abuse blkcipher_desc to pass iv around

2019-10-14 Thread Ard Biesheuvel
On Sun, 13 Oct 2019 at 06:40, Eric Biggers wrote: > > From: Eric Biggers > > The NX crypto driver is using 'struct blkcipher_desc' to pass the IV > around, even for AEADs (for which it creates the struct on the stack). > This is not appropriate since this structure is part of the "blkcipher" > AP

Re: [PATCH 2/4] crypto: nx - convert AES-ECB to skcipher API

2019-10-14 Thread Ard Biesheuvel
On Sun, 13 Oct 2019 at 06:40, Eric Biggers wrote: > > From: Eric Biggers > > Convert the PowerPC Nest (NX) implementation of AES-ECB from the > deprecated "blkcipher" API to the "skcipher" API. This is needed in > order for the blkcipher API to be removed. > > Signed-off-by: Eric Biggers Revie

Re: [PATCH 3/4] crypto: nx - convert AES-CBC to skcipher API

2019-10-14 Thread Ard Biesheuvel
On Sun, 13 Oct 2019 at 06:40, Eric Biggers wrote: > > From: Eric Biggers > > Convert the PowerPC Nest (NX) implementation of AES-CBC from the > deprecated "blkcipher" API to the "skcipher" API. This is needed in > order for the blkcipher API to be removed. > > Signed-off-by: Eric Biggers Revie

Re: [PATCH 4/4] crypto: nx - convert AES-CTR to skcipher API

2019-10-14 Thread Ard Biesheuvel
On Sun, 13 Oct 2019 at 06:40, Eric Biggers wrote: > > From: Eric Biggers > > Convert the PowerPC Nest (NX) implementation of AES-CTR from the > deprecated "blkcipher" API to the "skcipher" API. This is needed in > order for the blkcipher API to be removed. > > Signed-off-by: Eric Biggers Revie

Re: [RFT PATCH 0/3] crypto: s390 - convert to skcipher API

2019-10-14 Thread Ard Biesheuvel
On Sat, 12 Oct 2019 at 22:20, Eric Biggers wrote: > > This series converts the glue code for the S390 CPACF implementations of > AES, DES, and 3DES modes from the deprecated "blkcipher" API to the > "skcipher" API. This is needed in order for the blkcipher API to be > removed. > > I've compiled t

Re: [PATCH v3 21/29] crypto: BLAKE2s - generic C library implementation and selftest

2019-10-14 Thread Ard Biesheuvel
On Fri, 11 Oct 2019 at 18:46, Jason A. Donenfeld wrote: > > On Thu, Oct 10, 2019 at 11:02:32PM -0700, Eric Biggers wrote: > > FYI, I had left a few review comments on Jason's last version of this patch > > (https://lkml.kernel.org/linux-crypto/20190326173759.GA607@zzz.localdomain/), > > some of wh

Re: [PATCH 16/25] crypto: mxs - switch to skcipher API

2019-10-14 Thread Shawn Guo
Copy Marek who is the author of the driver. Shawn On Mon, Oct 14, 2019 at 02:19:01PM +0200, Ard Biesheuvel wrote: > Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") > dated 20 august 2015 introduced the new skcipher API which is supposed to > replace both blkcipher and

Re: [PATCH] hwrng: omap - Fix RNG wait loop timeout

2019-10-14 Thread Sumit Garg
On Mon, 14 Oct 2019 at 17:57, Daniel Thompson wrote: > > On Mon, Oct 14, 2019 at 05:32:45PM +0530, Sumit Garg wrote: > > Existing RNG data read timeout is 200us but it doesn't cover EIP76 RNG > > data rate which takes approx. 700us to produce 16 bytes of output data > > as per testing results. So

Re: [PATCH v3 24/29] crypto: lib/curve25519 - work around Clang stack spilling issue

2019-10-14 Thread Jason A. Donenfeld
Hi Ard, On Mon, Oct 7, 2019 at 6:46 PM Ard Biesheuvel wrote: > Arnd reports that the 32-bit generic library code for Curve25119 ends > up using an excessive amount of stack space when built with Clang: > > lib/crypto/curve25519-fiat32.c:756:6: error: stack frame size > of 1384 bytes in fu

Re: [PATCH v3 00/29] crypto: crypto API library interfaces for WireGuard

2019-10-14 Thread Jason A. Donenfeld
Hi Ard, Just to keep track of it in public, here are the things that we're deferring from my original series for after this one is (if it is) merged: - Zinc's generic C implementation of poly1305, which is faster and has separate implementations for u64 and u128. Should be uncontroversial, but it

Re: [PATCH v3 24/29] crypto: lib/curve25519 - work around Clang stack spilling issue

2019-10-14 Thread Ard Biesheuvel
On Mon, 14 Oct 2019 at 16:14, Jason A. Donenfeld wrote: > > Hi Ard, > > On Mon, Oct 7, 2019 at 6:46 PM Ard Biesheuvel > wrote: > > Arnd reports that the 32-bit generic library code for Curve25119 ends > > up using an excessive amount of stack space when built with Clang: > > > > lib/crypto/cur

[PATCH v2 2/2] crypto: aegis128 - duplicate init() and final() hooks in SIMD code

2019-10-14 Thread Ard Biesheuvel
In order to speed up aegis128 processing even more, duplicate the init() and final() routines as SIMD versions in their entirety. This results in a 2x speedup on ARM Cortex-A57 for ~1500 byte packets (using AES instructions). Signed-off-by: Ard Biesheuvel --- crypto/aegis128-core.c | 38 ++

[PATCH v2 1/2] crypto: aegis128 - avoid function pointers for parameterization

2019-10-14 Thread Ard Biesheuvel
Instead of passing around an ops structure with function pointers, which forces indirect calls to be used, refactor the code slightly so we can use ordinary function calls. At the same time, switch to a static key to decide whether or not the SIMD code path may be used. Signed-off-by: Ard Biesheuv

[PATCH v2 0/2] crypto: aegis128 SIMD improvements

2019-10-14 Thread Ard Biesheuvel
Refactor the aegis128 code to get rid of indirect calls, and implement SIMD versions of the init() and final() hooks. This results in a ~2x speedup on ARM Cortex-A57 for ~1500 byte inputs. Changes since v1: - fix missing Sbox loads for plain SIMD on GCC - fix endianness issue in final_simd() routi

[RFC PATCH] crypto: sun8i_ce_pm_ops can be static

2019-10-14 Thread kbuild test robot
Fixes: f113059e7b4f ("crypto: Add Allwinner sun8i-ce Crypto Engine") Signed-off-by: kbuild test robot --- sun8i-ce-core.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c

Re: [PATCH v4 02/11] crypto: Add Allwinner sun8i-ce Crypto Engine

2019-10-14 Thread kbuild test robot
Hi Corentin, I love your patch! Perhaps something to improve: [auto build test WARNING on cryptodev/master] [cannot apply to v5.4-rc3 next-20191014] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base'

Re: [PATCH] crypto: powerpc - convert SPE AES algorithms to skcipher API

2019-10-14 Thread Eric Biggers
On Mon, Oct 14, 2019 at 10:45:22AM +0200, Ard Biesheuvel wrote: > Hi Eric, > > On Sat, 12 Oct 2019 at 04:32, Eric Biggers wrote: > > > > From: Eric Biggers > > > > Convert the glue code for the PowerPC SPE implementations of AES-ECB, > > AES-CBC, AES-CTR, and AES-XTS from the deprecated "blkciph

Re: [PATCH] crypto: powerpc - convert SPE AES algorithms to skcipher API

2019-10-14 Thread Ard Biesheuvel
On Mon, 14 Oct 2019 at 19:38, Eric Biggers wrote: > > On Mon, Oct 14, 2019 at 10:45:22AM +0200, Ard Biesheuvel wrote: > > Hi Eric, > > > > On Sat, 12 Oct 2019 at 04:32, Eric Biggers wrote: > > > > > > From: Eric Biggers > > > > > > Convert the glue code for the PowerPC SPE implementations of AES

Re: [PATCH 23/25] crypto: niagara2 - switch to skcipher API

2019-10-14 Thread David Miller
From: Ard Biesheuvel Date: Mon, 14 Oct 2019 14:19:08 +0200 > Commit 7a7ffe65c8c5 ("crypto: skcipher - Add top-level skcipher interface") > dated 20 august 2015 introduced the new skcipher API which is supposed to > replace both blkcipher and ablkcipher. While all consumers of the API have > been

Re: [PATCH v2 1/4] dt-bindings: crypto: Add DT bindings documentation for amlogic-crypto

2019-10-14 Thread Rob Herring
On Mon, 14 Oct 2019 05:31:41 +, Corentin Labbe wrote: > This patch adds documentation for Device-Tree bindings for the > Amlogic GXL cryptographic offloader driver. > > Signed-off-by: Corentin Labbe > --- > .../bindings/crypto/amlogic,gxl-crypto.yaml | 52 +++ > 1 file chan

Re: [PATCH] KEYS: asym_tpm: Switch to get_random_bytes()

2019-10-14 Thread Jarkko Sakkinen
On Wed, Oct 09, 2019 at 12:11:06PM +, Safford, David (GE Global Research, US) wrote: > > > From: Jarkko Sakkinen > > Sent: Tuesday, October 8, 2019 7:54 PM > > To: Ken Goldman > > Cc: Safford, David (GE Global Research, US) ; Mimi > > Zohar ; linux-integr...@vger.kernel.org; > > sta...@vger

Re: [PATCH] KEYS: asym_tpm: Switch to get_random_bytes()

2019-10-14 Thread Jarkko Sakkinen
On Wed, Oct 09, 2019 at 08:09:29AM +, Pascal Van Leeuwen wrote: > There's certification and certification. Not all certificates are > created equally. But if it matches your specific requirements, why not. > There's a _lot_ of HW out there that's not x86 though ... > > And: is RDRAND certified

Re: [PATCH] KEYS: asym_tpm: Switch to get_random_bytes()

2019-10-14 Thread Jarkko Sakkinen
On Mon, Oct 14, 2019 at 10:00:33PM +0300, Jarkko Sakkinen wrote: > On Wed, Oct 09, 2019 at 12:11:06PM +, Safford, David (GE Global Research, > US) wrote: > > > > > From: Jarkko Sakkinen > > > Sent: Tuesday, October 8, 2019 7:54 PM > > > To: Ken Goldman > > > Cc: Safford, David (GE Global Re

Re: [PATCH] KEYS: asym_tpm: Switch to get_random_bytes()

2019-10-14 Thread James Bottomley
On Mon, 2019-10-14 at 22:00 +0300, Jarkko Sakkinen wrote: > On Wed, Oct 09, 2019 at 12:11:06PM +, Safford, David (GE Global > Research, US) wrote: > > > > > From: Jarkko Sakkinen > > > Sent: Tuesday, October 8, 2019 7:54 PM > > > To: Ken Goldman > > > Cc: Safford, David (GE Global Research,

Re: [Patch v7 0/4] Create and consolidate trusted keys subsystem

2019-10-14 Thread Jarkko Sakkinen
On Fri, Oct 11, 2019 at 03:37:57PM +0300, Jarkko Sakkinen wrote: > On Mon, Oct 07, 2019 at 10:55:31AM +0530, Sumit Garg wrote: > > This patch-set does restructuring of trusted keys code to create and > > consolidate trusted keys subsystem. > > > > Also, patch #2 replaces tpm1_buf code used in secu

Re: [Patch v7 0/4] Create and consolidate trusted keys subsystem

2019-10-14 Thread Jarkko Sakkinen
On Fri, Oct 11, 2019 at 02:05:17PM -0700, Jerry Snitselaar wrote: > On Fri Oct 11 19, Jarkko Sakkinen wrote: > > On Mon, Oct 07, 2019 at 10:55:31AM +0530, Sumit Garg wrote: > > > This patch-set does restructuring of trusted keys code to create and > > > consolidate trusted keys subsystem. > > > >

[PATCH v2 1/3] crypto: powerpc - don't unnecessarily use atomic scatterwalk

2019-10-14 Thread Eric Biggers
From: Eric Biggers The PowerPC SPE implementations of AES modes only disable preemption during the actual encryption/decryption, not during the scatterwalk functions. It's therefore unnecessary to request an atomic scatterwalk. So don't do so. Signed-off-by: Eric Biggers --- arch/powerpc/cryp

[PATCH v2 2/3] crypto: powerpc - don't set ivsize for AES-ECB

2019-10-14 Thread Eric Biggers
From: Eric Biggers Set the ivsize for the "ecb-ppc-spe" algorithm to 0, since ECB mode doesn't take an IV. This fixes a failure in the extra crypto self-tests: alg: skcipher: ivsize for ecb-ppc-spe (16) doesn't match generic impl (0) Signed-off-by: Eric Biggers --- arch/powerpc/cryp

[PATCH v2 3/3] crypto: powerpc - convert SPE AES algorithms to skcipher API

2019-10-14 Thread Eric Biggers
From: Eric Biggers Convert the glue code for the PowerPC SPE implementations of AES-ECB, AES-CBC, AES-CTR, and AES-XTS from the deprecated "blkcipher" API to the "skcipher" API. This is needed in order for the blkcipher API to be removed. Tested with: export ARCH=powerpc CROSS_COMPILE=

[PATCH v2 0/3] crypto: powerpc - convert SPE AES algorithms to skcipher API

2019-10-14 Thread Eric Biggers
This series converts the glue code for the PowerPC SPE implementations of AES-ECB, AES-CBC, AES-CTR, and AES-XTS from the deprecated "blkcipher" API to the "skcipher" API. This is needed in order for the blkcipher API to be removed. Patch 1-2 are fixes. Patch 3 is the actual conversion. Tested