Re: [PATCHv2] arm: crypto: Add optimized SHA-256/224

2015-03-27 Thread Andy Polyakov
Could you share the error log please? OK, I spotted one issue with this code: arch/arm/crypto/sha256-core.S: Assembler messages: arch/arm/crypto/sha256-core.S:1847: Error: invalid constant (efb0) after fixup This is caused by the fact that, when building the integer-only code for

Re: [PATCHv2] arm: crypto: Add optimized SHA-256/224

2015-03-27 Thread Ard Biesheuvel
On 27 March 2015 at 11:42, Andy Polyakov ap...@openssl.org wrote: Could you share the error log please? OK, I spotted one issue with this code: arch/arm/crypto/sha256-core.S: Assembler messages: arch/arm/crypto/sha256-core.S:1847: Error: invalid constant (efb0) after fixup This is

Re: [PATCHv2] arm: crypto: Add optimized SHA-256/224

2015-03-27 Thread Ard Biesheuvel
On 27 March 2015 at 11:44, Ard Biesheuvel ard.biesheu...@linaro.org wrote: On 27 March 2015 at 11:42, Andy Polyakov ap...@openssl.org wrote: Could you share the error log please? OK, I spotted one issue with this code: arch/arm/crypto/sha256-core.S: Assembler messages:

[PATCH v2 12/20] crypto: mark Serpent AVX2 helper ciphers

2015-03-27 Thread Stephan Mueller
Flag all Serpent AVX2 helper ciphers as internal ciphers to prevent them from being called by normal users. Signed-off-by: Stephan Mueller smuel...@chronox.de --- arch/x86/crypto/serpent_avx2_glue.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git

[PATCH v2 00/20] crypto: restrict usage of helper ciphers

2015-03-27 Thread Stephan Mueller
Hi, Based on the discussion in the thread [1], a flag is added to the kernel crypto API to allow ciphers to be marked as internal. The patch set is tested in FIPS and non-FIPS mode. In addition, the enforcement that the helper cipher of __driver-gcm-aes-aesni cannot be loaded, but the wrapper of

[PATCH v2 01/20] crypto: prevent helper ciphers from being used

2015-03-27 Thread Stephan Mueller
Several hardware related cipher implementations are implemented as follows: a helper cipher implementation is registered with the kernel crypto API. Such helper ciphers are never intended to be called by normal users. In some cases, calling them via the normal crypto API may even cause failures

[PATCH v2 04/20] crypto: /proc/crypto: identify internal ciphers

2015-03-27 Thread Stephan Mueller
With ciphers that now cannot be accessed via the kernel crypto API, callers shall be able to identify the ciphers that are not callable. The /proc/crypto file is added a boolean field identifying that such internal ciphers. Signed-off-by: Stephan Mueller smuel...@chronox.de --- crypto/proc.c | 3

[PATCH v2 02/20] crypto: testmgr to use CRYPTO_ALG_INTERNAL

2015-03-27 Thread Stephan Mueller
If a cipher allocation fails with -ENOENT, the testmgr now retries to allocate the cipher with CRYPTO_ALG_INTERNAL flag. As all ciphers, including the internal ciphers will be processed by the testmgr, it needs to be able to allocate those ciphers. Signed-off-by: Stephan Mueller

[PATCH v2 03/20] crypto: cryptd to process CRYPTO_ALG_INTERNAL

2015-03-27 Thread Stephan Mueller
The cryptd is used as a wrapper around internal ciphers. Therefore, the cryptd must process the internal cipher by marking cryptd as internal if the underlying cipher is an internal cipher. Signed-off-by: Stephan Mueller smuel...@chronox.de --- crypto/ablk_helper.c | 3 ++- crypto/cryptd.c

[PATCH v2 05/20] crypto: mark AES-NI helper ciphers

2015-03-27 Thread Stephan Mueller
Flag all AES-NI helper ciphers as internal ciphers to prevent them from being called by normal users. Signed-off-by: Stephan Mueller smuel...@chronox.de --- arch/x86/crypto/aesni-intel_glue.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git

[PATCH v2 14/20] crypto: mark Serpent SSE2 helper ciphers

2015-03-27 Thread Stephan Mueller
Flag all Serpent SSE2 helper ciphers as internal ciphers to prevent them from being called by normal users. Signed-off-by: Stephan Mueller smuel...@chronox.de --- arch/x86/crypto/serpent_sse2_glue.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git

