[PATCH 0/4] crypto: Key Derivation Function (SP800-108)

2016-01-25 Thread Stephan Mueller
Hi, this patch set implements all three key derivation functions defined in SP800-108. The implementation is provided as a template for random number generators, since a KDF can be considered a form of deterministic RNG where the key material is used as a seed. With the KDF implemented as a

[PATCH 2/4] crypto: kdf - add known answer tests

2016-01-25 Thread Stephan Mueller
Add known answer tests to the testmgr for the KDF (SP800-108) cipher. Signed-off-by: Stephan Mueller --- crypto/testmgr.c | 167 +++ crypto/testmgr.h | 111 2 files changed, 278

Re: [PATCH v2 3/3] crypto: mxs-dcp - provide statesize and import/export()

2016-01-25 Thread Herbert Xu
On Wed, Jan 13, 2016 at 03:52:04PM -0200, Fabio Estevam wrote: > From: Fabio Estevam > > Currently the mxs-dcp driver fails to probe: > > mxs-dcp 80028000.dcp: Failed to register sha1 hash! > mxs-dcp: probe of 80028000.dcp failed with error -22 > > This happens since

Re: [PATCH 1/2] crypto: s5p-sss - Fix minor coding style violations

2016-01-25 Thread Herbert Xu
On Mon, Jan 11, 2016 at 08:45:50PM +0900, Krzysztof Kozlowski wrote: > Improve a little bit code readability and use dev_info/err for printing > messages. > > Signed-off-by: Krzysztof Kozlowski Both applied. -- Email: Herbert Xu Home Page:

Re: [PATCH v1] crypto: ccp - Add hash state import and export support

2016-01-25 Thread Herbert Xu
On Tue, Jan 12, 2016 at 11:17:38AM -0600, Tom Lendacky wrote: > Commit 8996eafdcbad ("crypto: ahash - ensure statesize is non-zero") > added a check to prevent ahash algorithms from successfully registering > if the import and export functions were not implemented. This prevents > an oops in the

Re: [PATCH] crypto: qat - Pack cfg ctl structs

2016-01-25 Thread Herbert Xu
On Mon, Jan 11, 2016 at 03:23:47PM +, Ahsan Atta wrote: > -This is required to support 32bit adf_ctl >utility on a 64bit driver > > Signed-off-by: Ahsan Atta Applied. -- Email: Herbert Xu Home Page:

Re: [PATCH] crypto: qat - remove redundant function call

2016-01-25 Thread Herbert Xu
On Wed, Jan 06, 2016 at 05:56:20PM +0800, Yang Pingchao wrote: > adf_dev_restore(accel_dev) was called in adf_dev_shutdown,no > need to call it in adf_device_reset_worker after adf_dev_shutdown > was called. > > Signed-off-by: Yang Pingchao Applied. -- Email: Herbert

Re: [PATCH] crypto: qat - change name for c6xx dev type

2016-01-25 Thread Herbert Xu
On Tue, Jan 05, 2016 at 11:14:55AM -0800, Tadeusz Struk wrote: > change name for c6x dev type to more generic. > > Signed-off-by: Tadeusz Struk Applied. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key:

Re: crypto: algif_hash: creating 0 sized array in hash_accept

2016-01-25 Thread Herbert Xu
On Mon, Jan 25, 2016 at 07:14:20AM -0500, Sasha Levin wrote: > Hi all, > > While fuzzing with trinity inside a KVM tools guest running the latest -next > kernel > I've hit: > > [ 828.386074] UBSAN: Undefined behaviour in crypto/algif_hash.c:185:7 > [ 828.386811] variable length array bound

Re: [PATCH 0/2] n2rng: Attach on T5/M5, T7/M7 SPARC CPUs

2016-01-25 Thread Herbert Xu
On Fri, Jan 15, 2016 at 03:22:53PM -0500, David Miller wrote: > From: Anatoly Pugachev > Date: Thu, 14 Jan 2016 00:43:18 +0300 > > > This patch adds support for recent oracle hardware (T5/M5, T7/M7 SPARC > > CPUs), > > so n2_rng driver would work on them. > > > > 1. n2rng:

Re: [PATCH 1/4] hw_random: bcm63xx-rng: remove unused variables

2016-01-25 Thread Herbert Xu
On Sun, Jan 17, 2016 at 10:03:54AM +0100, Álvaro Fernández Rojas wrote: > These variables where left as unused in commit 6229c16060fe > ("hwrng: bcm63xx - make use of devm_hwrng_register") > > Fixes the following warning: > drivers/char/hw_random/bcm63xx-rng.c: In function 'bcm63xx_rng_probe': >

Re: [PATCH] crypto: drbg - remove FIPS 140-2 continuous test

2016-01-25 Thread Herbert Xu
On Fri, Jan 22, 2016 at 09:52:28AM +0100, Stephan Mueller wrote: > Hi, > > the following patch is fully CAVS tested on 64 bit and 32 bit. > > Note, this change cannot be made for random.c or ansi_cprng.c, unfortunately. > > ---8<--- > The newly released FIPS 140-2 IG 9.8 specifies that for

