aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-09-21 16:13:20 -0400
committerJack Lloyd <[email protected]>2017-09-21 16:13:20 -0400
commit5cd468130eb73635daf598292523df787904a47d (patch)
treee2bde06c75004e9e2958f05c5785d497e4095a26 /src/lib/pubkey
parent5d48c1406a956496fd4a020263ee59fbe7fad90a (diff)
More include header cleanups
Diffstat (limited to 'src/lib/pubkey')
-rw-r--r--src/lib/pubkey/blinding.cpp1
-rw-r--r--src/lib/pubkey/cecpq1/cecpq1.cpp1
-rw-r--r--src/lib/pubkey/dl_algo/dl_algo.h2
-rw-r--r--src/lib/pubkey/dl_group/dl_group.cpp2
-rw-r--r--src/lib/pubkey/dl_group/dl_group.h1
-rw-r--r--src/lib/pubkey/ecc_key/ecc_key.cpp1
-rw-r--r--src/lib/pubkey/ecc_key/ecc_key.h1
-rw-r--r--src/lib/pubkey/ecies/ecies.cpp1
-rw-r--r--src/lib/pubkey/ecies/ecies.h3
-rw-r--r--src/lib/pubkey/elgamal/elgamal.cpp1
-rw-r--r--src/lib/pubkey/mce/mceliece.cpp1
-rw-r--r--src/lib/pubkey/mce/polyn_gf2m.h1
-rw-r--r--src/lib/pubkey/mceies/mceies.cpp1
-rw-r--r--src/lib/pubkey/mceies/mceies.h2
-rw-r--r--src/lib/pubkey/newhope/newhope.cpp1
-rw-r--r--src/lib/pubkey/newhope/newhope.h4
-rw-r--r--src/lib/pubkey/pbes2/pbes2.cpp1
-rw-r--r--src/lib/pubkey/pbes2/pbes2.h3
-rw-r--r--src/lib/pubkey/pem/pem.cpp2
-rw-r--r--src/lib/pubkey/pem/pem.h5
-rw-r--r--src/lib/pubkey/pk_keys.h1
-rw-r--r--src/lib/pubkey/pubkey.h6
-rw-r--r--src/lib/pubkey/rsa/rsa.cpp2
-rw-r--r--src/lib/pubkey/rsa/rsa.h2
-rw-r--r--src/lib/pubkey/x509_key.cpp2
-rw-r--r--src/lib/pubkey/x509_key.h3
-rw-r--r--src/lib/pubkey/xmss/xmss_index_registry.cpp1
-rw-r--r--src/lib/pubkey/xmss/xmss_index_registry.h2
-rw-r--r--src/lib/pubkey/xmss/xmss_parameters.h1
-rw-r--r--src/lib/pubkey/xmss/xmss_privatekey.cpp2
-rw-r--r--src/lib/pubkey/xmss/xmss_signature.h1
-rw-r--r--src/lib/pubkey/xmss/xmss_wots_publickey.h1
32 files changed, 29 insertions, 30 deletions
diff --git a/src/lib/pubkey/blinding.cpp b/src/lib/pubkey/blinding.cpp
index 47436bcb0..ecd420780 100644
--- a/src/lib/pubkey/blinding.cpp
+++ b/src/lib/pubkey/blinding.cpp
@@ -6,7 +6,6 @@
*/
#include <botan/blinding.h>
-#include <botan/numthry.h>
namespace Botan {
diff --git a/src/lib/pubkey/cecpq1/cecpq1.cpp b/src/lib/pubkey/cecpq1/cecpq1.cpp
index 83c0a383c..e11a1e083 100644
--- a/src/lib/pubkey/cecpq1/cecpq1.cpp
+++ b/src/lib/pubkey/cecpq1/cecpq1.cpp
@@ -8,6 +8,7 @@
#include <botan/cecpq1.h>
#include <botan/newhope.h>
#include <botan/curve25519.h>
+#include <botan/rng.h>
namespace Botan {
diff --git a/src/lib/pubkey/dl_algo/dl_algo.h b/src/lib/pubkey/dl_algo/dl_algo.h
index a0a898bca..52b38a529 100644
--- a/src/lib/pubkey/dl_algo/dl_algo.h
+++ b/src/lib/pubkey/dl_algo/dl_algo.h
@@ -9,7 +9,7 @@
#define BOTAN_DL_ALGO_H_
#include <botan/dl_group.h>
-#include <botan/x509_key.h>
+#include <botan/pk_keys.h>
namespace Botan {
diff --git a/src/lib/pubkey/dl_group/dl_group.cpp b/src/lib/pubkey/dl_group/dl_group.cpp
index 6d7f0b107..ea47c71a1 100644
--- a/src/lib/pubkey/dl_group/dl_group.cpp
+++ b/src/lib/pubkey/dl_group/dl_group.cpp
@@ -6,13 +6,11 @@
*/
#include <botan/dl_group.h>
-#include <botan/parsing.h>
#include <botan/numthry.h>
#include <botan/der_enc.h>
#include <botan/ber_dec.h>
#include <botan/pem.h>
#include <botan/workfactor.h>
-#include <botan/pow_mod.h>
namespace Botan {
diff --git a/src/lib/pubkey/dl_group/dl_group.h b/src/lib/pubkey/dl_group/dl_group.h
index 5bd28bc27..4ec9962d7 100644
--- a/src/lib/pubkey/dl_group/dl_group.h
+++ b/src/lib/pubkey/dl_group/dl_group.h
@@ -9,7 +9,6 @@
#define BOTAN_DL_PARAM_H_
#include <botan/bigint.h>
-#include <botan/data_src.h>
namespace Botan {
diff --git a/src/lib/pubkey/ecc_key/ecc_key.cpp b/src/lib/pubkey/ecc_key/ecc_key.cpp
index 7274a3cd9..962cd3f45 100644
--- a/src/lib/pubkey/ecc_key/ecc_key.cpp
+++ b/src/lib/pubkey/ecc_key/ecc_key.cpp
@@ -8,7 +8,6 @@
*/
#include <botan/ecc_key.h>
-#include <botan/x509_key.h>
#include <botan/numthry.h>
#include <botan/der_enc.h>
#include <botan/ber_dec.h>
diff --git a/src/lib/pubkey/ecc_key/ecc_key.h b/src/lib/pubkey/ecc_key/ecc_key.h
index c189b38b6..427be56ef 100644
--- a/src/lib/pubkey/ecc_key/ecc_key.h
+++ b/src/lib/pubkey/ecc_key/ecc_key.h
@@ -12,7 +12,6 @@
#include <botan/ec_group.h>
#include <botan/pk_keys.h>
-#include <botan/x509_key.h>
namespace Botan {
diff --git a/src/lib/pubkey/ecies/ecies.cpp b/src/lib/pubkey/ecies/ecies.cpp
index d1edf058c..e295efbef 100644
--- a/src/lib/pubkey/ecies/ecies.cpp
+++ b/src/lib/pubkey/ecies/ecies.cpp
@@ -9,6 +9,7 @@
#include <botan/ecies.h>
#include <botan/numthry.h>
#include <botan/cipher_mode.h>
+#include <botan/mac.h>
#include <botan/internal/ct_utils.h>
#include <botan/internal/pk_ops_impl.h>
diff --git a/src/lib/pubkey/ecies/ecies.h b/src/lib/pubkey/ecies/ecies.h
index 0e3229cdc..382147db2 100644
--- a/src/lib/pubkey/ecies/ecies.h
+++ b/src/lib/pubkey/ecies/ecies.h
@@ -10,9 +10,7 @@
#include <botan/ecdh.h>
#include <botan/ec_group.h>
-#include <botan/kdf.h>
#include <botan/cipher_mode.h>
-#include <botan/mac.h>
#include <botan/point_gfp.h>
#include <botan/pubkey.h>
#include <botan/secmem.h>
@@ -24,6 +22,7 @@
namespace Botan {
+class MessageAuthenticationCode;
class RandomNumberGenerator;
enum class ECIES_Flags : uint32_t
diff --git a/src/lib/pubkey/elgamal/elgamal.cpp b/src/lib/pubkey/elgamal/elgamal.cpp
index b7ce643f1..5a3f19362 100644
--- a/src/lib/pubkey/elgamal/elgamal.cpp
+++ b/src/lib/pubkey/elgamal/elgamal.cpp
@@ -11,6 +11,7 @@
#include <botan/reducer.h>
#include <botan/blinding.h>
#include <botan/workfactor.h>
+#include <botan/pow_mod.h>
namespace Botan {
diff --git a/src/lib/pubkey/mce/mceliece.cpp b/src/lib/pubkey/mce/mceliece.cpp
index fd985c032..a68ae2a16 100644
--- a/src/lib/pubkey/mce/mceliece.cpp
+++ b/src/lib/pubkey/mce/mceliece.cpp
@@ -13,7 +13,6 @@
#include <botan/mceliece.h>
#include <botan/internal/code_based_util.h>
#include <botan/internal/bit_ops.h>
-#include <set>
namespace Botan {
diff --git a/src/lib/pubkey/mce/polyn_gf2m.h b/src/lib/pubkey/mce/polyn_gf2m.h
index 08d1fc98a..987e1cffe 100644
--- a/src/lib/pubkey/mce/polyn_gf2m.h
+++ b/src/lib/pubkey/mce/polyn_gf2m.h
@@ -14,7 +14,6 @@
#include <botan/secmem.h>
#include <botan/gf2m_small_m.h>
-#include <memory>
#include <utility>
namespace Botan {
diff --git a/src/lib/pubkey/mceies/mceies.cpp b/src/lib/pubkey/mceies/mceies.cpp
index e50df3156..3cdb9a6f8 100644
--- a/src/lib/pubkey/mceies/mceies.cpp
+++ b/src/lib/pubkey/mceies/mceies.cpp
@@ -7,6 +7,7 @@
#include <botan/mceies.h>
#include <botan/aead.h>
+#include <botan/rng.h>
#include <botan/mceliece.h>
#include <botan/pubkey.h>
diff --git a/src/lib/pubkey/mceies/mceies.h b/src/lib/pubkey/mceies/mceies.h
index ca920a7ab..85ec5b618 100644
--- a/src/lib/pubkey/mceies/mceies.h
+++ b/src/lib/pubkey/mceies/mceies.h
@@ -9,10 +9,10 @@
#define BOTAN_MCEIES_H_
#include <botan/secmem.h>
-#include <botan/rng.h>
namespace Botan {
+class RandomNumberGenerator;
class McEliece_PublicKey;
class McEliece_PrivateKey;
diff --git a/src/lib/pubkey/newhope/newhope.cpp b/src/lib/pubkey/newhope/newhope.cpp
index 69ea3d6d3..b5d841144 100644
--- a/src/lib/pubkey/newhope/newhope.cpp
+++ b/src/lib/pubkey/newhope/newhope.cpp
@@ -11,6 +11,7 @@
#include <botan/newhope.h>
#include <botan/hash.h>
+#include <botan/rng.h>
#include <botan/stream_cipher.h>
#include <botan/loadstor.h>
diff --git a/src/lib/pubkey/newhope/newhope.h b/src/lib/pubkey/newhope/newhope.h
index 12b7f2e48..070652db9 100644
--- a/src/lib/pubkey/newhope/newhope.h
+++ b/src/lib/pubkey/newhope/newhope.h
@@ -12,10 +12,12 @@
#ifndef BOTAN_NEWHOPE_H_
#define BOTAN_NEWHOPE_H_
-#include <botan/rng.h>
+#include <botan/mem_ops.h>
namespace Botan {
+class RandomNumberGenerator;
+
/*
* WARNING: This API is preliminary and will change
* Currently pubkey.h does not support a 2-phase KEM scheme of
diff --git a/src/lib/pubkey/pbes2/pbes2.cpp b/src/lib/pubkey/pbes2/pbes2.cpp
index 6bc7a23c3..41d18a86d 100644
--- a/src/lib/pubkey/pbes2/pbes2.cpp
+++ b/src/lib/pubkey/pbes2/pbes2.cpp
@@ -14,7 +14,6 @@
#include <botan/alg_id.h>
#include <botan/oids.h>
#include <botan/rng.h>
-#include <algorithm>
namespace Botan {
diff --git a/src/lib/pubkey/pbes2/pbes2.h b/src/lib/pubkey/pbes2/pbes2.h
index 0138d1bf3..bc56abd97 100644
--- a/src/lib/pubkey/pbes2/pbes2.h
+++ b/src/lib/pubkey/pbes2/pbes2.h
@@ -8,12 +8,13 @@
#ifndef BOTAN_PBE_PKCS_v20_H_
#define BOTAN_PBE_PKCS_v20_H_
-#include <botan/rng.h>
#include <botan/alg_id.h>
#include <chrono>
namespace Botan {
+class RandomNumberGenerator;
+
/**
* Encrypt with PBES2 from PKCS #5 v2.0
* @param key_bits the input
diff --git a/src/lib/pubkey/pem/pem.cpp b/src/lib/pubkey/pem/pem.cpp
index bc94e3b53..1303e4ac2 100644
--- a/src/lib/pubkey/pem/pem.cpp
+++ b/src/lib/pubkey/pem/pem.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/pem.h>
+#include <botan/data_src.h>
#include <botan/base64.h>
-#include <botan/parsing.h>
#include <botan/exceptn.h>
namespace Botan {
diff --git a/src/lib/pubkey/pem/pem.h b/src/lib/pubkey/pem/pem.h
index 8be93c0f9..b2b27282d 100644
--- a/src/lib/pubkey/pem/pem.h
+++ b/src/lib/pubkey/pem/pem.h
@@ -8,10 +8,13 @@
#ifndef BOTAN_PEM_H_
#define BOTAN_PEM_H_
-#include <botan/data_src.h>
+#include <botan/secmem.h>
+#include <string>
namespace Botan {
+class DataSource;
+
namespace PEM_Code {
/**
diff --git a/src/lib/pubkey/pk_keys.h b/src/lib/pubkey/pk_keys.h
index 1d7d1f2b5..f513cea6c 100644
--- a/src/lib/pubkey/pk_keys.h
+++ b/src/lib/pubkey/pk_keys.h
@@ -11,7 +11,6 @@
#include <botan/secmem.h>
#include <botan/asn1_oid.h>
#include <botan/alg_id.h>
-#include <botan/rng.h>
#include <botan/pk_ops_fwd.h>
namespace Botan {
diff --git a/src/lib/pubkey/pubkey.h b/src/lib/pubkey/pubkey.h
index 366acea65..bfe94509e 100644
--- a/src/lib/pubkey/pubkey.h
+++ b/src/lib/pubkey/pubkey.h
@@ -11,10 +11,6 @@
#include <botan/pk_keys.h>
#include <botan/pk_ops_fwd.h>
#include <botan/symkey.h>
-#include <botan/rng.h>
-#include <botan/eme.h>
-#include <botan/emsa.h>
-#include <botan/kdf.h>
#if defined(BOTAN_HAS_SYSTEM_RNG)
#include <botan/system_rng.h>
@@ -23,6 +19,8 @@
namespace Botan {
+class RandomNumberGenerator;
+
/**
* The two types of signature format supported by Botan.
*/
diff --git a/src/lib/pubkey/rsa/rsa.cpp b/src/lib/pubkey/rsa/rsa.cpp
index 7d48fd814..cafe6b069 100644
--- a/src/lib/pubkey/rsa/rsa.cpp
+++ b/src/lib/pubkey/rsa/rsa.cpp
@@ -7,13 +7,13 @@
#include <botan/rsa.h>
#include <botan/internal/pk_ops_impl.h>
-#include <botan/parsing.h>
#include <botan/keypair.h>
#include <botan/blinding.h>
#include <botan/reducer.h>
#include <botan/workfactor.h>
#include <botan/der_enc.h>
#include <botan/ber_dec.h>
+#include <botan/pow_mod.h>
#if defined(BOTAN_HAS_OPENSSL)
#include <botan/internal/openssl.h>
diff --git a/src/lib/pubkey/rsa/rsa.h b/src/lib/pubkey/rsa/rsa.h
index 0525e21ac..09c945c82 100644
--- a/src/lib/pubkey/rsa/rsa.h
+++ b/src/lib/pubkey/rsa/rsa.h
@@ -8,8 +8,8 @@
#ifndef BOTAN_RSA_H_
#define BOTAN_RSA_H_
+#include <botan/pk_keys.h>
#include <botan/bigint.h>
-#include <botan/x509_key.h>
namespace Botan {
diff --git a/src/lib/pubkey/x509_key.cpp b/src/lib/pubkey/x509_key.cpp
index 6fadeb70d..6e49d953a 100644
--- a/src/lib/pubkey/x509_key.cpp
+++ b/src/lib/pubkey/x509_key.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/x509_key.h>
-#include <botan/der_enc.h>
+#include <botan/data_src.h>
#include <botan/ber_dec.h>
#include <botan/pem.h>
#include <botan/alg_id.h>
diff --git a/src/lib/pubkey/x509_key.h b/src/lib/pubkey/x509_key.h
index 323ff5a01..b562208aa 100644
--- a/src/lib/pubkey/x509_key.h
+++ b/src/lib/pubkey/x509_key.h
@@ -10,11 +10,12 @@
#include <botan/pk_keys.h>
#include <botan/alg_id.h>
-#include <botan/data_src.h>
#include <string>
namespace Botan {
+class DataSource;
+
/**
* The two types of X509 encoding supported by Botan.
*/
diff --git a/src/lib/pubkey/xmss/xmss_index_registry.cpp b/src/lib/pubkey/xmss/xmss_index_registry.cpp
index 530d926c4..6a0995868 100644
--- a/src/lib/pubkey/xmss/xmss_index_registry.cpp
+++ b/src/lib/pubkey/xmss/xmss_index_registry.cpp
@@ -8,6 +8,7 @@
**/
#include <botan/xmss_index_registry.h>
+#include <botan/hash.h>
#include <limits>
namespace Botan {
diff --git a/src/lib/pubkey/xmss/xmss_index_registry.h b/src/lib/pubkey/xmss/xmss_index_registry.h
index 88dfb7517..d7448693a 100644
--- a/src/lib/pubkey/xmss/xmss_index_registry.h
+++ b/src/lib/pubkey/xmss/xmss_index_registry.h
@@ -8,7 +8,7 @@
#ifndef BOTAN_XMSS_INDEX_REGISTRY_H_
#define BOTAN_XMSS_INDEX_REGISTRY_H_
-#include <botan/hash.h>
+#include <botan/secmem.h>
#include <botan/atomic.h>
#include <botan/mutex.h>
diff --git a/src/lib/pubkey/xmss/xmss_parameters.h b/src/lib/pubkey/xmss/xmss_parameters.h
index a2f763d97..3e59634f4 100644
--- a/src/lib/pubkey/xmss/xmss_parameters.h
+++ b/src/lib/pubkey/xmss/xmss_parameters.h
@@ -10,7 +10,6 @@
#include <botan/xmss_wots_parameters.h>
#include <string>
-#include <map>
namespace Botan {
diff --git a/src/lib/pubkey/xmss/xmss_privatekey.cpp b/src/lib/pubkey/xmss/xmss_privatekey.cpp
index 753893c8c..0cb167f61 100644
--- a/src/lib/pubkey/xmss/xmss_privatekey.cpp
+++ b/src/lib/pubkey/xmss/xmss_privatekey.cpp
@@ -15,8 +15,8 @@
* Botan is released under the Simplified BSD License (see license.txt)
**/
-#include <botan/internal/xmss_signature_operation.h>
#include <botan/xmss_privatekey.h>
+#include <botan/internal/xmss_signature_operation.h>
#include <cmath>
namespace Botan {
diff --git a/src/lib/pubkey/xmss/xmss_signature.h b/src/lib/pubkey/xmss/xmss_signature.h
index ce8ed6d9b..493697d51 100644
--- a/src/lib/pubkey/xmss/xmss_signature.h
+++ b/src/lib/pubkey/xmss/xmss_signature.h
@@ -9,7 +9,6 @@
#define BOTAN_XMSS_SIGNATURE_H_
#include <cstddef>
-#include <iterator>
#include <botan/exceptn.h>
#include <botan/types.h>
#include <botan/secmem.h>
diff --git a/src/lib/pubkey/xmss/xmss_wots_publickey.h b/src/lib/pubkey/xmss/xmss_wots_publickey.h
index 86b4bc803..57009154b 100644
--- a/src/lib/pubkey/xmss/xmss_wots_publickey.h
+++ b/src/lib/pubkey/xmss/xmss_wots_publickey.h
@@ -12,6 +12,7 @@
#include <string>
#include <vector>
#include <botan/alg_id.h>
+#include <botan/rng.h>
#include <botan/asn1_oid.h>
#include <botan/exceptn.h>
#include <botan/pk_keys.h>