Re: [PATCH 1/2] arm64 aes: fix encryption of unaligned data

2014-07-26 Thread Ard Biesheuvel
that were not processed as the last parameter to blkcipher_walk_done. Signed-off-by: Mikulas Patocka mpato...@redhat.com Acked-by: Ard Biesheuvel ard.biesheu...@linaro.org Thanks for the patch. This correctly fixes a thinko on my part regarding the guarantees offered by the blkcipher API

Re: [PATCH 1/2] arm64 aes: fix encryption of unaligned data

2014-07-26 Thread Ard Biesheuvel
On 26 July 2014 15:13, Ard Biesheuvel ard.biesheu...@linaro.org wrote: On 26 July 2014 01:40, Mikulas Patocka mpato...@redhat.com wrote: cryptsetup fails on arm64 when using kernel encryption via AF_ALG socket. See https://bugzilla.redhat.com/show_bug.cgi?id=1122937 The bug is caused

Re: [PATCH 2/2] arm aes: fix encryption of unaligned data

2014-07-26 Thread Ard Biesheuvel
-by: Ard Biesheuvel ard.biesheu...@linaro.org As for the previous patch, this correctly fixes a thinko on my part regarding the guarantees offered by the blkcipher API. @Russell: could you please indicate whether you prefer to take this yourself or ack it so we can ask Herbert to take both ARM

[PATCH] crypto: use chunks smaller than algo block size in chunk tests

2014-07-27 Thread Ard Biesheuvel
This patch updates many of the chunked tcrypt test cases so that not all of the chunks are an exact multiple of the block size. This should help uncover cases where the residue passed to blkcipher_walk_done() is incorrect. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- Herbert

Re: [PATCH] [v3] crypto: sha512: add ARM NEON implementation

2014-07-29 Thread Ard Biesheuvel
3.56x 409640963.59x 819216 2.48x 8192256 3.42x 819210243.56x 819240963.60x 819281923.60x Acked-by: Ard Biesheuvel ard.biesheu...@linaro.org Tested

[PATCH 1/2] ARM: crypto: enable NEON SHA-1 for big endian

2014-08-04 Thread Ard Biesheuvel
This tweaks the SHA-1 NEON code slightly so it works correctly under big endian, and removes the Kconfig condition preventing it from being selected if CONFIG_CPU_BIG_ENDIAN is set. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm/crypto/sha1-armv7-neon.S | 8 crypto

Re: 3.17 regression; alg: skcipher: Chunk test 1 failed on encryption at page 0 for ecb-aes-padlock

2014-10-20 Thread Ard Biesheuvel
On 20 October 2014 09:14, Jamie Heilman ja...@audible.transient.net wrote: I get this new failure w/3.17.0 on my system with a VIA Esther processor: alg: skcipher: Chunk test 1 failed on encryption at page 0 for ecb-aes-padlock : 71 73 f7 db 24 93 21 6d 61 1e bb 63 42 79 db 64

Re: 3.17 regression; alg: skcipher: Chunk test 1 failed on encryption at page 0 for ecb-aes-padlock

2014-10-21 Thread Ard Biesheuvel
On 21 October 2014 01:43, Jamie Heilman ja...@audible.transient.net wrote: Ard Biesheuvel wrote: On 20 October 2014 09:14, Jamie Heilman ja...@audible.transient.net wrote: I get this new failure w/3.17.0 on my system with a VIA Esther processor: alg: skcipher: Chunk test 1 failed

[PATCH] arm64/crypto: use crypto instructions for generating AES key schedule

2014-10-22 Thread Ard Biesheuvel
This patch implements the AES key schedule generation using ARMv8 Crypto Instructions. It replaces the table based C implementation in aes_generic.ko, which means we can drop the dependency on that module. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm64/crypto/Kconfig

Re: [PATCH] arm64/crypto: use crypto instructions for generating AES key schedule

2014-10-22 Thread Ard Biesheuvel
On 22 October 2014 18:25, Catalin Marinas catalin.mari...@arm.com wrote: On Wed, Oct 22, 2014 at 08:15:32AM +0100, Ard Biesheuvel wrote: This patch implements the AES key schedule generation using ARMv8 Crypto Instructions. It replaces the table based C implementation in aes_generic.ko, which

[PATCH v2] arm64/crypto: use crypto instructions to generate AES key schedule

2014-11-03 Thread Ard Biesheuvel
...@linaro.org Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- v2: grammar/whitespace fixes, acked/tested-by added arch/arm64/crypto/Kconfig | 5 +- arch/arm64/crypto/aes-ce-ccm-glue.c | 4 +- arch/arm64/crypto/aes-ce-cipher.c | 112 +++- arch/arm64

Re: simd: Allow simd use in kernel threads with softirqs disabled

2014-11-14 Thread Ard Biesheuvel
On 14 November 2014 16:43, Herbert Xu herb...@gondor.apana.org.au wrote: While working on the cryptd request reordering problem, I noticed an anomaly where kernel threads are normally allowed to use simd per may_use_simd, but as soon as you disable softirqs, they suddenly lose that ability for

