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

2015-03-29 Thread Andy Polyakov
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 an older architecture, the conditional compilation produces a slightly bigger

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:

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 Jean-Christophe PLAGNIOL-VILLARD
+ '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);'. + 'ldr ($t1,[$Ktbl]) if ($j==15);'. + 'ldr

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

2015-03-24 Thread Herbert Xu
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 commit 2ecd32a1f8f0643ae7b38f59bbaf9f0d6ef326fe. Compared to

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) of a

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 Herbert Xu
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 file is included as a .S_shipped file. That is the big one. i suppose

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 Herbert Xu
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? Thanks, -- Email: Herbert Xu herb...@gondor.apana.org.au Home Page: http://gondor.apana.org.au/~herbert/ PGP Key:

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

2015-03-24 Thread Jean-Christophe PLAGNIOL-VILLARD
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 commit 2ecd32a1f8f0643ae7b38f59bbaf9f0d6ef326fe. Compared to sha256-generic these

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)', #

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

2015-03-24 Thread Jean-Christophe PLAGNIOL-VILLARD
On 15:46 Tue 24 Mar , Ard Biesheuvel wrote: 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)

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

2015-03-24 Thread Sami Tolvanen
On Tue, Mar 24, 2015 at 06:40:29PM +0100, Ard Biesheuvel wrote: @Sami, Andy: we need to respin the whole patch, including updated OpenSSL upstream commit id :-( Sure, I will send v3 once the changes are in OpenSSL. Thanks for testing! Do you still prefer everything in one patch? Sami -- To

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

2015-03-23 Thread Ard Biesheuvel
(resending due to size bounce) On 23 March 2015 at 14:50, Sami Tolvanen samitolva...@google.com 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 commit