diff options
author | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2018-06-19 22:10:49 +0300 |
---|---|---|
committer | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2018-06-19 22:10:49 +0300 |
commit | 8a44c55d2fb758f726b8b436aa5c0b88a6c6f112 (patch) | |
tree | 3b7051fbf9dc861dea2c1b78c5d3a6aeb9d35b81 /cipher/sha1.h | |
parent | 59c4e344eec61cff45185e1caea6815b3266a0f8 (diff) | |
download | libgcrypt-8a44c55d2fb758f726b8b436aa5c0b88a6c6f112.tar.gz |
Clean-up implementation selection for SHA1 and SHA2
* cipher/sha1.c (ASM_EXTRA_STACK): Increase by sizeof(void*)*4.
(do_sha1_transform_amd64_ssse3, do_sha1_transform_amd64_avx)
(do_sha1_transform_amd64_avx_bmi2, do_sha1_transform_intel_shaext)
(do_sha1_transform_armv7_neon, do_sha1_transform_armv8_ce): New.
(transform_blk, transform): Merge to ...
(do_transform_generic): ... this and remove calls to assembly
implementations.
(sha1_init): Select hd->bctx.bwrite based on HW features.
(_gcry_sha1_mixblock, sha1_final): Call hd->bctx.bwrite instead of
transform.
* cipher/sha1.h (SHA1_CONTEXT): Remove implementation selection bits.
* cipher/sha256.h (SHA256_CONTEXT): Remove implementation selection
bits.
(ASM_EXTRA_STACK): Increase by sizeof(void*)*4.
(do_sha256_transform_amd64_ssse3, do_sha256_transform_amd64_avx)
(do_sha256_transform_amd64_avx2, do_sha256_transform_intel_shaext)
(do_sha256_transform_armv8_ce): New.
(transform_blk, transform): Merge to ...
(do_transform_generic): ... this and remove calls to assembly
implementations.
(sha256_init, sha224_init): Select hd->bctx.bwrite based on HW
features.
(sha256_final): Call hd->bctx.bwrite instead of transform.
* cipher/sha512-armv7-neon.S
(_gcry_sha512_transform_armv7_neon): Return zero.
* cipher/sha512.h (SHA512_CONTEXT): Remove implementation selection
bits.
(ASM_EXTRA_STACK): Increase by sizeof(void*)*4.
(do_sha512_transform_armv7_neon, do_sha512_transform_amd64_ssse3)
(do_sha512_transform_amd64_avx, do_sha512_transform_amd64_avx2): New.
[USE_ARM_ASM] (do_transform_generic): New.
(transform_blk, transform): Merge to ...
[!USE_ARM_ASM] (do_transform_generic): ... this and remove calls to
assembly implementations.
(sha512_init, sha384_init): Select hd->bctx.bwrite based on HW
features.
(sha512_final): Call hd->bctx.bwrite instead of transform.
--
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Diffstat (limited to 'cipher/sha1.h')
-rw-r--r-- | cipher/sha1.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/cipher/sha1.h b/cipher/sha1.h index 93ce79b5..acf764ba 100644 --- a/cipher/sha1.h +++ b/cipher/sha1.h @@ -26,12 +26,6 @@ typedef struct { gcry_md_block_ctx_t bctx; u32 h0,h1,h2,h3,h4; - unsigned int use_ssse3:1; - unsigned int use_avx:1; - unsigned int use_bmi2:1; - unsigned int use_shaext:1; - unsigned int use_neon:1; - unsigned int use_arm_ce:1; } SHA1_CONTEXT; |