diff options
author | lloyd <[email protected]> | 2009-12-12 04:16:45 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-12-12 04:16:45 +0000 |
commit | d1ce64bedee53f0050d44f86db070d87bf78926e (patch) | |
tree | 4b2236cab24157aa5fae0b4d110d113c0c8aab59 /src/pubkey/gost_3410/gost_3410.h | |
parent | 579b059c9310b98db90eb534fe09e024dcc4f94f (diff) |
Of _course_, GOST 34.10 uses a non-standard X.509 encoding, and _of course_
it's ridiculously poorly thought out.
The PKCS #8 format isn't documented anywhere I can find, so I'm declaring
the standard GOST-34.10-2001 to be identical to the ECDSA/ECDH format,
thus defining the problem away. :)
Diffstat (limited to 'src/pubkey/gost_3410/gost_3410.h')
-rw-r--r-- | src/pubkey/gost_3410/gost_3410.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/pubkey/gost_3410/gost_3410.h b/src/pubkey/gost_3410/gost_3410.h index f053091ca..460aca9bf 100644 --- a/src/pubkey/gost_3410/gost_3410.h +++ b/src/pubkey/gost_3410/gost_3410.h @@ -1,5 +1,5 @@ /* -* GOST_3410 +* GOST 34.10-2001 * (C) 2007 Falko Strenzke, FlexSecure GmbH * Manuel Hartl, FlexSecure GmbH * (C) 2008-2009 Jack Lloyd @@ -87,6 +87,19 @@ class BOTAN_DLL GOST_3410_PublicKey : public virtual EC_PublicKey, */ virtual void affirm_init() const; + /** + * Get an x509_encoder that can be used to encode this key. + * @result an x509_encoder for this key + */ + X509_Encoder* x509_encoder() const; + + /** + * Get an x509_decoder that can be used to decode a stored key into + * this key. + * @result an x509_decoder for this key + */ + X509_Decoder* x509_decoder(); + protected: void X509_load_hook(); void set_all_values(const GOST_3410_PublicKey& other); @@ -96,8 +109,8 @@ class BOTAN_DLL GOST_3410_PublicKey : public virtual EC_PublicKey, * This class represents GOST_3410 Private Keys */ class BOTAN_DLL GOST_3410_PrivateKey : public GOST_3410_PublicKey, - public EC_PrivateKey, - public PK_Signing_Key + public EC_PrivateKey, + public PK_Signing_Key { public: /** @@ -111,7 +124,7 @@ 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); /** * Load a private key |