[PATCH] arm64: crypto: increase AES interleave to 4x

2015-02-19 Thread Ard Biesheuvel
of async cbc(aes) (cbc-aes-ce) decryption test 4 (128 bit key, 8192 byte blocks): 124735 operations in 1 seconds test 14 (256 bit key, 8192 byte blocks): 92328 operations in 1 seconds Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm64/crypto/Makefile | 2 +- 1 file changed, 1

Re: [PATCH] arm: crypto: Add NEON optimized SHA-256

2015-03-16 Thread Ard Biesheuvel
Hello Sami, On 16 March 2015 at 16:48, Sami Tolvanen samitolva...@google.com wrote: Add Andy Polyakov's NEON optimized SHA-256 implementation. On Nexus 6, this implementation is ~2x faster than sha256-generic. Signed-off-by: Sami Tolvanen samitolva...@google.com Have you tested this code

[PATCH] arm64/crypto: issue aese/aesmc instructions in pairs

2015-03-17 Thread Ard Biesheuvel
CBC dec CTR before3.641.341.32 after 1.950.850.93 Note that this results in a ~5% performance decrease for older cores. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- Will, This is the optimization you

[PATCH] crypto/arm: add support for GHASH using ARMv8 Crypto Extensions

2015-03-09 Thread Ard Biesheuvel
This implements the GHASH hash algorithm (as used by the GCM AEAD chaining mode) using the AArch32 version of the 64x64 to 128 bit polynomial multiplication instruction (vmull.p64) that is part of the ARMv8 Crypto Extensions. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm

[PATCH 4/4] crypto/arm: AES in ECB/CBC/CTR/XTS modes using ARMv8 Crypto Extensions

2015-03-09 Thread Ard Biesheuvel
This implements the ECB, CBC, CTR and XTS asynchronous block ciphers using the AArch32 versions of the ARMv8 Crypto Extensions for AES. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm/crypto/Kconfig | 9 + arch/arm/crypto/Makefile | 2 + arch/arm/crypto/aes-ce

[PATCH 2/4] crypto/arm: add support for SHA1 using ARMv8 Crypto Instructions

2015-03-09 Thread Ard Biesheuvel
This implements the SHA1 secure hash algorithm using the AArch32 versions of the ARMv8 Crypto Extensions for SHA1. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm/crypto/Kconfig| 10 +++ arch/arm/crypto/Makefile | 2 + arch/arm/crypto/sha1-ce-core.S | 134

[PATCH 3/4] crypto/arm: add support for SHA-224/256 using ARMv8 Crypto Extensions

2015-03-09 Thread Ard Biesheuvel
This implements the SHA-224/256 secure hash algorithm using the AArch32 versions of the ARMv8 Crypto Extensions for SHA2. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm/crypto/Kconfig| 9 ++ arch/arm/crypto/Makefile | 2 + arch/arm/crypto/sha2-ce-core.S

[PATCH 1/4] crypto/arm: move ARM specific Kconfig definitions to a dedicated file

2015-03-09 Thread Ard Biesheuvel
This moves all Kconfig symbols defined in crypto/Kconfig that depend on CONFIG_ARM to a dedicated Kconfig file in arch/arm/crypto, which is where the code that implements those features resides as well. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm/Kconfig| 3

[PATCH v2 2/5] crypto/arm: add support for SHA1 using ARMv8 Crypto Instructions

2015-03-10 Thread Ard Biesheuvel
This implements the SHA1 secure hash algorithm using the AArch32 versions of the ARMv8 Crypto Extensions for SHA1. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm/crypto/Kconfig| 10 +++ arch/arm/crypto/Makefile | 2 + arch/arm/crypto/sha1-ce-core.S | 134

[PATCH v2 3/5] crypto/arm: add support for SHA-224/256 using ARMv8 Crypto Extensions

2015-03-10 Thread Ard Biesheuvel
This implements the SHA-224/256 secure hash algorithm using the AArch32 versions of the ARMv8 Crypto Extensions for SHA2. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm/crypto/Kconfig| 9 ++ arch/arm/crypto/Makefile | 2 + arch/arm/crypto/sha2-ce-core.S

[PATCH v2 4/5] crypto/arm: AES in ECB/CBC/CTR/XTS modes using ARMv8 Crypto Extensions

2015-03-10 Thread Ard Biesheuvel
This implements the ECB, CBC, CTR and XTS asynchronous block ciphers using the AArch32 versions of the ARMv8 Crypto Extensions for AES. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm/crypto/Kconfig | 9 + arch/arm/crypto/Makefile | 2 + arch/arm/crypto/aes-ce

[PATCH v2 0/5] ARM: crypto: ARMv8 Crypto Extensions

