aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/ecc_key/ecc_key.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-11-12 01:53:56 -0500
committerJack Lloyd <[email protected]>2016-11-12 01:53:56 -0500
commit9c72dabc9dc73e2603c22dfce48611b5b626238b (patch)
treebda4f84f78bfbdd28e2199ee8f9998b08cc3c634 /src/lib/pubkey/ecc_key/ecc_key.cpp
parent618f890fd7ede74c728612ca8bc590c72ee353f1 (diff)
Pubkey cleanups
Add Public_Key::key_length usable for policy checking (as in TLS::Policy::check_peer_key_acceptable) Remove Public_Key::max_input_bits because it didn't make much sense for most algorithms actually. Remove message_parts and message_part_size from PK_Ops
Diffstat (limited to 'src/lib/pubkey/ecc_key/ecc_key.cpp')
-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 befc2cc4c..ea2bb48e9 100644
--- a/src/lib/pubkey/ecc_key/ecc_key.cpp
+++ b/src/lib/pubkey/ecc_key/ecc_key.cpp
@@ -18,9 +18,14 @@
namespace Botan {
+size_t EC_PublicKey::key_length() const
+ {
+ return domain().get_curve().get_p().bits();
+ }
+
size_t EC_PublicKey::estimated_strength() const
{
- return ecp_work_factor(domain().get_curve().get_p().bits());
+ return ecp_work_factor(key_length());
}
EC_PublicKey::EC_PublicKey(const EC_Group& dom_par,