summaryrefslogtreecommitdiffstats
path: root/test/exptest.c
diff options
context:
space:
mode:
authorAndrey Matyukov <andrey.matyukov@intel.com>2020-12-08 22:53:39 +0300
committerPauli <pauli@openssl.org>2021-11-19 12:50:34 +1000
commitf87b4c4ea67393c9269663ed40a7ea3463cc59d3 (patch)
tree4af4c0fd0415e6cc19e812b0eead726ed948661f /test/exptest.c
parente67edf60f2e9be6e5f5465b52d01aa26bf715280 (diff)
Dual 1536/2048-bit exponentiation optimization for Intel IceLake CPU
It uses AVX512_IFMA + AVX512_VL (with 256-bit wide registers) ISA to keep lower power license. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14908)
Diffstat (limited to 'test/exptest.c')
-rw-r--r--test/exptest.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/exptest.c b/test/exptest.c
index 84d972afe3..675984c8cb 100644
--- a/test/exptest.c
+++ b/test/exptest.c
@@ -223,11 +223,12 @@ static int test_mod_exp_x2(int idx)
BIGNUM *m2 = NULL;
int factor_size = 0;
- /*
- * Currently only 1024-bit factor size is supported.
- */
if (idx <= 100)
factor_size = 1024;
+ else if (idx <= 200)
+ factor_size = 1536;
+ else if (idx <= 300)
+ factor_size = 2048;
if (!TEST_ptr(ctx = BN_CTX_new()))
goto err;
@@ -303,6 +304,6 @@ int setup_tests(void)
{
ADD_TEST(test_mod_exp_zero);
ADD_ALL_TESTS(test_mod_exp, 200);
- ADD_ALL_TESTS(test_mod_exp_x2, 100);
+ ADD_ALL_TESTS(test_mod_exp_x2, 300);
return 1;
}