2015-03-10 Thread Ard Biesheuvel
for BE (currently still untested) - added alignment hints where appropriate (e,g., [rX, :128]) - various minor tweaks There are all tested on LE using the respective tcrypt tests. Ard Biesheuvel (5): crypto/arm: move ARM specific Kconfig definitions to a dedicated file crypto/arm: add support

[PATCH v2 5/5] crypto/arm: add support for GHASH using ARMv8 Crypto Extensions

2015-03-10 Thread Ard Biesheuvel
This implements the GHASH hash algorithm (as used by the GCM AEAD chaining mode) using the AArch32 version of the 64x64 to 128 bit polynomial multiplication instruction (vmull.p64) that is part of the ARMv8 Crypto Extensions. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm

[PATCH v2 1/5] crypto/arm: move ARM specific Kconfig definitions to a dedicated file

2015-03-10 Thread Ard Biesheuvel
This moves all Kconfig symbols defined in crypto/Kconfig that depend on CONFIG_ARM to a dedicated Kconfig file in arch/arm/crypto, which is where the code that implements those features resides as well. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm/Kconfig| 3

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

2015-03-24 Thread Ard Biesheuvel
On 24 March 2015 at 14:05, Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com wrote: + 'eor ($t0,$t0,$a,ror#.($Sigma0[2]-$Sigma0[0]))', # Sigma0(a) + 'add ($h,$h,$t1)', # h+=Ch(e,f,g) + 'ldr ($t1,sprintf [sp,#%d],4*(($j+1)15)) if (($j15)!=15);'.

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

2015-03-24 Thread Ard Biesheuvel
On 24 March 2015 at 13:27, Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com wrote: On 13:50 Mon 23 Mar , Sami Tolvanen wrote: Add Andy Polyakov's optimized assembly and NEON implementations for SHA-256/224. The sha256-armv4.pl script for generating the assembly code is from OpenSSL

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