Re: [PATCH 0/5] crypto: atmel-sha: fix registration issue and other bugs

2016-01-25 Thread Herbert Xu
On Fri, Jan 15, 2016 at 03:49:30PM +0100, Cyrille Pitchen wrote: > Hi all, > > This series of patches fixes many issues such as the algo registration failure > or the broken support of context switches. > > This series was applied to linux-next and tested on a sama5d2 xplained > ultra board. We

Re: [PATCH] Reduced reqsize in qat_algs

2016-01-25 Thread Herbert Xu
On Tue, Jan 19, 2016 at 05:34:04PM +, Giovanni Cabiddu wrote: > From: Cabiddu, Giovanni > > req_alloc functions already take into account the request data structure > when allocating memory. > > Signed-off-by: Giovanni Cabiddu >

Re: [PATCH 0/5] crypto: atmel-sha: fix registration issue and other bugs

2016-01-25 Thread Cyrille Pitchen
Hi Herbert, Le 25/01/2016 15:48, Herbert Xu a écrit : > On Fri, Jan 15, 2016 at 03:49:30PM +0100, Cyrille Pitchen wrote: >> Hi all, >> >> This series of patches fixes many issues such as the algo registration >> failure >> or the broken support of context switches. >> >> This series was applied

re: [PATCH] eCryptfs: Clean up crypto initialization

