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 /src/pubkey/gost_3410 | |
parent | 83a0887fb47633522be1512a9b85a22769eba564 (diff) |
Remove PointGFp::mult_this_secure
Diffstat (limited to 'src/pubkey/gost_3410')
-rw-r--r-- | src/pubkey/gost_3410/gost_3410.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/pubkey/gost_3410/gost_3410.cpp b/src/pubkey/gost_3410/gost_3410.cpp index c2ddabe63..43e8a9c7b 100644 --- a/src/pubkey/gost_3410/gost_3410.cpp +++ b/src/pubkey/gost_3410/gost_3410.cpp @@ -39,9 +39,8 @@ GOST_3410_PrivateKey::GOST_3410_PrivateKey(const EC_Domain_Params& domain, m_private_value = x; mp_public_point = std::auto_ptr<PointGFp>(new PointGFp (mp_dom_pars->get_base_point())); - mp_public_point->mult_this_secure(m_private_value, - mp_dom_pars->get_order(), - mp_dom_pars->get_order()-1); + + *mp_public_point *= m_private_value; try { @@ -332,9 +331,9 @@ GOST_3410_PrivateKey::sign(const byte msg[], if(e == 0) e = 1; - PointGFp k_times_P(mp_dom_pars->get_base_point()); - k_times_P.mult_this_secure(k, n, n-1); + PointGFp k_times_P = mp_dom_pars->get_base_point() * k; k_times_P.check_invariants(); + BigInt r = k_times_P.get_affine_x().get_value() % n; if(r == 0) |