diff options
author | lloyd <[email protected]> | 2010-02-24 15:46:01 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-02-24 15:46:01 +0000 |
commit | b06a941a98f49172b203914810483589cf86cc76 (patch) | |
tree | 60185833656de660a4d31556b98d0170b56a1e5b /checks/ec_tests.cpp | |
parent | 83a0887fb47633522be1512a9b85a22769eba564 (diff) |
Remove PointGFp::mult_this_secure
Diffstat (limited to 'checks/ec_tests.cpp')
-rw-r--r-- | checks/ec_tests.cpp | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/checks/ec_tests.cpp b/checks/ec_tests.cpp index 871425d20..cf63cc529 100644 --- a/checks/ec_tests.cpp +++ b/checks/ec_tests.cpp @@ -1032,26 +1032,6 @@ void test_point_swap(RandomNumberGenerator& rng) * This test verifies that the side channel attack resistant multiplication function * yields the same result as the normal (insecure) multiplication via operator*= */ -void test_mult_sec() - { - std::cout << "." << std::flush; - - EC_Domain_Params dom_pars(get_EC_Dom_Pars_by_oid("1.3.132.0.8")); - PointGFp a(dom_pars.get_base_point()); - BigInt scal("123413545342234"); - PointGFp b = a * scal; - PointGFp c(a); - c.mult_this_secure(scal, dom_pars.get_order(), dom_pars.get_order()-1); - PointGFp d(a); - d.mult_this_secure(scal, BigInt(0), dom_pars.get_order()-1); - CHECK(b == c); - CHECK(c == d); - } - -/** -* This test verifies that the side channel attack resistant multiplication function -* yields the same result as the normal (insecure) multiplication via operator*= -*/ void test_mult_sec_mass(RandomNumberGenerator& rng) { @@ -1064,11 +1044,9 @@ void test_mult_sec_mass(RandomNumberGenerator& rng) BigInt scal(BigInt(rng, 40)); PointGFp b = a * scal; PointGFp c(a); - c.mult_this_secure(scal, dom_pars.get_order()*dom_pars.get_cofactor(), dom_pars.get_order()-1); - //PointGFp d(a); - //d.mult_this_secure(scal, BigInt(0), dom_pars.get_order()-1); + + c *= scal; CHECK(b == c); - //CHECK(c == d); } } @@ -1192,7 +1170,6 @@ void do_ec_tests(RandomNumberGenerator& rng) test_gfp_curve_precomp_mres(); //test_point_worksp(); test_point_swap(rng); - test_mult_sec(); test_mult_sec_mass(rng); test_curve_cp_ctor(); test_ec_key_cp_and_assignment(rng); |