[PATCH 1/2] crypto: sha1/ARM: make use of common SHA-1 structures

2014-06-28 Thread Jussi Kivilinna
Common SHA-1 structures are defined in crypto/sha.h for code sharing. This patch changes SHA-1/ARM glue code to use these structures. Signed-off-by: Jussi Kivilinna jussi.kivili...@iki.fi --- arch/arm/crypto/sha1_glue.c | 50 +++ 1 file changed, 22

[PATCH 2/2] crypto: sha1: add ARM NEON implementation

2014-06-28 Thread Jussi Kivilinna
This patch adds ARM NEON assembly implementation of SHA-1 algorithm. tcrypt benchmark results on Cortex-A8, sha1-arm-asm vs sha1-neon-asm: block-size bytes/updateold-vs-new 16 16 1.06x 64 16 1.05x 64 64 1.09x

[PATCH] crypto: sha512: add ARM NEON implementation

2014-06-28 Thread Jussi Kivilinna
This patch adds ARM NEON assembly implementation of SHA-512 and SHA-384 algorithms. tcrypt benchmark results on Cortex-A8, sha512-generic vs sha512-neon-asm: block-size bytes/updateold-vs-new 16 16 2.99x 64 16 2.67x 64 64

Re: [PATCH 1/2] crypto: sha1/ARM: make use of common SHA-1 structures

2014-06-28 Thread Ard Biesheuvel
On 28 June 2014 12:39, Jussi Kivilinna jussi.kivili...@iki.fi wrote: Common SHA-1 structures are defined in crypto/sha.h for code sharing. This patch changes SHA-1/ARM glue code to use these structures. Signed-off-by: Jussi Kivilinna jussi.kivili...@iki.fi Acked-by: Ard Biesheuvel

[PATCH 4/4] DRBG: Call CTR DRBG DF function only once

2014-06-28 Thread Stephan Mueller
The CTR DRBG requires the update function to be called twice when generating a random number. In both cases, update function must process the additional information string by using the DF function. As the DF produces the same result in both cases, we can save one invocation of the DF function when

Re: [PATCH 2/2] crypto: sha1: add ARM NEON implementation

2014-06-28 Thread Ard Biesheuvel
Hi Jussi, On 28 June 2014 12:40, Jussi Kivilinna jussi.kivili...@iki.fi wrote: This patch adds ARM NEON assembly implementation of SHA-1 algorithm. tcrypt benchmark results on Cortex-A8, sha1-arm-asm vs sha1-neon-asm: block-size bytes/updateold-vs-new 16 16

[PATCH 3/4] DRBG: Fix format string for debugging statements

2014-06-28 Thread Stephan Mueller
The initial format strings caused warnings on several architectures. The updated format strings now match the variable types. Reported-by: kbuild test robot fengguang...@intel.com Reported-by: Randy Dunlap rdun...@infradead.org Signed-off-by: Stephan Mueller smuel...@chronox.de --- crypto/drbg.c

[PATCH 2/4] DRBG: cleanup of preprocessor macros

2014-06-28 Thread Stephan Mueller
The structure used to construct the module description line was marked problematic by the sparse code analysis tool. The module line description now does not contain any ifdefs to prevent error reports from sparse. The preprocessor warning declaration was reported by sparse. It is replaced in

[PATCH 1/4] DRBG: use of kernel linked list

2014-06-28 Thread Stephan Mueller
The DRBG-style linked list to manage input data that is fed into the cipher invocations is replaced with the kernel linked list implementation. The change is transparent to users of the interfaces offered by the DRBG. Therefore, no changes to the testmgr code is needed. Reported-by: kbuild test

[PATCH 0/4] DRBG: Fixes for sparse tool reports

2014-06-28 Thread Stephan Mueller
Hi, The following patches cover requested changes based on the sparse tool test run and suggestions by peer reviewers. In addition, a patch to make the CTR DRBG more efficient is added. Stephan Mueller (4): DRBG: use of kernel linked list DRBG: cleanup of preprocessor macros DRBG: Fix

Re: [PATCH 2/4] DRBG: cleanup of preprocessor macros

2014-06-28 Thread Stephen Rothwell
Hi Stephan, On Sat, 28 Jun 2014 22:00:07 +0200 Stephan Mueller smuel...@chronox.de wrote: diff --git a/crypto/drbg.c b/crypto/drbg.c index 6679a26..03a230e 100644 --- a/crypto/drbg.c +++ b/crypto/drbg.c @@ -102,8 +102,13 @@ #if !defined(CONFIG_CRYPTO_DRBG_HASH) \

Re: [PATCH 3/4] DRBG: Fix format string for debugging statements

2014-06-28 Thread Stephen Rothwell
Hi Stephan, On Sat, 28 Jun 2014 22:01:46 +0200 Stephan Mueller smuel...@chronox.de wrote: @@ -1987,8 +1987,9 @@ static int __init drbg_init(void) if (ARRAY_SIZE(drbg_cores) * 2 ARRAY_SIZE(drbg_algs)) { pr_info(DRBG: Cannot register all DRBG types -

Re: [PATCH 3/4] DRBG: Fix format string for debugging statements

2014-06-28 Thread Stephan Mueller
Am Sonntag, 29. Juni 2014, 12:24:02 schrieb Stephen Rothwell: Hi Stephen, Hi Stephan, On Sat, 28 Jun 2014 22:01:46 +0200 Stephan Mueller smuel...@chronox.de wrote: @@ -1987,8 +1987,9 @@ static int __init drbg_init(void) if (ARRAY_SIZE(drbg_cores) * 2 ARRAY_SIZE(drbg_algs)) {

Re: [PATCH 3/4] DRBG: Fix format string for debugging statements

2014-06-28 Thread Joe Perches
On Sun, 2014-06-29 at 05:46 +0200, Stephan Mueller wrote: Am Sonntag, 29. Juni 2014, 12:24:02 schrieb Stephen Rothwell: Hi Stephen, Hi Stephan, On Sat, 28 Jun 2014 22:01:46 +0200 Stephan Mueller smuel...@chronox.de wrote: @@ -1987,8 +1987,9 @@ static int __init drbg_init(void)

Re: [PATCH 3/4] DRBG: Fix format string for debugging statements

2014-06-28 Thread Stephan Mueller
Am Samstag, 28. Juni 2014, 20:53:19 schrieb Joe Perches: Hi Joe, On Sun, 2014-06-29 at 05:46 +0200, Stephan Mueller wrote: Am Sonntag, 29. Juni 2014, 12:24:02 schrieb Stephen Rothwell: Hi Stephen, Hi Stephan, On Sat, 28 Jun 2014 22:01:46 +0200 Stephan Mueller

Re: [PATCH 2/4] DRBG: cleanup of preprocessor macros

2014-06-28 Thread Stephan Mueller
Am Sonntag, 29. Juni 2014, 12:20:15 schrieb Stephen Rothwell: Hi Stephen, Hi Stephan, On Sat, 28 Jun 2014 22:00:07 +0200 Stephan Mueller smuel...@chronox.de wrote: diff --git a/crypto/drbg.c b/crypto/drbg.c index 6679a26..03a230e 100644 --- a/crypto/drbg.c +++ b/crypto/drbg.c @@