aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/ecdh/ecdh.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pubkey/ecdh/ecdh.cpp')
-rw-r--r--src/pubkey/ecdh/ecdh.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/pubkey/ecdh/ecdh.cpp b/src/pubkey/ecdh/ecdh.cpp
index 37dc7c392..d3688fa5c 100644
--- a/src/pubkey/ecdh/ecdh.cpp
+++ b/src/pubkey/ecdh/ecdh.cpp
@@ -11,12 +11,10 @@
namespace Botan {
-ECDH_KA_Operation::ECDH_KA_Operation(const ECDH_PrivateKey& key)
+ECDH_KA_Operation::ECDH_KA_Operation(const ECDH_PrivateKey& key) :
+ curve(key.domain().get_curve()),
+ cofactor(key.domain().get_cofactor())
{
- cofactor = key.domain().get_cofactor();
-
- curve = key.domain().get_curve();
-
l_times_priv = inverse_mod(cofactor, key.domain().get_order()) *
key.private_value();
}