aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2020-11-11 19:53:06 -0500
committerJack Lloyd <[email protected]>2020-11-11 19:53:06 -0500
commit5796f12e1a4bf003d9cbb817876b9ad9c196e464 (patch)
tree1f5e75339904072534f5c4f48ec925c687886a9a /src
parentebbf4467fd5522bb096289208e635618f1f7396e (diff)
parentf05aea8dbf390ba5aeb66c1c5c79c9731563d0c5 (diff)
Merge GH #2487 Make polyn_gf2m.h internal
Diffstat (limited to 'src')
-rw-r--r--src/lib/pubkey/mce/code_based_key_gen.cpp2
-rw-r--r--src/lib/pubkey/mce/gf2m_rootfind_dcmp.cpp2
-rw-r--r--src/lib/pubkey/mce/info.txt2
-rw-r--r--src/lib/pubkey/mce/mce_internal.h6
-rw-r--r--src/lib/pubkey/mce/mceliece.h6
-rw-r--r--src/lib/pubkey/mce/mceliece_key.cpp7
-rw-r--r--src/lib/pubkey/mce/polyn_gf2m.cpp2
-rw-r--r--src/lib/pubkey/mce/polyn_gf2m.h3
8 files changed, 17 insertions, 13 deletions
diff --git a/src/lib/pubkey/mce/code_based_key_gen.cpp b/src/lib/pubkey/mce/code_based_key_gen.cpp
index 9167a2339..fde9b4b38 100644
--- a/src/lib/pubkey/mce/code_based_key_gen.cpp
+++ b/src/lib/pubkey/mce/code_based_key_gen.cpp
@@ -14,7 +14,7 @@
#include <botan/internal/mce_internal.h>
#include <botan/internal/code_based_util.h>
#include <botan/internal/loadstor.h>
-#include <botan/polyn_gf2m.h>
+#include <botan/internal/polyn_gf2m.h>
namespace Botan {
diff --git a/src/lib/pubkey/mce/gf2m_rootfind_dcmp.cpp b/src/lib/pubkey/mce/gf2m_rootfind_dcmp.cpp
index 5fd88f3d7..409393562 100644
--- a/src/lib/pubkey/mce/gf2m_rootfind_dcmp.cpp
+++ b/src/lib/pubkey/mce/gf2m_rootfind_dcmp.cpp
@@ -6,7 +6,7 @@
*
*/
-#include <botan/polyn_gf2m.h>
+#include <botan/internal/polyn_gf2m.h>
#include <botan/internal/bit_ops.h>
#include <botan/internal/code_based_util.h>
#include <botan/exceptn.h>
diff --git a/src/lib/pubkey/mce/info.txt b/src/lib/pubkey/mce/info.txt
index 6a5577bfa..6a0e4a127 100644
--- a/src/lib/pubkey/mce/info.txt
+++ b/src/lib/pubkey/mce/info.txt
@@ -4,13 +4,13 @@ MCELIECE -> 20150922
<header:public>
mceliece.h
-polyn_gf2m.h
</header:public>
<header:internal>
gf2m_small_m.h
code_based_util.h
mce_internal.h
+polyn_gf2m.h
</header:internal>
<requires>
diff --git a/src/lib/pubkey/mce/mce_internal.h b/src/lib/pubkey/mce/mce_internal.h
index e0e0fce0e..875dc95ff 100644
--- a/src/lib/pubkey/mce/mce_internal.h
+++ b/src/lib/pubkey/mce/mce_internal.h
@@ -12,11 +12,9 @@
#ifndef BOTAN_MCELIECE_INTERNAL_H_
#define BOTAN_MCELIECE_INTERNAL_H_
-#include <botan/secmem.h>
-#include <botan/types.h>
-#include <botan/internal/pk_ops.h>
#include <botan/mceliece.h>
-#include <botan/polyn_gf2m.h>
+#include <botan/internal/pk_ops.h>
+#include <botan/internal/polyn_gf2m.h>
namespace Botan {
diff --git a/src/lib/pubkey/mce/mceliece.h b/src/lib/pubkey/mce/mceliece.h
index ba044ef7d..255898b63 100644
--- a/src/lib/pubkey/mce/mceliece.h
+++ b/src/lib/pubkey/mce/mceliece.h
@@ -13,7 +13,6 @@
#define BOTAN_MCELIECE_KEY_H_
#include <botan/pk_keys.h>
-#include <botan/polyn_gf2m.h>
namespace Botan {
@@ -99,6 +98,11 @@ class BOTAN_PUBLIC_API(2,0) McEliece_PrivateKey final : public virtual McEliece_
~McEliece_PrivateKey();
+ McEliece_PrivateKey(const McEliece_PrivateKey&);
+ McEliece_PrivateKey(McEliece_PrivateKey&&);
+ McEliece_PrivateKey& operator=(const McEliece_PrivateKey&);
+ McEliece_PrivateKey& operator=(McEliece_PrivateKey&&);
+
bool check_key(RandomNumberGenerator& rng, bool strong) const override;
polyn_gf2m const& get_goppa_polyn() const;
diff --git a/src/lib/pubkey/mce/mceliece_key.cpp b/src/lib/pubkey/mce/mceliece_key.cpp
index bca7625db..9db90112f 100644
--- a/src/lib/pubkey/mce/mceliece_key.cpp
+++ b/src/lib/pubkey/mce/mceliece_key.cpp
@@ -11,7 +11,7 @@
*/
#include <botan/mceliece.h>
-#include <botan/polyn_gf2m.h>
+#include <botan/internal/polyn_gf2m.h>
#include <botan/internal/mce_internal.h>
#include <botan/internal/bit_ops.h>
#include <botan/internal/code_based_util.h>
@@ -23,6 +23,11 @@
namespace Botan {
+McEliece_PrivateKey::McEliece_PrivateKey(const McEliece_PrivateKey&) = default;
+McEliece_PrivateKey::McEliece_PrivateKey(McEliece_PrivateKey&&) = default;
+McEliece_PrivateKey& McEliece_PrivateKey::operator=(const McEliece_PrivateKey&) = default;
+McEliece_PrivateKey& McEliece_PrivateKey::operator=(McEliece_PrivateKey&&) = default;
+
McEliece_PrivateKey::McEliece_PrivateKey(polyn_gf2m const& goppa_polyn,
std::vector<uint32_t> const& parity_check_matrix_coeffs,
std::vector<polyn_gf2m> const& square_root_matrix,
diff --git a/src/lib/pubkey/mce/polyn_gf2m.cpp b/src/lib/pubkey/mce/polyn_gf2m.cpp
index 4b4bf3526..dcaaa6a29 100644
--- a/src/lib/pubkey/mce/polyn_gf2m.cpp
+++ b/src/lib/pubkey/mce/polyn_gf2m.cpp
@@ -10,7 +10,7 @@
*
*/
-#include <botan/polyn_gf2m.h>
+#include <botan/internal/polyn_gf2m.h>
#include <botan/internal/code_based_util.h>
#include <botan/internal/bit_ops.h>
#include <botan/rng.h>
diff --git a/src/lib/pubkey/mce/polyn_gf2m.h b/src/lib/pubkey/mce/polyn_gf2m.h
index 0f9bf07f9..f3827ee39 100644
--- a/src/lib/pubkey/mce/polyn_gf2m.h
+++ b/src/lib/pubkey/mce/polyn_gf2m.h
@@ -16,9 +16,6 @@
#include <utility>
#include <string>
-// Currently must be visible for MSVC
-//BOTAN_FUTURE_INTERNAL_HEADER(polyn_gf2m.h)
-
namespace Botan {
typedef uint16_t gf2m;