2015-03-24 Thread Ard Biesheuvel
On 24 March 2015 at 12:35, Herbert Xu herb...@gondor.apana.org.au wrote: On Mon, Mar 23, 2015 at 07:26:03PM +0100, Ard Biesheuvel wrote: (resending due to size bounce) Aha that's why the patch didn't make it through. Can it be split up? Not so easily. It consists (among other things

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

2015-03-24 Thread Ard Biesheuvel
On 24 March 2015 at 12:46, Herbert Xu herb...@gondor.apana.org.au wrote: On Tue, Mar 24, 2015 at 12:40:50PM +0100, Ard Biesheuvel wrote: Not so easily. It consists (among other things) of a .pl file that generates a .S file, but to prevent introducing a build time dependency on perl, the .S

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

2015-03-24 Thread Ard Biesheuvel
On 24 March 2015 at 12:32, Herbert Xu herb...@gondor.apana.org.au wrote: On Mon, Mar 23, 2015 at 01:50:09PM +, Sami Tolvanen wrote: Add Andy Polyakov's optimized assembly and NEON implementations for SHA-256/224. The sha256-armv4.pl script for generating the assembly code is from OpenSSL

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

2015-03-24 Thread Ard Biesheuvel
On 24 March 2015 at 14:06, Ard Biesheuvel ard.biesheu...@linaro.org wrote: On 24 March 2015 at 14:05, Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com wrote: + 'eor ($t0,$t0,$a,ror#.($Sigma0[2]-$Sigma0[0]))', # Sigma0(a) + 'add ($h,$h,$t1)', # h+=Ch(e,f

[RFC PATCH 4/6] crypto: sha256-generic: move to generic glue implementation

2015-03-28 Thread Ard Biesheuvel
This updates the generic SHA-256 implementation to use the new shared SHA-256 glue code. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- crypto/Kconfig | 1 + crypto/sha256_generic.c | 131 +++- 2 files changed, 18 insertions

[RFC PATCH 1/6] crypto: sha512: implement base layer for SHA-512

2015-03-28 Thread Ard Biesheuvel
To reduce the number of copies of boilerplate code throughout the tree, this patch implements generic glue for the SHA-512 algorithm. This allows a specific arch or hardware implementation to only implement the special handling that it needs. Signed-off-by: Ard Biesheuvel ard.biesheu

[RFC PATCH 2/6] crypto: sha512-generic: move to generic glue implementation

2015-03-28 Thread Ard Biesheuvel
This updated the generic SHA-512 implementation to use the generic shared SHA-512 glue code. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- crypto/Kconfig | 1 + crypto/sha512_generic.c | 117 +++- 2 files changed, 16 insertions

[RFC PATCH 5/6] arm64/crypto: move ARMv8 SHA-224/256 driver to SHA-256 base layer

2015-03-28 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm64/crypto/Kconfig| 1 + arch/arm64/crypto/sha2-ce-core.S | 11 +- arch/arm64/crypto/sha2-ce-glue.c | 211 ++- 3 files changed, 40 insertions(+), 183 deletions(-) diff --git a/arch

[RFC PATCH 3/6] crypto: sha256: implement base layer for SHA-256

2015-03-28 Thread Ard Biesheuvel
To reduce the number of copies of boilerplate code throughout the tree, this patch implements generic glue for the SHA-256 algorithm. This allows a specific arch or hardware implementation to only implement the special handling that it needs. Signed-off-by: Ard Biesheuvel ard.biesheu

[PATCH v2 00/14] crypto: SHA glue code consolidation

2015-03-30 Thread Ard Biesheuvel
), I noticed that the memcpy/memset invocations with compile time constant src and len arguments (which includes the empty struct assignments) are eliminated completely, and replaced by direct loads and stores. Hopefully this addresses the concern raised by Markus regarding this. Ard Biesheuvel (14

[PATCH v2 05/14] crypto: sha256-generic: move to generic glue implementation

2015-03-30 Thread Ard Biesheuvel
This updates the generic SHA-256 implementation to use the new shared SHA-256 glue code. It also implements a .finup hook crypto_sha256_finup() and exports it to other modules. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- crypto/Kconfig | 1 + crypto/sha256_generic.c

[PATCH v2 03/14] crypto: sha1: implement base layer for SHA-1

2015-03-30 Thread Ard Biesheuvel
To reduce the number of copies of boilerplate code throughout the tree, this patch implements generic glue for the SHA-1 algorithm. This allows a specific arch or hardware implementation to only implement the special handling that it needs. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org

[PATCH v2 01/14] crypto: sha512: implement base layer for SHA-512

2015-03-30 Thread Ard Biesheuvel
To reduce the number of copies of boilerplate code throughout the tree, this patch implements generic glue for the SHA-512 algorithm. This allows a specific arch or hardware implementation to only implement the special handling that it needs. Signed-off-by: Ard Biesheuvel ard.biesheu

[PATCH v2 resend 10/14] crypto/arm64: move SHA-1 ARMv8 implementation to base layer

2015-03-30 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm64/crypto/Kconfig| 1 + arch/arm64/crypto/sha1-ce-core.S | 11 ++-- arch/arm64/crypto/sha1-ce-glue.c | 132 +++ 3 files changed, 31 insertions(+), 113 deletions(-) diff --git a/arch

[PATCH v2 04/14] crypto: sha512-generic: move to generic glue implementation

2015-03-30 Thread Ard Biesheuvel
This updated the generic SHA-512 implementation to use the generic shared SHA-512 glue code. It also implements a .finup hook crypto_sha512_finup() and exports it to other modules. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- crypto/Kconfig | 1 + crypto

[RFC PATCH 5/6] arm64/crypto: move ARMv8 SHA-224/256 driver to SHA-256 base layer

2015-03-30 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm64/crypto/Kconfig| 1 + arch/arm64/crypto/sha2-ce-core.S | 11 +- arch/arm64/crypto/sha2-ce-glue.c | 211 ++- 3 files changed, 40 insertions(+), 183 deletions(-) diff --git a/arch

[PATCH v2 08/14] crypto/arm: move SHA-1 ARMv8 implementation to base layer

2015-03-30 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm/crypto/Kconfig| 2 +- arch/arm/crypto/sha1-ce-glue.c | 110 +++-- 2 files changed, 31 insertions(+), 81 deletions(-) diff --git a/arch/arm/crypto/Kconfig b/arch/arm/crypto/Kconfig

[RFC PATCH 3/6] crypto: sha256: implement base layer for SHA-256

2015-03-30 Thread Ard Biesheuvel
To reduce the number of copies of boilerplate code throughout the tree, this patch implements generic glue for the SHA-256 algorithm. This allows a specific arch or hardware implementation to only implement the special handling that it needs. Signed-off-by: Ard Biesheuvel ard.biesheu

[RFC PATCH 2/6] crypto: sha512-generic: move to generic glue implementation

2015-03-30 Thread Ard Biesheuvel
This updated the generic SHA-512 implementation to use the generic shared SHA-512 glue code. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- crypto/Kconfig | 1 + crypto/sha512_generic.c | 117 +++- 2 files changed, 16 insertions

[PATCH v2 09/14] crypto/arm: move SHA-224/256 ARMv8 implementation to base layer

2015-03-30 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm/crypto/Kconfig| 1 + arch/arm/crypto/sha2-ce-glue.c | 151 + 2 files changed, 33 insertions(+), 119 deletions(-) diff --git a/arch/arm/crypto/Kconfig b/arch/arm/crypto/Kconfig

[RFC PATCH 6/6] arm/crypto: accelerated SHA-512 using ARM generic ASM and NEON

2015-03-30 Thread Ard Biesheuvel
10241.412.982.56 8192 40961.412.712.59 8192 81921.513.512.69 Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm/crypto/Kconfig |8 + arch/arm/crypto/Makefile |8

[PATCH v2 02/14] crypto: sha256: implement base layer for SHA-256

2015-03-30 Thread Ard Biesheuvel
To reduce the number of copies of boilerplate code throughout the tree, this patch implements generic glue for the SHA-256 algorithm. This allows a specific arch or hardware implementation to only implement the special handling that it needs. Signed-off-by: Ard Biesheuvel ard.biesheu

[RFC PATCH 4/6] crypto: sha256-generic: move to generic glue implementation

2015-03-30 Thread Ard Biesheuvel
This updates the generic SHA-256 implementation to use the new shared SHA-256 glue code. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- crypto/Kconfig | 1 + crypto/sha256_generic.c | 131 +++- 2 files changed, 18 insertions

[PATCH v2 resend 01/14] crypto: sha512: implement base layer for SHA-512

2015-03-30 Thread Ard Biesheuvel
To reduce the number of copies of boilerplate code throughout the tree, this patch implements generic glue for the SHA-512 algorithm. This allows a specific arch or hardware implementation to only implement the special handling that it needs. Signed-off-by: Ard Biesheuvel ard.biesheu

[PATCH v2 resend 05/14] crypto: sha256-generic: move to generic glue implementation

2015-03-30 Thread Ard Biesheuvel
This updates the generic SHA-256 implementation to use the new shared SHA-256 glue code. It also implements a .finup hook crypto_sha256_finup() and exports it to other modules. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- crypto/Kconfig | 1 + crypto/sha256_generic.c

[PATCH v2 resend 07/14] crypto/arm: move SHA-1 ARM asm implementation to base layer

2015-03-30 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm/crypto/Kconfig | 1 + arch/arm/{include/asm = }/crypto/sha1.h | 3 + arch/arm/crypto/sha1_glue.c | 117 +++ 3 files changed, 28 insertions(+), 93 deletions(-) rename

[PATCH v2 resend 03/14] crypto: sha1: implement base layer for SHA-1

2015-03-30 Thread Ard Biesheuvel
To reduce the number of copies of boilerplate code throughout the tree, this patch implements generic glue for the SHA-1 algorithm. This allows a specific arch or hardware implementation to only implement the special handling that it needs. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org

[PATCH v2 resend 04/14] crypto: sha512-generic: move to generic glue implementation

2015-03-30 Thread Ard Biesheuvel
This updated the generic SHA-512 implementation to use the generic shared SHA-512 glue code. It also implements a .finup hook crypto_sha512_finup() and exports it to other modules. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- crypto/Kconfig | 1 + crypto

[PATCH v2 resend 12/14] crypto/x86: move SHA-1 SSSE3 implementation to base layer

2015-03-30 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/x86/crypto/sha1_ssse3_glue.c | 139 +- crypto/Kconfig| 1 + 2 files changed, 34 insertions(+), 106 deletions(-) diff --git a/arch/x86/crypto/sha1_ssse3_glue.c b/arch/x86

[PATCH v2 resend 08/14] crypto/arm: move SHA-1 ARMv8 implementation to base layer

2015-03-30 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm/crypto/Kconfig| 2 +- arch/arm/crypto/sha1-ce-glue.c | 110 +++-- 2 files changed, 31 insertions(+), 81 deletions(-) diff --git a/arch/arm/crypto/Kconfig b/arch/arm/crypto/Kconfig

[PATCH v2 resend 11/14] crypto/arm64: move SHA-224/256 ARMv8 implementation to base layer

2015-03-30 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm64/crypto/Kconfig| 1 + arch/arm64/crypto/sha2-ce-core.S | 11 ++- arch/arm64/crypto/sha2-ce-glue.c | 208 ++- 3 files changed, 38 insertions(+), 182 deletions(-) diff --git a/arch

[PATCH v2 resend 13/14] crypto/x86: move SHA-224/256 SSSE3 implementation to base layer

2015-03-30 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/x86/crypto/sha256_ssse3_glue.c | 186 crypto/Kconfig | 1 + 2 files changed, 39 insertions(+), 148 deletions(-) diff --git a/arch/x86/crypto/sha256_ssse3_glue.c b/arch

[PATCH v2 resend 14/14] crypto/x86: move SHA-384/512 SSSE3 implementation to base layer

2015-03-30 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/x86/crypto/sha512_ssse3_glue.c | 195 +++- crypto/Kconfig | 1 + 2 files changed, 39 insertions(+), 157 deletions(-) diff --git a/arch/x86/crypto/sha512_ssse3_glue.c b/arch

[PATCH v2 resend 09/14] crypto/arm: move SHA-224/256 ARMv8 implementation to base layer

2015-03-30 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm/crypto/Kconfig| 1 + arch/arm/crypto/sha2-ce-glue.c | 151 + 2 files changed, 33 insertions(+), 119 deletions(-) diff --git a/arch/arm/crypto/Kconfig b/arch/arm/crypto/Kconfig

[PATCH v2 resend 02/14] crypto: sha256: implement base layer for SHA-256

2015-03-30 Thread Ard Biesheuvel
To reduce the number of copies of boilerplate code throughout the tree, this patch implements generic glue for the SHA-256 algorithm. This allows a specific arch or hardware implementation to only implement the special handling that it needs. Signed-off-by: Ard Biesheuvel ard.biesheu

[PATCH v2 resend 06/14] crypto: sha1-generic: move to generic glue implementation

2015-03-30 Thread Ard Biesheuvel
This updated the generic SHA-1 implementation to use the generic shared SHA-1 glue code. It also implements a .finup hook crypto_sha1_finup() and exports it to other modules. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- crypto/Kconfig| 1 + crypto/sha1_generic.c | 105

[PATCH v2 resend 00/14] crypto: SHA glue code consolidation

2015-03-30 Thread Ard Biesheuvel
completely, and replaced by direct loads and stores. Hopefully this addresses the concern raised by Markus regarding this. Ard Biesheuvel (14): crypto: sha512: implement base layer for SHA-512 crypto: sha256: implement base layer for SHA-256 crypto: sha1: implement base layer for SHA-1 crypto

[RFC PATCH 6/6] arm/crypto: accelerated SHA-512 using ARM generic ASM and NEON

2015-03-28 Thread Ard Biesheuvel
10241.412.982.56 8192 40961.412.712.59 8192 81921.513.512.69 Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm/crypto/Kconfig |8 + arch/arm/crypto/Makefile |8

[RFC PATCH 0/6] SHA-256/512 glue code consolidation

2015-03-28 Thread Ard Biesheuvel
in asm for inputs that are round multiples of the block size. The final patch is the same core code as the patch I sent yesterday, but this time with most of the redundant glue removed. Comments, suggestions etc are highly appreciated! Regards, Ard. Ard Biesheuvel (6): crypto: sha512

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: [RFC PATCH 1/6] crypto: sha512: implement base layer for SHA-512

2015-03-29 Thread Ard Biesheuvel
On 29 March 2015 at 10:29, Markus Stockhausen stockhau...@collogia.de wrote: Von: linux-crypto-ow...@vger.kernel.org [linux-crypto-ow...@vger.kernel.org]quot; im Auftrag von quot;Ard Biesheuvel [ard.biesheu...@linaro.org] Gesendet: Samstag, 28. März 2015 23:10 An: linux-arm-ker

Re: [PATCH] arm64: crypto: increase AES interleave to 4x

2015-02-20 Thread Ard Biesheuvel
On 20 February 2015 at 15:55, Will Deacon will.dea...@arm.com wrote: On Thu, Feb 19, 2015 at 05:25:16PM +, Ard Biesheuvel wrote: This patch increases the interleave factor for parallel AES modes to 4x. This improves performance on Cortex-A57 by ~35%. This is due to the 3-cycle latency

[PATCH] ARM: crypto: update NEON AES module to latest OpenSSL version

2015-02-25 Thread Ard Biesheuvel
) Reported-by: Adrian Kotelba adrian.kote...@gmail.com Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- This was found using the tcrypt test code, to which I recently added additional chunking modes. However, XTS typically operates on pages or at least on sectors, so this bug is unlikely

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: arch/arm/crypto

