aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/mce/mceliece_key.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/pubkey/mce/mceliece_key.cpp')
-rw-r--r--src/lib/pubkey/mce/mceliece_key.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/pubkey/mce/mceliece_key.cpp b/src/lib/pubkey/mce/mceliece_key.cpp
index 9db90112f..f0bd8e61d 100644
--- a/src/lib/pubkey/mce/mceliece_key.cpp
+++ b/src/lib/pubkey/mce/mceliece_key.cpp
@@ -292,6 +292,13 @@ bool McEliece_PrivateKey::operator==(const McEliece_PrivateKey & other) const
return true;
}
+std::unique_ptr<Public_Key> McEliece_PrivateKey::public_key() const
+ {
+ return std::unique_ptr<Public_Key>(new McEliece_PublicKey(
+ get_public_matrix(),
+ get_t(), get_code_length()));
+ }
+
bool McEliece_PublicKey::operator==(const McEliece_PublicKey& other) const
{
if(m_public_matrix != other.m_public_matrix)