aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/ecdsa
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-03-02 00:34:25 +0000
committerlloyd <[email protected]>2010-03-02 00:34:25 +0000
commit3435b04adf83c714d9907e85135db30a0e1d07c4 (patch)
treeb75ac5b16f738e1806319031c2d37f7149bf82e6 /src/pubkey/ecdsa
parentdd4984b39fb4d5e43cc9ba97f7180b0780c04217 (diff)
Remove a fairly useless member of EC_PublicKey that was only used for
handling ImplicitCA ECDSA keys in the CVC code. Currently dealt with in CVC by simply commenting out the calls - CVC is already pretty broken and I'd much rather have ECC sane and under control and CVC totally broken than ECC remaining in its current state.
Diffstat (limited to 'src/pubkey/ecdsa')
-rw-r--r--src/pubkey/ecdsa/ecdsa.cpp34
-rw-r--r--src/pubkey/ecdsa/ecdsa.h12
2 files changed, 0 insertions, 46 deletions
diff --git a/src/pubkey/ecdsa/ecdsa.cpp b/src/pubkey/ecdsa/ecdsa.cpp
index 2e6efd609..462f0cd0c 100644
--- a/src/pubkey/ecdsa/ecdsa.cpp
+++ b/src/pubkey/ecdsa/ecdsa.cpp
@@ -64,43 +64,10 @@ void ECDSA_PublicKey::affirm_init() const // virtual
EC_PublicKey::affirm_init();
}
-void ECDSA_PublicKey::set_domain_parameters(const EC_Domain_Params& dom_pars)
- {
- if(mp_dom_pars.get())
- {
- // they are already set, we must ensure that they are equal to the arg
- if(dom_pars != *mp_dom_pars.get())
- throw Invalid_Argument("EC_PublicKey::set_domain_parameters - cannot reset to a new value");
-
- return;
- }
-
- if(m_enc_public_point.size() == 0)
- throw Invalid_State("EC_PublicKey::set_domain_parameters(): encoded public point isn't set");
-
- // now try to decode the public key ...
- PointGFp tmp_pp(OS2ECP(m_enc_public_point, dom_pars.get_curve()));
- try
- {
- tmp_pp.check_invariants();
- }
- catch(Illegal_Point e)
- {
- throw Invalid_State("EC_PublicKey::set_domain_parameters(): point does not lie on provided curve");
- }
-
- std::auto_ptr<EC_Domain_Params> p_tmp_pars(new EC_Domain_Params(dom_pars));
- ECDSA_Core tmp_ecdsa_core(*p_tmp_pars, BigInt(0), tmp_pp);
- mp_public_point.reset(new PointGFp(tmp_pp));
- m_ecdsa_core = tmp_ecdsa_core;
- mp_dom_pars = p_tmp_pars;
- }
-
void ECDSA_PublicKey::set_all_values(const ECDSA_PublicKey& other)
{
m_param_enc = other.m_param_enc;
m_ecdsa_core = other.m_ecdsa_core;
- m_enc_public_point = other.m_enc_public_point;
if(other.mp_dom_pars.get())
mp_dom_pars.reset(new EC_Domain_Params(other.domain_parameters()));
@@ -175,7 +142,6 @@ void ECDSA_PrivateKey::set_all_values(const ECDSA_PrivateKey& other)
m_private_value = other.m_private_value;
m_param_enc = other.m_param_enc;
m_ecdsa_core = other.m_ecdsa_core;
- m_enc_public_point = other.m_enc_public_point;
if(other.mp_dom_pars.get())
mp_dom_pars.reset(new EC_Domain_Params(other.domain_parameters()));
diff --git a/src/pubkey/ecdsa/ecdsa.h b/src/pubkey/ecdsa/ecdsa.h
index ce8c185a5..f6ac8a0d7 100644
--- a/src/pubkey/ecdsa/ecdsa.h
+++ b/src/pubkey/ecdsa/ecdsa.h
@@ -71,18 +71,6 @@ class BOTAN_DLL ECDSA_PublicKey : public virtual EC_PublicKey,
ECDSA_PublicKey(const ECDSA_PublicKey& other);
/**
- * Set the domain parameters of this key. This function has to be
- * used when a key encoded without domain parameters was decoded into
- * this key. Otherwise it will not be able to verify a signature.
- * @param dom_pars the domain_parameters associated with this key
- * @throw Invalid_Argument if the point was found not to be satisfying the
- * curve equation of the provided domain parameters
- * or if this key already has domain parameters set
- * and these are differing from those given as the parameter
- */
- void set_domain_parameters(const EC_Domain_Params& dom_pars);
-
- /**
* Ensure that the public point and domain parameters of this key are set.
* @throw Invalid_State if either of the two data members is not set
*/