[PATCH] crypto/arm: accelerated SHA-512 using ARM generic ASM and NEON

2015-03-28 Thread Ard Biesheuvel
1.513.512.69 Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- This should get the same treatment as Sami's sha56 version: I would like to wait until the OpenSSL source file hits the upstream repository so that I can refer to its sha1 hash in the commit log. arch/arm/crypto

[PATCH] crypto/arm: fix big-endian bug in ghash

2015-03-23 Thread Ard Biesheuvel
This fixes a bug in the new v8 Crypto Extensions GHASH code that only manifests itself in big-endian mode. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm/crypto/ghash-ce-core.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/crypto/ghash-ce

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

2015-03-23 Thread Ard Biesheuvel
the tcrypt.ko tests in ARM and Thumb2 and even in big-endian (ARM) mode, so Tested-by: Ard Biesheuvel ard.biesheu...@linaro.org Reviewed-by: Ard Biesheuvel ard.biesheu...@linaro.org Nice work! Ard. --- Changes since v1: Rebased to Herbert's cryptodev tree Include sha256-armv4.pl and use

Re: [PATCH v2] crypto/arm: accelerated SHA-512 using ARM generic ASM and NEON

2015-04-11 Thread Ard Biesheuvel
On 11 April 2015 at 10:48, Arnd Bergmann a...@arndb.de wrote: On Saturday 11 April 2015 09:35:15 Ard Biesheuvel wrote: On 10 April 2015 at 22:23, Ard Biesheuvel ard.biesheu...@linaro.org wrote: On 10 apr. 2015, at 22:08, Arnd Bergmann a...@arndb.de wrote: On Friday 10 April 2015 16:29:08

