diff options
Diffstat (limited to 'src/lib/pubkey/ecdh')
-rw-r--r-- | src/lib/pubkey/ecdh/ecdh.cpp | 5 | ||||
-rw-r--r-- | src/lib/pubkey/ecdh/ecdh.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/pubkey/ecdh/ecdh.cpp b/src/lib/pubkey/ecdh/ecdh.cpp index e7e49a74f..74c385fcf 100644 --- a/src/lib/pubkey/ecdh/ecdh.cpp +++ b/src/lib/pubkey/ecdh/ecdh.cpp @@ -17,6 +17,11 @@ namespace Botan { +std::unique_ptr<Public_Key> ECDH_PrivateKey::public_key() const + { + return std::unique_ptr<Public_Key>(new ECDH_PublicKey(domain(), public_point())); + } + namespace { /** diff --git a/src/lib/pubkey/ecdh/ecdh.h b/src/lib/pubkey/ecdh/ecdh.h index f88955ac4..4be7e656c 100644 --- a/src/lib/pubkey/ecdh/ecdh.h +++ b/src/lib/pubkey/ecdh/ecdh.h @@ -89,6 +89,8 @@ class BOTAN_PUBLIC_API(2,0) ECDH_PrivateKey final : public ECDH_PublicKey, const BigInt& x = 0) : EC_PrivateKey(rng, domain, x) {} + std::unique_ptr<Public_Key> public_key() const override; + std::vector<uint8_t> public_value() const override { return ECDH_PublicKey::public_value(PointGFp::UNCOMPRESSED); } |