diff options
author | Matt Caswell <matt@openssl.org> | 2015-11-04 22:54:29 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-01-29 12:56:58 +0000 |
commit | 8ce4e7e605577cb5818de068e2c6da60901cddba (patch) | |
tree | 889ca86f2ad1eda38f1d110df5623c52a4180c53 /test/ectest.c | |
parent | 615614c8862fb89dcf1551a4e113be0789dddf5f (diff) |
Add have_precompute_mult tests
Add tests for have_precompute_mult for the optimised curves (nistp224,
nistp256 and nistp521) if present
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'test/ectest.c')
-rw-r--r-- | test/ectest.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ectest.c b/test/ectest.c index f17b8b04e1..674e593f44 100644 --- a/test/ectest.c +++ b/test/ectest.c @@ -1592,9 +1592,18 @@ static void nistp_single_test(const struct nistp_test_params *test) if (0 != EC_POINT_cmp(NISTP, Q, Q_CHECK, ctx)) ABORT; + /* + * We have not performed precomputation so have_precompute mult should be + * false + */ + if (EC_GROUP_have_precompute_mult(NISTP)) + ABORT; + /* now repeat all tests with precomputation */ if (!EC_GROUP_precompute_mult(NISTP, ctx)) ABORT; + if (!EC_GROUP_have_precompute_mult(NISTP)) + ABORT; /* fixed point multiplication */ EC_POINT_mul(NISTP, Q, m, NULL, NULL, ctx); |