[PATCH v2 4/6] compile the DRBG code

2014-03-17 Thread Stephan Mueller
Signed-off-by: Stephan Mueller smuel...@chronox.de --- diff --git a/crypto/Makefile b/crypto/Makefile index b29402a..0d63373 100644 --- a/crypto/Makefile +++ b/crypto/Makefile @@ -92,6 +92,7 @@ obj-$(CONFIG_CRYPTO_842) += 842.o obj-$(CONFIG_CRYPTO_RNG2) += rng.o obj-$(CONFIG_CRYPTO_RNG2) +=

[PATCH v2 1/6] SP800-90A Deterministic Random Bit Generator

2014-03-17 Thread Stephan Mueller
This is a clean-room implementation of the DRBG defined in SP800-90A. All three viable DRBGs defined in the standard are implemented: * HMAC: This is the leanest DRBG and compiled per default * Hash: The more complex DRBG can be enabled at compile time * CTR: The most complex DRBG can also be

[PATCH v2 5/6] DRBG testmgr test vectors

2014-03-17 Thread Stephan Mueller
All types of the DRBG (CTR, HMAC, Hash) are covered with test vectors. In addition, all permutations of use cases of the DRBG are covered: * with and without predition resistance * with and without additional information string * with and without personalization string As

[PATCH v2 3/6] DRBG kernel configuration options

2014-03-17 Thread Stephan Mueller
The different DRBG types of CTR, Hash, HMAC can be enabled or disabled at compile time. At least one DRBG type shall be selected. The default is the HMAC DRBG as its code base is smallest. Signed-off-by: Stephan Mueller smuel...@chronox.de --- diff --git a/crypto/Kconfig b/crypto/Kconfig index

[PATCH v2 2/6] header file for DRBG

2014-03-17 Thread Stephan Mueller
The header file includes the definition of: * DRBG data structures with - struct drbg_state as main structure - struct drbg_core referencing the backend ciphers - struct drbg_state_ops callbach handlers for specific code supporting the Hash, HMAC, CTR DRBG

[PATCH v2 6/6] Add DRBG test code to testmgr

2014-03-17 Thread Stephan Mueller
The DRBG test code implements the CAVS test approach. As discussed for the test vectors, all DRBG types are covered with testing. However, not every backend cipher is covered with testing. To prevent the testmgr from logging missing testing, the NULL test is registered for all backend ciphers not

Re: [PATCH][RESEND 3] hwrng: add randomness to system from rng sources

2014-03-17 Thread Austin S Hemmelgarn
On 2014-03-16 18:56, H. Peter Anvin wrote: On 03/03/2014 03:51 PM, Kees Cook wrote: When bringing a new RNG source online, it seems like it would make sense to use some of its bytes to make the system entropy pool more random, as done with all sorts of other devices that contain per-device or

Re: [PATCH 2/2] SHA1 transform: x86_64 AVX2 optimization - glue build-v2

2014-03-17 Thread chandramouli narayanan
On Fri, 2014-03-14 at 06:40 +0100, Marek Vasut wrote: On Wednesday, March 12, 2014 at 07:47:50 PM, chandramouli narayanan wrote: This git patch adds the glue, build and configuration changes to include x86_64 AVX2 optimization of SHA1 transform to crypto support. The patch has been tested

Re: [PATCH 1/2] SHA1 transform: x86_64 AVX2 optimization - assembly code-v2

2014-03-17 Thread chandramouli narayanan
On Fri, 2014-03-14 at 06:34 +0100, Marek Vasut wrote: On Wednesday, March 12, 2014 at 07:47:43 PM, chandramouli narayanan wrote: This git patch adds x86_64 AVX2 optimization of SHA1 transform to crypto support. The patch has been tested with 3.14.0-rc1 kernel. On a Haswell desktop,

Re: [PATCH 2/2] SHA1 transform: x86_64 AVX2 optimization - glue build-v2

2014-03-17 Thread Marek Vasut
On Monday, March 17, 2014 at 04:53:12 PM, chandramouli narayanan wrote: On Fri, 2014-03-14 at 06:40 +0100, Marek Vasut wrote: On Wednesday, March 12, 2014 at 07:47:50 PM, chandramouli narayanan wrote: This git patch adds the glue, build and configuration changes to include x86_64 AVX2

