diff options
author | Never <[email protected]> | 2017-02-27 17:52:04 +0100 |
---|---|---|
committer | Never <[email protected]> | 2017-02-28 15:16:52 +0100 |
commit | 5cf9935fc040648ed767fbfcff46afdf28d39992 (patch) | |
tree | 1edbfd9074c3e4f789ec4f891eeee39174e854f7 /src | |
parent | f79cba75823ba72a8dc4d1931087acddd0c32af3 (diff) |
verify ec domain in EC_PublicKey::check_key
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/pubkey/ecc_key/ecc_key.cpp | 7 |
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()) { |