From: ard.biesheuvel@linaro.org (Ard Biesheuvel)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 0/6] SHA-256/512 glue code consolidation
Date: Sat, 28 Mar 2015 23:10:22 +0100 [thread overview]
Message-ID: <1427580628-7128-1-git-send-email-ard.biesheuvel@linaro.org> (raw)
Hello all,
After working on various flavors of SHA over the past week, I noticed there
is a fair amount of duplication, not only of true boiler plate but also of
glue code that is not entirely non-trivial.
So this series proposes a way to cut down on that: I implemented generic
glue for SHA-256 and SHA-512, and ported the generic implementations to
use it. The last two patches are examples of non-trivial uses of it.
Patch #5 ports the arm64 SHA-256 Crypto Extensions to use it: this code
needs to enable and disable the NEON before and after using it, and has
an implementation of the padding 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: implement base layer for SHA-512
crypto: sha512-generic: move to generic glue implementation
crypto: sha256: implement base layer for SHA-256
crypto: sha256-generic: move to generic glue implementation
arm64/crypto: move ARMv8 SHA-224/256 driver to SHA-256 base layer
arm/crypto: accelerated SHA-512 using ARM generic ASM and NEON
arch/arm/crypto/Kconfig | 8 +
arch/arm/crypto/Makefile | 8 +-
arch/arm/crypto/sha512-armv4.pl | 656 ++++++++++++
arch/arm/crypto/sha512-core.S_shipped | 1814 +++++++++++++++++++++++++++++++++
arch/arm/crypto/sha512-glue.c | 137 +++
arch/arm/crypto/sha512-neon-glue.c | 111 ++
arch/arm/crypto/sha512.h | 8 +
arch/arm64/crypto/Kconfig | 1 +
arch/arm64/crypto/sha2-ce-core.S | 11 +-
arch/arm64/crypto/sha2-ce-glue.c | 211 +---
crypto/Kconfig | 9 +
crypto/Makefile | 2 +
crypto/sha256_base.c | 138 +++
crypto/sha256_generic.c | 131 +--
crypto/sha512_base.c | 143 +++
crypto/sha512_generic.c | 117 +--
include/crypto/sha.h | 37 +
17 files changed, 3142 insertions(+), 400 deletions(-)
create mode 100644 arch/arm/crypto/sha512-armv4.pl
create mode 100644 arch/arm/crypto/sha512-core.S_shipped
create mode 100644 arch/arm/crypto/sha512-glue.c
create mode 100644 arch/arm/crypto/sha512-neon-glue.c
create mode 100644 arch/arm/crypto/sha512.h
create mode 100644 crypto/sha256_base.c
create mode 100644 crypto/sha512_base.c
--
1.8.3.2
next reply other threads:[~2015-03-28 22:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-28 22:10 Ard Biesheuvel [this message]
2015-03-28 22:10 ` [RFC PATCH 1/6] crypto: sha512: implement base layer for SHA-512 Ard Biesheuvel
2015-03-29 8:29 ` AW: " Markus Stockhausen
2015-03-29 10:38 ` Ard Biesheuvel
2015-03-29 16:05 ` AW: " Markus Stockhausen
2015-03-28 22:10 ` [RFC PATCH 2/6] crypto: sha512-generic: move to generic glue implementation Ard Biesheuvel
2015-03-28 22:10 ` [RFC PATCH 3/6] crypto: sha256: implement base layer for SHA-256 Ard Biesheuvel
2015-03-28 22:10 ` [RFC PATCH 4/6] crypto: sha256-generic: move to generic glue implementation Ard Biesheuvel
2015-03-28 22:10 ` [RFC PATCH 5/6] arm64/crypto: move ARMv8 SHA-224/256 driver to SHA-256 base layer Ard Biesheuvel
2015-03-28 22:10 ` [RFC PATCH 6/6] arm/crypto: accelerated SHA-512 using ARM generic ASM and NEON Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1427580628-7128-1-git-send-email-ard.biesheuvel@linaro.org \
--to=ard.biesheuvel@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).