aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/curve25519/curve25519.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/pubkey/curve25519/curve25519.cpp')
-rw-r--r--src/lib/pubkey/curve25519/curve25519.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/pubkey/curve25519/curve25519.cpp b/src/lib/pubkey/curve25519/curve25519.cpp
index 515fdc5e6..a06e700c4 100644
--- a/src/lib/pubkey/curve25519/curve25519.cpp
+++ b/src/lib/pubkey/curve25519/curve25519.cpp
@@ -87,6 +87,11 @@ Curve25519_PrivateKey::Curve25519_PrivateKey(const AlgorithmIdentifier&,
curve25519_basepoint(m_public.data(), m_private.data());
}
+std::unique_ptr<Public_Key> Curve25519_PrivateKey::public_key() const
+ {
+ return std::unique_ptr<Public_Key>(new Curve25519_PublicKey(public_value()));
+ }
+
secure_vector<uint8_t> Curve25519_PrivateKey::private_key_bits() const
{
return DER_Encoder().encode(m_private, OCTET_STRING).get_contents();