aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/ecc_key/ecc_key.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-03-05 06:47:02 +0000
committerlloyd <[email protected]>2010-03-05 06:47:02 +0000
commit1b68d7e53c4bc5e6b2938194b0f7eda78a72ce43 (patch)
treeda1b0482d875a48fe95e133346aee4baabcbf7cb /src/pubkey/ecc_key/ecc_key.cpp
parentd4ef447dc8b3b4f40f2ab250b1c364e2f74ccfa4 (diff)
Remove the sign() operation from the public key objects, totally replaced
by using the ops. Add real ECDSA test vectors (two found in ANSI X9.62)
Diffstat (limited to 'src/pubkey/ecc_key/ecc_key.cpp')
-rw-r--r--src/pubkey/ecc_key/ecc_key.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/pubkey/ecc_key/ecc_key.cpp b/src/pubkey/ecc_key/ecc_key.cpp
index f1ece3ebd..5ad0fbddd 100644
--- a/src/pubkey/ecc_key/ecc_key.cpp
+++ b/src/pubkey/ecc_key/ecc_key.cpp
@@ -87,17 +87,18 @@ const BigInt& EC_PrivateKey::private_value() const
/**
* EC_PrivateKey generator
-**/
+*/
EC_PrivateKey::EC_PrivateKey(const EC_Domain_Params& dom_par,
- const BigInt& priv_key) :
- EC_PublicKey(dom_par, dom_par.get_base_point() * private_key),
- private_key(priv_key)
+ const BigInt& priv_key)
{
+ domain_params = dom_par;
+ public_key = domain().get_base_point() * priv_key;
+ private_key = priv_key;
}
/**
* EC_PrivateKey generator
-**/
+*/
EC_PrivateKey::EC_PrivateKey(RandomNumberGenerator& rng,
const EC_Domain_Params& dom_par)
{