mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Merge pull request #8822 from daverodgman/sha3-perf
SHA-3 performance & code size
This commit is contained in:
@ -4781,6 +4781,26 @@ component_test_aesni () { # ~ 60s
|
||||
not grep -q "AES note: built-in implementation." ./programs/test/selftest
|
||||
}
|
||||
|
||||
component_test_sha3_variations() {
|
||||
msg "sha3 loop unroll variations"
|
||||
|
||||
# define minimal config sufficient to test SHA3
|
||||
cat > include/mbedtls/mbedtls_config.h << END
|
||||
#define MBEDTLS_SELF_TEST
|
||||
#define MBEDTLS_SHA3_C
|
||||
END
|
||||
|
||||
msg "all loops unrolled"
|
||||
make clean
|
||||
make -C tests test_suite_shax CFLAGS="-DMBEDTLS_SHA3_THETA_UNROLL=1 -DMBEDTLS_SHA3_PI_UNROLL=1 -DMBEDTLS_SHA3_CHI_UNROLL=1 -DMBEDTLS_SHA3_RHO_UNROLL=1"
|
||||
./tests/test_suite_shax
|
||||
|
||||
msg "all loops rolled up"
|
||||
make clean
|
||||
make -C tests test_suite_shax CFLAGS="-DMBEDTLS_SHA3_THETA_UNROLL=0 -DMBEDTLS_SHA3_PI_UNROLL=0 -DMBEDTLS_SHA3_CHI_UNROLL=0 -DMBEDTLS_SHA3_RHO_UNROLL=0"
|
||||
./tests/test_suite_shax
|
||||
}
|
||||
|
||||
support_test_aesni_m32() {
|
||||
support_test_m32_no_asm && (lscpu | grep -qw aes)
|
||||
}
|
||||
|
Reference in New Issue
Block a user