Home GnuPG

sha512-avx512: enable only on Intel CPUs for now

Description

sha512-avx512: enable only on Intel CPUs for now

* cipher/sha512.c (sha512_init_common): Enable AVX512 implementation
only for Intel CPUs.

SHA512-AVX512 implementation is slightly slower than AVX2 variant
on AMD Zen4 (AVX512 4.88 cpb, AVX2 4.35 cpb). This is likely
because AVX512 implementation uses vector registers for round
function unlike AVX2 where general purpose registers are used
for round function. On Zen4, message expansion and round function
then end up competing for narrower vector execution bandwidth
and gives slower performance.

  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Oct 22 2022, 3:22 PM
Parents
rCb095ea755973: hmac,hkdf: Check the HMAC key length in FIPS mode.
Branches
Unknown
Tags
Unknown