diff options
author | lloyd <[email protected]> | 2010-03-04 03:56:49 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-03-04 03:56:49 +0000 |
commit | ea2b48cca1ef37815742577bfd692397bdcf8d13 (patch) | |
tree | 863933a7a0fc21ccee07dda33ac0806984ee0929 /src/pubkey/ecc_key | |
parent | e998558e1fa903b32155b694107082fff25f9c0e (diff) |
Remove load hooks from ECC classes, unused
Diffstat (limited to 'src/pubkey/ecc_key')
-rw-r--r-- | src/pubkey/ecc_key/ecc_key.cpp | 24 | ||||
-rw-r--r-- | src/pubkey/ecc_key/ecc_key.h | 4 |
2 files changed, 8 insertions, 20 deletions
diff --git a/src/pubkey/ecc_key/ecc_key.cpp b/src/pubkey/ecc_key/ecc_key.cpp index 081649de3..f1ece3ebd 100644 --- a/src/pubkey/ecc_key/ecc_key.cpp +++ b/src/pubkey/ecc_key/ecc_key.cpp @@ -45,18 +45,6 @@ MemoryVector<byte> EC_PublicKey::x509_subject_public_key() const return EC2OSP(public_point(), PointGFp::COMPRESSED); } -void EC_PublicKey::X509_load_hook() - { - try - { - public_point().check_invariants(); - } - catch(Illegal_Point) - { - throw Decoding_Error("Invalid public point; not on curve"); - } - } - EC_PublicKey::EC_PublicKey(const AlgorithmIdentifier& alg_id, const MemoryRegion<byte>& key_bits) { @@ -160,11 +148,15 @@ EC_PrivateKey::EC_PrivateKey(const AlgorithmIdentifier& alg_id, private_key = BigInt::decode(octstr_secret, octstr_secret.size()); public_key = domain().get_base_point() * private_key; - } -void EC_PrivateKey::PKCS8_load_hook(bool) - { - public_key = domain().get_base_point() * private_key; + try + { + public_key.check_invariants(); + } + catch(Illegal_Point) + { + throw Internal_Error("Loaded ECC private key failed self test"); + } } } diff --git a/src/pubkey/ecc_key/ecc_key.h b/src/pubkey/ecc_key/ecc_key.h index e9cd7f68b..295de2797 100644 --- a/src/pubkey/ecc_key/ecc_key.h +++ b/src/pubkey/ecc_key/ecc_key.h @@ -82,8 +82,6 @@ class BOTAN_DLL EC_PublicKey : public virtual Public_Key protected: EC_PublicKey() : domain_encoding(EC_DOMPAR_ENC_EXPLICIT) {} - virtual void X509_load_hook(); - EC_Domain_Params domain_params; PointGFp public_key; EC_Domain_Params_Encoding domain_encoding; @@ -117,8 +115,6 @@ class BOTAN_DLL EC_PrivateKey : public virtual EC_PublicKey, protected: EC_PrivateKey() {} - virtual void PKCS8_load_hook(bool = false); - BigInt private_key; }; |