Re: [PATCH 2/2] SHA1 transform: x86_64 AVX2 optimization - glue build-v2

2014-03-17 Thread chandramouli narayanan
On Mon, 2014-03-17 at 17:06 +0100, Marek Vasut wrote: On Monday, March 17, 2014 at 04:53:12 PM, chandramouli narayanan wrote: On Fri, 2014-03-14 at 06:40 +0100, Marek Vasut wrote: On Wednesday, March 12, 2014 at 07:47:50 PM, chandramouli narayanan wrote: This git patch adds the glue,

Re: [PATCH 2/2] SHA1 transform: x86_64 AVX2 optimization - glue build-v2

2014-03-17 Thread H. Peter Anvin
On 03/17/2014 09:53 AM, chandramouli narayanan wrote: On second thoughts, with sha1-sse3-(CONFIG_AS_AVX2) += sha1_avx2_x86_64_asm.o, I have build issues and sha1_transform_avx2 undefined in sha1-sss3.ko. I can rid #ifdef CONFIG_AS_AVX2 in patch1. The following works though: ifeq

Re: [PATCH 2/2] SHA1 transform: x86_64 AVX2 optimization - glue build-v2

2014-03-17 Thread Marek Vasut
On Monday, March 17, 2014 at 05:53:52 PM, chandramouli narayanan wrote: On Mon, 2014-03-17 at 17:06 +0100, Marek Vasut wrote: On Monday, March 17, 2014 at 04:53:12 PM, chandramouli narayanan wrote: On Fri, 2014-03-14 at 06:40 +0100, Marek Vasut wrote: On Wednesday, March 12, 2014 at

Re: [PATCH cryptodev 3/4] crypto: testmgr - add aead null encryption test vectors

2014-03-17 Thread Marek Vasut
On Friday, March 14, 2014 at 04:46:51 PM, Horia Geanta wrote: Add test vectors for aead with null encryption and md5, respectively sha1 authentication. Input data is taken from test vectors listed in RFC2410. Signed-off-by: Horia Geanta horia.gea...@freescale.com [...] ---

Re: [PATCH] arm64/lib: add optimized implementation of sha_transform

2014-03-17 Thread Marek Vasut
On Friday, March 14, 2014 at 04:02:33 PM, Ard Biesheuvel wrote: This implementation keeps the 64 bytes of workspace in registers rather than on the stack, eliminating most of the loads and stores, and reducing the instruction count by about 25%. Signed-off-by: Ard Biesheuvel

Re: [PATCH cryptodev 1/4] crypto: caam - remove error propagation handling

2014-03-17 Thread Marek Vasut
On Friday, March 14, 2014 at 04:46:49 PM, Horia Geanta wrote: Commit 61bb86bba169507a5f223b94b9176c32c84b4721 (crypto: caam - set descriptor sharing type to SERIAL) changed the descriptor sharing mode from SHARE_WAIT to SHARE_SERIAL. All descriptor commands that handle the ok to share and

Re: [PATCH 2/2] SHA1 transform: x86_64 AVX2 optimization - glue build-v2

2014-03-17 Thread chandramouli narayanan
On Mon, 2014-03-17 at 19:11 +0100, Marek Vasut wrote: On Monday, March 17, 2014 at 05:53:52 PM, chandramouli narayanan wrote: On Mon, 2014-03-17 at 17:06 +0100, Marek Vasut wrote: On Monday, March 17, 2014 at 04:53:12 PM, chandramouli narayanan wrote: On Fri, 2014-03-14 at 06:40 +0100,

Re: [RFC PATCH 03/22] staging: crypto: skein: allow building statically

2014-03-17 Thread Greg KH
On Tue, Mar 11, 2014 at 09:32:35PM +, Jason Cooper wrote: These are the minimum changes required to get the code to build statically in the kernel. It's necessary to do this first so that we can empirically determine that future cleanup patches aren't changing the generated object code.

[PATCH] Fix late crypto work queue initialization

2014-03-17 Thread Tim Chen
The crypto algorithm modules utilizing the crypto daemon could be used early when the system start up. Using module_init does not guarantee that the daemon's work queue is initialized when the cypto alorithm depending on crypto_wq starts. It is necessary to initialize the crypto work queue