This is a port to ARMv8 (Crypto Extensions) of the Intel implementation of the
GHASH Secure Hash (used in the Galois/Counter chaining mode). It relies on the
optional PMULL/PMULL2 instruction (polynomial multiply long, what Intel call
carry-less multiply).
Signed-off-by: Ard Biesheuvel
Acked-by
Signed-off-by: Ard Biesheuvel
---
arch/arm64/include/asm/Kbuild | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/include/asm/Kbuild b/arch/arm64/include/asm/Kbuild
index 83f71b3004a8..42c7eecd2bb6 100644
--- a/arch/arm64/include/asm/Kbuild
+++ b/arch/arm64/include/asm/Kbuild
This patch adds support for the AES-CCM encryption algorithm for CPUs that
have support for the AES part of the ARM v8 Crypto Extensions.
Signed-off-by: Ard Biesheuvel
Acked-by: Herbert Xu
---
arch/arm64/crypto/Kconfig | 7 +
arch/arm64/crypto/Makefile | 3 +
arch/arm64
This patch adds support for the SHA-224 and SHA-256 Secure Hash Algorithms
for CPUs that have support for the SHA-2 part of the ARM v8 Crypto Extensions.
Signed-off-by: Ard Biesheuvel
Acked-by: Herbert Xu
---
arch/arm64/crypto/Kconfig| 5 +
arch/arm64/crypto/Makefile | 3
All patches operate correctly under their respective 'tcrypt.ko mode=xx' tests.
Ard Biesheuvel (11):
arm64/crypto: SHA-1 using ARMv8 Crypto Extensions
arm64/crypto: SHA-224/SHA-256 using ARMv8 Crypto Extensions
arm64/crypto: GHASH secure hash using ARMv8 Crypto Extensions
arm64/cr
This adds the asm macro definition 'b_if_no_resched' that performs a conditional
branch depending on the preempt need_resched state.
Signed-off-by: Ard Biesheuvel
---
arch/arm64/include/asm/assembler.h | 21 +
1 file changed, 21 insertions(+)
diff --git a/arch/arm
nsion routines were borrowed from aes_generic.
Signed-off-by: Ard Biesheuvel
Acked-by: Herbert Xu
---
arch/arm64/crypto/Kconfig | 14 ++
arch/arm64/crypto/Makefile| 14 ++
arch/arm64/crypto/aes-ce.S| 133 +++
arch/arm64/crypto/aes-glue.c
the
scheduler.
Signed-off-by: Ard Biesheuvel
Acked-by: Herbert Xu
---
arch/arm64/crypto/sha1-ce-core.S | 19 ---
arch/arm64/crypto/sha1-ce-glue.c | 52 ++--
2 files changed, 44 insertions(+), 27 deletions(-)
diff --git a/arch/arm64/crypto/sha1-ce
This patch adds support for the SHA-1 Secure Hash Algorithm for CPUs that
have support for the SHA-1 part of the ARM v8 Crypto Extensions.
Signed-off-by: Ard Biesheuvel
Acked-by: Herbert Xu
---
arch/arm64/Kconfig | 3 +
arch/arm64/Makefile | 1 +
arch/arm64
the
scheduler.
Signed-off-by: Ard Biesheuvel
Acked-by: Herbert Xu
---
arch/arm64/crypto/sha2-ce-core.S | 19 ---
arch/arm64/crypto/sha2-ce-glue.c | 51 ++--
2 files changed, 44 insertions(+), 26 deletions(-)
diff --git a/arch/arm64/crypto/sha2-ce
the
scheduler.
Signed-off-by: Ard Biesheuvel
Acked-by: Herbert Xu
---
arch/arm64/crypto/ghash-ce-core.S | 10 ++
arch/arm64/crypto/ghash-ce-glue.c | 34 ++
2 files changed, 32 insertions(+), 12 deletions(-)
diff --git a/arch/arm64/crypto/ghash-ce-core.S
This patch adds support for the AES symmetric encryption algorithm for CPUs
that have support for the AES part of the ARM v8 Crypto Extensions.
Signed-off-by: Ard Biesheuvel
Acked-by: Herbert Xu
---
arch/arm64/crypto/Kconfig | 7 +-
arch/arm64/crypto/Makefile| 3 +
arch
On 15 May 2014 10:24, Catalin Marinas wrote:
> On Wed, May 14, 2014 at 07:17:29PM +0100, Ard Biesheuvel wrote:
>> The Crypto Extensions based SHA1 implementation uses the NEON register file,
>> and hence runs with preemption disabled. This patch adds a TIF_NEED_RESCHED
>> ch
On 15 May 2014 14:47, Catalin Marinas wrote:
> On 15 May 2014, at 22:35, Ard Biesheuvel wrote:
>> On 15 May 2014 10:24, Catalin Marinas wrote:
>>> On Wed, May 14, 2014 at 07:17:29PM +0100, Ard Biesheuvel wrote:
>>>> +static u8 const *sha1_do_update(struct sh
This adds 4 test vectors for GHASH (of which one for chunked mode), making
a total of 5.
Signed-off-by: Ard Biesheuvel
---
crypto/testmgr.h | 49 +
1 file changed, 45 insertions(+), 4 deletions(-)
diff --git a/crypto/testmgr.h b/crypto/testmgr.h
On 28 June 2014 12:39, Jussi Kivilinna wrote:
> Common SHA-1 structures are defined in for code sharing.
>
> This patch changes SHA-1/ARM glue code to use these structures.
>
> Signed-off-by: Jussi Kivilinna
Acked-by: Ard Biesheuvel
> ---
> arch/arm/cryp
Hi Jussi,
On 28 June 2014 12:40, Jussi Kivilinna 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 1.06x
> 64
1.63x
>
> Changes in v2:
> - Use ENTRY/ENDPROC
> - Don't provide Thumb2 version
> - Move contants to .text section
> - Further tweaks to implementation for ~10% speed-up.
>
Please move the changelog to below the '---' so it doesn't end up in
the kernel c
81923.60x
>
Nice speedup!
> Changes in v2:
> - Use ENTRY/ENDPROC
> - Don't provide Thumb2 version
>
Please move Changelog below '---'
> Signed-off-by: Jussi Kivilinna
Acked-by: Ard Biesheuvel
Tested-by: Ard Biesheuvel
Tested on Exynos-5250
On 29 June 2014 16:33, Jussi Kivilinna wrote:
> Common SHA-1 structures are defined in for code sharing.
>
> This patch changes SHA-1/ARM glue code to use these structures.
>
> Acked-by: Ard Biesheuvel
> Signed-off-by: Jussi Kivilinna
> ---
These two should go into Russ
t; 4096256 3.42x
> 409610243.56x
> 409640963.59x
> 819216 2.48x
> 8192256 3.42x
> 819210243.56x
> 8192 4096 3.60x
> 8192
he residue bytes that were not
> processed as the last parameter to blkcipher_walk_done.
>
> Signed-off-by: Mikulas Patocka
>
Acked-by: Ard Biesheuvel
Thanks for the patch. This correctly fixes a thinko on my part
regarding the guarantees offered by the blkcipher API. Unfortunat
On 26 July 2014 15:13, Ard Biesheuvel wrote:
> On 26 July 2014 01:40, Mikulas Patocka 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 by incorrect ha
On 26 July 2014 01:42, Mikulas Patocka wrote:
> Fix the same alignment bug as in arm64 - we need to pass residue
> unprocessed bytes as the last argument to blkcipher_walk_done.
>
> Signed-off-by: Mikulas Patocka
> Cc: sta...@vger.kernel.org # 3.13+
>
Acked-by: Ard Biesh
On 26 July 2014 17:31, Mikulas Patocka wrote:
>
>
> On Sat, 26 Jul 2014, Ard Biesheuvel wrote:
>
>> On 26 July 2014 15:13, Ard Biesheuvel wrote:
>> > On 26 July 2014 01:40, Mikulas Patocka wrote:
>> >> cryptsetup fails on arm64 when using kernel encryp
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
---
Herbert,
After this change, the ARM
t; 4096256 3.42x
> 409610243.56x
> 409640963.59x
> 819216 2.48x
> 8192256 3.42x
> 819210243.56x
> 8192 4096 3.60x
> 8192
The SHA-512 NEON works just fine under big endian, so remove the Kconfig
condition preventing it from being selected if CONFIG_CPU_BIG_ENDIAN is set.
Signed-off-by: Ard Biesheuvel
---
crypto/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crypto/Kconfig b/crypto
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
---
arch/arm/crypto/sha1-armv7-neon.S | 8
crypto/Kconfig
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
---
I accidentally submitted the version below to the patch system (#8125/1) rather
gt; Updating data by blocks * SHA256_BLOCK_SIZE at the end of
> ha2_finup is redundant code and can be removed.
>
^^^ typo here
> Signed-off-by: Colin Ian King
Acked-by: Ard Biesheuvel
> ---
> arch/arm64/crypto/sha2-ce-glue.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff
On 20 October 2014 09:14, Jamie Heilman 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
> 0010: 6f 82 c0 ca a3 9b
On 21 October 2014 01:43, Jamie Heilman wrote:
> Ard Biesheuvel wrote:
>> On 20 October 2014 09:14, Jamie Heilman wrote:
>> > I get this new failure w/3.17.0 on my system with a VIA Esther
>> > processor:
>> >
>> > alg: skcipher: Chunk test 1 fai
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
---
arch/arm64/crypto/Kconfig | 5 +-
arch
On 22 October 2014 18:25, Catalin Marinas 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.k
On 22 October 2014 18:59, Catalin Marinas wrote:
> On Wed, Oct 22, 2014 at 05:31:32PM +0100, Ard Biesheuvel wrote:
>> On 22 October 2014 18:25, Catalin Marinas wrote:
>> > On Wed, Oct 22, 2014 at 08:15:32AM +0100, Ard Biesheuvel wrote:
>> >> This patch implements t
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.
Tested-by: Steve Capper
Acked-by: Steve Capper
Signed-off-by: Ard Biesheuvel
---
v2
On 14 November 2014 16:43, Herbert Xu 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 no good reason.
>
> The
n ARMv8.
>>
>> Tested on AMD Seattle.
>>
>> Improvement compared to crc32c-generic algorithm:
>> TCRYPT CRC32C speed test shows ~450% speedup.
>> Simple dd write tests to btrfs filesystem show ~30% speedup.
>>
>> Signed-off-by: Yazen Ghannam
>&
!= x
> when strict
> }
> //
>
> This change was suggested by Daniel Borkmann
>
> Signed-off-by: Julia Lawall
>
> ---
> Daniel Borkmann suggested that these patches could go through Herbert Xu's
> cryptodev tree.
>
> I was not able to
ed 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
---
arch/arm64/crypto/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 del
On 20 February 2015 at 15:55, Will Deacon wrote:
> On Thu, Feb 19, 2015 at 05:25:16PM +0000, 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
ing NEON
instructions")
Reported-by: Adrian Kotelba
Signed-off-by: Ard Biesheuvel
---
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 to affect anyone in real life.
On 28 February 2015 at 22:30, Milan Broz wrote:
> On 02/26/2015 08:22 AM, Ard Biesheuvel wrote:
>> This updates the bit sliced AES module to the latest version in the
>> upstream OpenSSL repository (e620e5ae37bc). This is needed to fix a
>> bug in the XTS decryption path, wh
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
---
arch/arm/Kconfig| 3 ++
arch/arm/crypto/Kconfig
This implements the SHA1 secure hash algorithm using the AArch32
versions of the ARMv8 Crypto Extensions for SHA1.
Signed-off-by: Ard Biesheuvel
---
arch/arm/crypto/Kconfig| 10 +++
arch/arm/crypto/Makefile | 2 +
arch/arm/crypto/sha1-ce-core.S | 134
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
---
arch/arm/crypto/Kconfig| 9 ++
arch/arm/crypto/Makefile | 2 +
arch/arm/crypto/sha2-ce-core.S | 134
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
---
arch/arm/crypto/Kconfig | 9 +
arch/arm/crypto/Makefile | 2 +
arch/arm/crypto/aes-ce-core.S | 535
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
---
arch/arm/crypto/Kconfig
(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 for
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
---
arch/arm/crypto/Kconfig
This implements the SHA1 secure hash algorithm using the AArch32
versions of the ARMv8 Crypto Extensions for SHA1.
Signed-off-by: Ard Biesheuvel
---
arch/arm/crypto/Kconfig| 10 +++
arch/arm/crypto/Makefile | 2 +
arch/arm/crypto/sha1-ce-core.S | 134
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
---
arch/arm/crypto/Kconfig| 9 ++
arch/arm/crypto/Makefile | 2 +
arch/arm/crypto/sha2-ce-core.S | 134
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
---
arch/arm/crypto/Kconfig | 9 +
arch/arm/crypto/Makefile | 2 +
arch/arm/crypto/aes-ce-core.S | 518
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
---
arch/arm/Kconfig| 3 ++
arch/arm/crypto/Kconfig
Hello Sami,
On 16 March 2015 at 16:48, Sami Tolvanen 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
>
Have you tested this code with the tcrypt.ko module?
Some more comm
On 16 March 2015 at 17:23, Sami Tolvanen wrote:
> On Mon, Mar 16, 2015 at 05:08:03PM +0100, Ard Biesheuvel wrote:
>> Have you tested this code with the tcrypt.ko module?
>
> I have not, but I can look into it.
>
>> Did you talk to Andy about the license? I don't thi
On 17 March 2015 at 16:09, Andy Polyakov wrote:
> Hi,
>
Have you tested this code with the tcrypt.ko module?
>>>
>>> I have not, but I can look into it.
>>>
Did you talk to Andy about the license? I don't think this is
permissible for the kernel as-is.
>>>
>>> Unless I have misunder
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
---
Will,
This is the optimization you yourself mentioned to me
Signed-off-by: Sami Tolvanen
> Cc: Andy Polyakov
>
This builds fine and passes the tcrypt.ko tests in ARM and Thumb2 and
even in big-endian (ARM) mode, so
Tested-by: Ard Biesheuvel
Reviewed-by: Ard Biesheuvel
Nice work!
Ard.
> ---
> Changes since v1:
> Rebased to Herbert
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
---
arch/arm/crypto/ghash-ce-core.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/crypto/ghash-ce-core.S b/arch/arm/crypto
On 24 March 2015 at 12:32, Herbert Xu 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 commit 2ecd32a1f
On 24 March 2015 at 12:35, Herbert Xu 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 othe
On 24 March 2015 at 12:46, Herbert Xu 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,
On 24 March 2015 at 13:27, Jean-Christophe PLAGNIOL-VILLARD
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 commit 2ec
On 24 March 2015 at 14:05, Jean-Christophe PLAGNIOL-VILLARD
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 (($j&15)!=15);'.
>> >
On 24 March 2015 at 14:06, Ard Biesheuvel wrote:
> On 24 March 2015 at 14:05, Jean-Christophe PLAGNIOL-VILLARD
> wrote:
>> >> + '&eor ($t0,$t0,$a,"ror#".($Sigma0[2]-$Sigma0[0]))', # Sigma0(a)
>>> >> + '&add ($h,$h
On 24 March 2015 at 18:05, Jean-Christophe PLAGNIOL-VILLARD
wrote:
> On 15:46 Tue 24 Mar , Ard Biesheuvel wrote:
>> On 24 March 2015 at 14:06, Ard Biesheuvel wrote:
>> > On 24 March 2015 at 14:05, Jean-Christophe PLAGNIOL-VILLARD
>> > wrote:
>> >
On 24 March 2015 at 19:17, Sami Tolvanen wrote:
> 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 OpenSS
On 27 March 2015 at 11:42, Andy Polyakov 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 ca
On 27 March 2015 at 11:44, Ard Biesheuvel wrote:
> On 27 March 2015 at 11:42, Andy Polyakov wrote:
>>>> Could you share the error log please?
>>>
>>> OK, I spotted one issue with this code:
>>>
>>> arch/arm/crypto/sha256-core.S: Assembler mess
1.513.512.69
Signed-off-by: Ard Biesheuvel
---
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/Kc
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
---
crypto/Kconfig
This updated the generic SHA-512 implementation to use the
generic shared SHA-512 glue code.
Signed-off-by: Ard Biesheuvel
---
crypto/Kconfig | 1 +
crypto/sha512_generic.c | 117 +++-
2 files changed, 16 insertions(+), 102 deletions
Signed-off-by: Ard Biesheuvel
---
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/arm64/crypto/Kconfig b
This updates the generic SHA-256 implementation to use the
new shared SHA-256 glue code.
Signed-off-by: Ard Biesheuvel
---
crypto/Kconfig | 1 +
crypto/sha256_generic.c | 131 +++-
2 files changed, 18 insertions(+), 114 deletions(-)
diff
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
---
crypto/Kconfig
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
10241.412.982.56
8192 40961.412.712.59
8192 81921.513.512.69
Signed-off-by: Ard Biesheuvel
---
arch/arm/crypto/Kconfig |8 +
arch/arm/crypto/Makefile |8 +-
arch/arm/crypto/sha512
On 29 March 2015 at 10:29, Markus Stockhausen wrote:
>> Von: linux-crypto-ow...@vger.kernel.org
>> [linux-crypto-ow...@vger.kernel.org]" im Auftrag von "Ard
>> Biesheuvel [ard.biesheu...@linaro.org]
>> Gesendet: Samstag, 28. März 2015 23:10
>> An: lin
t the generated asm (for arm64), 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
regar
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
---
crypto/Kconfig
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
---
crypto/Kconfig | 1 +
crypto/sha256_generic.c | 139
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
---
crypto/Kconfig
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
---
crypto/Kconfig | 1 +
crypto/sha512_generic.c | 126
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
---
crypto/Kconfig| 1 +
crypto/sha1_generic.c | 105
Signed-off-by: Ard Biesheuvel
---
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/arm64/crypto/Kconfig b
Signed-off-by: Ard Biesheuvel
---
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
index c111d8992afb
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
---
crypto/Kconfig
This updated the generic SHA-512 implementation to use the
generic shared SHA-512 glue code.
Signed-off-by: Ard Biesheuvel
---
crypto/Kconfig | 1 +
crypto/sha512_generic.c | 117 +++-
2 files changed, 16 insertions(+), 102 deletions
Signed-off-by: Ard Biesheuvel
---
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 arch/arm/{include/
Signed-off-by: Ard Biesheuvel
---
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
index 31ad19f18af2
10241.412.982.56
8192 40961.412.712.59
8192 81921.513.512.69
Signed-off-by: Ard Biesheuvel
---
arch/arm/crypto/Kconfig |8 +
arch/arm/crypto/Makefile |8 +-
arch/arm/crypto/sha512
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
---
crypto/Kconfig
This updates the generic SHA-256 implementation to use the
new shared SHA-256 glue code.
Signed-off-by: Ard Biesheuvel
---
crypto/Kconfig | 1 +
crypto/sha256_generic.c | 131 +++-
2 files changed, 18 insertions(+), 114 deletions(-)
diff
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
---
crypto/Kconfig | 1 +
crypto/sha256_generic.c | 139
Signed-off-by: Ard Biesheuvel
---
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 arch/arm/{include/
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
---
crypto/Kconfig
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
---
crypto/Kconfig | 1 +
crypto/sha512_generic.c | 126
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
---
crypto/Kconfig
1 - 100 of 2556 matches
Mail list logo