Re: [PATCH] crypto: arm: workaround for building with old binutils

2015-04-11 Thread Ard Biesheuvel
On 10 April 2015 at 21:57, Arnd Bergmann a...@arndb.de wrote: Old versions of binutils (before 2.23) do not yet understand the crypto-neon-fp-armv8 fpu instructions, and an attempt to build these files results in a build failure: arch/arm/crypto/aes-ce-core.S:133: Error: selected processor

Re: [PATCH v2] crypto/arm: accelerated SHA-512 using ARM generic ASM and NEON

2015-04-11 Thread Ard Biesheuvel
On 10 April 2015 at 22:23, Ard Biesheuvel ard.biesheu...@linaro.org wrote: On 10 apr. 2015, at 22:08, Arnd Bergmann a...@arndb.de wrote: On Friday 10 April 2015 16:29:08 Ard Biesheuvel wrote: +#if __ARM_MAX_ARCH__=7 +.arch armv7-a +.fpu neon + This will cause a build failure

Re: Crypto Update for 4.1

2015-04-23 Thread Ard Biesheuvel
On 23 April 2015 at 21:27, Bobby Powers bobbypow...@gmail.com wrote: Hello, Linus Torvalds torva...@linux-foundation.org wrote: Ok, this patch seems to fix it for me, so I undid my revert that I hadn't pushed out yet, and pushed out this instead. Commit