[PATCH v2 08/20] crypto: mark AES-NI Camellia helper ciphers

2015-03-27 Thread Stephan Mueller
Flag all AES-NI Camellia helper ciphers as internal ciphers to prevent them from being called by normal users. Signed-off-by: Stephan Mueller smuel...@chronox.de --- arch/x86/crypto/camellia_aesni_avx2_glue.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git

[PATCH v2 07/20] crypto: mark GHASH ARMv8 vmull.p64 helper ciphers

2015-03-27 Thread Stephan Mueller
Flag all GHASH ARMv8 vmull.p64 helper ciphers as internal ciphers to prevent them from being called by normal users. Signed-off-by: Stephan Mueller smuel...@chronox.de --- arch/arm/crypto/ghash-ce-glue.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH v2 13/20] crypto: mark Serpent AVX helper ciphers

2015-03-27 Thread Stephan Mueller
Flag all Serpent AVX helper ciphers as internal ciphers to prevent them from being called by normal users. Signed-off-by: Stephan Mueller smuel...@chronox.de --- arch/x86/crypto/serpent_avx_glue.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git

[PATCH v2 09/20] crypto: mark CAST5 helper ciphers

2015-03-27 Thread Stephan Mueller
Flag all CAST5 helper ciphers as internal ciphers to prevent them from being called by normal users. Signed-off-by: Stephan Mueller smuel...@chronox.de --- arch/x86/crypto/cast5_avx_glue.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git

[PATCH v2 17/20] crypto: mark ARMv8 AES helper ciphers

2015-03-27 Thread Stephan Mueller
Flag all ARMv8 AES helper ciphers as internal ciphers to prevent them from being called by normal users. Signed-off-by: Stephan Mueller smuel...@chronox.de --- arch/arm/crypto/aes-ce-glue.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git

[PATCH v2 10/20] crypto: mark AVX Camellia helper ciphers

2015-03-27 Thread Stephan Mueller
Flag all AVX Camellia helper ciphers as internal ciphers to prevent them from being called by normal users. Signed-off-by: Stephan Mueller smuel...@chronox.de --- arch/x86/crypto/camellia_aesni_avx_glue.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git

[PATCH v2 15/20] crypto: mark Twofish AVX helper ciphers

2015-03-27 Thread Stephan Mueller
Flag all Twofish AVX helper ciphers as internal ciphers to prevent them from being called by normal users. Signed-off-by: Stephan Mueller smuel...@chronox.de --- arch/x86/crypto/twofish_avx_glue.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git

[PATCH v2 11/20] crypto: mark CAST6 helper ciphers

2015-03-27 Thread Stephan Mueller
Flag all CAST6 helper ciphers as internal ciphers to prevent them from being called by normal users. Signed-off-by: Stephan Mueller smuel...@chronox.de --- arch/x86/crypto/cast6_avx_glue.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git

[PATCH v2 19/20] crypto: mcryptd to process CRYPTO_ALG_INTERNAL

2015-03-27 Thread Stephan Mueller
The mcryptd is used as a wrapper around internal ciphers. Therefore, the mcryptd must process the internal cipher by marking mcryptd as internal if the underlying cipher is an internal cipher. Signed-off-by: Stephan Mueller smuel...@chronox.de --- crypto/mcryptd.c | 25 +++--

[PATCH v2 16/20] crypto: mark NEON bit sliced AES helper ciphers

2015-03-27 Thread Stephan Mueller
Flag all NEON bit sliced AES helper ciphers as internal ciphers to prevent them from being called by normal users. Signed-off-by: Stephan Mueller smuel...@chronox.de --- arch/arm/crypto/aesbs-glue.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git

[PATCH v2 18/20] crypto: mark 64 bit ARMv8 AES helper ciphers

2015-03-27 Thread Stephan Mueller
Flag all 64 bit ARMv8 AES helper ciphers as internal ciphers to prevent them from being called by normal users. Signed-off-by: Stephan Mueller smuel...@chronox.de --- arch/arm64/crypto/aes-glue.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git

[PATCH v2 20/20] crypto: mark Multi buffer SHA1 helper cipher

2015-03-27 Thread Stephan Mueller
Flag all Multi buffer SHA1 helper ciphers as internal ciphers to prevent them from being called by normal users. Signed-off-by: Stephan Mueller smuel...@chronox.de --- arch/x86/crypto/sha-mb/sha1_mb.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git