linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/6] SHA-256/512 glue code consolidation
@ 2015-03-28 22:10 Ard Biesheuvel
  2015-03-28 22:10 ` [RFC PATCH 1/6] crypto: sha512: implement base layer for SHA-512 Ard Biesheuvel
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Ard Biesheuvel @ 2015-03-28 22:10 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-03-29 16:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-28 22:10 [RFC PATCH 0/6] SHA-256/512 glue code consolidation Ard Biesheuvel
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

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).