aboutsummaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorSami Tolvanen <samitolvanen@google.com>2015-03-23 14:42:55 +0000
committerJP Abgrall <jpa@google.com>2015-04-09 17:39:04 +0000
commit11a2b3dd2e2c5a7a9ede692759c4a600fe42581b (patch)
tree4b9cf22589788cb099112aaaa4eb33a9a5a9f823 /crypto
parent3aaf46626af5875372d625644759c570a1515c3f (diff)
arm: crypto: Add optimized SHA-256/224
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 51f8d095562f36cdaa6893597b5c609e943b0565. Compared to sha256-generic these implementations have the following tcrypt speed improvements on Motorola Nexus 6 (Snapdragon 805): bs b/u sha256-neon sha256-asm 16 16 x1.32 x1.19 64 16 x1.27 x1.15 64 64 x1.36 x1.20 256 16 x1.22 x1.11 256 64 x1.36 x1.19 256 256 x1.59 x1.23 1024 16 x1.21 x1.10 1024 256 x1.65 x1.23 1024 1024 x1.76 x1.25 2048 16 x1.21 x1.10 2048 256 x1.66 x1.23 2048 1024 x1.78 x1.25 2048 2048 x1.79 x1.25 4096 16 x1.20 x1.09 4096 256 x1.66 x1.23 4096 1024 x1.79 x1.26 4096 4096 x1.82 x1.26 8192 16 x1.20 x1.09 8192 256 x1.67 x1.23 8192 1024 x1.80 x1.26 8192 4096 x1.85 x1.28 8192 8192 x1.85 x1.27 Where bs refers to block size and b/u to bytes per update. Change-Id: I83938010007660f7f3f77f2946c8d22557e3a327 Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/Kconfig7
1 files changed, 7 insertions, 0 deletions
diff --git a/crypto/Kconfig b/crypto/Kconfig
index b7cc3cb3a613..fa7e2a8cc608 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -556,6 +556,13 @@ config CRYPTO_SHA256
This code also includes SHA-224, a 224 bit hash with 112 bits
of security against collision attacks.
+config CRYPTO_SHA256_ARM
+ tristate "SHA-224/256 digest algorithm (ARM-asm and NEON)"
+ select CRYPTO_HASH
+ help
+ SHA-256 secure hash standard (DFIPS 180-2) implemented
+ using optimized ARM assembler and NEON, when available.
+
config CRYPTO_SHA256_SPARC64
tristate "SHA224 and SHA256 digest algorithm (SPARC64)"
depends on SPARC64