aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/gost_3410
diff options
context:
space:
mode:
Diffstat (limited to 'src/pubkey/gost_3410')
-rw-r--r--src/pubkey/gost_3410/gost_3410.cpp25
-rw-r--r--src/pubkey/gost_3410/gost_3410.h8
2 files changed, 5 insertions, 28 deletions
diff --git a/src/pubkey/gost_3410/gost_3410.cpp b/src/pubkey/gost_3410/gost_3410.cpp
index 1c3faca7a..8dd72dfc1 100644
--- a/src/pubkey/gost_3410/gost_3410.cpp
+++ b/src/pubkey/gost_3410/gost_3410.cpp
@@ -16,31 +16,6 @@
namespace Botan {
-GOST_3410_PrivateKey::GOST_3410_PrivateKey(RandomNumberGenerator& rng,
- const EC_Domain_Params& dom_pars)
- {
- domain_params = dom_pars;
- generate_private_key(rng);
- }
-
-GOST_3410_PrivateKey::GOST_3410_PrivateKey(const EC_Domain_Params& dom_pars,
- const BigInt& x)
- {
- domain_params = dom_pars;
-
- private_key = x;
- public_key = domain().get_base_point() * private_key;
-
- try
- {
- public_key.check_invariants();
- }
- catch(Illegal_Point)
- {
- throw Invalid_State("GOST_3410 key generation failed");
- }
- }
-
X509_Encoder* GOST_3410_PublicKey::x509_encoder() const
{
class GOST_3410_Key_Encoder : public X509_Encoder
diff --git a/src/pubkey/gost_3410/gost_3410.h b/src/pubkey/gost_3410/gost_3410.h
index 1d3430753..8104cbb75 100644
--- a/src/pubkey/gost_3410/gost_3410.h
+++ b/src/pubkey/gost_3410/gost_3410.h
@@ -63,7 +63,7 @@ class BOTAN_DLL GOST_3410_PublicKey : public virtual EC_PublicKey,
* @param public_point the public point defining this key
*/
GOST_3410_PublicKey(const EC_Domain_Params& dom_par,
- const PointGFp& public_point); // sets core
+ const PointGFp& public_point);
/**
* Get an x509_encoder that can be used to encode this key.
@@ -98,14 +98,16 @@ class BOTAN_DLL GOST_3410_PrivateKey : public GOST_3410_PublicKey,
* @param the domain parameters to used for this key
*/
GOST_3410_PrivateKey(RandomNumberGenerator& rng,
- const EC_Domain_Params& domain);
+ const EC_Domain_Params& domain) :
+ EC_PrivateKey(rng, domain) {}
/**
* Load a private key
* @param domain parameters
* @param x the private key
*/
- GOST_3410_PrivateKey(const EC_Domain_Params& domain, const BigInt& x);
+ GOST_3410_PrivateKey(const EC_Domain_Params& domain, const BigInt& x) :
+ EC_PrivateKey(domain, x) {}
/**
* Sign a message with this key.