aboutsummaryrefslogtreecommitdiff
path: root/crypto/modes/gcm128.c
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2014-04-24 10:16:58 +0200
committerAndy Polyakov <appro@openssl.org>2014-04-24 10:24:53 +0200
commitf8cee9d08181f9e966ef01d3b69ba78b6cb7c8a8 (patch)
tree1b6fa2798c8ce447bb6713926010457e2884db4e /crypto/modes/gcm128.c
parent558ff0f0c1d87d74e70b0a70ddd67c0ff7f596ad (diff)
downloadopenssl-f8cee9d08181f9e966ef01d3b69ba78b6cb7c8a8.zip
openssl-f8cee9d08181f9e966ef01d3b69ba78b6cb7c8a8.tar.gz
openssl-f8cee9d08181f9e966ef01d3b69ba78b6cb7c8a8.tar.bz2
bn/asm/armv4-gf2m.pl, modes/asm/ghash-armv4.pl: faster multiplication
algorithm suggested in following paper: Câmara, D.; Gouvêa, C. P. L.; López, J. & Dahab, R.: Fast Software Polynomial Multiplication on ARM Processors using the NEON Engine. http://conradoplg.cryptoland.net/files/2010/12/mocrysen13.pdf
Diffstat (limited to 'crypto/modes/gcm128.c')
-rw-r--r--crypto/modes/gcm128.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/modes/gcm128.c b/crypto/modes/gcm128.c
index 253746c..9afef1c 100644
--- a/crypto/modes/gcm128.c
+++ b/crypto/modes/gcm128.c
@@ -681,6 +681,7 @@ void gcm_ghash_4bit_x86(u64 Xi[2],const u128 Htable[16],const u8 *inp,size_t len
# if __ARM_ARCH__>=7
# define GHASH_ASM_ARM
# define GCM_FUNCREF_4BIT
+void gcm_init_neon(u128 Htable[16],const u64 Xi[2]);
void gcm_gmult_neon(u64 Xi[2],const u128 Htable[16]);
void gcm_ghash_neon(u64 Xi[2],const u128 Htable[16],const u8 *inp,size_t len);
# endif
@@ -767,6 +768,7 @@ void CRYPTO_gcm128_init(GCM128_CONTEXT *ctx,void *key,block128_f block)
# endif
# elif defined(GHASH_ASM_ARM)
if (OPENSSL_armcap_P & ARMV7_NEON) {
+ gcm_init_neon(ctx->Htable,ctx->H.u);
ctx->gmult = gcm_gmult_neon;
ctx->ghash = gcm_ghash_neon;
} else {