[PATCH] crypto: x86/sha512_ssse3 - fixup for asm function prototype change

2015-04-24 Thread Ard Biesheuvel
...@gmail.com Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/x86/crypto/sha512-avx2-asm.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/crypto/sha512-avx2-asm.S b/arch/x86/crypto/sha512-avx2-asm.S index a4771dcd1fcf..1f20b35d8573 100644 --- a/arch/x86/crypto

Re: [PATCH 1/2] crypto: arm/sha512 - accelerated SHA-512 using ARM generic ASM and NEON

2015-05-11 Thread Ard Biesheuvel
On 11 May 2015 at 08:59, Herbert Xu herb...@gondor.apana.org.au wrote: On Fri, May 08, 2015 at 10:46:21AM +0200, Ard Biesheuvel wrote: diff --git a/arch/arm/crypto/Kconfig b/arch/arm/crypto/Kconfig index 8da2207b0072..08b5fb85bff5 100644 --- a/arch/arm/crypto/Kconfig +++ b/arch/arm/crypto

Re: [PATCH v2] crypto/arm: accelerated SHA-512 using ARM generic ASM and NEON

2015-04-13 Thread Ard Biesheuvel
On 13 April 2015 at 06:13, Herbert Xu herb...@gondor.apana.org.au wrote: On Sat, Apr 11, 2015 at 09:15:10PM +0200, Ard Biesheuvel wrote: @Herbert: could you please apply this onto cryptodev before sending out your pull request for v4.1? Done. And please disregard $subject, I will post a v3

[PATCH] crypto: arm: workaround for building with old binutils

2015-04-11 Thread Ard Biesheuvel
modules entirely instead of building empty ones if binutils is too old - update commit log accordingly] Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm/crypto/Makefile | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/arch/arm/crypto

Re: [PATCH] crypto: arm: workaround for building with old binutils

2015-04-12 Thread Ard Biesheuvel
On 11 April 2015 at 22:54, Arnd Bergmann a...@arndb.de wrote: On Saturday 11 April 2015 15:32:34 Ard Biesheuvel wrote: From: Arnd Bergmann a...@arndb.de How about something like this: A warning will be emitted by make when descending into the arch/arm/crypto directory, but only if any ARMv8

Re: [PATCH v2] crypto/arm: accelerated SHA-512 using ARM generic ASM and NEON

2015-04-11 Thread Ard Biesheuvel
On 11 apr. 2015, at 10:48, Arnd Bergmann a...@arndb.de wrote: On Saturday 11 April 2015 09:35:15 Ard Biesheuvel wrote: On 10 April 2015 at 22:23, Ard Biesheuvel ard.biesheu...@linaro.org wrote: On 10 apr. 2015, at 22:08, Arnd Bergmann a...@arndb.de wrote: On Friday 10 April 2015 16:29

Re: [PATCH] crypto: arm: workaround for building with old binutils

2015-04-11 Thread Ard Biesheuvel
On 11 apr. 2015, at 10:55, Arnd Bergmann a...@arndb.de wrote: On Saturday 11 April 2015 09:41:08 Ard Biesheuvel wrote: Could you perhaps put the rules that build these modules inside a ifneq ($(armv8-ce-flags),-DARMV8_CE_DISABLED) ... endif How about something like this: ifeq

[PATCH v3 10/16] crypto/arm: move SHA-224/256 ASM/NEON implementation to base layer

2015-04-07 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm/crypto/sha256_glue.c | 174 - arch/arm/crypto/sha256_glue.h | 17 +--- arch/arm/crypto/sha256_neon_glue.c | 144 +- 3 files changed, 81 insertions

[PATCH v3 07/16] crypto/arm: move SHA-1 ARM asm implementation to base layer

