aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/pubkey/ecc_key/ecc_key.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/pubkey/ecc_key/ecc_key.cpp b/src/lib/pubkey/ecc_key/ecc_key.cpp
index fd1e9dd83..0c59c75fd 100644
--- a/src/lib/pubkey/ecc_key/ecc_key.cpp
+++ b/src/lib/pubkey/ecc_key/ecc_key.cpp
@@ -44,9 +44,14 @@ EC_PublicKey::EC_PublicKey(const AlgorithmIdentifier& alg_id,
m_domain_encoding{EC_DOMPAR_ENC_EXPLICIT}
{}
-bool EC_PublicKey::check_key(RandomNumberGenerator&,
+bool EC_PublicKey::check_key(RandomNumberGenerator& rng,
bool) const
{
+ //verify domain parameters
+ if(!m_domain_params.verify_group(rng))
+ {
+ return false;
+ }
//check that public point is not at infinity
if(public_point().is_zero())
{