diff options
Diffstat (limited to 'src/lib/prov/pkcs11/p11_ecdh.cpp')
-rw-r--r-- | src/lib/prov/pkcs11/p11_ecdh.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/prov/pkcs11/p11_ecdh.cpp b/src/lib/prov/pkcs11/p11_ecdh.cpp index bd598143a..82f09e4cd 100644 --- a/src/lib/prov/pkcs11/p11_ecdh.cpp +++ b/src/lib/prov/pkcs11/p11_ecdh.cpp @@ -32,6 +32,11 @@ ECDH_PrivateKey PKCS11_ECDH_PrivateKey::export_key() const return ECDH_PrivateKey(rng, domain(), BigInt::decode(priv_key)); } +std::unique_ptr<Public_Key> PKCS11_ECDH_PrivateKey::public_key() const + { + return std::unique_ptr<Public_Key>(new ECDH_PublicKey(domain(), public_point())); + } + secure_vector<uint8_t> PKCS11_ECDH_PrivateKey::private_key_bits() const { return export_key().private_key_bits(); |