2016-01-25 Thread Dan Carpenter
Hello Michael Halcrow, The patch e5d9cbde6ce0: "[PATCH] eCryptfs: Clean up crypto initialization" from Oct 30, 2006, leads to the following static checker warning: fs/ecryptfs/crypto.c:1625 ecryptfs_process_key_cipher() error: get_random_bytes() 'dummy_key' too small (64 vs

Re: [PATCH] crypto: chacha20_4block_xor_ssse3: Align stack pointer to 64 bytes

2016-01-25 Thread Herbert Xu
On Fri, Jan 22, 2016 at 08:55:24AM +0100, Martin Willi wrote: > Hi Eli, > > > This aligns the stack pointer in chacha20_4block_xor_ssse3 to 64 bytes. > > Fixes general protection faults and potential kernel panics. > > I assumed 16-byte alignment according to the System V AMD64 ABI, but > this

Re: [PATCH v2 1/3] crypto: sahara - avoid needlessly saving and restoring sahara_ctx

2016-01-25 Thread Herbert Xu
On Wed, Jan 13, 2016 at 03:52:02PM -0200, Fabio Estevam wrote: > From: Fabio Estevam > > Based on commit 434b421241f2d0 ("crypto: caam - avoid needlessly saving and > restoring caam_hash_ctx") from Russell King. > > When exporting and importing the hash state, we will

Re: [PATCH v2 1/2] crypto: caam - make write transactions bufferable on PPC platforms

2016-01-25 Thread Herbert Xu
On Tue, Jan 12, 2016 at 05:59:29PM +0200, Horia Geantă wrote: > Previous change (see "Fixes" tag) to the MCFGR register > clears AWCACHE[0] ("bufferable" AXI3 attribute) (which is "1" at POR). > > This makes all writes non-bufferable, causing a ~ 5% performance drop > for PPC-based platforms. >

Re: [PATCH 16/26] libceph: Use skcipher

2016-01-25 Thread Ilya Dryomov
On Sun, Jan 24, 2016 at 2:18 PM, Herbert Xu wrote: > This patch replaces uses of blkcipher with skcipher. > > Signed-off-by: Herbert Xu > --- > > net/ceph/crypto.c | 97 > +++--- > 1

Re: [dm-devel] [PATCH 22/26] iscsi_tcp: Use ahash

2016-01-25 Thread Mike Christie
On 01/24/2016 07:19 AM, Herbert Xu wrote: > This patch replaces uses of the long obsolete hash interface with > ahash. > > Signed-off-by: Herbert Xu > --- > > drivers/scsi/iscsi_tcp.c| 54 > ++-- >

[PATCH] crypto: hash - select CRYPTO_HASH where needed

2016-01-25 Thread Arnd Bergmann
The ghash and poly1305 hash implementations can be enabled when CONFIG_CRYPTO_HASH is turned off, causing a link error: crypto/built-in.o: In function `ghash_mod_init': (.init.text+0xd0): undefined reference to `crypto_register_shash' crypto/built-in.o: In function `ghash_mod_exit':

Re: [PATCH 0/2] n2rng: Attach on T5/M5, T7/M7 SPARC CPUs

2016-01-25 Thread Anatoly Pugachev
On Mon, Jan 25, 2016 at 10:41:01PM +0800, Herbert Xu wrote: > On Fri, Jan 15, 2016 at 03:22:53PM -0500, David Miller wrote: > > From: Anatoly Pugachev > > Date: Thu, 14 Jan 2016 00:43:18 +0300 > > > > > This patch adds support for recent oracle hardware (T5/M5, T7/M7 SPARC >

[PATCH 1/2] crypto: jitterentropy - always select CRYPTO_RNG

2016-01-25 Thread Arnd Bergmann
When building the jitterentropy driver by itself, we get a link error when CRYPTO_RNG is not enabled as well: crypto/built-in.o: In function `jent_mod_init': jitterentropy-kcapi.c:(.init.text+0x98): undefined reference to `crypto_register_rng' crypto/built-in.o: In function `jent_mod_exit':

[PATCH 2/2] n2rng: Attach on T5/M5, T7/M7 SPARC CPUs

2016-01-25 Thread Anatoly Pugachev
n2rng: Attach on T5/M5, T7/M7 SPARC CPUs Signed-off-by: Anatoly Pugachev --- drivers/char/hw_random/n2-drv.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/char/hw_random/n2-drv.c b/drivers/char/hw_random/n2-drv.c index 843d6f6..8bee43a 100644 ---

[PATCH 1/2] n2rng: documentation, add DT bindings, vendor prefixes

2016-01-25 Thread Anatoly Pugachev
n2rng: documentation, add DT bindings, vendor prefixes Signed-off-by: Anatoly Pugachev --- .../devicetree/bindings/sparc_sun_oracle_rng.txt | 30 ++ .../devicetree/bindings/vendor-prefixes.txt| 2 ++ 2 files changed, 32 insertions(+) create

[PATCH 1/4] crypto: sunxi - don't print uninitialized data

2016-01-25 Thread Arnd Bergmann
gcc correctly warns that the printk output contains a variable that is not initialized in some cases: drivers/crypto/sunxi-ss/sun4i-ss-cipher.c: In function 'sun4i_ss_cipher_poll': drivers/crypto/sunxi-ss/sun4i-ss-cipher.c:254:76: warning: 'todo' may be used uninitialized in this function

Re: [PATCH 2/2] n2rng: Attach on T5/M5, T7/M7 SPARC CPUs

2016-01-25 Thread David Miller
From: Anatoly Pugachev Date: Mon, 25 Jan 2016 19:09:39 +0300 > n2rng: Attach on T5/M5, T7/M7 SPARC CPUs > > Signed-off-by: Anatoly Pugachev Acked-by: David S. Miller -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH 1/2] n2rng: documentation, add DT bindings, vendor prefixes

2016-01-25 Thread David Miller
From: Anatoly Pugachev Date: Mon, 25 Jan 2016 19:09:21 +0300 > n2rng: documentation, add DT bindings, vendor prefixes > > Signed-off-by: Anatoly Pugachev Acked-by: David S. Miller -- To unsubscribe from this list: send the line

Re: [PATCH v3 0/4] crypto: add algif_akcipher user space API

2016-01-25 Thread Stephan Mueller
Am Freitag, 18. Dezember 2015, 00:49:57 schrieb Stephan Mueller: Hi Herbert, [...] > Changes v3: > * fix hack in alg_setkey and alg_setsockopt by avoding branches for > setkey and setpubkey as pointed out by Marcel Holtmann > * removal of patch for fixing SGL handling as this is already

GCM: cra_name == cra_driver_name

2016-01-25 Thread Stephan Mueller
Hi Herbert, with the current cryptodev tree, when I call a compound AEAD cipher with cra_driver_name for the first time, this cra_driver_name gets registered also as cra_name. Note, using other compound ciphers (like HMAC or symmetric ciphers), I do not see that error. With that registering,

Re: [PATCH 2/2] n2rng: Attach on T5/M5, T7/M7 SPARC CPUs

2016-01-25 Thread Anatoly Pugachev
n2rng: Attach on T5/M5, T7/M7 SPARC CPUs (space to tab fixes after variable names) Signed-off-by: Anatoly Pugachev --- drivers/char/hw_random/n2-drv.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/char/hw_random/n2-drv.c

AF_ALG: hash returns -ENOKEY

2016-01-25 Thread Stephan Mueller
Hi Herbert, during testing of the current cryptodev-2.6 key, the AF_ALG hash does not seem to work as it used to. Regardless whether I use the vmsplice or the sendmsg call, I get -ENOKEY using a normal hash. When you use by libkcapi/test/ [1] test application with the following command, I

[PATCH 05/22] hw_random: Fix dependencies for !HAS_IOMEM archs

2016-01-25 Thread Richard Weinberger
Not every arch has io memory. So, unbreak the build by fixing the dependencies. Signed-off-by: Richard Weinberger --- drivers/char/hw_random/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig index

[PATCH] crypto : sha1-mb : Add missing args_digest offset

2016-01-25 Thread Megha Dey
From: Megha Dey The _args_digest is defined as _args+_digest, both of which are the first members of 2 separate structures, effectively yielding _args_digest to have a value of zero. Thus, no errors have spawned yet due to this. To ensure sanity, adding the missing