2015-04-07 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm/crypto/sha1-ce-glue.c | 3 +- arch/arm/{include/asm = }/crypto/sha1.h | 3 + arch/arm/crypto/sha1_glue.c | 116 ++- arch/arm/crypto/sha1_neon_glue.c | 2 +- 4

[PATCH v3 04/16] crypto: sha1-generic: move to generic glue implementation

2015-04-07 Thread Ard Biesheuvel
This updates the generic SHA-1 implementation to use the generic shared SHA-1 glue code. It also implements a .finup hook crypto_sha1_finup() and exports it to other modules. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- crypto/sha1_generic.c | 108

[PATCH v3 03/16] crypto: sha512: implement base layer for SHA-512

2015-04-07 Thread Ard Biesheuvel
To reduce the number of copies of boilerplate code throughout the tree, this patch implements generic glue for the SHA-512 algorithm. This allows a specific arch or hardware implementation to only implement the special handling that it needs. Signed-off-by: Ard Biesheuvel ard.biesheu

[PATCH v3 08/16] crypto/arm: move SHA-1 NEON implementation to base layer

2015-04-07 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm/crypto/sha1_neon_glue.c | 137 +-- 1 file changed, 30 insertions(+), 107 deletions(-) diff --git a/arch/arm/crypto/sha1_neon_glue.c b/arch/arm/crypto/sha1_neon_glue.c index 5d9a1b4aac73

[PATCH v3 09/16] crypto/arm: move SHA-1 ARMv8 implementation to base layer

2015-04-07 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm/crypto/Kconfig| 1 - arch/arm/crypto/sha1-ce-glue.c | 108 +++-- 2 files changed, 28 insertions(+), 81 deletions(-) diff --git a/arch/arm/crypto/Kconfig b/arch/arm/crypto/Kconfig

[PATCH v3 13/16] crypto/arm64: move SHA-224/256 ARMv8 implementation to base layer

2015-04-07 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm64/crypto/sha2-ce-core.S | 11 ++- arch/arm64/crypto/sha2-ce-glue.c | 209 ++- 2 files changed, 38 insertions(+), 182 deletions(-) diff --git a/arch/arm64/crypto/sha2-ce-core.S b/arch/arm64

[PATCH v3 15/16] crypto/x86: move SHA-224/256 SSSE3 implementation to base layer

2015-04-07 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/x86/crypto/sha256_ssse3_glue.c | 184 +++- 1 file changed, 36 insertions(+), 148 deletions(-) diff --git a/arch/x86/crypto/sha256_ssse3_glue.c b/arch/x86/crypto/sha256_ssse3_glue.c index

[PATCH v3 05/16] crypto: sha256-generic: move to generic glue implementation

2015-04-07 Thread Ard Biesheuvel
This updates the generic SHA-256 implementation to use the new shared SHA-256 glue code. It also implements a .finup hook crypto_sha256_finup() and exports it to other modules. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- crypto/sha256_generic.c | 140

[PATCH v3 06/16] crypto: sha512-generic: move to generic glue implementation

2015-04-07 Thread Ard Biesheuvel
This updated the generic SHA-512 implementation to use the generic shared SHA-512 glue code. It also implements a .finup hook crypto_sha512_finup() and exports it to other modules. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- crypto/sha512_generic.c | 127

[PATCH v3 14/16] crypto/x86: move SHA-1 SSSE3 implementation to base layer

2015-04-07 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/x86/crypto/sha1_ssse3_glue.c | 136 +- 1 file changed, 30 insertions(+), 106 deletions(-) diff --git a/arch/x86/crypto/sha1_ssse3_glue.c b/arch/x86/crypto/sha1_ssse3_glue.c index 6c20fe04a738

[PATCH v3 16/16] crypto/x86: move SHA-384/512 SSSE3 implementation to base layer

2015-04-07 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/x86/crypto/sha512_ssse3_glue.c | 193 +++- 1 file changed, 36 insertions(+), 157 deletions(-) diff --git a/arch/x86/crypto/sha512_ssse3_glue.c b/arch/x86/crypto/sha512_ssse3_glue.c index

[PATCH v3 12/16] crypto/arm64: move SHA-1 ARMv8 implementation to base layer

2015-04-07 Thread Ard Biesheuvel
Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- arch/arm64/crypto/sha1-ce-core.S | 11 ++-- arch/arm64/crypto/sha1-ce-glue.c | 133 +++ 2 files changed, 31 insertions(+), 113 deletions(-) diff --git a/arch/arm64/crypto/sha1-ce-core.S b/arch/arm64

[PATCH v3 01/16] crypto: sha1: implement base layer for SHA-1

2015-04-07 Thread Ard Biesheuvel
To reduce the number of copies of boilerplate code throughout the tree, this patch implements generic glue for the SHA-1 algorithm. This allows a specific arch or hardware implementation to only implement the special handling that it needs. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org

<    1   2   3   4   5   6   7   8   9   >