aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-12-16 02:52:12 +0000
committerlloyd <[email protected]>2009-12-16 02:52:12 +0000
commit317b76d71dca1840c9e72f9a26407590719c1423 (patch)
tree2eb49072e6e27f6ee41e704004aa8689b1e98bb3 /src
parent457ce43934a4e51ead4d21e43013eef9d448d0e1 (diff)
parent12afeca214c4414a0ced0bc4654d0fc5908dc77b (diff)
propagate from branch 'net.randombit.botan' (head 744dccf92270cf16b80b50ee2759424c9866b256)
to branch 'net.randombit.botan.c++0x' (head 2aa1acac1d05e8ea9991fe39015b1db9abc3b24e)
Diffstat (limited to 'src')
-rw-r--r--src/algo_factory/algo_factory.cpp4
-rw-r--r--src/algo_factory/info.txt12
-rw-r--r--src/algo_factory/prov_weight.cpp2
-rw-r--r--src/alloc/alloc_mmap/info.txt8
-rw-r--r--src/alloc/alloc_mmap/mmap_mem.cpp4
-rw-r--r--src/alloc/alloc_mmap/mmap_mem.h4
-rw-r--r--src/alloc/info.txt6
-rw-r--r--src/alloc/mem_pool/info.txt8
-rw-r--r--src/alloc/mem_pool/mem_pool.cpp4
-rw-r--r--src/alloc/mem_pool/mem_pool.h4
-rw-r--r--src/alloc/system_alloc/defalloc.cpp4
-rw-r--r--src/alloc/system_alloc/defalloc.h6
-rw-r--r--src/alloc/system_alloc/info.txt8
-rw-r--r--src/asn1/asn1_alt.cpp4
-rw-r--r--src/asn1/asn1_dn.cpp2
-rw-r--r--src/asn1/asn1_oid.cpp2
-rw-r--r--src/asn1/ber_dec.cpp2
-rw-r--r--src/asn1/der_enc.cpp4
-rw-r--r--src/asn1/info.txt7
-rw-r--r--src/benchmark/info.txt7
-rw-r--r--src/block/aes/aes.cpp2
-rw-r--r--src/block/aes_intel/aes_intel.cpp2
-rw-r--r--src/block/blowfish/blowfish.cpp2
-rw-r--r--src/block/cast/cast128.cpp4
-rw-r--r--src/block/cast/cast256.cpp4
-rw-r--r--src/block/des/des.cpp2
-rw-r--r--src/block/des/desx.cpp2
-rw-r--r--src/block/gost_28147/gost_28147.cpp2
-rw-r--r--src/block/idea/idea.cpp2
-rw-r--r--src/block/kasumi/kasumi.cpp4
-rw-r--r--src/block/lion/lion.cpp2
-rw-r--r--src/block/lubyrack/lubyrack.cpp2
-rw-r--r--src/block/mars/mars.cpp4
-rw-r--r--src/block/misty1/misty1.cpp2
-rw-r--r--src/block/noekeon/noekeon.cpp4
-rw-r--r--src/block/rc2/rc2.cpp4
-rw-r--r--src/block/rc5/rc5.cpp4
-rw-r--r--src/block/rc6/rc6.cpp4
-rw-r--r--src/block/safer/safer_sk.cpp4
-rw-r--r--src/block/seed/seed.cpp2
-rw-r--r--src/block/serpent/serpent.cpp8
-rw-r--r--src/block/serpent_ia32/serp_ia32.cpp2
-rw-r--r--src/block/serpent_ia32/serp_ia32_imp.S2
-rw-r--r--src/block/serpent_simd/info.txt12
-rw-r--r--src/block/serpent_simd/serp_simd.cpp10
-rw-r--r--src/block/skipjack/skipjack.cpp2
-rw-r--r--src/block/square/square.cpp4
-rw-r--r--src/block/tea/tea.cpp2
-rw-r--r--src/block/twofish/twofish.cpp4
-rw-r--r--src/block/xtea/xtea.cpp2
-rw-r--r--src/block/xtea_simd/info.txt7
-rw-r--r--src/block/xtea_simd/xtea_simd.cpp4
-rw-r--r--src/build-data/cc/gcc.txt4
-rw-r--r--src/cert/cvc/asn1_eac_tm.cpp2
-rw-r--r--src/cert/cvc/cvc_gen_cert.h1
-rw-r--r--src/cert/cvc/cvc_self.h75
-rw-r--r--src/cert/cvc/eac_asn_obj.h16
-rw-r--r--src/cert/cvc/info.txt29
-rw-r--r--src/cert/x509/info.txt27
-rw-r--r--src/cert/x509/x509_crl.h2
-rw-r--r--src/cert/x509/x509_ext.cpp2
-rw-r--r--src/cert/x509/x509cert.cpp2
-rw-r--r--src/checksum/adler32/adler32.cpp2
-rw-r--r--src/checksum/adler32/info.txt7
-rw-r--r--src/checksum/crc24/crc24.cpp2
-rw-r--r--src/checksum/crc24/info.txt7
-rw-r--r--src/checksum/crc32/crc32.cpp2
-rw-r--r--src/checksum/crc32/info.txt7
-rw-r--r--src/cms/info.txt13
-rw-r--r--src/codec/pem/info.txt7
-rw-r--r--src/constructs/aont/info.txt7
-rw-r--r--src/constructs/aont/package.cpp4
-rw-r--r--src/constructs/cryptobox/cryptobox.cpp2
-rw-r--r--src/constructs/cryptobox/info.txt7
-rw-r--r--src/constructs/fpe/fpe.cpp2
-rw-r--r--src/constructs/fpe/info.txt10
-rw-r--r--src/constructs/tss/tss.cpp2
-rw-r--r--src/engine/amd64_eng/info.txt5
-rw-r--r--src/engine/def_engine/info.txt9
-rw-r--r--src/engine/gnump/info.txt12
-rw-r--r--src/engine/ia32_eng/info.txt5
-rw-r--r--src/engine/info.txt6
-rw-r--r--src/engine/openssl/info.txt14
-rw-r--r--src/engine/simd_engine/simd_engine.cpp2
-rw-r--r--src/entropy/beos_stats/info.txt8
-rw-r--r--src/entropy/cryptoapi_rng/info.txt8
-rw-r--r--src/entropy/dev_random/dev_random.cpp (renamed from src/entropy/dev_random/es_dev.cpp)2
-rw-r--r--src/entropy/dev_random/dev_random.h (renamed from src/entropy/dev_random/es_dev.h)2
-rw-r--r--src/entropy/dev_random/info.txt10
-rw-r--r--src/entropy/egd/es_egd.cpp2
-rw-r--r--src/entropy/egd/es_egd.h2
-rw-r--r--src/entropy/egd/info.txt8
-rw-r--r--src/entropy/hres_timer/hres_timer.cpp2
-rw-r--r--src/entropy/hres_timer/hres_timer.h2
-rw-r--r--src/entropy/hres_timer/info.txt8
-rw-r--r--src/entropy/info.txt6
-rw-r--r--src/entropy/proc_walk/es_ftw.cpp2
-rw-r--r--src/entropy/proc_walk/es_ftw.h2
-rw-r--r--src/entropy/proc_walk/info.txt8
-rw-r--r--src/entropy/unix_procs/es_unix.cpp4
-rw-r--r--src/entropy/unix_procs/es_unix.h4
-rw-r--r--src/entropy/unix_procs/info.txt11
-rw-r--r--src/entropy/unix_procs/unix_cmd.cpp2
-rw-r--r--src/entropy/unix_procs/unix_cmd.h2
-rw-r--r--src/entropy/unix_procs/unix_src.cpp2
-rw-r--r--src/entropy/win32_stats/info.txt8
-rw-r--r--src/filters/base64/info.txt8
-rw-r--r--src/filters/filter.cpp2
-rw-r--r--src/filters/hex/info.txt8
-rw-r--r--src/filters/info.txt31
-rw-r--r--src/filters/modes/cbc/cbc.cpp2
-rw-r--r--src/filters/modes/cbc/info.txt7
-rw-r--r--src/filters/modes/cfb/cfb.cpp2
-rw-r--r--src/filters/modes/cfb/info.txt11
-rw-r--r--src/filters/modes/cts/cts.cpp2
-rw-r--r--src/filters/modes/cts/info.txt11
-rw-r--r--src/filters/modes/eax/eax.cpp2
-rw-r--r--src/filters/modes/eax/eax_dec.cpp2
-rw-r--r--src/filters/modes/eax/info.txt11
-rw-r--r--src/filters/modes/ecb/info.txt8
-rw-r--r--src/filters/modes/info.txt7
-rw-r--r--src/filters/modes/mode_pad/info.txt7
-rw-r--r--src/filters/modes/xts/info.txt12
-rw-r--r--src/filters/modes/xts/xts.cpp2
-rw-r--r--src/filters/out_buf.cpp4
-rw-r--r--src/filters/out_buf.h2
-rw-r--r--src/filters/pipe.cpp4
-rw-r--r--src/filters/pipe.h4
-rw-r--r--src/filters/pipe_rw.cpp4
-rw-r--r--src/filters/secqueue.cpp2
-rw-r--r--src/filters/secqueue.h2
-rw-r--r--src/hash/bmw/bmw_512.cpp4
-rw-r--r--src/hash/fork256/fork256.cpp4
-rw-r--r--src/hash/gost_3411/gost_3411.cpp6
-rw-r--r--src/hash/has160/has160.cpp8
-rw-r--r--src/hash/info.txt6
-rw-r--r--src/hash/md2/md2.cpp2
-rw-r--r--src/hash/md4/md4.cpp4
-rw-r--r--src/hash/md4_ia32/md4_ia32.cpp2
-rw-r--r--src/hash/md4_ia32/md4_ia32_imp.S2
-rw-r--r--src/hash/md5/md5.cpp4
-rw-r--r--src/hash/md5_ia32/md5_ia32.cpp2
-rw-r--r--src/hash/md5_ia32/md5_ia32_imp.S2
-rw-r--r--src/hash/mdx_hash/mdx_hash.cpp2
-rw-r--r--src/hash/rmd128/rmd128.cpp8
-rw-r--r--src/hash/rmd160/rmd160.cpp4
-rw-r--r--src/hash/sha1/sha160.cpp4
-rw-r--r--src/hash/sha1_amd64/sha1_amd64_imp.S2
-rw-r--r--src/hash/sha1_ia32/sha1_ia32.cpp2
-rw-r--r--src/hash/sha1_ia32/sha1_ia32_imp.S2
-rw-r--r--src/hash/sha1_sse2/sha1_sse2.cpp2
-rw-r--r--src/hash/sha2/sha2_32.cpp4
-rw-r--r--src/hash/sha2/sha2_64.cpp4
-rw-r--r--src/hash/skein/skein_512.cpp2
-rw-r--r--src/hash/tiger/tiger.cpp2
-rw-r--r--src/hash/whirlpool/whrlpool.cpp2
-rw-r--r--src/kdf/info.txt7
-rw-r--r--src/kdf/kdf1/info.txt7
-rw-r--r--src/kdf/kdf2/info.txt7
-rw-r--r--src/kdf/kdf2/kdf2.cpp2
-rw-r--r--src/kdf/mgf1/info.txt7
-rw-r--r--src/kdf/mgf1/mgf1.cpp4
-rw-r--r--src/kdf/ssl_prf/info.txt7
-rw-r--r--src/kdf/tls_prf/info.txt8
-rw-r--r--src/kdf/tls_prf/prf_tls.cpp2
-rw-r--r--src/kdf/x942_prf/info.txt7
-rw-r--r--src/kdf/x942_prf/prf_x942.cpp2
-rw-r--r--src/libstate/info.txt19
-rw-r--r--src/libstate/libstate.cpp2
-rw-r--r--src/libstate/oid_lookup/info.txt7
-rw-r--r--src/libstate/scan_name.cpp2
-rw-r--r--src/mac/cbc_mac/cbc_mac.cpp2
-rw-r--r--src/mac/cbc_mac/info.txt7
-rw-r--r--src/mac/cmac/cmac.cpp2
-rw-r--r--src/mac/cmac/info.txt7
-rw-r--r--src/mac/hmac/hmac.cpp2
-rw-r--r--src/mac/hmac/info.txt7
-rw-r--r--src/mac/info.txt7
-rw-r--r--src/mac/ssl3mac/info.txt7
-rw-r--r--src/mac/x919_mac/info.txt7
-rw-r--r--src/mac/x919_mac/x919_mac.cpp2
-rw-r--r--src/math/bigint/big_ops2.cpp4
-rw-r--r--src/math/bigint/big_ops3.cpp4
-rw-r--r--src/math/bigint/bigint.cpp6
-rw-r--r--src/math/bigint/bigint.h2
-rw-r--r--src/math/bigint/divide.cpp2
-rw-r--r--src/math/bigint/info.txt12
-rw-r--r--src/math/bigint/monty_amd64/info.txt4
-rw-r--r--src/math/bigint/monty_amd64/mp_monty.S2
-rw-r--r--src/math/bigint/monty_generic/info.txt4
-rw-r--r--src/math/bigint/monty_generic/mp_monty.cpp6
-rw-r--r--src/math/bigint/mp_amd64/info.txt8
-rw-r--r--src/math/bigint/mp_amd64/mp_asmi.h2
-rw-r--r--src/math/bigint/mp_asm.cpp6
-rw-r--r--src/math/bigint/mp_asm64/info.txt4
-rw-r--r--src/math/bigint/mp_comba.cpp4
-rw-r--r--src/math/bigint/mp_generic/info.txt4
-rw-r--r--src/math/bigint/mp_generic/mp_asmi.h2
-rw-r--r--src/math/bigint/mp_ia32/info.txt8
-rw-r--r--src/math/bigint/mp_ia32/mp_asmi.h2
-rw-r--r--src/math/bigint/mp_ia32_msvc/info.txt4
-rw-r--r--src/math/bigint/mp_ia32_msvc/mp_asmi.h2
-rw-r--r--src/math/bigint/mp_karat.cpp4
-rw-r--r--src/math/bigint/mp_misc.cpp4
-rw-r--r--src/math/bigint/mp_shift.cpp2
-rw-r--r--src/math/bigint/mulop_amd64/info.txt4
-rw-r--r--src/math/bigint/mulop_amd64/mp_mulop.cpp6
-rw-r--r--src/math/bigint/mulop_amd64/mp_mulop_amd64.S2
-rw-r--r--src/math/bigint/mulop_generic/info.txt4
-rw-r--r--src/math/bigint/mulop_generic/mp_mulop.cpp6
-rw-r--r--src/math/bigint/mulop_ia32/info.txt4
-rw-r--r--src/math/bigint/mulop_ia32/mp_mulop.S2
-rw-r--r--src/math/gfpmath/gfp_element.cpp5
-rw-r--r--src/math/gfpmath/gfp_element.h40
-rw-r--r--src/math/gfpmath/info.txt21
-rw-r--r--src/math/gfpmath/point_gfp.cpp6
-rw-r--r--src/math/gfpmath/point_gfp.h41
-rw-r--r--src/math/numbertheory/info.txt15
-rw-r--r--src/math/numbertheory/mp_numth.cpp4
-rw-r--r--src/math/numbertheory/numthry.cpp2
-rw-r--r--src/math/numbertheory/powm_fw.cpp6
-rw-r--r--src/math/numbertheory/powm_mnt.cpp8
-rw-r--r--src/math/numbertheory/reducer.cpp2
-rw-r--r--src/pbe/info.txt7
-rw-r--r--src/pbe/pbes1/info.txt7
-rw-r--r--src/pbe/pbes2/info.txt7
-rw-r--r--src/pk_pad/eme1/info.txt5
-rw-r--r--src/pk_pad/eme_pkcs/info.txt7
-rw-r--r--src/pk_pad/emsa1/info.txt7
-rw-r--r--src/pk_pad/emsa1_bsi/info.txt7
-rw-r--r--src/pk_pad/emsa2/info.txt7
-rw-r--r--src/pk_pad/emsa3/info.txt7
-rw-r--r--src/pk_pad/emsa4/emsa4.cpp2
-rw-r--r--src/pk_pad/emsa4/info.txt7
-rw-r--r--src/pk_pad/emsa_raw/info.txt7
-rw-r--r--src/pk_pad/hash_id/info.txt7
-rw-r--r--src/pk_pad/info.txt6
-rw-r--r--src/pubkey/dh/dh_core.cpp8
-rw-r--r--src/pubkey/dh/info.txt13
-rw-r--r--src/pubkey/dl_algo/info.txt7
-rw-r--r--src/pubkey/dl_group/info.txt7
-rw-r--r--src/pubkey/dlies/dlies.cpp2
-rw-r--r--src/pubkey/dlies/info.txt7
-rw-r--r--src/pubkey/dsa/info.txt13
-rw-r--r--src/pubkey/ec_dompar/ec_dompar.h13
-rw-r--r--src/pubkey/ec_dompar/info.txt7
-rw-r--r--src/pubkey/ecc_key/info.txt7
-rw-r--r--src/pubkey/ecdsa/info.txt11
-rw-r--r--src/pubkey/eckaeg/info.txt11
-rw-r--r--src/pubkey/elgamal/elg_core.cpp8
-rw-r--r--src/pubkey/elgamal/info.txt11
-rw-r--r--src/pubkey/if_algo/if_core.cpp8
-rw-r--r--src/pubkey/if_algo/info.txt13
-rw-r--r--src/pubkey/info.txt2
-rw-r--r--src/pubkey/keypair/info.txt7
-rw-r--r--src/pubkey/nr/info.txt11
-rw-r--r--src/pubkey/pk_codecs/info.txt9
-rw-r--r--src/pubkey/pubkey.cpp2
-rw-r--r--src/pubkey/rsa/info.txt7
-rw-r--r--src/pubkey/rw/info.txt7
-rw-r--r--src/rng/auto_rng/auto_rng.cpp20
-rw-r--r--src/rng/auto_rng/info.txt7
-rw-r--r--src/rng/hmac_rng/hmac_rng.cpp10
-rw-r--r--src/rng/hmac_rng/info.txt7
-rw-r--r--src/rng/info.txt7
-rw-r--r--src/rng/randpool/info.txt7
-rw-r--r--src/rng/x931_rng/info.txt7
-rw-r--r--src/rng/x931_rng/x931_rng.cpp2
-rw-r--r--src/s2k/info.txt7
-rw-r--r--src/s2k/pbkdf1/info.txt7
-rw-r--r--src/s2k/pbkdf2/info.txt7
-rw-r--r--src/s2k/pbkdf2/pbkdf2.cpp4
-rw-r--r--src/s2k/pgps2k/info.txt7
-rw-r--r--src/selftest/info.txt7
-rw-r--r--src/selftest/selftest.cpp2
-rw-r--r--src/stream/arc4/arc4.cpp2
-rw-r--r--src/stream/arc4/info.txt11
-rw-r--r--src/stream/ctr/ctr.cpp2
-rw-r--r--src/stream/ctr/info.txt7
-rw-r--r--src/stream/info.txt6
-rw-r--r--src/stream/ofb/info.txt7
-rw-r--r--src/stream/ofb/ofb.cpp2
-rw-r--r--src/stream/salsa20/info.txt11
-rw-r--r--src/stream/salsa20/salsa20.cpp4
-rw-r--r--src/stream/turing/info.txt12
-rw-r--r--src/stream/turing/turing.cpp4
-rw-r--r--src/stream/wid_wake/info.txt11
-rw-r--r--src/stream/wid_wake/wid_wake.cpp4
-rw-r--r--src/sym_algo/info.txt8
-rw-r--r--src/sym_algo/symkey.cpp2
-rw-r--r--src/utils/asm_amd64/info.txt4
-rw-r--r--src/utils/asm_ia32/info.txt4
-rw-r--r--src/utils/bswap.h2
-rw-r--r--src/utils/buf_comp/info.txt6
-rw-r--r--src/utils/cpuid.cpp2
-rw-r--r--src/utils/datastor/datastor.cpp2
-rw-r--r--src/utils/datastor/info.txt7
-rw-r--r--src/utils/info.txt35
-rw-r--r--src/utils/loadstor.h6
-rw-r--r--src/utils/mlock.cpp2
-rw-r--r--src/utils/mlock.h4
-rw-r--r--src/utils/parsing.cpp2
-rw-r--r--src/utils/simd_32/info.txt7
-rw-r--r--src/utils/simd_32/simd_32.h6
-rw-r--r--src/utils/simd_32/simd_altivec.h6
-rw-r--r--src/utils/simd_32/simd_scalar.h4
-rw-r--r--src/utils/simd_32/simd_sse.h5
307 files changed, 727 insertions, 1140 deletions
diff --git a/src/algo_factory/algo_factory.cpp b/src/algo_factory/algo_factory.cpp
index 0b8422bcb..10dfa15b8 100644
--- a/src/algo_factory/algo_factory.cpp
+++ b/src/algo_factory/algo_factory.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/algo_factory.h>
-#include <botan/algo_cache.h>
-#include <botan/stl_util.h>
+#include <botan/internal/algo_cache.h>
+#include <botan/internal/stl_util.h>
#include <botan/engine.h>
#include <botan/exceptn.h>
diff --git a/src/algo_factory/info.txt b/src/algo_factory/info.txt
index afd350bdb..236fdda0e 100644
--- a/src/algo_factory/info.txt
+++ b/src/algo_factory/info.txt
@@ -2,12 +2,18 @@ load_on auto
define ALGORITHM_FACTORY
-<add>
-algo_factory.cpp
+<header:public>
algo_factory.h
+</header:public>
+
+<header:internal>
algo_cache.h
+</header:internal>
+
+<source>
+algo_factory.cpp
prov_weight.cpp
-</add>
+</source>
<requires>
block
diff --git a/src/algo_factory/prov_weight.cpp b/src/algo_factory/prov_weight.cpp
index d7e84a323..c7c2d8d8d 100644
--- a/src/algo_factory/prov_weight.cpp
+++ b/src/algo_factory/prov_weight.cpp
@@ -5,7 +5,7 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/algo_cache.h>
+#include <botan/internal/algo_cache.h>
namespace Botan {
diff --git a/src/alloc/alloc_mmap/info.txt b/src/alloc/alloc_mmap/info.txt
index 8ecb4df13..562277a37 100644
--- a/src/alloc/alloc_mmap/info.txt
+++ b/src/alloc/alloc_mmap/info.txt
@@ -1,6 +1,12 @@
define ALLOC_MMAP
-load_on auto
+<source>
+mmap_mem.cpp
+</source>
+
+<header:internal>
+mmap_mem.h
+</header:internal>
<os>
linux
diff --git a/src/alloc/alloc_mmap/mmap_mem.cpp b/src/alloc/alloc_mmap/mmap_mem.cpp
index 546da7a81..4a7019ae7 100644
--- a/src/alloc/alloc_mmap/mmap_mem.cpp
+++ b/src/alloc/alloc_mmap/mmap_mem.cpp
@@ -5,7 +5,7 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/mmap_mem.h>
+#include <botan/internal/mmap_mem.h>
#include <cstring>
#include <sys/types.h>
@@ -26,7 +26,7 @@ namespace {
/*
* MemoryMapping_Allocator Exception
*/
-class MemoryMapping_Failed : public Exception
+class BOTAN_DLL MemoryMapping_Failed : public Exception
{
public:
MemoryMapping_Failed(const std::string& msg) :
diff --git a/src/alloc/alloc_mmap/mmap_mem.h b/src/alloc/alloc_mmap/mmap_mem.h
index 30e6d9ebb..14caf5db1 100644
--- a/src/alloc/alloc_mmap/mmap_mem.h
+++ b/src/alloc/alloc_mmap/mmap_mem.h
@@ -8,14 +8,14 @@
#ifndef BOTAN_MMAP_ALLOCATOR_H__
#define BOTAN_MMAP_ALLOCATOR_H__
-#include <botan/mem_pool.h>
+#include <botan/internal/mem_pool.h>
namespace Botan {
/*
* Memory Mapping Allocator
*/
-class BOTAN_DLL MemoryMapping_Allocator : public Pooling_Allocator
+class MemoryMapping_Allocator : public Pooling_Allocator
{
public:
std::string type() const { return "mmap"; }
diff --git a/src/alloc/info.txt b/src/alloc/info.txt
index 99dbe3a4d..40e7bacdf 100644
--- a/src/alloc/info.txt
+++ b/src/alloc/info.txt
@@ -1,6 +1,4 @@
-load_on auto
-
-<add>
+<header:public>
allocate.h
secmem.h
-</add>
+</header:public>
diff --git a/src/alloc/mem_pool/info.txt b/src/alloc/mem_pool/info.txt
index b57a8b647..f87ea4c4c 100644
--- a/src/alloc/mem_pool/info.txt
+++ b/src/alloc/mem_pool/info.txt
@@ -1,6 +1,8 @@
-load_on auto
-<add>
+<source>
mem_pool.cpp
+</source>
+
+<header:internal>
mem_pool.h
-</add>
+</header:internal>
diff --git a/src/alloc/mem_pool/mem_pool.cpp b/src/alloc/mem_pool/mem_pool.cpp
index 820355678..031cc2656 100644
--- a/src/alloc/mem_pool/mem_pool.cpp
+++ b/src/alloc/mem_pool/mem_pool.cpp
@@ -7,8 +7,8 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/mem_pool.h>
-#include <botan/rounding.h>
+#include <botan/internal/mem_pool.h>
+#include <botan/internal/rounding.h>
#include <botan/mem_ops.h>
#include <algorithm>
#include <exception>
diff --git a/src/alloc/mem_pool/mem_pool.h b/src/alloc/mem_pool/mem_pool.h
index dd463d908..f0a564965 100644
--- a/src/alloc/mem_pool/mem_pool.h
+++ b/src/alloc/mem_pool/mem_pool.h
@@ -19,7 +19,7 @@ namespace Botan {
/*
* Pooling Allocator
*/
-class BOTAN_DLL Pooling_Allocator : public Allocator
+class Pooling_Allocator : public Allocator
{
public:
void* allocate(u32bit);
@@ -36,7 +36,7 @@ class BOTAN_DLL Pooling_Allocator : public Allocator
virtual void* alloc_block(u32bit) = 0;
virtual void dealloc_block(void*, u32bit) = 0;
- class BOTAN_DLL Memory_Block
+ class Memory_Block
{
public:
Memory_Block(void*);
diff --git a/src/alloc/system_alloc/defalloc.cpp b/src/alloc/system_alloc/defalloc.cpp
index b1b338d71..faaeb3c58 100644
--- a/src/alloc/system_alloc/defalloc.cpp
+++ b/src/alloc/system_alloc/defalloc.cpp
@@ -5,9 +5,9 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/defalloc.h>
+#include <botan/internal/defalloc.h>
+#include <botan/internal/mlock.h>
#include <botan/libstate.h>
-#include <botan/mlock.h>
#include <cstdlib>
#include <cstring>
diff --git a/src/alloc/system_alloc/defalloc.h b/src/alloc/system_alloc/defalloc.h
index ed2682ec0..436549540 100644
--- a/src/alloc/system_alloc/defalloc.h
+++ b/src/alloc/system_alloc/defalloc.h
@@ -8,14 +8,14 @@
#ifndef BOTAN_BASIC_ALLOC_H__
#define BOTAN_BASIC_ALLOC_H__
-#include <botan/mem_pool.h>
+#include <botan/internal/mem_pool.h>
namespace Botan {
/*
* Malloc Allocator
*/
-class BOTAN_DLL Malloc_Allocator : public Allocator
+class Malloc_Allocator : public Allocator
{
public:
void* allocate(u32bit);
@@ -27,7 +27,7 @@ class BOTAN_DLL Malloc_Allocator : public Allocator
/*
* Locking Allocator
*/
-class BOTAN_DLL Locking_Allocator : public Pooling_Allocator
+class Locking_Allocator : public Pooling_Allocator
{
public:
std::string type() const { return "locking"; }
diff --git a/src/alloc/system_alloc/info.txt b/src/alloc/system_alloc/info.txt
index 8b9a2f067..87de0cb67 100644
--- a/src/alloc/system_alloc/info.txt
+++ b/src/alloc/system_alloc/info.txt
@@ -1,9 +1,11 @@
-load_on auto
-<add>
+<source>
defalloc.cpp
+</source>
+
+<header:internal>
defalloc.h
-</add>
+</header:internal>
<requires>
libstate
diff --git a/src/asn1/asn1_alt.cpp b/src/asn1/asn1_alt.cpp
index 401eb54e9..de3fb7549 100644
--- a/src/asn1/asn1_alt.cpp
+++ b/src/asn1/asn1_alt.cpp
@@ -10,10 +10,10 @@
#include <botan/der_enc.h>
#include <botan/ber_dec.h>
#include <botan/oids.h>
-#include <botan/stl_util.h>
+#include <botan/internal/stl_util.h>
#include <botan/charset.h>
#include <botan/parsing.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
namespace Botan {
diff --git a/src/asn1/asn1_dn.cpp b/src/asn1/asn1_dn.cpp
index d86edcd84..e474458b3 100644
--- a/src/asn1/asn1_dn.cpp
+++ b/src/asn1/asn1_dn.cpp
@@ -9,7 +9,7 @@
#include <botan/der_enc.h>
#include <botan/ber_dec.h>
#include <botan/parsing.h>
-#include <botan/stl_util.h>
+#include <botan/internal/stl_util.h>
#include <botan/oids.h>
namespace Botan {
diff --git a/src/asn1/asn1_oid.cpp b/src/asn1/asn1_oid.cpp
index c72ee7a1a..425df645c 100644
--- a/src/asn1/asn1_oid.cpp
+++ b/src/asn1/asn1_oid.cpp
@@ -8,7 +8,7 @@
#include <botan/asn1_oid.h>
#include <botan/der_enc.h>
#include <botan/ber_dec.h>
-#include <botan/bit_ops.h>
+#include <botan/internal/bit_ops.h>
#include <botan/parsing.h>
namespace Botan {
diff --git a/src/asn1/ber_dec.cpp b/src/asn1/ber_dec.cpp
index b34bf8ca2..a61bbf00a 100644
--- a/src/asn1/ber_dec.cpp
+++ b/src/asn1/ber_dec.cpp
@@ -7,7 +7,7 @@
#include <botan/ber_dec.h>
#include <botan/bigint.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
namespace Botan {
diff --git a/src/asn1/der_enc.cpp b/src/asn1/der_enc.cpp
index 1863e400d..baf3fa043 100644
--- a/src/asn1/der_enc.cpp
+++ b/src/asn1/der_enc.cpp
@@ -8,8 +8,8 @@
#include <botan/der_enc.h>
#include <botan/asn1_int.h>
#include <botan/bigint.h>
-#include <botan/loadstor.h>
-#include <botan/bit_ops.h>
+#include <botan/internal/loadstor.h>
+#include <botan/internal/bit_ops.h>
#include <botan/parsing.h>
#include <algorithm>
diff --git a/src/asn1/info.txt b/src/asn1/info.txt
index d836b4c0b..7ed025e68 100644
--- a/src/asn1/info.txt
+++ b/src/asn1/info.txt
@@ -2,7 +2,7 @@ define ASN1
load_on auto
-<add>
+<source>
alg_id.cpp
asn1_alt.cpp
asn1_att.cpp
@@ -13,13 +13,16 @@ asn1_str.cpp
asn1_tm.cpp
ber_dec.cpp
der_enc.cpp
+</source>
+
+<header:public>
alg_id.h
asn1_int.h
asn1_obj.h
asn1_oid.h
ber_dec.h
der_enc.h
-</add>
+</header:public>
<requires>
alloc
diff --git a/src/benchmark/info.txt b/src/benchmark/info.txt
index 0210971f7..3a817435a 100644
--- a/src/benchmark/info.txt
+++ b/src/benchmark/info.txt
@@ -1,12 +1,5 @@
define RUNTIME_BENCHMARKING
-load_on auto
-
-<add>
-benchmark.cpp
-benchmark.h
-</add>
-
<requires>
algo_factory
block
diff --git a/src/block/aes/aes.cpp b/src/block/aes/aes.cpp
index 108edd7a3..d972d921a 100644
--- a/src/block/aes/aes.cpp
+++ b/src/block/aes/aes.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/aes.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
namespace Botan {
diff --git a/src/block/aes_intel/aes_intel.cpp b/src/block/aes_intel/aes_intel.cpp
index 3d3683d7d..5ccf3fc5d 100644
--- a/src/block/aes_intel/aes_intel.cpp
+++ b/src/block/aes_intel/aes_intel.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/aes_intel.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
#include <wmmintrin.h>
namespace Botan {
diff --git a/src/block/blowfish/blowfish.cpp b/src/block/blowfish/blowfish.cpp
index d0b182a84..6a00caa90 100644
--- a/src/block/blowfish/blowfish.cpp
+++ b/src/block/blowfish/blowfish.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/blowfish.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
namespace Botan {
diff --git a/src/block/cast/cast128.cpp b/src/block/cast/cast128.cpp
index 887dcf994..2d876d31e 100644
--- a/src/block/cast/cast128.cpp
+++ b/src/block/cast/cast128.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/cast128.h>
-#include <botan/loadstor.h>
-#include <botan/rotate.h>
+#include <botan/internal/loadstor.h>
+#include <botan/internal/rotate.h>
namespace Botan {
diff --git a/src/block/cast/cast256.cpp b/src/block/cast/cast256.cpp
index 7a4a4e805..832c170aa 100644
--- a/src/block/cast/cast256.cpp
+++ b/src/block/cast/cast256.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/cast256.h>
-#include <botan/loadstor.h>
-#include <botan/rotate.h>
+#include <botan/internal/loadstor.h>
+#include <botan/internal/rotate.h>
namespace Botan {
diff --git a/src/block/des/des.cpp b/src/block/des/des.cpp
index 05287304f..3bc970735 100644
--- a/src/block/des/des.cpp
+++ b/src/block/des/des.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/des.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
namespace Botan {
diff --git a/src/block/des/desx.cpp b/src/block/des/desx.cpp
index 1fc1c47f2..d19d7da8a 100644
--- a/src/block/des/desx.cpp
+++ b/src/block/des/desx.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/desx.h>
-#include <botan/xor_buf.h>
+#include <botan/internal/xor_buf.h>
namespace Botan {
diff --git a/src/block/gost_28147/gost_28147.cpp b/src/block/gost_28147/gost_28147.cpp
index 272f1bcab..8340b8ccc 100644
--- a/src/block/gost_28147/gost_28147.cpp
+++ b/src/block/gost_28147/gost_28147.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/gost_28147.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
namespace Botan {
diff --git a/src/block/idea/idea.cpp b/src/block/idea/idea.cpp
index fb5fe83f1..84c401475 100644
--- a/src/block/idea/idea.cpp
+++ b/src/block/idea/idea.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/idea.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
namespace Botan {
diff --git a/src/block/kasumi/kasumi.cpp b/src/block/kasumi/kasumi.cpp
index dff6db13c..e22948293 100644
--- a/src/block/kasumi/kasumi.cpp
+++ b/src/block/kasumi/kasumi.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/kasumi.h>
-#include <botan/loadstor.h>
-#include <botan/rotate.h>
+#include <botan/internal/loadstor.h>
+#include <botan/internal/rotate.h>
namespace Botan {
diff --git a/src/block/lion/lion.cpp b/src/block/lion/lion.cpp
index 81252f5e3..51567d304 100644
--- a/src/block/lion/lion.cpp
+++ b/src/block/lion/lion.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/lion.h>
-#include <botan/xor_buf.h>
+#include <botan/internal/xor_buf.h>
#include <botan/parsing.h>
namespace Botan {
diff --git a/src/block/lubyrack/lubyrack.cpp b/src/block/lubyrack/lubyrack.cpp
index 2003d2a89..bdb26837e 100644
--- a/src/block/lubyrack/lubyrack.cpp
+++ b/src/block/lubyrack/lubyrack.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/lubyrack.h>
-#include <botan/xor_buf.h>
+#include <botan/internal/xor_buf.h>
namespace Botan {
diff --git a/src/block/mars/mars.cpp b/src/block/mars/mars.cpp
index 6b73ea054..526073cef 100644
--- a/src/block/mars/mars.cpp
+++ b/src/block/mars/mars.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/mars.h>
-#include <botan/loadstor.h>
-#include <botan/rotate.h>
+#include <botan/internal/loadstor.h>
+#include <botan/internal/rotate.h>
namespace Botan {
diff --git a/src/block/misty1/misty1.cpp b/src/block/misty1/misty1.cpp
index 56cd7446c..bfb151519 100644
--- a/src/block/misty1/misty1.cpp
+++ b/src/block/misty1/misty1.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/misty1.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
#include <botan/parsing.h>
namespace Botan {
diff --git a/src/block/noekeon/noekeon.cpp b/src/block/noekeon/noekeon.cpp
index 0bfce1882..74a485773 100644
--- a/src/block/noekeon/noekeon.cpp
+++ b/src/block/noekeon/noekeon.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/noekeon.h>
-#include <botan/loadstor.h>
-#include <botan/rotate.h>
+#include <botan/internal/loadstor.h>
+#include <botan/internal/rotate.h>
namespace Botan {
diff --git a/src/block/rc2/rc2.cpp b/src/block/rc2/rc2.cpp
index b5e4a7d50..7fd1ed80e 100644
--- a/src/block/rc2/rc2.cpp
+++ b/src/block/rc2/rc2.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/rc2.h>
-#include <botan/loadstor.h>
-#include <botan/rotate.h>
+#include <botan/internal/loadstor.h>
+#include <botan/internal/rotate.h>
namespace Botan {
diff --git a/src/block/rc5/rc5.cpp b/src/block/rc5/rc5.cpp
index 1b71de85a..c69b5f8a0 100644
--- a/src/block/rc5/rc5.cpp
+++ b/src/block/rc5/rc5.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/rc5.h>
-#include <botan/loadstor.h>
-#include <botan/rotate.h>
+#include <botan/internal/loadstor.h>
+#include <botan/internal/rotate.h>
#include <botan/parsing.h>
#include <algorithm>
diff --git a/src/block/rc6/rc6.cpp b/src/block/rc6/rc6.cpp
index 8bda62259..5c2aba60a 100644
--- a/src/block/rc6/rc6.cpp
+++ b/src/block/rc6/rc6.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/rc6.h>
-#include <botan/loadstor.h>
-#include <botan/rotate.h>
+#include <botan/internal/loadstor.h>
+#include <botan/internal/rotate.h>
#include <algorithm>
namespace Botan {
diff --git a/src/block/safer/safer_sk.cpp b/src/block/safer/safer_sk.cpp
index fcbe84c8b..2970d38fc 100644
--- a/src/block/safer/safer_sk.cpp
+++ b/src/block/safer/safer_sk.cpp
@@ -6,9 +6,9 @@
*/
#include <botan/safer_sk.h>
-#include <botan/rotate.h>
+#include <botan/internal/rotate.h>
#include <botan/parsing.h>
-#include <botan/rotate.h>
+#include <botan/internal/rotate.h>
namespace Botan {
diff --git a/src/block/seed/seed.cpp b/src/block/seed/seed.cpp
index 378be16e4..b674fce95 100644
--- a/src/block/seed/seed.cpp
+++ b/src/block/seed/seed.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/seed.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
namespace Botan {
diff --git a/src/block/serpent/serpent.cpp b/src/block/serpent/serpent.cpp
index 2fa27308f..d08e0c384 100644
--- a/src/block/serpent/serpent.cpp
+++ b/src/block/serpent/serpent.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/serpent.h>
-#include <botan/loadstor.h>
-#include <botan/rotate.h>
+#include <botan/internal/loadstor.h>
+#include <botan/internal/rotate.h>
namespace Botan {
@@ -344,6 +344,10 @@ void Serpent::decrypt_n(const byte in[], byte out[], u32bit blocks) const
}
}
+#undef key_xor
+#undef transform
+#undef i_transform
+
/*
* Serpent Key Schedule
*/
diff --git a/src/block/serpent_ia32/serp_ia32.cpp b/src/block/serpent_ia32/serp_ia32.cpp
index 721584b18..3b90f4950 100644
--- a/src/block/serpent_ia32/serp_ia32.cpp
+++ b/src/block/serpent_ia32/serp_ia32.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/serp_ia32.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
namespace Botan {
diff --git a/src/block/serpent_ia32/serp_ia32_imp.S b/src/block/serpent_ia32/serp_ia32_imp.S
index 8b4a79937..768192061 100644
--- a/src/block/serpent_ia32/serp_ia32_imp.S
+++ b/src/block/serpent_ia32/serp_ia32_imp.S
@@ -5,7 +5,7 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/asm_macr_ia32.h>
+#include <botan/internal/asm_macr_ia32.h>
START_LISTING(serp_ia32.S)
diff --git a/src/block/serpent_simd/info.txt b/src/block/serpent_simd/info.txt
index d65b41235..b3bf34972 100644
--- a/src/block/serpent_simd/info.txt
+++ b/src/block/serpent_simd/info.txt
@@ -5,3 +5,15 @@ serpent
simd_32
simd_engine
</requires>
+
+<source>
+serp_simd.cpp
+</source>
+
+<header:public>
+serp_simd.h
+</header:public>
+
+<header:internal>
+serp_simd_sbox.h
+</header:internal>
diff --git a/src/block/serpent_simd/serp_simd.cpp b/src/block/serpent_simd/serp_simd.cpp
index b394b0c26..3a42db55f 100644
--- a/src/block/serpent_simd/serp_simd.cpp
+++ b/src/block/serpent_simd/serp_simd.cpp
@@ -6,9 +6,9 @@
*/
#include <botan/serp_simd.h>
-#include <botan/serp_simd_sbox.h>
-#include <botan/simd_32.h>
-#include <botan/loadstor.h>
+#include <botan/internal/serp_simd_sbox.h>
+#include <botan/internal/simd_32.h>
+#include <botan/internal/loadstor.h>
namespace Botan {
@@ -171,6 +171,10 @@ void serpent_decrypt_4(const byte in[64],
}
+#undef key_xor
+#undef transform
+#undef i_transform
+
/*
* Serpent Encryption
*/
diff --git a/src/block/skipjack/skipjack.cpp b/src/block/skipjack/skipjack.cpp
index b23d1e160..b1765d67a 100644
--- a/src/block/skipjack/skipjack.cpp
+++ b/src/block/skipjack/skipjack.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/skipjack.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
namespace Botan {
diff --git a/src/block/square/square.cpp b/src/block/square/square.cpp
index 892568655..a64e2538e 100644
--- a/src/block/square/square.cpp
+++ b/src/block/square/square.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/square.h>
-#include <botan/loadstor.h>
-#include <botan/rotate.h>
+#include <botan/internal/loadstor.h>
+#include <botan/internal/rotate.h>
namespace Botan {
diff --git a/src/block/tea/tea.cpp b/src/block/tea/tea.cpp
index de30858da..617c9505a 100644
--- a/src/block/tea/tea.cpp
+++ b/src/block/tea/tea.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/tea.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
namespace Botan {
diff --git a/src/block/twofish/twofish.cpp b/src/block/twofish/twofish.cpp
index 3136837aa..1969b615b 100644
--- a/src/block/twofish/twofish.cpp
+++ b/src/block/twofish/twofish.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/twofish.h>
-#include <botan/loadstor.h>
-#include <botan/rotate.h>
+#include <botan/internal/loadstor.h>
+#include <botan/internal/rotate.h>
namespace Botan {
diff --git a/src/block/xtea/xtea.cpp b/src/block/xtea/xtea.cpp
index fc14c0a57..2172d63b8 100644
--- a/src/block/xtea/xtea.cpp
+++ b/src/block/xtea/xtea.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/xtea.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
namespace Botan {
diff --git a/src/block/xtea_simd/info.txt b/src/block/xtea_simd/info.txt
index 98a6e941f..5a8445b35 100644
--- a/src/block/xtea_simd/info.txt
+++ b/src/block/xtea_simd/info.txt
@@ -1,12 +1,5 @@
define XTEA_SIMD
-load_on auto
-
-<add>
-xtea_simd.cpp
-xtea_simd.h
-</add>
-
<requires>
xtea
simd_32
diff --git a/src/block/xtea_simd/xtea_simd.cpp b/src/block/xtea_simd/xtea_simd.cpp
index 6151c355c..a8d1fe810 100644
--- a/src/block/xtea_simd/xtea_simd.cpp
+++ b/src/block/xtea_simd/xtea_simd.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/xtea_simd.h>
-#include <botan/loadstor.h>
-#include <botan/simd_32.h>
+#include <botan/internal/loadstor.h>
+#include <botan/internal/simd_32.h>
namespace Botan {
diff --git a/src/build-data/cc/gcc.txt b/src/build-data/cc/gcc.txt
index c977b9df4..95340f5c0 100644
--- a/src/build-data/cc/gcc.txt
+++ b/src/build-data/cc/gcc.txt
@@ -14,10 +14,12 @@ warning_flags "-W -Wall"
lib_opt_flags "-O3"
check_opt_flags "-O2"
-shared_flags "-fPIC"
+shared_flags "-fPIC -fvisibility=hidden"
debug_flags -g
no_debug_flags "-finline-functions"
+dll_import_flags '__attribute__((visibility("default")))'
+
makefile_style unix
<so_link_flags>
diff --git a/src/cert/cvc/asn1_eac_tm.cpp b/src/cert/cvc/asn1_eac_tm.cpp
index 827710084..1335e8afa 100644
--- a/src/cert/cvc/asn1_eac_tm.cpp
+++ b/src/cert/cvc/asn1_eac_tm.cpp
@@ -11,7 +11,7 @@
#include <botan/ber_dec.h>
#include <botan/charset.h>
#include <botan/parsing.h>
-#include <botan/rounding.h>
+#include <botan/internal/rounding.h>
#include <botan/time.h>
namespace Botan {
diff --git a/src/cert/cvc/cvc_gen_cert.h b/src/cert/cvc/cvc_gen_cert.h
index 8620cd89a..059a82562 100644
--- a/src/cert/cvc/cvc_gen_cert.h
+++ b/src/cert/cvc/cvc_gen_cert.h
@@ -13,6 +13,7 @@
#include <botan/eac_asn_obj.h>
#include <botan/pubkey_enums.h>
#include <botan/pubkey.h>
+#include <botan/ecdsa.h>
#include <botan/ecdsa_sig.h>
#include <string>
#include <assert.h>
diff --git a/src/cert/cvc/cvc_self.h b/src/cert/cvc/cvc_self.h
index db23547b9..fb24ecd3a 100644
--- a/src/cert/cvc/cvc_self.h
+++ b/src/cert/cvc/cvc_self.h
@@ -48,9 +48,9 @@ namespace CVC_EAC {
* @result the self signed certificate
*/
-EAC1_1_CVC create_self_signed_cert(Private_Key const& key,
- EAC1_1_CVC_Options const& opts,
- RandomNumberGenerator& rng);
+EAC1_1_CVC BOTAN_DLL create_self_signed_cert(Private_Key const& key,
+ EAC1_1_CVC_Options const& opts,
+ RandomNumberGenerator& rng);
/**
* Create a CVC request. The key encoding will be according to the provided private key.
* @param priv_key the private key associated with the requesting entity
@@ -61,10 +61,10 @@ EAC1_1_CVC create_self_signed_cert(Private_Key const& key,
* @param rng the rng to use
* @result the new request
*/
-EAC1_1_Req create_cvc_req(Private_Key const& priv_key,
- ASN1_Chr const& chr,
- std::string const& hash_alg,
- RandomNumberGenerator& rng);
+EAC1_1_Req BOTAN_DLL create_cvc_req(Private_Key const& priv_key,
+ ASN1_Chr const& chr,
+ std::string const& hash_alg,
+ RandomNumberGenerator& rng);
/**
* Create an ADO from a request object.
@@ -74,15 +74,16 @@ EAC1_1_Req create_cvc_req(Private_Key const& priv_key,
* CHR of the entity associated with the provided private key
* @param rng the rng to use
*/
-EAC1_1_ADO create_ado_req(Private_Key const& priv_key,
- EAC1_1_Req const& req,
- ASN1_Car const& car,
- RandomNumberGenerator& rng);
+EAC1_1_ADO BOTAN_DLL create_ado_req(Private_Key const& priv_key,
+ EAC1_1_Req const& req,
+ ASN1_Car const& car,
+ RandomNumberGenerator& rng);
}
/**
-* This namespace represents EAC 1.1 CVC convenience functions following the specific german
-* requirements.
+* This namespace represents EAC 1.1 CVC convenience functions
+* following the specific german requirements.
*/
+
namespace DE_EAC {
/**
@@ -99,13 +100,13 @@ namespace DE_EAC {
* @param rng the rng to use
* @result the CVCA certificate created
*/
-EAC1_1_CVC create_cvca(Private_Key const& priv_key,
- std::string const& hash,
- ASN1_Car const& car,
- bool iris,
- bool fingerpr,
- u32bit cvca_validity_months,
- RandomNumberGenerator& rng);
+EAC1_1_CVC BOTAN_DLL create_cvca(Private_Key const& priv_key,
+ std::string const& hash,
+ ASN1_Car const& car,
+ bool iris,
+ bool fingerpr,
+ u32bit cvca_validity_months,
+ RandomNumberGenerator& rng);
/**
* Create a link certificate between two CVCA certificates. The key
@@ -117,10 +118,10 @@ EAC1_1_CVC create_cvca(Private_Key const& priv_key,
* the holder of the link certificate
* @param rng a random number generator
*/
-EAC1_1_CVC link_cvca(EAC1_1_CVC const& signer,
- Private_Key const& priv_key,
- EAC1_1_CVC const& to_be_signed,
- RandomNumberGenerator& rng);
+EAC1_1_CVC BOTAN_DLL link_cvca(EAC1_1_CVC const& signer,
+ Private_Key const& priv_key,
+ EAC1_1_CVC const& to_be_signed,
+ RandomNumberGenerator& rng);
/**
* Create a CVC request. The key encoding will be implicitCA.
@@ -132,10 +133,10 @@ EAC1_1_CVC link_cvca(EAC1_1_CVC const& signer,
* @param rng a random number generator
* @result the new request
*/
-EAC1_1_Req create_cvc_req(Private_Key const& priv_key,
- ASN1_Chr const& chr,
- std::string const& hash_alg,
- RandomNumberGenerator& rng);
+EAC1_1_Req BOTAN_DLL create_cvc_req(Private_Key const& priv_key,
+ ASN1_Chr const& chr,
+ std::string const& hash_alg,
+ RandomNumberGenerator& rng);
/**
* Sign a CVC request.
@@ -151,15 +152,15 @@ EAC1_1_Req create_cvc_req(Private_Key const& priv_key,
* @result the new certificate
*
**/
-EAC1_1_CVC sign_request(EAC1_1_CVC const& signer_cert,
- Private_Key const& priv_key,
- EAC1_1_Req const& req,
- u32bit seqnr,
- u32bit seqnr_len,
- bool domestic,
- u32bit dvca_validity_months,
- u32bit ca_is_validity_months,
- RandomNumberGenerator& rng);
+EAC1_1_CVC BOTAN_DLL sign_request(EAC1_1_CVC const& signer_cert,
+ Private_Key const& priv_key,
+ EAC1_1_Req const& req,
+ u32bit seqnr,
+ u32bit seqnr_len,
+ bool domestic,
+ u32bit dvca_validity_months,
+ u32bit ca_is_validity_months,
+ RandomNumberGenerator& rng);
}
}
diff --git a/src/cert/cvc/eac_asn_obj.h b/src/cert/cvc/eac_asn_obj.h
index a6685a8ed..79802951c 100644
--- a/src/cert/cvc/eac_asn_obj.h
+++ b/src/cert/cvc/eac_asn_obj.h
@@ -223,14 +223,14 @@ class BOTAN_DLL ASN1_Chr : public ASN1_EAC_String
/*
* Comparison Operations
*/
-bool operator==(const EAC_Time&, const EAC_Time&);
-bool operator!=(const EAC_Time&, const EAC_Time&);
-bool operator<=(const EAC_Time&, const EAC_Time&);
-bool operator>=(const EAC_Time&, const EAC_Time&);
-bool operator>(const EAC_Time&, const EAC_Time&);
-bool operator<(const EAC_Time&, const EAC_Time&);
-
-bool operator==(const ASN1_EAC_String&, const ASN1_EAC_String&);
+bool BOTAN_DLL operator==(const EAC_Time&, const EAC_Time&);
+bool BOTAN_DLL operator!=(const EAC_Time&, const EAC_Time&);
+bool BOTAN_DLL operator<=(const EAC_Time&, const EAC_Time&);
+bool BOTAN_DLL operator>=(const EAC_Time&, const EAC_Time&);
+bool BOTAN_DLL operator>(const EAC_Time&, const EAC_Time&);
+bool BOTAN_DLL operator<(const EAC_Time&, const EAC_Time&);
+
+bool BOTAN_DLL operator==(const ASN1_EAC_String&, const ASN1_EAC_String&);
inline bool operator!=(const ASN1_EAC_String& lhs, const ASN1_EAC_String& rhs)
{
return !(lhs == rhs);
diff --git a/src/cert/cvc/info.txt b/src/cert/cvc/info.txt
index ff7e04c07..b89441a03 100644
--- a/src/cert/cvc/info.txt
+++ b/src/cert/cvc/info.txt
@@ -2,29 +2,32 @@ define CARD_VERIFIABLE_CERTIFICATES
load_on auto
-<add>
-asn1_eac_str.cpp
-asn1_eac_tm.cpp
-ecdsa_sig.cpp
-ecdsa_sig.h
-cvc_ado.cpp
+<header:public>
cvc_ado.h
-cvc_ca.cpp
cvc_ca.h
-cvc_cert.cpp
cvc_cert.h
cvc_gen_cert.h
cvc_key.h
-cvc_req.cpp
cvc_req.h
-cvc_self.cpp
cvc_self.h
eac_asn_obj.h
eac_obj.h
-signed_obj.cpp
-signed_obj.h
+ecdsa_sig.h
freestore.h
-</add>
+signed_obj.h
+</header:public>
+
+<source>
+asn1_eac_str.cpp
+asn1_eac_tm.cpp
+ecdsa_sig.cpp
+cvc_ado.cpp
+cvc_ca.cpp
+cvc_cert.cpp
+cvc_req.cpp
+cvc_self.cpp
+signed_obj.cpp
+</source>
<requires>
asn1
diff --git a/src/cert/x509/info.txt b/src/cert/x509/info.txt
index 37faea9fa..a5cd973a4 100644
--- a/src/cert/x509/info.txt
+++ b/src/cert/x509/info.txt
@@ -2,31 +2,34 @@ define X509
load_on auto
-<add>
+<header:public>
certstor.h
-certstor.cpp
-crl_ent.cpp
crl_ent.h
pkcs10.h
+x509_ca.h
+x509_crl.h
+x509_ext.h
+x509_obj.h
+x509cert.h
+x509find.h
+x509self.h
+x509stor.h
+</header:public>
+
+<source>
+certstor.cpp
+crl_ent.cpp
pkcs10.cpp
x509_ca.cpp
-x509_ca.h
x509_crl.cpp
-x509_crl.h
x509_ext.cpp
-x509_ext.h
x509_obj.cpp
-x509_obj.h
x509cert.cpp
-x509cert.h
x509find.cpp
-x509find.h
x509opt.cpp
x509self.cpp
-x509self.h
x509stor.cpp
-x509stor.h
-</add>
+</source>
<requires>
asn1
diff --git a/src/cert/x509/x509_crl.h b/src/cert/x509/x509_crl.h
index 6caef42cc..a7903e7e6 100644
--- a/src/cert/x509/x509_crl.h
+++ b/src/cert/x509/x509_crl.h
@@ -23,7 +23,7 @@ class BOTAN_DLL X509_CRL : public X509_Object
/**
* This class represents CRL related errors.
*/
- struct X509_CRL_Error : public Exception
+ struct BOTAN_DLL X509_CRL_Error : public Exception
{
X509_CRL_Error(const std::string& error) :
Exception("X509_CRL: " + error) {}
diff --git a/src/cert/x509/x509_ext.cpp b/src/cert/x509/x509_ext.cpp
index 5e07cbd27..e88b5a268 100644
--- a/src/cert/x509/x509_ext.cpp
+++ b/src/cert/x509/x509_ext.cpp
@@ -11,7 +11,7 @@
#include <botan/ber_dec.h>
#include <botan/oids.h>
#include <botan/libstate.h>
-#include <botan/bit_ops.h>
+#include <botan/internal/bit_ops.h>
#include <algorithm>
#include <memory>
diff --git a/src/cert/x509/x509cert.cpp b/src/cert/x509/x509cert.cpp
index 32c508a0c..e3844e8e9 100644
--- a/src/cert/x509/x509cert.cpp
+++ b/src/cert/x509/x509cert.cpp
@@ -9,7 +9,7 @@
#include <botan/x509_ext.h>
#include <botan/der_enc.h>
#include <botan/ber_dec.h>
-#include <botan/stl_util.h>
+#include <botan/internal/stl_util.h>
#include <botan/parsing.h>
#include <botan/bigint.h>
#include <botan/oids.h>
diff --git a/src/checksum/adler32/adler32.cpp b/src/checksum/adler32/adler32.cpp
index c66943b88..2af1f22ce 100644
--- a/src/checksum/adler32/adler32.cpp
+++ b/src/checksum/adler32/adler32.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/adler32.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
namespace Botan {
diff --git a/src/checksum/adler32/info.txt b/src/checksum/adler32/info.txt
index 53bc66354..a25c792d3 100644
--- a/src/checksum/adler32/info.txt
+++ b/src/checksum/adler32/info.txt
@@ -1,12 +1,5 @@
define ADLER32
-load_on auto
-
-<add>
-adler32.cpp
-adler32.h
-</add>
-
<requires>
hash
</requires>
diff --git a/src/checksum/crc24/crc24.cpp b/src/checksum/crc24/crc24.cpp
index e50b4d33e..6023ace73 100644
--- a/src/checksum/crc24/crc24.cpp
+++ b/src/checksum/crc24/crc24.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/crc24.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
namespace Botan {
diff --git a/src/checksum/crc24/info.txt b/src/checksum/crc24/info.txt
index 8c61aa58b..2c2dbc782 100644
--- a/src/checksum/crc24/info.txt
+++ b/src/checksum/crc24/info.txt
@@ -1,12 +1,5 @@
define CRC24
-load_on auto
-
-<add>
-crc24.cpp
-crc24.h
-</add>
-
<requires>
hash
</requires>
diff --git a/src/checksum/crc32/crc32.cpp b/src/checksum/crc32/crc32.cpp
index 42462096f..1f118c023 100644
--- a/src/checksum/crc32/crc32.cpp
+++ b/src/checksum/crc32/crc32.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/crc32.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
namespace Botan {
diff --git a/src/checksum/crc32/info.txt b/src/checksum/crc32/info.txt
index d86848cf4..590092ede 100644
--- a/src/checksum/crc32/info.txt
+++ b/src/checksum/crc32/info.txt
@@ -1,12 +1,5 @@
define CRC32
-load_on auto
-
-<add>
-crc32.cpp
-crc32.h
-</add>
-
<requires>
hash
</requires>
diff --git a/src/cms/info.txt b/src/cms/info.txt
index 55d559f83..44c5811f8 100644
--- a/src/cms/info.txt
+++ b/src/cms/info.txt
@@ -1,18 +1,5 @@
define CMS
-load_on auto
-
-<add>
-cms_algo.cpp
-cms_comp.cpp
-cms_dalg.cpp
-cms_dec.cpp
-cms_dec.h
-cms_ealg.cpp
-cms_enc.cpp
-cms_enc.h
-</add>
-
<requires>
asn1
bigint
diff --git a/src/codec/pem/info.txt b/src/codec/pem/info.txt
index 5544e1bb0..88f36594c 100644
--- a/src/codec/pem/info.txt
+++ b/src/codec/pem/info.txt
@@ -1,12 +1,5 @@
define PEM_CODEC
-load_on auto
-
-<add>
-pem.cpp
-pem.h
-</add>
-
<requires>
base64
filters
diff --git a/src/constructs/aont/info.txt b/src/constructs/aont/info.txt
index 533b70eb5..ebd54fc11 100644
--- a/src/constructs/aont/info.txt
+++ b/src/constructs/aont/info.txt
@@ -1,12 +1,5 @@
define PACKAGE_TRANSFORM
-load_on auto
-
-<add>
-package.cpp
-package.h
-</add>
-
<requires>
block
ctr
diff --git a/src/constructs/aont/package.cpp b/src/constructs/aont/package.cpp
index 37bad46c8..23b020e8a 100644
--- a/src/constructs/aont/package.cpp
+++ b/src/constructs/aont/package.cpp
@@ -9,8 +9,8 @@
#include <botan/package.h>
#include <botan/filters.h>
#include <botan/ctr.h>
-#include <botan/loadstor.h>
-#include <botan/xor_buf.h>
+#include <botan/internal/loadstor.h>
+#include <botan/internal/xor_buf.h>
namespace Botan {
diff --git a/src/constructs/cryptobox/cryptobox.cpp b/src/constructs/cryptobox/cryptobox.cpp
index ba7553c55..1c7975a7d 100644
--- a/src/constructs/cryptobox/cryptobox.cpp
+++ b/src/constructs/cryptobox/cryptobox.cpp
@@ -13,7 +13,7 @@
#include <botan/hmac.h>
#include <botan/pbkdf2.h>
#include <botan/pem.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
#include <botan/mem_ops.h>
namespace Botan {
diff --git a/src/constructs/cryptobox/info.txt b/src/constructs/cryptobox/info.txt
index 0780f55aa..3521c32d0 100644
--- a/src/constructs/cryptobox/info.txt
+++ b/src/constructs/cryptobox/info.txt
@@ -1,12 +1,5 @@
-load_on auto
-
define CRYPTO_BOX
-<add>
-cryptobox.h
-cryptobox.cpp
-</add>
-
<requires>
filters
ctr
diff --git a/src/constructs/fpe/fpe.cpp b/src/constructs/fpe/fpe.cpp
index 86e56625d..17f9a1406 100644
--- a/src/constructs/fpe/fpe.cpp
+++ b/src/constructs/fpe/fpe.cpp
@@ -12,7 +12,7 @@
#include <botan/numthry.h>
#include <botan/hmac.h>
#include <botan/sha2_32.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
#include <stdexcept>
namespace Botan {
diff --git a/src/constructs/fpe/info.txt b/src/constructs/fpe/info.txt
index f7a8c4ae4..15965cff5 100644
--- a/src/constructs/fpe/info.txt
+++ b/src/constructs/fpe/info.txt
@@ -1,13 +1,7 @@
define FORMAT_PRESERVING_ENCRYPTION
-load_on auto
-
-<add>
-fpe.cpp
-fpe.h
-</add>
-
<requires>
-cbc_mac
+hmac
+sha2
bigint
</requires>
diff --git a/src/constructs/tss/tss.cpp b/src/constructs/tss/tss.cpp
index 0782a27d1..d38741235 100644
--- a/src/constructs/tss/tss.cpp
+++ b/src/constructs/tss/tss.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/tss.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
#include <botan/pipe.h>
#include <botan/hex.h>
#include <botan/sha2_32.h>
diff --git a/src/engine/amd64_eng/info.txt b/src/engine/amd64_eng/info.txt
index 03baf76ee..2ae2aaad0 100644
--- a/src/engine/amd64_eng/info.txt
+++ b/src/engine/amd64_eng/info.txt
@@ -1,8 +1,3 @@
define ENGINE_AMD64_ASSEMBLER
load_on dep
-
-<add>
-eng_amd64.cpp
-eng_amd64.h
-</add>
diff --git a/src/engine/def_engine/info.txt b/src/engine/def_engine/info.txt
index e307fbf8e..74b4d3f9b 100644
--- a/src/engine/def_engine/info.txt
+++ b/src/engine/def_engine/info.txt
@@ -1,9 +1,10 @@
define DEFAULT_ENGINE
-load_on auto
-
-<add>
+<header:public>
def_eng.h
+</header:public>
+
+<source>
def_mode.cpp
def_pk_ops.cpp
def_powm.cpp
@@ -11,7 +12,7 @@ lookup_block.cpp
lookup_hash.cpp
lookup_mac.cpp
lookup_stream.cpp
-</add>
+</source>
<requires>
algo_factory
diff --git a/src/engine/gnump/info.txt b/src/engine/gnump/info.txt
index 0805c1ba8..9566bded2 100644
--- a/src/engine/gnump/info.txt
+++ b/src/engine/gnump/info.txt
@@ -6,8 +6,15 @@ load_on request
all -> gmp
</libs>
-<add>
+<header:public>
eng_gmp.h
+</header:public>
+
+<header:internal>
+gmp_wrap.h
+</header:internal>
+
+<source>
gmp_dh.cpp
gmp_dsa.cpp
gmp_elg.cpp
@@ -16,8 +23,7 @@ gmp_mem.cpp
gmp_nr.cpp
gmp_powm.cpp
gmp_wrap.cpp
-gmp_wrap.h
-</add>
+</source>
<requires>
bigint
diff --git a/src/engine/ia32_eng/info.txt b/src/engine/ia32_eng/info.txt
index 98fd1f2cc..d2106c555 100644
--- a/src/engine/ia32_eng/info.txt
+++ b/src/engine/ia32_eng/info.txt
@@ -1,8 +1,3 @@
define ENGINE_IA32_ASSEMBLER
load_on dep
-
-<add>
-eng_ia32.cpp
-eng_ia32.h
-</add>
diff --git a/src/engine/info.txt b/src/engine/info.txt
index dcb26d9d6..b270edaa5 100644
--- a/src/engine/info.txt
+++ b/src/engine/info.txt
@@ -1,10 +1,8 @@
define ENGINES
-load_on auto
-
-<add>
+<header:public>
engine.h
-</add>
+</header:public>
<requires>
block
diff --git a/src/engine/openssl/info.txt b/src/engine/openssl/info.txt
index 9f8c84b31..d30e76293 100644
--- a/src/engine/openssl/info.txt
+++ b/src/engine/openssl/info.txt
@@ -6,12 +6,18 @@ load_on request
all -> crypto
</libs>
-<add>
+<header:public>
+eng_ossl.h
+</header:public>
+
+<header:internal>
+bn_wrap.h
+</header:internal>
+
+<source>
arc4_openssl.cpp
bn_powm.cpp
bn_wrap.cpp
-bn_wrap.h
-eng_ossl.h
ossl_bc.cpp
ossl_dh.cpp
ossl_dsa.cpp
@@ -19,7 +25,7 @@ ossl_elg.cpp
ossl_if.cpp
ossl_md.cpp
ossl_nr.cpp
-</add>
+</source>
<requires>
bigint
diff --git a/src/engine/simd_engine/simd_engine.cpp b/src/engine/simd_engine/simd_engine.cpp
index fdb1644d0..60ff8ba1d 100644
--- a/src/engine/simd_engine/simd_engine.cpp
+++ b/src/engine/simd_engine/simd_engine.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/simd_engine.h>
-#include <botan/simd_32.h>
+#include <botan/internal/simd_32.h>
#include <botan/cpuid.h>
#if defined(BOTAN_HAS_SERPENT_SIMD)
diff --git a/src/entropy/beos_stats/info.txt b/src/entropy/beos_stats/info.txt
index 26c3feb75..088b926f9 100644
--- a/src/entropy/beos_stats/info.txt
+++ b/src/entropy/beos_stats/info.txt
@@ -1,6 +1,12 @@
define ENTROPY_SRC_BEOS
-load_on auto
+<source>
+es_beos.cpp
+</source>
+
+<header:internal>
+es_beos.h
+</header:internal>
<os>
beos
diff --git a/src/entropy/cryptoapi_rng/info.txt b/src/entropy/cryptoapi_rng/info.txt
index a07892971..800e9ee52 100644
--- a/src/entropy/cryptoapi_rng/info.txt
+++ b/src/entropy/cryptoapi_rng/info.txt
@@ -1,6 +1,12 @@
define ENTROPY_SRC_CAPI
-load_on auto
+<source>
+es_capi.cpp
+</source>
+
+<header:internal>
+es_capi.h
+</header:internal>
# We'll just assume CAPI is there; this is OK except for 3.x, early
# versions of 95, and maybe NT 3.5
diff --git a/src/entropy/dev_random/es_dev.cpp b/src/entropy/dev_random/dev_random.cpp
index ef3074194..d0babfd1e 100644
--- a/src/entropy/dev_random/es_dev.cpp
+++ b/src/entropy/dev_random/dev_random.cpp
@@ -5,7 +5,7 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/es_dev.h>
+#include <botan/internal/dev_random.h>
#include <sys/types.h>
#include <sys/select.h>
diff --git a/src/entropy/dev_random/es_dev.h b/src/entropy/dev_random/dev_random.h
index df9dbe1c1..3ffe536e3 100644
--- a/src/entropy/dev_random/es_dev.h
+++ b/src/entropy/dev_random/dev_random.h
@@ -14,7 +14,7 @@
namespace Botan {
-class BOTAN_DLL Device_EntropySource : public EntropySource
+class Device_EntropySource : public EntropySource
{
public:
std::string name() const { return "RNG Device Reader"; }
diff --git a/src/entropy/dev_random/info.txt b/src/entropy/dev_random/info.txt
index 2907d4178..cabb47ea2 100644
--- a/src/entropy/dev_random/info.txt
+++ b/src/entropy/dev_random/info.txt
@@ -1,6 +1,12 @@
-define ENTROPY_SRC_DEVICE
+define ENTROPY_SRC_DEV_RANDOM
-load_on auto
+<source>
+dev_random.cpp
+</source>
+
+<header:internal>
+dev_random.h
+</header:internal>
<os>
aix
diff --git a/src/entropy/egd/es_egd.cpp b/src/entropy/egd/es_egd.cpp
index 9e37f8f17..bd8dc8590 100644
--- a/src/entropy/egd/es_egd.cpp
+++ b/src/entropy/egd/es_egd.cpp
@@ -5,7 +5,7 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/es_egd.h>
+#include <botan/internal/es_egd.h>
#include <botan/parsing.h>
#include <botan/exceptn.h>
#include <cstring>
diff --git a/src/entropy/egd/es_egd.h b/src/entropy/egd/es_egd.h
index 5db65659d..1a3618989 100644
--- a/src/entropy/egd/es_egd.h
+++ b/src/entropy/egd/es_egd.h
@@ -17,7 +17,7 @@ namespace Botan {
/**
* EGD Entropy Source
*/
-class BOTAN_DLL EGD_EntropySource : public EntropySource
+class EGD_EntropySource : public EntropySource
{
public:
std::string name() const { return "EGD/PRNGD"; }
diff --git a/src/entropy/egd/info.txt b/src/entropy/egd/info.txt
index be6380fc9..25117ed09 100644
--- a/src/entropy/egd/info.txt
+++ b/src/entropy/egd/info.txt
@@ -1,6 +1,12 @@
define ENTROPY_SRC_EGD
-load_on auto
+<source>
+es_egd.cpp
+</source>
+
+<header:internal>
+es_egd.h
+</header:internal>
<libs>
solaris -> socket
diff --git a/src/entropy/hres_timer/hres_timer.cpp b/src/entropy/hres_timer/hres_timer.cpp
index e6cc102ed..3e7c235ca 100644
--- a/src/entropy/hres_timer/hres_timer.cpp
+++ b/src/entropy/hres_timer/hres_timer.cpp
@@ -5,7 +5,7 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/hres_timer.h>
+#include <botan/internal/hres_timer.h>
#include <botan/cpuid.h>
#if defined(BOTAN_TARGET_OS_HAS_QUERY_PERF_COUNTER)
diff --git a/src/entropy/hres_timer/hres_timer.h b/src/entropy/hres_timer/hres_timer.h
index 8dfbfc2d7..a602d5d7b 100644
--- a/src/entropy/hres_timer/hres_timer.h
+++ b/src/entropy/hres_timer/hres_timer.h
@@ -15,7 +15,7 @@ namespace Botan {
/*
* High Resolution Timestamp Source
*/
-class BOTAN_DLL High_Resolution_Timestamp : public EntropySource
+class High_Resolution_Timestamp : public EntropySource
{
public:
std::string name() const { return "High Resolution Timestamp"; }
diff --git a/src/entropy/hres_timer/info.txt b/src/entropy/hres_timer/info.txt
index 6c6454f5d..6e542aac8 100644
--- a/src/entropy/hres_timer/info.txt
+++ b/src/entropy/hres_timer/info.txt
@@ -1 +1,9 @@
define ENTROPY_SRC_HIGH_RESOLUTION_TIMER
+
+<source>
+hres_timer.cpp
+</source>
+
+<header:internal>
+hres_timer.h
+</header:internal>
diff --git a/src/entropy/info.txt b/src/entropy/info.txt
index 5f3d39dd5..a048df7d9 100644
--- a/src/entropy/info.txt
+++ b/src/entropy/info.txt
@@ -1,9 +1,3 @@
-load_on auto
-
-<add>
-entropy_src.h
-</add>
-
<requires>
buf_comp
</requires>
diff --git a/src/entropy/proc_walk/es_ftw.cpp b/src/entropy/proc_walk/es_ftw.cpp
index 2016f099a..5e2b17860 100644
--- a/src/entropy/proc_walk/es_ftw.cpp
+++ b/src/entropy/proc_walk/es_ftw.cpp
@@ -5,7 +5,7 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/es_ftw.h>
+#include <botan/internal/es_ftw.h>
#include <botan/secmem.h>
#include <cstring>
#include <deque>
diff --git a/src/entropy/proc_walk/es_ftw.h b/src/entropy/proc_walk/es_ftw.h
index 928a7b16a..d7a719818 100644
--- a/src/entropy/proc_walk/es_ftw.h
+++ b/src/entropy/proc_walk/es_ftw.h
@@ -15,7 +15,7 @@ namespace Botan {
/**
* File Tree Walking Entropy Source
*/
-class BOTAN_DLL FTW_EntropySource : public EntropySource
+class FTW_EntropySource : public EntropySource
{
public:
std::string name() const { return "Proc Walker"; }
diff --git a/src/entropy/proc_walk/info.txt b/src/entropy/proc_walk/info.txt
index 50b67980a..fd65d8ffe 100644
--- a/src/entropy/proc_walk/info.txt
+++ b/src/entropy/proc_walk/info.txt
@@ -1,6 +1,12 @@
define ENTROPY_SRC_FTW
-load_on auto
+<source>
+es_ftw.cpp
+</source>
+
+<header:internal>
+es_ftw.h
+</header:internal>
<os>
aix
diff --git a/src/entropy/unix_procs/es_unix.cpp b/src/entropy/unix_procs/es_unix.cpp
index fc5b026a4..039479308 100644
--- a/src/entropy/unix_procs/es_unix.cpp
+++ b/src/entropy/unix_procs/es_unix.cpp
@@ -5,8 +5,8 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/es_unix.h>
-#include <botan/unix_cmd.h>
+#include <botan/internal/es_unix.h>
+#include <botan/internal/unix_cmd.h>
#include <botan/parsing.h>
#include <algorithm>
#include <sys/time.h>
diff --git a/src/entropy/unix_procs/es_unix.h b/src/entropy/unix_procs/es_unix.h
index 1f8abb784..03496b364 100644
--- a/src/entropy/unix_procs/es_unix.h
+++ b/src/entropy/unix_procs/es_unix.h
@@ -9,7 +9,7 @@
#define BOTAN_ENTROPY_SRC_UNIX_H__
#include <botan/entropy_src.h>
-#include <botan/unix_cmd.h>
+#include <botan/internal/unix_cmd.h>
#include <vector>
namespace Botan {
@@ -17,7 +17,7 @@ namespace Botan {
/**
* Unix Entropy Source
*/
-class BOTAN_DLL Unix_EntropySource : public EntropySource
+class Unix_EntropySource : public EntropySource
{
public:
std::string name() const { return "Unix Entropy Source"; }
diff --git a/src/entropy/unix_procs/info.txt b/src/entropy/unix_procs/info.txt
index 529b56966..2100584e4 100644
--- a/src/entropy/unix_procs/info.txt
+++ b/src/entropy/unix_procs/info.txt
@@ -1,6 +1,15 @@
define ENTROPY_SRC_UNIX
-load_on auto
+<source>
+es_unix.cpp
+unix_cmd.cpp
+unix_src.cpp
+</source>
+
+<header:internal>
+es_unix.h
+unix_cmd.h
+</header:internal>
<os>
aix
diff --git a/src/entropy/unix_procs/unix_cmd.cpp b/src/entropy/unix_procs/unix_cmd.cpp
index 1cae07e26..34e7c314a 100644
--- a/src/entropy/unix_procs/unix_cmd.cpp
+++ b/src/entropy/unix_procs/unix_cmd.cpp
@@ -5,7 +5,7 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/unix_cmd.h>
+#include <botan/internal/unix_cmd.h>
#include <botan/parsing.h>
#include <botan/exceptn.h>
diff --git a/src/entropy/unix_procs/unix_cmd.h b/src/entropy/unix_procs/unix_cmd.h
index aec189176..7decf587f 100644
--- a/src/entropy/unix_procs/unix_cmd.h
+++ b/src/entropy/unix_procs/unix_cmd.h
@@ -31,7 +31,7 @@ struct Unix_Program
/**
* Command Output DataSource
*/
-class BOTAN_DLL DataSource_Command : public DataSource
+class DataSource_Command : public DataSource
{
public:
u32bit read(byte[], u32bit);
diff --git a/src/entropy/unix_procs/unix_src.cpp b/src/entropy/unix_procs/unix_src.cpp
index c843af6c2..a72ecf055 100644
--- a/src/entropy/unix_procs/unix_src.cpp
+++ b/src/entropy/unix_procs/unix_src.cpp
@@ -5,7 +5,7 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/es_unix.h>
+#include <botan/internal/es_unix.h>
namespace Botan {
diff --git a/src/entropy/win32_stats/info.txt b/src/entropy/win32_stats/info.txt
index 3af05d502..0972df898 100644
--- a/src/entropy/win32_stats/info.txt
+++ b/src/entropy/win32_stats/info.txt
@@ -1,6 +1,12 @@
define ENTROPY_SRC_WIN32
-load_on auto
+<source>
+es_win32.cpp
+</source>
+
+<header:internal>
+es_win32.h
+</header:internal>
<os>
windows
diff --git a/src/filters/base64/info.txt b/src/filters/base64/info.txt
index 1d36b948e..93671739d 100644
--- a/src/filters/base64/info.txt
+++ b/src/filters/base64/info.txt
@@ -1,13 +1,5 @@
define BASE64_CODEC
-load_on auto
-
-<add>
-base64.cpp
-b64_char.cpp
-base64.h
-</add>
-
<requires>
filters
</requires>
diff --git a/src/filters/filter.cpp b/src/filters/filter.cpp
index ff223ae8c..ca32a3801 100644
--- a/src/filters/filter.cpp
+++ b/src/filters/filter.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/filter.h>
-#include <botan/secqueue.h>
+#include <botan/internal/secqueue.h>
#include <botan/exceptn.h>
namespace Botan {
diff --git a/src/filters/hex/info.txt b/src/filters/hex/info.txt
index 817ff1a00..0a4205669 100644
--- a/src/filters/hex/info.txt
+++ b/src/filters/hex/info.txt
@@ -1,13 +1,5 @@
define HEX_CODEC
-load_on auto
-
-<add>
-hex.cpp
-hex_char.cpp
-hex.h
-</add>
-
<requires>
filters
</requires>
diff --git a/src/filters/info.txt b/src/filters/info.txt
index c4113de58..94b91371b 100644
--- a/src/filters/info.txt
+++ b/src/filters/info.txt
@@ -1,6 +1,35 @@
define FILTERS
-load_on auto
+<source>
+algo_filt.cpp
+basefilt.cpp
+buf_filt.cpp
+data_snk.cpp
+data_src.cpp
+filter.cpp
+out_buf.cpp
+pipe.cpp
+pipe_io.cpp
+pipe_rw.cpp
+secqueue.cpp
+</source>
+
+<header:public>
+basefilt.h
+buf_filt.h
+data_snk.h
+data_src.h
+filter.h
+filters.h
+key_filt.h
+pbe.h
+pipe.h
+</header:public>
+
+<header:internal>
+out_buf.h
+secqueue.h
+</header:internal>
<requires>
alloc
diff --git a/src/filters/modes/cbc/cbc.cpp b/src/filters/modes/cbc/cbc.cpp
index fb7ae8f90..a52f4b2e1 100644
--- a/src/filters/modes/cbc/cbc.cpp
+++ b/src/filters/modes/cbc/cbc.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/cbc.h>
-#include <botan/xor_buf.h>
+#include <botan/internal/xor_buf.h>
#include <algorithm>
namespace Botan {
diff --git a/src/filters/modes/cbc/info.txt b/src/filters/modes/cbc/info.txt
index 9b4be1b58..92a39d674 100644
--- a/src/filters/modes/cbc/info.txt
+++ b/src/filters/modes/cbc/info.txt
@@ -1,12 +1,5 @@
define CBC
-load_on auto
-
-<add>
-cbc.cpp
-cbc.h
-</add>
-
<requires>
mode_pad
</requires>
diff --git a/src/filters/modes/cfb/cfb.cpp b/src/filters/modes/cfb/cfb.cpp
index 672dbe7f5..5456bbe0f 100644
--- a/src/filters/modes/cfb/cfb.cpp
+++ b/src/filters/modes/cfb/cfb.cpp
@@ -7,7 +7,7 @@
#include <botan/cfb.h>
#include <botan/parsing.h>
-#include <botan/xor_buf.h>
+#include <botan/internal/xor_buf.h>
#include <algorithm>
namespace Botan {
diff --git a/src/filters/modes/cfb/info.txt b/src/filters/modes/cfb/info.txt
index b68afc7d0..230899a03 100644
--- a/src/filters/modes/cfb/info.txt
+++ b/src/filters/modes/cfb/info.txt
@@ -1,12 +1 @@
define CFB
-
-load_on auto
-
-<add>
-cfb.cpp
-cfb.h
-</add>
-
-<requires>
-modes
-</requires>
diff --git a/src/filters/modes/cts/cts.cpp b/src/filters/modes/cts/cts.cpp
index 99f042f61..226a31898 100644
--- a/src/filters/modes/cts/cts.cpp
+++ b/src/filters/modes/cts/cts.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/cts.h>
-#include <botan/xor_buf.h>
+#include <botan/internal/xor_buf.h>
#include <algorithm>
namespace Botan {
diff --git a/src/filters/modes/cts/info.txt b/src/filters/modes/cts/info.txt
index 773254a30..237f8cd97 100644
--- a/src/filters/modes/cts/info.txt
+++ b/src/filters/modes/cts/info.txt
@@ -1,12 +1 @@
define CTS
-
-load_on auto
-
-<add>
-cts.cpp
-cts.h
-</add>
-
-<requires>
-block
-</requires>
diff --git a/src/filters/modes/eax/eax.cpp b/src/filters/modes/eax/eax.cpp
index 4b712fa90..1187d8461 100644
--- a/src/filters/modes/eax/eax.cpp
+++ b/src/filters/modes/eax/eax.cpp
@@ -7,7 +7,7 @@
#include <botan/eax.h>
#include <botan/cmac.h>
-#include <botan/xor_buf.h>
+#include <botan/internal/xor_buf.h>
#include <botan/parsing.h>
#include <algorithm>
diff --git a/src/filters/modes/eax/eax_dec.cpp b/src/filters/modes/eax/eax_dec.cpp
index f395ce437..24b68f3b7 100644
--- a/src/filters/modes/eax/eax_dec.cpp
+++ b/src/filters/modes/eax/eax_dec.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/eax.h>
-#include <botan/xor_buf.h>
+#include <botan/internal/xor_buf.h>
#include <botan/parsing.h>
#include <algorithm>
diff --git a/src/filters/modes/eax/info.txt b/src/filters/modes/eax/info.txt
index 143944f03..4c91318d6 100644
--- a/src/filters/modes/eax/info.txt
+++ b/src/filters/modes/eax/info.txt
@@ -1,16 +1,5 @@
define EAX
-load_on auto
-
-<add>
-eax.cpp
-eax.h
-eax_dec.cpp
-</add>
-
<requires>
-block
cmac
-filters
-mac
</requires>
diff --git a/src/filters/modes/ecb/info.txt b/src/filters/modes/ecb/info.txt
index f5c831169..a26930470 100644
--- a/src/filters/modes/ecb/info.txt
+++ b/src/filters/modes/ecb/info.txt
@@ -1,13 +1,5 @@
define ECB
-load_on auto
-
-<add>
-ecb.cpp
-ecb.h
-</add>
-
<requires>
-block
mode_pad
</requires>
diff --git a/src/filters/modes/info.txt b/src/filters/modes/info.txt
index 420233b46..6d27c9709 100644
--- a/src/filters/modes/info.txt
+++ b/src/filters/modes/info.txt
@@ -1,12 +1,5 @@
define CIPHER_MODEBASE
-load_on auto
-
-<add>
-modebase.cpp
-modebase.h
-</add>
-
<requires>
block
filters
diff --git a/src/filters/modes/mode_pad/info.txt b/src/filters/modes/mode_pad/info.txt
index 9629a7202..e97ea03a5 100644
--- a/src/filters/modes/mode_pad/info.txt
+++ b/src/filters/modes/mode_pad/info.txt
@@ -1,8 +1 @@
define CIPHER_MODE_PADDING
-
-load_on auto
-
-<add>
-mode_pad.cpp
-mode_pad.h
-</add>
diff --git a/src/filters/modes/xts/info.txt b/src/filters/modes/xts/info.txt
index 871bb987a..9af3238f1 100644
--- a/src/filters/modes/xts/info.txt
+++ b/src/filters/modes/xts/info.txt
@@ -1,13 +1 @@
define XTS
-
-load_on auto
-
-<add>
-xts.cpp
-xts.h
-</add>
-
-<requires>
-block
-filters
-</requires>
diff --git a/src/filters/modes/xts/xts.cpp b/src/filters/modes/xts/xts.cpp
index 586cc92af..c9b77e1eb 100644
--- a/src/filters/modes/xts/xts.cpp
+++ b/src/filters/modes/xts/xts.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/xts.h>
-#include <botan/xor_buf.h>
+#include <botan/internal/xor_buf.h>
#include <algorithm>
#include <stdexcept>
diff --git a/src/filters/out_buf.cpp b/src/filters/out_buf.cpp
index 864598194..80189eb3c 100644
--- a/src/filters/out_buf.cpp
+++ b/src/filters/out_buf.cpp
@@ -5,8 +5,8 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/out_buf.h>
-#include <botan/secqueue.h>
+#include <botan/internal/out_buf.h>
+#include <botan/internal/secqueue.h>
namespace Botan {
diff --git a/src/filters/out_buf.h b/src/filters/out_buf.h
index 0baacda20..fecbf9191 100644
--- a/src/filters/out_buf.h
+++ b/src/filters/out_buf.h
@@ -17,7 +17,7 @@ namespace Botan {
/*
* Container of output buffers for Pipe
*/
-class BOTAN_DLL Output_Buffers
+class Output_Buffers
{
public:
u32bit read(byte[], u32bit, Pipe::message_id);
diff --git a/src/filters/pipe.cpp b/src/filters/pipe.cpp
index ae0f6996d..169205e5f 100644
--- a/src/filters/pipe.cpp
+++ b/src/filters/pipe.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/pipe.h>
-#include <botan/out_buf.h>
-#include <botan/secqueue.h>
+#include <botan/internal/out_buf.h>
+#include <botan/internal/secqueue.h>
#include <botan/parsing.h>
namespace Botan {
diff --git a/src/filters/pipe.h b/src/filters/pipe.h
index 58bb6d22a..29b3b050c 100644
--- a/src/filters/pipe.h
+++ b/src/filters/pipe.h
@@ -270,8 +270,8 @@ BOTAN_DLL std::istream& operator>>(std::istream&, Pipe&);
}
-#endif
-
#if defined(BOTAN_HAS_PIPE_UNIXFD_IO)
#include <botan/fd_unix.h>
#endif
+
+#endif
diff --git a/src/filters/pipe_rw.cpp b/src/filters/pipe_rw.cpp
index 41b57a716..756a1cf09 100644
--- a/src/filters/pipe_rw.cpp
+++ b/src/filters/pipe_rw.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/pipe.h>
-#include <botan/out_buf.h>
-#include <botan/secqueue.h>
+#include <botan/internal/out_buf.h>
+#include <botan/internal/secqueue.h>
namespace Botan {
diff --git a/src/filters/secqueue.cpp b/src/filters/secqueue.cpp
index f63ef898c..74897805c 100644
--- a/src/filters/secqueue.cpp
+++ b/src/filters/secqueue.cpp
@@ -5,7 +5,7 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/secqueue.h>
+#include <botan/internal/secqueue.h>
#include <algorithm>
namespace Botan {
diff --git a/src/filters/secqueue.h b/src/filters/secqueue.h
index fc1fc213a..75f650030 100644
--- a/src/filters/secqueue.h
+++ b/src/filters/secqueue.h
@@ -16,7 +16,7 @@ namespace Botan {
/*
* SecureQueue
*/
-class BOTAN_DLL SecureQueue : public Fanout_Filter, public DataSource
+class SecureQueue : public Fanout_Filter, public DataSource
{
public:
void write(const byte[], u32bit);
diff --git a/src/hash/bmw/bmw_512.cpp b/src/hash/bmw/bmw_512.cpp
index 5ccb09579..61c20d769 100644
--- a/src/hash/bmw/bmw_512.cpp
+++ b/src/hash/bmw/bmw_512.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/bmw_512.h>
-#include <botan/loadstor.h>
-#include <botan/rotate.h>
+#include <botan/internal/loadstor.h>
+#include <botan/internal/rotate.h>
namespace Botan {
diff --git a/src/hash/fork256/fork256.cpp b/src/hash/fork256/fork256.cpp
index bd85dfd7c..6e6e44fb8 100644
--- a/src/hash/fork256/fork256.cpp
+++ b/src/hash/fork256/fork256.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/fork256.h>
-#include <botan/loadstor.h>
-#include <botan/rotate.h>
+#include <botan/internal/loadstor.h>
+#include <botan/internal/rotate.h>
namespace Botan {
diff --git a/src/hash/gost_3411/gost_3411.cpp b/src/hash/gost_3411/gost_3411.cpp
index 16b1311da..6de3c9d52 100644
--- a/src/hash/gost_3411/gost_3411.cpp
+++ b/src/hash/gost_3411/gost_3411.cpp
@@ -6,9 +6,9 @@
*/
#include <botan/gost_3411.h>
-#include <botan/loadstor.h>
-#include <botan/rotate.h>
-#include <botan/xor_buf.h>
+#include <botan/internal/loadstor.h>
+#include <botan/internal/rotate.h>
+#include <botan/internal/xor_buf.h>
namespace Botan {
diff --git a/src/hash/has160/has160.cpp b/src/hash/has160/has160.cpp
index ae45418ce..006e8f142 100644
--- a/src/hash/has160/has160.cpp
+++ b/src/hash/has160/has160.cpp
@@ -6,12 +6,12 @@
*/
#include <botan/has160.h>
-#include <botan/loadstor.h>
-#include <botan/rotate.h>
+#include <botan/internal/loadstor.h>
+#include <botan/internal/rotate.h>
namespace Botan {
-namespace {
+namespace HAS_160_F {
/*
* HAS-160 F1 Function
@@ -60,6 +60,8 @@ inline void F4(u32bit A, u32bit& B, u32bit C, u32bit D, u32bit& E,
*/
void HAS_160::compress_n(const byte input[], u32bit blocks)
{
+ using namespace HAS_160_F;
+
u32bit A = digest[0], B = digest[1], C = digest[2],
D = digest[3], E = digest[4];
diff --git a/src/hash/info.txt b/src/hash/info.txt
index 0e45806f8..a048df7d9 100644
--- a/src/hash/info.txt
+++ b/src/hash/info.txt
@@ -1,9 +1,3 @@
-load_on auto
-
-<add>
-hash.h
-</add>
-
<requires>
buf_comp
</requires>
diff --git a/src/hash/md2/md2.cpp b/src/hash/md2/md2.cpp
index f03518ec0..7d0ab0ab0 100644
--- a/src/hash/md2/md2.cpp
+++ b/src/hash/md2/md2.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/md2.h>
-#include <botan/xor_buf.h>
+#include <botan/internal/xor_buf.h>
namespace Botan {
diff --git a/src/hash/md4/md4.cpp b/src/hash/md4/md4.cpp
index f573dae25..5713a17b2 100644
--- a/src/hash/md4/md4.cpp
+++ b/src/hash/md4/md4.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/md4.h>
-#include <botan/loadstor.h>
-#include <botan/rotate.h>
+#include <botan/internal/loadstor.h>
+#include <botan/internal/rotate.h>
namespace Botan {
diff --git a/src/hash/md4_ia32/md4_ia32.cpp b/src/hash/md4_ia32/md4_ia32.cpp
index 12fe71da4..cdaffb62e 100644
--- a/src/hash/md4_ia32/md4_ia32.cpp
+++ b/src/hash/md4_ia32/md4_ia32.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/md4_ia32.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
namespace Botan {
diff --git a/src/hash/md4_ia32/md4_ia32_imp.S b/src/hash/md4_ia32/md4_ia32_imp.S
index 1df972bb9..c7e108147 100644
--- a/src/hash/md4_ia32/md4_ia32_imp.S
+++ b/src/hash/md4_ia32/md4_ia32_imp.S
@@ -5,7 +5,7 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/asm_macr_ia32.h>
+#include <botan/internal/asm_macr_ia32.h>
START_LISTING(md4_ia32.S)
diff --git a/src/hash/md5/md5.cpp b/src/hash/md5/md5.cpp
index 8c1e5a8e1..4714603d3 100644
--- a/src/hash/md5/md5.cpp
+++ b/src/hash/md5/md5.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/md5.h>
-#include <botan/loadstor.h>
-#include <botan/rotate.h>
+#include <botan/internal/loadstor.h>
+#include <botan/internal/rotate.h>
namespace Botan {
diff --git a/src/hash/md5_ia32/md5_ia32.cpp b/src/hash/md5_ia32/md5_ia32.cpp
index 443569b3b..5681a2763 100644
--- a/src/hash/md5_ia32/md5_ia32.cpp
+++ b/src/hash/md5_ia32/md5_ia32.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/md5_ia32.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
namespace Botan {
diff --git a/src/hash/md5_ia32/md5_ia32_imp.S b/src/hash/md5_ia32/md5_ia32_imp.S
index d1aecb834..e77836353 100644
--- a/src/hash/md5_ia32/md5_ia32_imp.S
+++ b/src/hash/md5_ia32/md5_ia32_imp.S
@@ -5,7 +5,7 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/asm_macr_ia32.h>
+#include <botan/internal/asm_macr_ia32.h>
START_LISTING(md5_ia32.S)
diff --git a/src/hash/mdx_hash/mdx_hash.cpp b/src/hash/mdx_hash/mdx_hash.cpp
index 28402c2c5..cc03d0319 100644
--- a/src/hash/mdx_hash/mdx_hash.cpp
+++ b/src/hash/mdx_hash/mdx_hash.cpp
@@ -7,7 +7,7 @@
#include <botan/mdx_hash.h>
#include <botan/exceptn.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
namespace Botan {
diff --git a/src/hash/rmd128/rmd128.cpp b/src/hash/rmd128/rmd128.cpp
index 7e9da3bdd..f86addda4 100644
--- a/src/hash/rmd128/rmd128.cpp
+++ b/src/hash/rmd128/rmd128.cpp
@@ -6,12 +6,12 @@
*/
#include <botan/rmd128.h>
-#include <botan/loadstor.h>
-#include <botan/rotate.h>
+#include <botan/internal/loadstor.h>
+#include <botan/internal/rotate.h>
namespace Botan {
-namespace {
+namespace RIPEMD_128_F {
/*
* RIPEMD-128 F1 Function
@@ -60,6 +60,8 @@ inline void F4(u32bit& A, u32bit B, u32bit C, u32bit D,
*/
void RIPEMD_128::compress_n(const byte input[], u32bit blocks)
{
+ using namespace RIPEMD_128_F;
+
const u32bit MAGIC2 = 0x5A827999, MAGIC3 = 0x6ED9EBA1,
MAGIC4 = 0x8F1BBCDC, MAGIC5 = 0x50A28BE6,
MAGIC6 = 0x5C4DD124, MAGIC7 = 0x6D703EF3;
diff --git a/src/hash/rmd160/rmd160.cpp b/src/hash/rmd160/rmd160.cpp
index 5237f1e12..e1d6a8dc5 100644
--- a/src/hash/rmd160/rmd160.cpp
+++ b/src/hash/rmd160/rmd160.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/rmd160.h>
-#include <botan/loadstor.h>
-#include <botan/rotate.h>
+#include <botan/internal/loadstor.h>
+#include <botan/internal/rotate.h>
namespace Botan {
diff --git a/src/hash/sha1/sha160.cpp b/src/hash/sha1/sha160.cpp
index ff44593f6..5666d8fa5 100644
--- a/src/hash/sha1/sha160.cpp
+++ b/src/hash/sha1/sha160.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/sha160.h>
-#include <botan/loadstor.h>
-#include <botan/rotate.h>
+#include <botan/internal/loadstor.h>
+#include <botan/internal/rotate.h>
namespace Botan {
diff --git a/src/hash/sha1_amd64/sha1_amd64_imp.S b/src/hash/sha1_amd64/sha1_amd64_imp.S
index d45e2fd86..4eea75f11 100644
--- a/src/hash/sha1_amd64/sha1_amd64_imp.S
+++ b/src/hash/sha1_amd64/sha1_amd64_imp.S
@@ -5,7 +5,7 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/asm_macr_amd64.h>
+#include <botan/internal/asm_macr_amd64.h>
START_LISTING(sha1_amd64.S)
diff --git a/src/hash/sha1_ia32/sha1_ia32.cpp b/src/hash/sha1_ia32/sha1_ia32.cpp
index 0fa0b6bf2..a8f7f7b75 100644
--- a/src/hash/sha1_ia32/sha1_ia32.cpp
+++ b/src/hash/sha1_ia32/sha1_ia32.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/sha1_ia32.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
namespace Botan {
diff --git a/src/hash/sha1_ia32/sha1_ia32_imp.S b/src/hash/sha1_ia32/sha1_ia32_imp.S
index 3167fce9a..c2777b4b5 100644
--- a/src/hash/sha1_ia32/sha1_ia32_imp.S
+++ b/src/hash/sha1_ia32/sha1_ia32_imp.S
@@ -5,7 +5,7 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/asm_macr_ia32.h>
+#include <botan/internal/asm_macr_ia32.h>
START_LISTING(sha1_ia32.S)
diff --git a/src/hash/sha1_sse2/sha1_sse2.cpp b/src/hash/sha1_sse2/sha1_sse2.cpp
index 9267689e7..89ad7b003 100644
--- a/src/hash/sha1_sse2/sha1_sse2.cpp
+++ b/src/hash/sha1_sse2/sha1_sse2.cpp
@@ -9,7 +9,7 @@
*/
#include <botan/sha1_sse2.h>
-#include <botan/rotate.h>
+#include <botan/internal/rotate.h>
#include <emmintrin.h>
namespace Botan {
diff --git a/src/hash/sha2/sha2_32.cpp b/src/hash/sha2/sha2_32.cpp
index 91375df04..d9d69e4a9 100644
--- a/src/hash/sha2/sha2_32.cpp
+++ b/src/hash/sha2/sha2_32.cpp
@@ -7,8 +7,8 @@
*/
#include <botan/sha2_32.h>
-#include <botan/loadstor.h>
-#include <botan/rotate.h>
+#include <botan/internal/loadstor.h>
+#include <botan/internal/rotate.h>
namespace Botan {
diff --git a/src/hash/sha2/sha2_64.cpp b/src/hash/sha2/sha2_64.cpp
index 3e7c0e228..9815a6e19 100644
--- a/src/hash/sha2/sha2_64.cpp
+++ b/src/hash/sha2/sha2_64.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/sha2_64.h>
-#include <botan/loadstor.h>
-#include <botan/rotate.h>
+#include <botan/internal/loadstor.h>
+#include <botan/internal/rotate.h>
namespace Botan {
diff --git a/src/hash/skein/skein_512.cpp b/src/hash/skein/skein_512.cpp
index 5ae09f621..bf27133fe 100644
--- a/src/hash/skein/skein_512.cpp
+++ b/src/hash/skein/skein_512.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/skein_512.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
#include <botan/parsing.h>
#include <botan/exceptn.h>
#include <algorithm>
diff --git a/src/hash/tiger/tiger.cpp b/src/hash/tiger/tiger.cpp
index 2d56aa1b3..89282e25d 100644
--- a/src/hash/tiger/tiger.cpp
+++ b/src/hash/tiger/tiger.cpp
@@ -7,7 +7,7 @@
#include <botan/tiger.h>
#include <botan/exceptn.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
#include <botan/parsing.h>
namespace Botan {
diff --git a/src/hash/whirlpool/whrlpool.cpp b/src/hash/whirlpool/whrlpool.cpp
index 06755fe77..c9d520776 100644
--- a/src/hash/whirlpool/whrlpool.cpp
+++ b/src/hash/whirlpool/whrlpool.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/whrlpool.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
namespace Botan {
diff --git a/src/kdf/info.txt b/src/kdf/info.txt
index 8eb4fc6e9..a4cd72bf5 100644
--- a/src/kdf/info.txt
+++ b/src/kdf/info.txt
@@ -1,12 +1,5 @@
define KDF_BASE
-load_on auto
-
-<add>
-kdf.cpp
-kdf.h
-</add>
-
<requires>
alloc
</requires>
diff --git a/src/kdf/kdf1/info.txt b/src/kdf/kdf1/info.txt
index 2557f9472..354466107 100644
--- a/src/kdf/kdf1/info.txt
+++ b/src/kdf/kdf1/info.txt
@@ -1,12 +1,5 @@
define KDF1
-load_on auto
-
-<add>
-kdf1.h
-kdf1.cpp
-</add>
-
<requires>
hash
</requires>
diff --git a/src/kdf/kdf2/info.txt b/src/kdf/kdf2/info.txt
index b71595449..d233b5f77 100644
--- a/src/kdf/kdf2/info.txt
+++ b/src/kdf/kdf2/info.txt
@@ -1,12 +1,5 @@
define KDF2
-load_on auto
-
-<add>
-kdf2.cpp
-kdf2.h
-</add>
-
<requires>
hash
</requires>
diff --git a/src/kdf/kdf2/kdf2.cpp b/src/kdf/kdf2/kdf2.cpp
index 167f64436..f8f178c80 100644
--- a/src/kdf/kdf2/kdf2.cpp
+++ b/src/kdf/kdf2/kdf2.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/kdf2.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
namespace Botan {
diff --git a/src/kdf/mgf1/info.txt b/src/kdf/mgf1/info.txt
index 0f104c3b3..91973a614 100644
--- a/src/kdf/mgf1/info.txt
+++ b/src/kdf/mgf1/info.txt
@@ -1,12 +1,5 @@
define MGF1
-load_on dep
-
-<add>
-mgf1.h
-mgf1.cpp
-</add>
-
<requires>
hash
</requires>
diff --git a/src/kdf/mgf1/mgf1.cpp b/src/kdf/mgf1/mgf1.cpp
index a26e33a9e..c61f583a7 100644
--- a/src/kdf/mgf1/mgf1.cpp
+++ b/src/kdf/mgf1/mgf1.cpp
@@ -6,9 +6,9 @@
*/
#include <botan/mgf1.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
#include <botan/exceptn.h>
-#include <botan/xor_buf.h>
+#include <botan/internal/xor_buf.h>
#include <algorithm>
#include <memory>
diff --git a/src/kdf/ssl_prf/info.txt b/src/kdf/ssl_prf/info.txt
index b306721b9..68355ff40 100644
--- a/src/kdf/ssl_prf/info.txt
+++ b/src/kdf/ssl_prf/info.txt
@@ -1,12 +1,5 @@
define SSL_V3_PRF
-load_on auto
-
-<add>
-prf_ssl3.h
-prf_ssl3.cpp
-</add>
-
<requires>
md5
sha1
diff --git a/src/kdf/tls_prf/info.txt b/src/kdf/tls_prf/info.txt
index 11a0d44f5..9531a6a83 100644
--- a/src/kdf/tls_prf/info.txt
+++ b/src/kdf/tls_prf/info.txt
@@ -1,15 +1,7 @@
define TLS_V10_PRF
-load_on auto
-
-<add>
-prf_tls.h
-prf_tls.cpp
-</add>
-
<requires>
hmac
-mac
md5
sha1
</requires>
diff --git a/src/kdf/tls_prf/prf_tls.cpp b/src/kdf/tls_prf/prf_tls.cpp
index 7c638b994..5e77f831e 100644
--- a/src/kdf/tls_prf/prf_tls.cpp
+++ b/src/kdf/tls_prf/prf_tls.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/prf_tls.h>
-#include <botan/xor_buf.h>
+#include <botan/internal/xor_buf.h>
#include <botan/hmac.h>
#include <botan/md5.h>
#include <botan/sha160.h>
diff --git a/src/kdf/x942_prf/info.txt b/src/kdf/x942_prf/info.txt
index e38b2aac1..e51aafd08 100644
--- a/src/kdf/x942_prf/info.txt
+++ b/src/kdf/x942_prf/info.txt
@@ -1,12 +1,5 @@
define X942_PRF
-load_on auto
-
-<add>
-prf_x942.cpp
-prf_x942.h
-</add>
-
<requires>
asn1
oid_lookup
diff --git a/src/kdf/x942_prf/prf_x942.cpp b/src/kdf/x942_prf/prf_x942.cpp
index d9ee09d20..060fed700 100644
--- a/src/kdf/x942_prf/prf_x942.cpp
+++ b/src/kdf/x942_prf/prf_x942.cpp
@@ -9,7 +9,7 @@
#include <botan/der_enc.h>
#include <botan/oids.h>
#include <botan/sha160.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
#include <algorithm>
#include <memory>
diff --git a/src/libstate/info.txt b/src/libstate/info.txt
index aa74e6573..342bdb5f2 100644
--- a/src/libstate/info.txt
+++ b/src/libstate/info.txt
@@ -2,23 +2,26 @@ load_on always
define LIBSTATE_MODULE
-<add>
+<header:public>
botan.h
+libstate.h
+init.h
+look_pk.h
+lookup.h
+pk_engine.h
+scan_name.h
+</header:public>
+
+<source>
get_enc.cpp
init.cpp
-init.h
libstate.cpp
-libstate.h
look_pk.cpp
-look_pk.h
lookup.cpp
-lookup.h
pk_engine.cpp
-pk_engine.h
policy.cpp
scan_name.cpp
-scan_name.h
-</add>
+</source>
<requires>
algo_factory
diff --git a/src/libstate/libstate.cpp b/src/libstate/libstate.cpp
index dd7fe7eaf..06b05276f 100644
--- a/src/libstate/libstate.cpp
+++ b/src/libstate/libstate.cpp
@@ -16,7 +16,7 @@
#include <algorithm>
#if defined(BOTAN_HAS_ALLOC_MMAP)
- #include <botan/mmap_mem.h>
+ #include <botan/internal/mmap_mem.h>
#endif
#if defined(BOTAN_HAS_ENGINE_IA32_ASSEMBLER)
diff --git a/src/libstate/oid_lookup/info.txt b/src/libstate/oid_lookup/info.txt
index e0f6f099c..6544c9501 100644
--- a/src/libstate/oid_lookup/info.txt
+++ b/src/libstate/oid_lookup/info.txt
@@ -1,12 +1,5 @@
-load_on dep
-
define OID_LOOKUP
-<add>
-oids.cpp
-oids.h
-</add>
-
<requires>
asn1
</requires>
diff --git a/src/libstate/scan_name.cpp b/src/libstate/scan_name.cpp
index e16ffbcfe..9e046e8ea 100644
--- a/src/libstate/scan_name.cpp
+++ b/src/libstate/scan_name.cpp
@@ -1,6 +1,6 @@
/**
* SCAN Name Abstraction
-* (C) 2008 Jack Lloyd
+* (C) 2008-2009 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
diff --git a/src/mac/cbc_mac/cbc_mac.cpp b/src/mac/cbc_mac/cbc_mac.cpp
index 0617e3e90..6a0692580 100644
--- a/src/mac/cbc_mac/cbc_mac.cpp
+++ b/src/mac/cbc_mac/cbc_mac.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/cbc_mac.h>
-#include <botan/xor_buf.h>
+#include <botan/internal/xor_buf.h>
#include <algorithm>
namespace Botan {
diff --git a/src/mac/cbc_mac/info.txt b/src/mac/cbc_mac/info.txt
index 80adc5fd0..b65bb684c 100644
--- a/src/mac/cbc_mac/info.txt
+++ b/src/mac/cbc_mac/info.txt
@@ -1,12 +1,5 @@
define CBC_MAC
-load_on auto
-
-<add>
-cbc_mac.cpp
-cbc_mac.h
-</add>
-
<requires>
block
</requires>
diff --git a/src/mac/cmac/cmac.cpp b/src/mac/cmac/cmac.cpp
index b689a4d3a..05c5f4a88 100644
--- a/src/mac/cmac/cmac.cpp
+++ b/src/mac/cmac/cmac.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/cmac.h>
-#include <botan/xor_buf.h>
+#include <botan/internal/xor_buf.h>
namespace Botan {
diff --git a/src/mac/cmac/info.txt b/src/mac/cmac/info.txt
index 5dad789de..5513943ac 100644
--- a/src/mac/cmac/info.txt
+++ b/src/mac/cmac/info.txt
@@ -1,12 +1,5 @@
define CMAC
-load_on auto
-
-<add>
-cmac.cpp
-cmac.h
-</add>
-
<requires>
block
</requires>
diff --git a/src/mac/hmac/hmac.cpp b/src/mac/hmac/hmac.cpp
index dcd6bce5d..f69504c82 100644
--- a/src/mac/hmac/hmac.cpp
+++ b/src/mac/hmac/hmac.cpp
@@ -7,7 +7,7 @@
*/
#include <botan/hmac.h>
-#include <botan/xor_buf.h>
+#include <botan/internal/xor_buf.h>
namespace Botan {
diff --git a/src/mac/hmac/info.txt b/src/mac/hmac/info.txt
index 26da83533..b1a69c25b 100644
--- a/src/mac/hmac/info.txt
+++ b/src/mac/hmac/info.txt
@@ -1,12 +1,5 @@
define HMAC
-load_on auto
-
-<add>
-hmac.cpp
-hmac.h
-</add>
-
<requires>
hash
</requires>
diff --git a/src/mac/info.txt b/src/mac/info.txt
index 9a839d04d..6a74d8445 100644
--- a/src/mac/info.txt
+++ b/src/mac/info.txt
@@ -1,10 +1,3 @@
-load_on auto
-
-<add>
-mac.h
-mac.cpp
-</add>
-
<requires>
buf_comp
sym_algo
diff --git a/src/mac/ssl3mac/info.txt b/src/mac/ssl3mac/info.txt
index c4ef54629..8c636dbae 100644
--- a/src/mac/ssl3mac/info.txt
+++ b/src/mac/ssl3mac/info.txt
@@ -1,12 +1,5 @@
define SSL3_MAC
-load_on auto
-
-<add>
-ssl3_mac.cpp
-ssl3_mac.h
-</add>
-
<requires>
hash
</requires>
diff --git a/src/mac/x919_mac/info.txt b/src/mac/x919_mac/info.txt
index 16955816c..ca294c951 100644
--- a/src/mac/x919_mac/info.txt
+++ b/src/mac/x919_mac/info.txt
@@ -1,12 +1,5 @@
define ANSI_X919_MAC
-load_on auto
-
-<add>
-x919_mac.cpp
-x919_mac.h
-</add>
-
<requires>
block
</requires>
diff --git a/src/mac/x919_mac/x919_mac.cpp b/src/mac/x919_mac/x919_mac.cpp
index 52260494a..42e039d60 100644
--- a/src/mac/x919_mac/x919_mac.cpp
+++ b/src/mac/x919_mac/x919_mac.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/x919_mac.h>
-#include <botan/xor_buf.h>
+#include <botan/internal/xor_buf.h>
#include <algorithm>
namespace Botan {
diff --git a/src/math/bigint/big_ops2.cpp b/src/math/bigint/big_ops2.cpp
index 488eca909..1137fe4b2 100644
--- a/src/math/bigint/big_ops2.cpp
+++ b/src/math/bigint/big_ops2.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/bigint.h>
-#include <botan/mp_core.h>
-#include <botan/bit_ops.h>
+#include <botan/internal/mp_core.h>
+#include <botan/internal/bit_ops.h>
#include <algorithm>
namespace Botan {
diff --git a/src/math/bigint/big_ops3.cpp b/src/math/bigint/big_ops3.cpp
index ad8b7bbd0..b92b71543 100644
--- a/src/math/bigint/big_ops3.cpp
+++ b/src/math/bigint/big_ops3.cpp
@@ -7,8 +7,8 @@
#include <botan/bigint.h>
#include <botan/divide.h>
-#include <botan/mp_core.h>
-#include <botan/bit_ops.h>
+#include <botan/internal/mp_core.h>
+#include <botan/internal/bit_ops.h>
#include <algorithm>
namespace Botan {
diff --git a/src/math/bigint/bigint.cpp b/src/math/bigint/bigint.cpp
index c777e770b..1d234391c 100644
--- a/src/math/bigint/bigint.cpp
+++ b/src/math/bigint/bigint.cpp
@@ -6,10 +6,10 @@
*/
#include <botan/bigint.h>
-#include <botan/mp_core.h>
-#include <botan/loadstor.h>
+#include <botan/internal/mp_core.h>
+#include <botan/internal/loadstor.h>
#include <botan/parsing.h>
-#include <botan/rounding.h>
+#include <botan/internal/rounding.h>
namespace Botan {
diff --git a/src/math/bigint/bigint.h b/src/math/bigint/bigint.h
index 3db9a1a04..2612850c3 100644
--- a/src/math/bigint/bigint.h
+++ b/src/math/bigint/bigint.h
@@ -40,7 +40,7 @@ class BOTAN_DLL BigInt
/**
* DivideByZero Exception
*/
- struct DivideByZero : public Exception
+ struct BOTAN_DLL DivideByZero : public Exception
{ DivideByZero() : Exception("BigInt divide by zero") {} };
/**
diff --git a/src/math/bigint/divide.cpp b/src/math/bigint/divide.cpp
index 45d31350d..a5f2462d8 100644
--- a/src/math/bigint/divide.cpp
+++ b/src/math/bigint/divide.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/divide.h>
-#include <botan/mp_core.h>
+#include <botan/internal/mp_core.h>
namespace Botan {
diff --git a/src/math/bigint/info.txt b/src/math/bigint/info.txt
index 30018b795..d5741943f 100644
--- a/src/math/bigint/info.txt
+++ b/src/math/bigint/info.txt
@@ -2,11 +2,17 @@ load_on auto
define BIGINT
-<add>
+<header:public>
bigint.h
divide.h
-mp_core.h
mp_types.h
+</header:public>
+
+<header:internal>
+mp_core.h
+</header:internal>
+
+<source>
big_code.cpp
big_io.cpp
big_ops2.cpp
@@ -19,7 +25,7 @@ mp_comba.cpp
mp_karat.cpp
mp_misc.cpp
mp_shift.cpp
-</add>
+</source>
<requires>
alloc
diff --git a/src/math/bigint/monty_amd64/info.txt b/src/math/bigint/monty_amd64/info.txt
index 657cd0353..bb16dbe8f 100644
--- a/src/math/bigint/monty_amd64/info.txt
+++ b/src/math/bigint/monty_amd64/info.txt
@@ -2,9 +2,9 @@ mp_bits 64
load_on never
-<add>
+<source>
mp_monty.S
-</add>
+</source>
<arch>
amd64
diff --git a/src/math/bigint/monty_amd64/mp_monty.S b/src/math/bigint/monty_amd64/mp_monty.S
index fa493aaa2..9eab9f766 100644
--- a/src/math/bigint/monty_amd64/mp_monty.S
+++ b/src/math/bigint/monty_amd64/mp_monty.S
@@ -5,7 +5,7 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/asm_macr_amd64.h>
+#include <botan/internal/asm_macr_amd64.h>
START_LISTING(mp_monty.S)
diff --git a/src/math/bigint/monty_generic/info.txt b/src/math/bigint/monty_generic/info.txt
index c709229e6..cd05ccdc0 100644
--- a/src/math/bigint/monty_generic/info.txt
+++ b/src/math/bigint/monty_generic/info.txt
@@ -1,5 +1,5 @@
load_on dep
-<add>
+<source>
mp_monty.cpp
-</add>
+</source>
diff --git a/src/math/bigint/monty_generic/mp_monty.cpp b/src/math/bigint/monty_generic/mp_monty.cpp
index 5409e2569..ba1071e21 100644
--- a/src/math/bigint/monty_generic/mp_monty.cpp
+++ b/src/math/bigint/monty_generic/mp_monty.cpp
@@ -6,9 +6,9 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/mp_core.h>
-#include <botan/mp_asm.h>
-#include <botan/mp_asmi.h>
+#include <botan/internal/mp_core.h>
+#include <botan/internal/mp_asm.h>
+#include <botan/internal/mp_asmi.h>
namespace Botan {
diff --git a/src/math/bigint/mp_amd64/info.txt b/src/math/bigint/mp_amd64/info.txt
index a7da8806e..616fb2840 100644
--- a/src/math/bigint/mp_amd64/info.txt
+++ b/src/math/bigint/mp_amd64/info.txt
@@ -1,11 +1,11 @@
-mp_bits 64
-
load_on dep
-<add>
+mp_bits 64
+
+<header:internal>
mp_asm.h
mp_asmi.h
-</add>
+</header:internal>
<arch>
amd64
diff --git a/src/math/bigint/mp_amd64/mp_asmi.h b/src/math/bigint/mp_amd64/mp_asmi.h
index 1a3ac1aaa..d8f681d77 100644
--- a/src/math/bigint/mp_amd64/mp_asmi.h
+++ b/src/math/bigint/mp_amd64/mp_asmi.h
@@ -9,7 +9,7 @@
#ifndef BOTAN_MP_ASM_INTERNAL_H__
#define BOTAN_MP_ASM_INTERNAL_H__
-#include <botan/mp_asm.h>
+#include <botan/internal/mp_asm.h>
namespace Botan {
diff --git a/src/math/bigint/mp_asm.cpp b/src/math/bigint/mp_asm.cpp
index ea9738d30..9827bff06 100644
--- a/src/math/bigint/mp_asm.cpp
+++ b/src/math/bigint/mp_asm.cpp
@@ -6,9 +6,9 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/mp_asm.h>
-#include <botan/mp_asmi.h>
-#include <botan/mp_core.h>
+#include <botan/internal/mp_asm.h>
+#include <botan/internal/mp_asmi.h>
+#include <botan/internal/mp_core.h>
#include <botan/mem_ops.h>
namespace Botan {
diff --git a/src/math/bigint/mp_asm64/info.txt b/src/math/bigint/mp_asm64/info.txt
index 7bdbffb2c..fd0242a7a 100644
--- a/src/math/bigint/mp_asm64/info.txt
+++ b/src/math/bigint/mp_asm64/info.txt
@@ -2,10 +2,10 @@ mp_bits 64
load_on dep
-<add>
+<header:internal>
mp_asm.h
mp_generic:mp_asmi.h
-</add>
+</header:internal>
<arch>
#amd64
diff --git a/src/math/bigint/mp_comba.cpp b/src/math/bigint/mp_comba.cpp
index 218038d8a..2770d3f0a 100644
--- a/src/math/bigint/mp_comba.cpp
+++ b/src/math/bigint/mp_comba.cpp
@@ -5,8 +5,8 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/mp_core.h>
-#include <botan/mp_asmi.h>
+#include <botan/internal/mp_core.h>
+#include <botan/internal/mp_asmi.h>
namespace Botan {
diff --git a/src/math/bigint/mp_generic/info.txt b/src/math/bigint/mp_generic/info.txt
index 28f258ebb..ab4d7406a 100644
--- a/src/math/bigint/mp_generic/info.txt
+++ b/src/math/bigint/mp_generic/info.txt
@@ -1,6 +1,6 @@
load_on dep
-<add>
+<header:internal>
mp_asm.h
mp_asmi.h
-</add>
+</header:internal>
diff --git a/src/math/bigint/mp_generic/mp_asmi.h b/src/math/bigint/mp_generic/mp_asmi.h
index 21c4db248..9913c6ba9 100644
--- a/src/math/bigint/mp_generic/mp_asmi.h
+++ b/src/math/bigint/mp_generic/mp_asmi.h
@@ -9,7 +9,7 @@
#ifndef BOTAN_MP_ASM_INTERNAL_H__
#define BOTAN_MP_ASM_INTERNAL_H__
-#include <botan/mp_asm.h>
+#include <botan/internal/mp_asm.h>
namespace Botan {
diff --git a/src/math/bigint/mp_ia32/info.txt b/src/math/bigint/mp_ia32/info.txt
index 6e093a7e5..182f34eb7 100644
--- a/src/math/bigint/mp_ia32/info.txt
+++ b/src/math/bigint/mp_ia32/info.txt
@@ -1,11 +1,11 @@
-mp_bits 32
+load_on dep
-load_on asm_ok
+mp_bits 32
-<add>
+<header:internal>
mp_asm.h
mp_asmi.h
-</add>
+</header:internal>
<arch>
ia32
diff --git a/src/math/bigint/mp_ia32/mp_asmi.h b/src/math/bigint/mp_ia32/mp_asmi.h
index 46bf302d5..0b8708e53 100644
--- a/src/math/bigint/mp_ia32/mp_asmi.h
+++ b/src/math/bigint/mp_ia32/mp_asmi.h
@@ -9,7 +9,7 @@
#ifndef BOTAN_MP_ASM_INTERNAL_H__
#define BOTAN_MP_ASM_INTERNAL_H__
-#include <botan/mp_asm.h>
+#include <botan/internal/mp_asm.h>
namespace Botan {
diff --git a/src/math/bigint/mp_ia32_msvc/info.txt b/src/math/bigint/mp_ia32_msvc/info.txt
index 52839d89b..55a42c310 100644
--- a/src/math/bigint/mp_ia32_msvc/info.txt
+++ b/src/math/bigint/mp_ia32_msvc/info.txt
@@ -2,10 +2,10 @@ mp_bits 32
load_on dep
-<add>
+<header:internal>
mp_generic:mp_asm.h
mp_asmi.h
-</add>
+</header:internal>
<arch>
ia32
diff --git a/src/math/bigint/mp_ia32_msvc/mp_asmi.h b/src/math/bigint/mp_ia32_msvc/mp_asmi.h
index 33ce6eb3d..4c3027fde 100644
--- a/src/math/bigint/mp_ia32_msvc/mp_asmi.h
+++ b/src/math/bigint/mp_ia32_msvc/mp_asmi.h
@@ -9,7 +9,7 @@
#ifndef BOTAN_MP_ASM_INTERNAL_H__
#define BOTAN_MP_ASM_INTERNAL_H__
-#include <botan/mp_asm.h>
+#include <botan/internal/mp_asm.h>
namespace Botan {
diff --git a/src/math/bigint/mp_karat.cpp b/src/math/bigint/mp_karat.cpp
index f30d418cc..a50e4ee0c 100644
--- a/src/math/bigint/mp_karat.cpp
+++ b/src/math/bigint/mp_karat.cpp
@@ -5,9 +5,9 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/mp_core.h>
+#include <botan/internal/mp_core.h>
#include <botan/mem_ops.h>
-#include <botan/mp_asmi.h>
+#include <botan/internal/mp_asmi.h>
namespace Botan {
diff --git a/src/math/bigint/mp_misc.cpp b/src/math/bigint/mp_misc.cpp
index 6b7fc651b..86d5f3d50 100644
--- a/src/math/bigint/mp_misc.cpp
+++ b/src/math/bigint/mp_misc.cpp
@@ -5,8 +5,8 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/mp_core.h>
-#include <botan/mp_asm.h>
+#include <botan/internal/mp_core.h>
+#include <botan/internal/mp_asm.h>
namespace Botan {
diff --git a/src/math/bigint/mp_shift.cpp b/src/math/bigint/mp_shift.cpp
index a7de79c77..f1d609bfb 100644
--- a/src/math/bigint/mp_shift.cpp
+++ b/src/math/bigint/mp_shift.cpp
@@ -5,7 +5,7 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/mp_core.h>
+#include <botan/internal/mp_core.h>
#include <botan/mem_ops.h>
namespace Botan {
diff --git a/src/math/bigint/mulop_amd64/info.txt b/src/math/bigint/mulop_amd64/info.txt
index 704e4dad8..4a82ff5be 100644
--- a/src/math/bigint/mulop_amd64/info.txt
+++ b/src/math/bigint/mulop_amd64/info.txt
@@ -2,9 +2,9 @@ mp_bits 64
load_on never
-<add>
+<source>
mp_mulop_amd64.S
-</add>
+</source>
<arch>
amd64
diff --git a/src/math/bigint/mulop_amd64/mp_mulop.cpp b/src/math/bigint/mulop_amd64/mp_mulop.cpp
index cbd723e28..e2f38a104 100644
--- a/src/math/bigint/mulop_amd64/mp_mulop.cpp
+++ b/src/math/bigint/mulop_amd64/mp_mulop.cpp
@@ -5,9 +5,9 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/mp_asm.h>
-#include <botan/mp_asmi.h>
-#include <botan/mp_core.h>
+#include <botan/internal/mp_asm.h>
+#include <botan/internal/mp_asmi.h>
+#include <botan/internal/mp_core.h>
#include <botan/mem_ops.h>
namespace Botan {
diff --git a/src/math/bigint/mulop_amd64/mp_mulop_amd64.S b/src/math/bigint/mulop_amd64/mp_mulop_amd64.S
index dd794bccd..d0bb3325f 100644
--- a/src/math/bigint/mulop_amd64/mp_mulop_amd64.S
+++ b/src/math/bigint/mulop_amd64/mp_mulop_amd64.S
@@ -5,7 +5,7 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/asm_macr_amd64.h>
+#include <botan/internal/asm_macr_amd64.h>
START_LISTING(mp_mulop.S)
diff --git a/src/math/bigint/mulop_generic/info.txt b/src/math/bigint/mulop_generic/info.txt
index 8fa2a40c9..548d0f44b 100644
--- a/src/math/bigint/mulop_generic/info.txt
+++ b/src/math/bigint/mulop_generic/info.txt
@@ -1,5 +1,5 @@
load_on dep
-<add>
+<source>
mp_mulop.cpp
-</add>
+</source>
diff --git a/src/math/bigint/mulop_generic/mp_mulop.cpp b/src/math/bigint/mulop_generic/mp_mulop.cpp
index 4647d00d5..33ee2af32 100644
--- a/src/math/bigint/mulop_generic/mp_mulop.cpp
+++ b/src/math/bigint/mulop_generic/mp_mulop.cpp
@@ -5,9 +5,9 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/mp_asm.h>
-#include <botan/mp_asmi.h>
-#include <botan/mp_core.h>
+#include <botan/internal/mp_asm.h>
+#include <botan/internal/mp_asmi.h>
+#include <botan/internal/mp_core.h>
#include <botan/mem_ops.h>
namespace Botan {
diff --git a/src/math/bigint/mulop_ia32/info.txt b/src/math/bigint/mulop_ia32/info.txt
index dd554773f..7afa2ca2f 100644
--- a/src/math/bigint/mulop_ia32/info.txt
+++ b/src/math/bigint/mulop_ia32/info.txt
@@ -4,9 +4,9 @@ mp_bits 32
load_on request
-<add>
+<source>
mp_mulop.S
-</add>
+</source>
<arch>
ia32
diff --git a/src/math/bigint/mulop_ia32/mp_mulop.S b/src/math/bigint/mulop_ia32/mp_mulop.S
index 0ca559659..34cd58112 100644
--- a/src/math/bigint/mulop_ia32/mp_mulop.S
+++ b/src/math/bigint/mulop_ia32/mp_mulop.S
@@ -5,7 +5,7 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/asm_macr_ia32.h>
+#include <botan/internal/asm_macr_ia32.h>
START_LISTING(mp_muladd.S)
diff --git a/src/math/gfpmath/gfp_element.cpp b/src/math/gfpmath/gfp_element.cpp
index 872000a58..1a48fdc92 100644
--- a/src/math/gfpmath/gfp_element.cpp
+++ b/src/math/gfpmath/gfp_element.cpp
@@ -9,9 +9,8 @@
#include <botan/gfp_element.h>
#include <botan/numthry.h>
#include <botan/def_powm.h>
-#include <botan/mp_types.h>
-#include <botan/mp_asm.h>
-#include <botan/mp_asmi.h>
+#include <botan/internal/mp_asm.h>
+#include <botan/internal/mp_asmi.h>
#include <ostream>
#include <assert.h>
diff --git a/src/math/gfpmath/gfp_element.h b/src/math/gfpmath/gfp_element.h
index d340c77b1..c84806f9a 100644
--- a/src/math/gfpmath/gfp_element.h
+++ b/src/math/gfpmath/gfp_element.h
@@ -218,14 +218,6 @@ class BOTAN_DLL GFpElement
//friend declarations for non-member functions
- /**
- * write a GFpElement to an output stream.
- * @param output the output stream to write to
- * @param elem the object to write
- * @result the output stream
- */
- friend std::ostream& operator<<(std::ostream& output, const GFpElement& elem);
-
friend class Point_Coords_GFp;
/**
@@ -252,31 +244,37 @@ class BOTAN_DLL GFpElement
};
// relational operators
-bool operator==(const GFpElement& lhs, const GFpElement& rhs);
+bool BOTAN_DLL operator==(const GFpElement& lhs, const GFpElement& rhs);
inline bool operator!=(const GFpElement& lhs, const GFpElement& rhs )
{
return !operator==(lhs, rhs);
}
// arithmetic operators
-GFpElement operator+(const GFpElement& lhs, const GFpElement& rhs);
-GFpElement operator-(const GFpElement& lhs, const GFpElement& rhs);
-GFpElement operator-(const GFpElement& lhs);
+GFpElement BOTAN_DLL operator+(const GFpElement& lhs, const GFpElement& rhs);
+GFpElement BOTAN_DLL operator-(const GFpElement& lhs, const GFpElement& rhs);
+GFpElement BOTAN_DLL operator-(const GFpElement& lhs);
-GFpElement operator*(const GFpElement& lhs, const GFpElement& rhs);
-GFpElement operator/(const GFpElement& lhs, const GFpElement& rhs);
-GFpElement operator* (const GFpElement& lhs, u32bit rhs);
-GFpElement operator* (u32bit rhs, const GFpElement& lhs);
+GFpElement BOTAN_DLL operator*(const GFpElement& lhs, const GFpElement& rhs);
+GFpElement BOTAN_DLL operator/(const GFpElement& lhs, const GFpElement& rhs);
+GFpElement BOTAN_DLL operator* (const GFpElement& lhs, u32bit rhs);
+GFpElement BOTAN_DLL operator* (u32bit rhs, const GFpElement& lhs);
-// io operators
-std::ostream& operator<<(std::ostream& output, const GFpElement& elem);
+
+/**
+* write a GFpElement to an output stream.
+* @param output the output stream to write to
+* @param elem the object to write
+* @result the output stream
+*/
+BOTAN_DLL std::ostream& operator<<(std::ostream& output, const GFpElement& elem);
// return (*this)^(-1)
-GFpElement inverse(const GFpElement& elem);
+GFpElement BOTAN_DLL inverse(const GFpElement& elem);
// encoding and decoding
-SecureVector<byte> FE2OSP(const GFpElement& elem);
-GFpElement OS2FEP(MemoryRegion<byte> const& os, BigInt p);
+SecureVector<byte> BOTAN_DLL FE2OSP(const GFpElement& elem);
+GFpElement BOTAN_DLL OS2FEP(MemoryRegion<byte> const& os, BigInt p);
inline void swap(GFpElement& x, GFpElement& y)
{
diff --git a/src/math/gfpmath/info.txt b/src/math/gfpmath/info.txt
index e1bf892c7..55ae8b5e6 100644
--- a/src/math/gfpmath/info.txt
+++ b/src/math/gfpmath/info.txt
@@ -1,16 +1,25 @@
define BIGINT_GFP
-load_on auto
+<header:public>
+curve_gfp.h
+gfp_element.h
+gfp_modulus.h
+point_gfp.h
+</header:public>
+<<<<<<< variant A
+<source>
+>>>>>>> variant B
<add>
+####### Ancestor
+define BIGINT_GFP
+
+<add>
+======= end
curve_gfp.cpp
-curve_gfp.h
gfp_element.cpp
-gfp_element.h
-gfp_modulus.h
point_gfp.cpp
-point_gfp.h
-</add>
+</source>
<requires>
bigint
diff --git a/src/math/gfpmath/point_gfp.cpp b/src/math/gfpmath/point_gfp.cpp
index b19687537..4dae1afc8 100644
--- a/src/math/gfpmath/point_gfp.cpp
+++ b/src/math/gfpmath/point_gfp.cpp
@@ -839,7 +839,7 @@ void PointGFp::swap(PointGFp& other)
std::swap<bool>(mAZpow4_set, other.mAZpow4_set);
}
-PointGFp const mult2(const PointGFp& point)
+PointGFp mult2(const PointGFp& point)
{
return (PointGFp(point)).mult2_in_place();
}
@@ -1114,8 +1114,8 @@ GFpElement PointGFp::decompress(bool yMod2, const GFpElement& x,
return GFpElement(curve.get_p(),z);
}
-PointGFp const create_random_point(RandomNumberGenerator& rng,
- const CurveGFp& curve)
+PointGFp create_random_point(RandomNumberGenerator& rng,
+ const CurveGFp& curve)
{
// create a random point
diff --git a/src/math/gfpmath/point_gfp.h b/src/math/gfpmath/point_gfp.h
index ce2bf1626..10fc404bf 100644
--- a/src/math/gfpmath/point_gfp.h
+++ b/src/math/gfpmath/point_gfp.h
@@ -18,7 +18,7 @@
namespace Botan {
-struct Illegal_Point : public Exception
+struct BOTAN_DLL Illegal_Point : public Exception
{
Illegal_Point(const std::string& err = "") : Exception(err) {}
};
@@ -260,36 +260,39 @@ class BOTAN_DLL PointGFp
};
// relational operators
-bool operator==(const PointGFp& lhs, const PointGFp& rhs);
+bool BOTAN_DLL operator==(const PointGFp& lhs, const PointGFp& rhs);
inline bool operator!=(const PointGFp& lhs, const PointGFp& rhs )
{
return !operator==(lhs, rhs);
}
// arithmetic operators
-PointGFp operator+(const PointGFp& lhs, const PointGFp& rhs);
-PointGFp operator-(const PointGFp& lhs, const PointGFp& rhs);
-PointGFp operator-(const PointGFp& lhs);
+PointGFp BOTAN_DLL operator+(const PointGFp& lhs, const PointGFp& rhs);
+PointGFp BOTAN_DLL operator-(const PointGFp& lhs, const PointGFp& rhs);
+PointGFp BOTAN_DLL operator-(const PointGFp& lhs);
-PointGFp operator*(const BigInt& scalar, const PointGFp& point);
-PointGFp operator*(const PointGFp& point, const BigInt& scalar);
-PointGFp mult_point_secure(const PointGFp& point,
- const BigInt& scalar,
- const BigInt& point_order,
- const BigInt& max_secret);
+PointGFp BOTAN_DLL operator*(const BigInt& scalar, const PointGFp& point);
+PointGFp BOTAN_DLL operator*(const PointGFp& point, const BigInt& scalar);
+PointGFp BOTAN_DLL mult_point_secure(const PointGFp& point,
+ const BigInt& scalar,
+ const BigInt& point_order,
+ const BigInt& max_secret);
-PointGFp const mult2(const PointGFp& point);
+PointGFp BOTAN_DLL mult2(const PointGFp& point);
-PointGFp const create_random_point(RandomNumberGenerator& rng,
- const CurveGFp& curve);
+PointGFp BOTAN_DLL create_random_point(RandomNumberGenerator& rng,
+ const CurveGFp& curve);
// encoding and decoding
-SecureVector<byte> EC2OSP(const PointGFp& point, byte format);
-PointGFp OS2ECP(MemoryRegion<byte> const& os, const CurveGFp& curve);
+SecureVector<byte> BOTAN_DLL EC2OSP(const PointGFp& point, byte format);
+PointGFp BOTAN_DLL OS2ECP(MemoryRegion<byte> const& os, const CurveGFp& curve);
-SecureVector<byte> encode_uncompressed(const PointGFp& point); // maybe make private
-SecureVector<byte> encode_hybrid(const PointGFp& point); // maybe make private
-SecureVector<byte> encode_compressed(const PointGFp& point); // maybe make private
+/* Should these be private? */
+SecureVector<byte>
+BOTAN_DLL encode_uncompressed(const PointGFp& point);
+
+SecureVector<byte> BOTAN_DLL encode_hybrid(const PointGFp& point);
+SecureVector<byte> BOTAN_DLL encode_compressed(const PointGFp& point);
// swaps the states of point1 and point2, does not throw!
// cf. Meyers, Item 25
diff --git a/src/math/numbertheory/info.txt b/src/math/numbertheory/info.txt
index 527f4fa29..4a3e3436b 100644
--- a/src/math/numbertheory/info.txt
+++ b/src/math/numbertheory/info.txt
@@ -2,25 +2,28 @@ load_on auto
define BIGINT_MATH
-<add>
-blinding.cpp
+<header:public>
blinding.h
def_powm.h
+numthry.h
+pow_mod.h
+reducer.h
+</header:public>
+
+<source>
+blinding.cpp
dsa_gen.cpp
jacobi.cpp
make_prm.cpp
mp_numth.cpp
numthry.cpp
-numthry.h
pow_mod.cpp
-pow_mod.h
powm_fw.cpp
powm_mnt.cpp
primes.cpp
reducer.cpp
-reducer.h
ressol.cpp
-</add>
+</source>
<requires>
algo_factory
diff --git a/src/math/numbertheory/mp_numth.cpp b/src/math/numbertheory/mp_numth.cpp
index 2cb36b8a3..03eb8d9db 100644
--- a/src/math/numbertheory/mp_numth.cpp
+++ b/src/math/numbertheory/mp_numth.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/numthry.h>
-#include <botan/mp_core.h>
-#include <botan/rounding.h>
+#include <botan/internal/mp_core.h>
+#include <botan/internal/rounding.h>
#include <algorithm>
namespace Botan {
diff --git a/src/math/numbertheory/numthry.cpp b/src/math/numbertheory/numthry.cpp
index 5e36288ff..42e83fa4a 100644
--- a/src/math/numbertheory/numthry.cpp
+++ b/src/math/numbertheory/numthry.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/numthry.h>
-#include <botan/bit_ops.h>
+#include <botan/internal/bit_ops.h>
#include <algorithm>
namespace Botan {
diff --git a/src/math/numbertheory/powm_fw.cpp b/src/math/numbertheory/powm_fw.cpp
index b764ee7aa..8f39830a7 100644
--- a/src/math/numbertheory/powm_fw.cpp
+++ b/src/math/numbertheory/powm_fw.cpp
@@ -16,8 +16,8 @@ namespace {
/*
* Try to choose a good window size
*/
-u32bit choose_window_bits(u32bit exp_bits, u32bit,
- Power_Mod::Usage_Hints hints)
+u32bit fw_powm_window_bits(u32bit exp_bits, u32bit,
+ Power_Mod::Usage_Hints hints)
{
static const u32bit wsize[][2] = {
{ 2048, 7 }, { 1024, 6 }, { 256, 5 }, { 128, 4 }, { 64, 3 }, { 0, 0 }
@@ -62,7 +62,7 @@ void Fixed_Window_Exponentiator::set_exponent(const BigInt& e)
*/
void Fixed_Window_Exponentiator::set_base(const BigInt& base)
{
- window_bits = choose_window_bits(exp.bits(), base.bits(), hints);
+ window_bits = fw_powm_window_bits(exp.bits(), base.bits(), hints);
g.resize((1 << window_bits) - 1);
g[0] = base;
diff --git a/src/math/numbertheory/powm_mnt.cpp b/src/math/numbertheory/powm_mnt.cpp
index e6d8cc3f0..d18081c6a 100644
--- a/src/math/numbertheory/powm_mnt.cpp
+++ b/src/math/numbertheory/powm_mnt.cpp
@@ -7,7 +7,7 @@
#include <botan/def_powm.h>
#include <botan/numthry.h>
-#include <botan/mp_core.h>
+#include <botan/internal/mp_core.h>
namespace Botan {
@@ -16,8 +16,8 @@ namespace {
/*
* Try to choose a good window size
*/
-u32bit choose_window_bits(u32bit exp_bits, u32bit,
- Power_Mod::Usage_Hints hints)
+u32bit montgomery_powm_window_bits(u32bit exp_bits, u32bit,
+ Power_Mod::Usage_Hints hints)
{
static const u32bit wsize[][2] = {
{ 2048, 4 }, { 1024, 3 }, { 256, 2 }, { 128, 1 }, { 0, 0 }
@@ -76,7 +76,7 @@ void Montgomery_Exponentiator::set_exponent(const BigInt& exp)
*/
void Montgomery_Exponentiator::set_base(const BigInt& base)
{
- window_bits = choose_window_bits(exp.bits(), base.bits(), hints);
+ window_bits = montgomery_powm_window_bits(exp.bits(), base.bits(), hints);
g.resize((1 << window_bits) - 1);
diff --git a/src/math/numbertheory/reducer.cpp b/src/math/numbertheory/reducer.cpp
index fbd675ea6..aa53f1a0e 100644
--- a/src/math/numbertheory/reducer.cpp
+++ b/src/math/numbertheory/reducer.cpp
@@ -7,7 +7,7 @@
#include <botan/reducer.h>
#include <botan/numthry.h>
-#include <botan/mp_core.h>
+#include <botan/internal/mp_core.h>
namespace Botan {
diff --git a/src/pbe/info.txt b/src/pbe/info.txt
index f58ed1da4..b45c8f9f4 100644
--- a/src/pbe/info.txt
+++ b/src/pbe/info.txt
@@ -1,12 +1,5 @@
-load_on dep
-
define PASSWORD_BASED_ENCRYPTION
-<add>
-get_pbe.cpp
-get_pbe.h
-</add>
-
<requires>
filters
libstate
diff --git a/src/pbe/pbes1/info.txt b/src/pbe/pbes1/info.txt
index 5dcbf9510..4fe66f6f8 100644
--- a/src/pbe/pbes1/info.txt
+++ b/src/pbe/pbes1/info.txt
@@ -1,12 +1,5 @@
define PBE_PKCS_V15
-load_on auto
-
-<add>
-pbes1.cpp
-pbes1.h
-</add>
-
<requires>
asn1
block
diff --git a/src/pbe/pbes2/info.txt b/src/pbe/pbes2/info.txt
index 71fb6ea72..e0d3833e2 100644
--- a/src/pbe/pbes2/info.txt
+++ b/src/pbe/pbes2/info.txt
@@ -1,12 +1,5 @@
define PBE_PKCS_V20
-load_on auto
-
-<add>
-pbes2.cpp
-pbes2.h
-</add>
-
<requires>
algo_factory
asn1
diff --git a/src/pk_pad/eme1/info.txt b/src/pk_pad/eme1/info.txt
index 794254e8e..42f6be5a2 100644
--- a/src/pk_pad/eme1/info.txt
+++ b/src/pk_pad/eme1/info.txt
@@ -2,11 +2,6 @@ define EME1
load_on auto
-<add>
-eme1.h
-eme1.cpp
-</add>
-
<requires>
hash
kdf
diff --git a/src/pk_pad/eme_pkcs/info.txt b/src/pk_pad/eme_pkcs/info.txt
index 95c568452..e4fb4604d 100644
--- a/src/pk_pad/eme_pkcs/info.txt
+++ b/src/pk_pad/eme_pkcs/info.txt
@@ -1,8 +1 @@
define EME_PKCS1v15
-
-load_on auto
-
-<add>
-eme_pkcs.h
-eme_pkcs.cpp
-</add>
diff --git a/src/pk_pad/emsa1/info.txt b/src/pk_pad/emsa1/info.txt
index 55832307b..294e4b068 100644
--- a/src/pk_pad/emsa1/info.txt
+++ b/src/pk_pad/emsa1/info.txt
@@ -1,12 +1,5 @@
define EMSA1
-load_on auto
-
-<add>
-emsa1.h
-emsa1.cpp
-</add>
-
<requires>
hash
</requires>
diff --git a/src/pk_pad/emsa1_bsi/info.txt b/src/pk_pad/emsa1_bsi/info.txt
index 5e8fe09ca..313b153fc 100644
--- a/src/pk_pad/emsa1_bsi/info.txt
+++ b/src/pk_pad/emsa1_bsi/info.txt
@@ -1,12 +1,5 @@
define EMSA1_BSI
-load_on auto
-
-<add>
-emsa1_bsi.h
-emsa1_bsi.cpp
-</add>
-
<requires>
emsa1
</requires>
diff --git a/src/pk_pad/emsa2/info.txt b/src/pk_pad/emsa2/info.txt
index a6fff2a02..16357f841 100644
--- a/src/pk_pad/emsa2/info.txt
+++ b/src/pk_pad/emsa2/info.txt
@@ -1,12 +1,5 @@
define EMSA2
-load_on auto
-
-<add>
-emsa2.h
-emsa2.cpp
-</add>
-
<requires>
hash
hash_id
diff --git a/src/pk_pad/emsa3/info.txt b/src/pk_pad/emsa3/info.txt
index babd98711..e9ba20196 100644
--- a/src/pk_pad/emsa3/info.txt
+++ b/src/pk_pad/emsa3/info.txt
@@ -1,12 +1,5 @@
define EMSA3
-load_on auto
-
-<add>
-emsa3.h
-emsa3.cpp
-</add>
-
<requires>
hash
hash_id
diff --git a/src/pk_pad/emsa4/emsa4.cpp b/src/pk_pad/emsa4/emsa4.cpp
index dba248662..df4005aad 100644
--- a/src/pk_pad/emsa4/emsa4.cpp
+++ b/src/pk_pad/emsa4/emsa4.cpp
@@ -7,7 +7,7 @@
#include <botan/emsa4.h>
#include <botan/mgf1.h>
-#include <botan/bit_ops.h>
+#include <botan/internal/bit_ops.h>
namespace Botan {
diff --git a/src/pk_pad/emsa4/info.txt b/src/pk_pad/emsa4/info.txt
index ea1db30a1..ff492d1e0 100644
--- a/src/pk_pad/emsa4/info.txt
+++ b/src/pk_pad/emsa4/info.txt
@@ -1,12 +1,5 @@
define EMSA4
-load_on auto
-
-<add>
-emsa4.h
-emsa4.cpp
-</add>
-
<requires>
hash
kdf
diff --git a/src/pk_pad/emsa_raw/info.txt b/src/pk_pad/emsa_raw/info.txt
index 4bd850e11..f5be26ac9 100644
--- a/src/pk_pad/emsa_raw/info.txt
+++ b/src/pk_pad/emsa_raw/info.txt
@@ -1,8 +1 @@
define EMSA_RAW
-
-load_on auto
-
-<add>
-emsa_raw.h
-emsa_raw.cpp
-</add>
diff --git a/src/pk_pad/hash_id/info.txt b/src/pk_pad/hash_id/info.txt
index af9f5cd4f..5a4df3cc2 100644
--- a/src/pk_pad/hash_id/info.txt
+++ b/src/pk_pad/hash_id/info.txt
@@ -1,12 +1,5 @@
define HASH_ID
-load_on auto
-
-<add>
-hash_id.cpp
-hash_id.h
-</add>
-
<requires>
alloc
</requires>
diff --git a/src/pk_pad/info.txt b/src/pk_pad/info.txt
index 14b05f458..19e15f8bd 100644
--- a/src/pk_pad/info.txt
+++ b/src/pk_pad/info.txt
@@ -2,12 +2,6 @@ define PK_PADDING
load_on auto
-<add>
-emsa.h
-eme.cpp
-eme.h
-</add>
-
<requires>
alloc
rng
diff --git a/src/pubkey/dh/dh_core.cpp b/src/pubkey/dh/dh_core.cpp
index 78a26a8ef..07d134c44 100644
--- a/src/pubkey/dh/dh_core.cpp
+++ b/src/pubkey/dh/dh_core.cpp
@@ -13,18 +13,14 @@
namespace Botan {
-namespace {
-
-const u32bit BLINDING_BITS = BOTAN_PRIVATE_KEY_OP_BLINDING_BITS;
-
-}
-
/*
* DH_Core Constructor
*/
DH_Core::DH_Core(RandomNumberGenerator& rng,
const DL_Group& group, const BigInt& x)
{
+ const u32bit BLINDING_BITS = BOTAN_PRIVATE_KEY_OP_BLINDING_BITS;
+
op = Engine_Core::dh_op(group, x);
const BigInt& p = group.get_p();
diff --git a/src/pubkey/dh/info.txt b/src/pubkey/dh/info.txt
index 8295a74f4..ca8f74fa1 100644
--- a/src/pubkey/dh/info.txt
+++ b/src/pubkey/dh/info.txt
@@ -1,14 +1,15 @@
define DIFFIE_HELLMAN
-load_on auto
+<header:public>
+dh_core.h
+dh_op.h
+dh.h
+</header:public>
-<add>
+<source>
dh.cpp
-dh.h
dh_core.cpp
-dh_core.h
-dh_op.h
-</add>
+</source>
<requires>
dl_algo
diff --git a/src/pubkey/dl_algo/info.txt b/src/pubkey/dl_algo/info.txt
index 0ac91c887..21829fa42 100644
--- a/src/pubkey/dl_algo/info.txt
+++ b/src/pubkey/dl_algo/info.txt
@@ -1,12 +1,5 @@
define DL_PUBLIC_KEY_FAMILY
-load_on auto
-
-<add>
-dl_algo.cpp
-dl_algo.h
-</add>
-
<requires>
asn1
dl_group
diff --git a/src/pubkey/dl_group/info.txt b/src/pubkey/dl_group/info.txt
index 2e5273ac4..8922be3fb 100644
--- a/src/pubkey/dl_group/info.txt
+++ b/src/pubkey/dl_group/info.txt
@@ -1,12 +1,5 @@
-load_on auto
-
define DL_GROUP
-<add>
-dl_group.cpp
-dl_group.h
-</add>
-
<requires>
asn1
bigint
diff --git a/src/pubkey/dlies/dlies.cpp b/src/pubkey/dlies/dlies.cpp
index 0f5d76726..3a3ab52ee 100644
--- a/src/pubkey/dlies/dlies.cpp
+++ b/src/pubkey/dlies/dlies.cpp
@@ -7,7 +7,7 @@
#include <botan/dlies.h>
#include <botan/look_pk.h>
-#include <botan/xor_buf.h>
+#include <botan/internal/xor_buf.h>
namespace Botan {
diff --git a/src/pubkey/dlies/info.txt b/src/pubkey/dlies/info.txt
index d3e950427..5aa90f646 100644
--- a/src/pubkey/dlies/info.txt
+++ b/src/pubkey/dlies/info.txt
@@ -1,12 +1,5 @@
define DLIES
-load_on auto
-
-<add>
-dlies.cpp
-dlies.h
-</add>
-
<requires>
kdf
libstate
diff --git a/src/pubkey/dsa/info.txt b/src/pubkey/dsa/info.txt
index 776a5da28..1248cf68d 100644
--- a/src/pubkey/dsa/info.txt
+++ b/src/pubkey/dsa/info.txt
@@ -1,15 +1,16 @@
define DSA
-load_on auto
+<header:public>
+dsa.h
+dsa_core.h
+dsa_op.h
+</header:public>
-<add>
+<source>
dsa.cpp
-dsa.h
dsa_core.cpp
-dsa_core.h
dsa_op.cpp
-dsa_op.h
-</add>
+</source>
<requires>
dl_algo
diff --git a/src/pubkey/ec_dompar/ec_dompar.h b/src/pubkey/ec_dompar/ec_dompar.h
index 5ea599c9d..5f03f1c5f 100644
--- a/src/pubkey/ec_dompar/ec_dompar.h
+++ b/src/pubkey/ec_dompar/ec_dompar.h
@@ -92,7 +92,8 @@ class BOTAN_DLL EC_Domain_Params
std::string m_oid;
};
-bool operator==(EC_Domain_Params const& lhs, EC_Domain_Params const& rhs);
+bool BOTAN_DLL operator==(EC_Domain_Params const& lhs,
+ EC_Domain_Params const& rhs);
inline bool operator!=(const EC_Domain_Params& lhs,
const EC_Domain_Params& rhs)
@@ -102,10 +103,12 @@ inline bool operator!=(const EC_Domain_Params& lhs,
enum EC_dompar_enc { ENC_EXPLICIT = 0, ENC_IMPLICITCA = 1, ENC_OID = 2 };
-SecureVector<byte> encode_der_ec_dompar(EC_Domain_Params const& dom_pars,
- EC_dompar_enc enc_type);
+SecureVector<byte>
+BOTAN_DLL encode_der_ec_dompar(EC_Domain_Params const& dom_pars,
+ EC_dompar_enc enc_type);
-EC_Domain_Params decode_ber_ec_dompar(SecureVector<byte> const& encoded);
+EC_Domain_Params
+BOTAN_DLL decode_ber_ec_dompar(SecureVector<byte> const& encoded);
/**
* Factory function, the only way to obtain EC domain parameters with
@@ -115,7 +118,7 @@ EC_Domain_Params decode_ber_ec_dompar(SecureVector<byte> const& encoded);
* @param oid the oid of the demanded EC domain parameters
* @result the EC domain parameters associated with the OID
*/
-EC_Domain_Params get_EC_Dom_Pars_by_oid(std::string oid);
+EC_Domain_Params BOTAN_DLL get_EC_Dom_Pars_by_oid(std::string oid);
}
diff --git a/src/pubkey/ec_dompar/info.txt b/src/pubkey/ec_dompar/info.txt
index f32e4fc2f..b05903b69 100644
--- a/src/pubkey/ec_dompar/info.txt
+++ b/src/pubkey/ec_dompar/info.txt
@@ -1,12 +1,5 @@
define ECC_DOMAIN_PARAMATERS
-load_on auto
-
-<add>
-ec_dompar.cpp
-ec_dompar.h
-</add>
-
<requires>
asn1
bigint
diff --git a/src/pubkey/ecc_key/info.txt b/src/pubkey/ecc_key/info.txt
index f45533129..92455189a 100644
--- a/src/pubkey/ecc_key/info.txt
+++ b/src/pubkey/ecc_key/info.txt
@@ -1,12 +1,5 @@
define ECC_PUBLIC_KEY_CRYPTO
-load_on auto
-
-<add>
-ecc_key.cpp
-ecc_key.h
-</add>
-
<requires>
alloc
asn1
diff --git a/src/pubkey/ecdsa/info.txt b/src/pubkey/ecdsa/info.txt
index 3da73dd34..be5ac037a 100644
--- a/src/pubkey/ecdsa/info.txt
+++ b/src/pubkey/ecdsa/info.txt
@@ -1,16 +1,5 @@
define ECDSA
-load_on auto
-
-<add>
-ecdsa.cpp
-ecdsa.h
-ecdsa_core.cpp
-ecdsa_core.h
-ecdsa_op.cpp
-ecdsa_op.h
-</add>
-
<requires>
alloc
asn1
diff --git a/src/pubkey/eckaeg/info.txt b/src/pubkey/eckaeg/info.txt
index 3a9768df1..53a744daa 100644
--- a/src/pubkey/eckaeg/info.txt
+++ b/src/pubkey/eckaeg/info.txt
@@ -1,16 +1,5 @@
define ECKAEG
-load_on auto
-
-<add>
-eckaeg.cpp
-eckaeg.h
-eckaeg_core.cpp
-eckaeg_core.h
-eckaeg_op.cpp
-eckaeg_op.h
-</add>
-
<requires>
alloc
asn1
diff --git a/src/pubkey/elgamal/elg_core.cpp b/src/pubkey/elgamal/elg_core.cpp
index 8b8c8f50b..f2416d8a0 100644
--- a/src/pubkey/elgamal/elg_core.cpp
+++ b/src/pubkey/elgamal/elg_core.cpp
@@ -13,12 +13,6 @@
namespace Botan {
-namespace {
-
-const u32bit BLINDING_BITS = BOTAN_PRIVATE_KEY_OP_BLINDING_BITS;
-
-}
-
/*
* ELG_Core Constructor
*/
@@ -34,6 +28,8 @@ ELG_Core::ELG_Core(const DL_Group& group, const BigInt& y)
ELG_Core::ELG_Core(RandomNumberGenerator& rng,
const DL_Group& group, const BigInt& y, const BigInt& x)
{
+ const u32bit BLINDING_BITS = BOTAN_PRIVATE_KEY_OP_BLINDING_BITS;
+
op = Engine_Core::elg_op(group, y, x);
const BigInt& p = group.get_p();
diff --git a/src/pubkey/elgamal/info.txt b/src/pubkey/elgamal/info.txt
index 8c55eb909..7906d0cd0 100644
--- a/src/pubkey/elgamal/info.txt
+++ b/src/pubkey/elgamal/info.txt
@@ -1,16 +1,5 @@
define ELGAMAL
-load_on auto
-
-<add>
-elgamal.cpp
-elgamal.h
-elg_core.cpp
-elg_core.h
-elg_op.cpp
-elg_op.h
-</add>
-
<requires>
dl_algo
dl_group
diff --git a/src/pubkey/if_algo/if_core.cpp b/src/pubkey/if_algo/if_core.cpp
index 8cc6a816f..9c4a12ee5 100644
--- a/src/pubkey/if_algo/if_core.cpp
+++ b/src/pubkey/if_algo/if_core.cpp
@@ -13,12 +13,6 @@
namespace Botan {
-namespace {
-
-const u32bit BLINDING_BITS = BOTAN_PRIVATE_KEY_OP_BLINDING_BITS;
-
-}
-
/*
* IF_Core Constructor
*/
@@ -36,6 +30,8 @@ IF_Core::IF_Core(RandomNumberGenerator& rng,
const BigInt& p, const BigInt& q,
const BigInt& d1, const BigInt& d2, const BigInt& c)
{
+ const u32bit BLINDING_BITS = BOTAN_PRIVATE_KEY_OP_BLINDING_BITS;
+
op = Engine_Core::if_op(e, n, d, p, q, d1, d2, c);
if(BLINDING_BITS)
diff --git a/src/pubkey/if_algo/info.txt b/src/pubkey/if_algo/info.txt
index ec948aec3..833117819 100644
--- a/src/pubkey/if_algo/info.txt
+++ b/src/pubkey/if_algo/info.txt
@@ -2,14 +2,17 @@ define IF_PUBLIC_KEY_FAMILY
load_on dep
-<add>
-if_algo.cpp
+<header:public>
if_algo.h
-if_core.cpp
if_core.h
-if_op.cpp
if_op.h
-</add>
+</header:public>
+
+<source>
+if_algo.cpp
+if_core.cpp
+if_op.cpp
+</source>
<requires>
asn1
diff --git a/src/pubkey/info.txt b/src/pubkey/info.txt
index ea6b4cb9b..69e743351 100644
--- a/src/pubkey/info.txt
+++ b/src/pubkey/info.txt
@@ -1,7 +1,5 @@
define PUBLIC_KEY_CRYPTO
-load_on auto
-
<requires>
alloc
asn1
diff --git a/src/pubkey/keypair/info.txt b/src/pubkey/keypair/info.txt
index 360d317c5..c6bf758cc 100644
--- a/src/pubkey/keypair/info.txt
+++ b/src/pubkey/keypair/info.txt
@@ -1,12 +1,5 @@
define KEYPAIR_TESTING
-load_on auto
-
-<add>
-keypair.cpp
-keypair.h
-</add>
-
<requires>
libstate
</requires>
diff --git a/src/pubkey/nr/info.txt b/src/pubkey/nr/info.txt
index dcf22033e..c0886ac07 100644
--- a/src/pubkey/nr/info.txt
+++ b/src/pubkey/nr/info.txt
@@ -1,16 +1,5 @@
define NYBERG_RUEPPEL
-load_on auto
-
-<add>
-nr.cpp
-nr.h
-nr_core.cpp
-nr_core.h
-nr_op.cpp
-nr_op.h
-</add>
-
<requires>
dl_algo
dl_group
diff --git a/src/pubkey/pk_codecs/info.txt b/src/pubkey/pk_codecs/info.txt
index 55c71b0c9..64fb10b8a 100644
--- a/src/pubkey/pk_codecs/info.txt
+++ b/src/pubkey/pk_codecs/info.txt
@@ -1,12 +1,3 @@
-load_on auto
-
-<add>
-pkcs8.h
-pkcs8.cpp
-x509_key.h
-x509_key.cpp
-</add>
-
<requires>
asn1
filters
diff --git a/src/pubkey/pubkey.cpp b/src/pubkey/pubkey.cpp
index 5a5ca335e..a6e424e05 100644
--- a/src/pubkey/pubkey.cpp
+++ b/src/pubkey/pubkey.cpp
@@ -10,7 +10,7 @@
#include <botan/ber_dec.h>
#include <botan/bigint.h>
#include <botan/parsing.h>
-#include <botan/bit_ops.h>
+#include <botan/internal/bit_ops.h>
#include <memory>
namespace Botan {
diff --git a/src/pubkey/rsa/info.txt b/src/pubkey/rsa/info.txt
index c8bde68d0..877d092b6 100644
--- a/src/pubkey/rsa/info.txt
+++ b/src/pubkey/rsa/info.txt
@@ -1,12 +1,5 @@
define RSA
-load_on auto
-
-<add>
-rsa.cpp
-rsa.h
-</add>
-
<requires>
if_algo
keypair
diff --git a/src/pubkey/rw/info.txt b/src/pubkey/rw/info.txt
index 39857bccc..cb3e5531c 100644
--- a/src/pubkey/rw/info.txt
+++ b/src/pubkey/rw/info.txt
@@ -1,12 +1,5 @@
define RW
-load_on auto
-
-<add>
-rw.cpp
-rw.h
-</add>
-
<requires>
if_algo
keypair
diff --git a/src/rng/auto_rng/auto_rng.cpp b/src/rng/auto_rng/auto_rng.cpp
index 6906d9d17..5befc9d14 100644
--- a/src/rng/auto_rng/auto_rng.cpp
+++ b/src/rng/auto_rng/auto_rng.cpp
@@ -28,35 +28,35 @@
#endif
#if defined(BOTAN_HAS_ENTROPY_SRC_HIGH_RESOLUTION_TIMER)
- #include <botan/hres_timer.h>
+ #include <botan/internal/hres_timer.h>
#endif
-#if defined(BOTAN_HAS_ENTROPY_SRC_DEVICE)
- #include <botan/es_dev.h>
+#if defined(BOTAN_HAS_ENTROPY_SRC_DEV_RANDOM)
+ #include <botan/internal/dev_random.h>
#endif
#if defined(BOTAN_HAS_ENTROPY_SRC_EGD)
- #include <botan/es_egd.h>
+ #include <botan/internal/es_egd.h>
#endif
#if defined(BOTAN_HAS_ENTROPY_SRC_UNIX)
- #include <botan/es_unix.h>
+ #include <botan/internal/es_unix.h>
#endif
#if defined(BOTAN_HAS_ENTROPY_SRC_BEOS)
- #include <botan/es_beos.h>
+ #include <botan/internal/es_beos.h>
#endif
#if defined(BOTAN_HAS_ENTROPY_SRC_CAPI)
- #include <botan/es_capi.h>
+ #include <botan/internal/es_capi.h>
#endif
#if defined(BOTAN_HAS_ENTROPY_SRC_WIN32)
- #include <botan/es_win32.h>
+ #include <botan/internal/es_win32.h>
#endif
#if defined(BOTAN_HAS_ENTROPY_SRC_FTW)
- #include <botan/es_ftw.h>
+ #include <botan/internal/es_ftw.h>
#endif
namespace Botan {
@@ -72,7 +72,7 @@ void add_entropy_sources(RandomNumberGenerator* rng)
rng->add_entropy_source(new High_Resolution_Timestamp);
#endif
-#if defined(BOTAN_HAS_ENTROPY_SRC_DEVICE)
+#if defined(BOTAN_HAS_ENTROPY_SRC_DEV_RANDOM)
rng->add_entropy_source(
new Device_EntropySource(
split_on("/dev/urandom:/dev/random:/dev/srandom", ':')
diff --git a/src/rng/auto_rng/info.txt b/src/rng/auto_rng/info.txt
index 357dc17ad..0f7cee282 100644
--- a/src/rng/auto_rng/info.txt
+++ b/src/rng/auto_rng/info.txt
@@ -1,12 +1,5 @@
define AUTO_SEEDING_RNG
-load_on auto
-
-<add>
-auto_rng.h
-auto_rng.cpp
-</add>
-
<requires>
hmac
sha2
diff --git a/src/rng/hmac_rng/hmac_rng.cpp b/src/rng/hmac_rng/hmac_rng.cpp
index b43e6d9c2..00a3a27d0 100644
--- a/src/rng/hmac_rng/hmac_rng.cpp
+++ b/src/rng/hmac_rng/hmac_rng.cpp
@@ -6,8 +6,18 @@
*/
#include <botan/hmac_rng.h>
+<<<<<<< variant A
+#include <botan/internal/loadstor.h>
+#include <botan/internal/xor_buf.h>
+#include <botan/internal/stl_util.h>
+>>>>>>> variant B
#include <botan/loadstor.h>
#include <botan/xor_buf.h>
+####### Ancestor
+#include <botan/loadstor.h>
+#include <botan/xor_buf.h>
+#include <botan/stl_util.h>
+======= end
#include <algorithm>
namespace Botan {
diff --git a/src/rng/hmac_rng/info.txt b/src/rng/hmac_rng/info.txt
index f6135ee5a..5facd4aae 100644
--- a/src/rng/hmac_rng/info.txt
+++ b/src/rng/hmac_rng/info.txt
@@ -1,12 +1,5 @@
define HMAC_RNG
-load_on auto
-
-<add>
-hmac_rng.cpp
-hmac_rng.h
-</add>
-
<requires>
mac
</requires>
diff --git a/src/rng/info.txt b/src/rng/info.txt
index eea122cf9..4c88ba382 100644
--- a/src/rng/info.txt
+++ b/src/rng/info.txt
@@ -1,10 +1,3 @@
-load_on auto
-
-<add>
-rng.cpp
-rng.h
-</add>
-
<requires>
entropy
</requires>
diff --git a/src/rng/randpool/info.txt b/src/rng/randpool/info.txt
index cab276e15..cc54e5d06 100644
--- a/src/rng/randpool/info.txt
+++ b/src/rng/randpool/info.txt
@@ -1,12 +1,5 @@
define RANDPOOL
-load_on auto
-
-<add>
-randpool.cpp
-randpool.h
-</add>
-
<requires>
block
mac
diff --git a/src/rng/x931_rng/info.txt b/src/rng/x931_rng/info.txt
index 35836b33b..d5ec68013 100644
--- a/src/rng/x931_rng/info.txt
+++ b/src/rng/x931_rng/info.txt
@@ -1,12 +1,5 @@
define X931_RNG
-load_on auto
-
-<add>
-x931_rng.cpp
-x931_rng.h
-</add>
-
<requires>
block
</requires>
diff --git a/src/rng/x931_rng/x931_rng.cpp b/src/rng/x931_rng/x931_rng.cpp
index bd66d22bf..3ff180898 100644
--- a/src/rng/x931_rng/x931_rng.cpp
+++ b/src/rng/x931_rng/x931_rng.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/x931_rng.h>
-#include <botan/xor_buf.h>
+#include <botan/internal/xor_buf.h>
#include <algorithm>
namespace Botan {
diff --git a/src/s2k/info.txt b/src/s2k/info.txt
index 17f2a8c42..1d5226524 100644
--- a/src/s2k/info.txt
+++ b/src/s2k/info.txt
@@ -1,10 +1,3 @@
-load_on auto
-
-<add>
-s2k.cpp
-s2k.h
-</add>
-
<requires>
rng
sym_algo
diff --git a/src/s2k/pbkdf1/info.txt b/src/s2k/pbkdf1/info.txt
index 387043f1b..e51b44886 100644
--- a/src/s2k/pbkdf1/info.txt
+++ b/src/s2k/pbkdf1/info.txt
@@ -1,12 +1,5 @@
define PBKDF1
-load_on auto
-
-<add>
-pbkdf1.cpp
-pbkdf1.h
-</add>
-
<requires>
hash
</requires>
diff --git a/src/s2k/pbkdf2/info.txt b/src/s2k/pbkdf2/info.txt
index 56359d13d..5462b2e1b 100644
--- a/src/s2k/pbkdf2/info.txt
+++ b/src/s2k/pbkdf2/info.txt
@@ -1,12 +1,5 @@
define PBKDF2
-load_on auto
-
-<add>
-pbkdf2.cpp
-pbkdf2.h
-</add>
-
<requires>
mac
</requires>
diff --git a/src/s2k/pbkdf2/pbkdf2.cpp b/src/s2k/pbkdf2/pbkdf2.cpp
index 1de27c9ac..4fc1b8deb 100644
--- a/src/s2k/pbkdf2/pbkdf2.cpp
+++ b/src/s2k/pbkdf2/pbkdf2.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/pbkdf2.h>
-#include <botan/loadstor.h>
-#include <botan/xor_buf.h>
+#include <botan/internal/loadstor.h>
+#include <botan/internal/xor_buf.h>
namespace Botan {
diff --git a/src/s2k/pgps2k/info.txt b/src/s2k/pgps2k/info.txt
index a1f5b3dfd..8be9c79f8 100644
--- a/src/s2k/pgps2k/info.txt
+++ b/src/s2k/pgps2k/info.txt
@@ -1,12 +1,5 @@
define PGPS2K
-load_on auto
-
-<add>
-pgp_s2k.cpp
-pgp_s2k.h
-</add>
-
<requires>
hash
</requires>
diff --git a/src/selftest/info.txt b/src/selftest/info.txt
index 079fd5030..53c6d286d 100644
--- a/src/selftest/info.txt
+++ b/src/selftest/info.txt
@@ -1,12 +1,5 @@
define SELFTESTS
-load_on auto
-
-<add>
-selftest.cpp
-selftest.h
-</add>
-
<requires>
algo_factory
filters
diff --git a/src/selftest/selftest.cpp b/src/selftest/selftest.cpp
index d5b184f8f..3ed3653b3 100644
--- a/src/selftest/selftest.cpp
+++ b/src/selftest/selftest.cpp
@@ -8,7 +8,7 @@
#include <botan/selftest.h>
#include <botan/filters.h>
#include <botan/def_eng.h>
-#include <botan/stl_util.h>
+#include <botan/internal/stl_util.h>
namespace Botan {
diff --git a/src/stream/arc4/arc4.cpp b/src/stream/arc4/arc4.cpp
index 5d0c67d3e..705b77062 100644
--- a/src/stream/arc4/arc4.cpp
+++ b/src/stream/arc4/arc4.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/arc4.h>
-#include <botan/xor_buf.h>
+#include <botan/internal/xor_buf.h>
#include <botan/parsing.h>
namespace Botan {
diff --git a/src/stream/arc4/info.txt b/src/stream/arc4/info.txt
index bb373dbc5..e3022925c 100644
--- a/src/stream/arc4/info.txt
+++ b/src/stream/arc4/info.txt
@@ -1,12 +1 @@
define ARC4
-
-load_on auto
-
-<requires>
-stream
-</requires>
-
-<add>
-arc4.cpp
-arc4.h
-</add>
diff --git a/src/stream/ctr/ctr.cpp b/src/stream/ctr/ctr.cpp
index 723b94f28..0b0f72da2 100644
--- a/src/stream/ctr/ctr.cpp
+++ b/src/stream/ctr/ctr.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/ctr.h>
-#include <botan/xor_buf.h>
+#include <botan/internal/xor_buf.h>
namespace Botan {
diff --git a/src/stream/ctr/info.txt b/src/stream/ctr/info.txt
index ac4f3f710..2fa2272fd 100644
--- a/src/stream/ctr/info.txt
+++ b/src/stream/ctr/info.txt
@@ -1,12 +1,5 @@
define CTR_BE
-load_on auto
-
-<add>
-ctr.cpp
-ctr.h
-</add>
-
<requires>
block
stream
diff --git a/src/stream/info.txt b/src/stream/info.txt
index 213c42137..68d6c46d6 100644
--- a/src/stream/info.txt
+++ b/src/stream/info.txt
@@ -1,11 +1,5 @@
-load_on auto
-
define STREAM_CIPHER
-<add>
-stream_cipher.h
-</add>
-
<requires>
sym_algo
</requires>
diff --git a/src/stream/ofb/info.txt b/src/stream/ofb/info.txt
index a01e9e1a6..702fea666 100644
--- a/src/stream/ofb/info.txt
+++ b/src/stream/ofb/info.txt
@@ -1,12 +1,5 @@
define OFB
-load_on auto
-
-<add>
-ofb.cpp
-ofb.h
-</add>
-
<requires>
block
stream
diff --git a/src/stream/ofb/ofb.cpp b/src/stream/ofb/ofb.cpp
index b52617789..cfa035a4f 100644
--- a/src/stream/ofb/ofb.cpp
+++ b/src/stream/ofb/ofb.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/ofb.h>
-#include <botan/xor_buf.h>
+#include <botan/internal/xor_buf.h>
#include <algorithm>
namespace Botan {
diff --git a/src/stream/salsa20/info.txt b/src/stream/salsa20/info.txt
index 8171708b0..1ce648d9f 100644
--- a/src/stream/salsa20/info.txt
+++ b/src/stream/salsa20/info.txt
@@ -1,12 +1 @@
define SALSA20
-
-load_on auto
-
-<requires>
-stream
-</requires>
-
-<add>
-salsa20.cpp
-salsa20.h
-</add>
diff --git a/src/stream/salsa20/salsa20.cpp b/src/stream/salsa20/salsa20.cpp
index 3aae64eae..cc5d3a712 100644
--- a/src/stream/salsa20/salsa20.cpp
+++ b/src/stream/salsa20/salsa20.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/salsa20.h>
-#include <botan/xor_buf.h>
-#include <botan/loadstor.h>
+#include <botan/internal/xor_buf.h>
+#include <botan/internal/loadstor.h>
namespace Botan {
diff --git a/src/stream/turing/info.txt b/src/stream/turing/info.txt
index dede0dd39..feb00a92d 100644
--- a/src/stream/turing/info.txt
+++ b/src/stream/turing/info.txt
@@ -1,13 +1 @@
define TURING
-
-load_on auto
-
-<requires>
-stream
-</requires>
-
-<add>
-tur_tab.cpp
-turing.cpp
-turing.h
-</add>
diff --git a/src/stream/turing/turing.cpp b/src/stream/turing/turing.cpp
index 6769784c7..dec9190ab 100644
--- a/src/stream/turing/turing.cpp
+++ b/src/stream/turing/turing.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/turing.h>
-#include <botan/loadstor.h>
-#include <botan/xor_buf.h>
+#include <botan/internal/loadstor.h>
+#include <botan/internal/xor_buf.h>
namespace Botan {
diff --git a/src/stream/wid_wake/info.txt b/src/stream/wid_wake/info.txt
index 6289e0369..f7333dede 100644
--- a/src/stream/wid_wake/info.txt
+++ b/src/stream/wid_wake/info.txt
@@ -1,12 +1 @@
define WID_WAKE
-
-load_on auto
-
-<requires>
-stream
-</requires>
-
-<add>
-wid_wake.cpp
-wid_wake.h
-</add>
diff --git a/src/stream/wid_wake/wid_wake.cpp b/src/stream/wid_wake/wid_wake.cpp
index 2a8946649..d52851aee 100644
--- a/src/stream/wid_wake/wid_wake.cpp
+++ b/src/stream/wid_wake/wid_wake.cpp
@@ -6,8 +6,8 @@
*/
#include <botan/wid_wake.h>
-#include <botan/loadstor.h>
-#include <botan/xor_buf.h>
+#include <botan/internal/loadstor.h>
+#include <botan/internal/xor_buf.h>
namespace Botan {
diff --git a/src/sym_algo/info.txt b/src/sym_algo/info.txt
index fab46270e..cfdd9b691 100644
--- a/src/sym_algo/info.txt
+++ b/src/sym_algo/info.txt
@@ -1,11 +1,3 @@
-load_on auto
-
-<add>
-sym_algo.h
-symkey.cpp
-symkey.h
-</add>
-
<requires>
alloc
filters
diff --git a/src/sym_algo/symkey.cpp b/src/sym_algo/symkey.cpp
index e309f56ab..97bd08819 100644
--- a/src/sym_algo/symkey.cpp
+++ b/src/sym_algo/symkey.cpp
@@ -6,7 +6,7 @@
*/
#include <botan/symkey.h>
-#include <botan/xor_buf.h>
+#include <botan/internal/xor_buf.h>
#include <botan/rng.h>
#include <botan/pipe.h>
#include <botan/hex.h>
diff --git a/src/utils/asm_amd64/info.txt b/src/utils/asm_amd64/info.txt
index fdfcbcb6a..93405e6ce 100644
--- a/src/utils/asm_amd64/info.txt
+++ b/src/utils/asm_amd64/info.txt
@@ -1,5 +1,9 @@
load_on dep
+<header:internal>
+asm_macr_amd64.h
+</header:internal>
+
<arch>
amd64
</arch>
diff --git a/src/utils/asm_ia32/info.txt b/src/utils/asm_ia32/info.txt
index d19fdd192..d490124f4 100644
--- a/src/utils/asm_ia32/info.txt
+++ b/src/utils/asm_ia32/info.txt
@@ -1,5 +1,9 @@
load_on dep
+<header:internal>
+asm_macr_ia32.h
+</header:internal>
+
<arch>
ia32
</arch>
diff --git a/src/utils/bswap.h b/src/utils/bswap.h
index ec1e81435..3294111a0 100644
--- a/src/utils/bswap.h
+++ b/src/utils/bswap.h
@@ -10,7 +10,7 @@
#define BOTAN_BYTE_SWAP_H__
#include <botan/types.h>
-#include <botan/rotate.h>
+#include <botan/internal/rotate.h>
namespace Botan {
diff --git a/src/utils/buf_comp/info.txt b/src/utils/buf_comp/info.txt
index 7aea580ce..b91fe5082 100644
--- a/src/utils/buf_comp/info.txt
+++ b/src/utils/buf_comp/info.txt
@@ -1,9 +1,3 @@
-load_on auto
-
-<add>
-buf_comp.h
-</add>
-
<requires>
alloc
</requires>
diff --git a/src/utils/cpuid.cpp b/src/utils/cpuid.cpp
index 2ba7f9b77..a6f40f53c 100644
--- a/src/utils/cpuid.cpp
+++ b/src/utils/cpuid.cpp
@@ -7,7 +7,7 @@
#include <botan/cpuid.h>
#include <botan/types.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
#include <botan/mem_ops.h>
#if defined(BOTAN_TARGET_ARCH_IS_IA32) || defined(BOTAN_TARGET_ARCH_IS_AMD64)
diff --git a/src/utils/datastor/datastor.cpp b/src/utils/datastor/datastor.cpp
index 634b72872..85b0f22ba 100644
--- a/src/utils/datastor/datastor.cpp
+++ b/src/utils/datastor/datastor.cpp
@@ -8,7 +8,7 @@
#include <botan/datastor.h>
#include <botan/exceptn.h>
#include <botan/parsing.h>
-#include <botan/stl_util.h>
+#include <botan/internal/stl_util.h>
#include <botan/filters.h>
namespace Botan {
diff --git a/src/utils/datastor/info.txt b/src/utils/datastor/info.txt
index 9c995adaf..93e938d78 100644
--- a/src/utils/datastor/info.txt
+++ b/src/utils/datastor/info.txt
@@ -1,10 +1,3 @@
-load_on auto
-
-<add>
-datastor.cpp
-datastor.h
-</add>
-
<requires>
alloc
filters
diff --git a/src/utils/info.txt b/src/utils/info.txt
index 110afeb64..edeeb1cf9 100644
--- a/src/utils/info.txt
+++ b/src/utils/info.txt
@@ -2,6 +2,41 @@ define UTIL_FUNCTIONS
load_on always
+<source>
+charset.cpp
+cpuid.cpp
+exceptn.cpp
+mlock.cpp
+parsing.cpp
+time.cpp
+ui.cpp
+version.cpp
+</source>
+
+<header:internal>
+bit_ops.h
+bswap.h
+loadstor.h
+mlock.h
+prefetch.h
+rotate.h
+rounding.h
+stl_util.h
+xor_buf.h
+</header:internal>
+
+<header:public>
+charset.h
+cpuid.h
+exceptn.h
+mem_ops.h
+parsing.h
+time.h
+types.h
+ui.h
+version.h
+</header:public>
+
<libs>
linux,tru64 -> rt
</libs>
diff --git a/src/utils/loadstor.h b/src/utils/loadstor.h
index b15cafd2c..fa2e36c1e 100644
--- a/src/utils/loadstor.h
+++ b/src/utils/loadstor.h
@@ -10,9 +10,9 @@
#define BOTAN_LOAD_STORE_H__
#include <botan/types.h>
-#include <botan/bswap.h>
-#include <botan/rotate.h>
-#include <botan/prefetch.h>
+#include <botan/internal/bswap.h>
+#include <botan/internal/rotate.h>
+#include <botan/internal/prefetch.h>
#include <cstring>
#if BOTAN_TARGET_UNALIGNED_MEMORY_ACCESS_OK
diff --git a/src/utils/mlock.cpp b/src/utils/mlock.cpp
index 6453d8a30..bb3a38d4e 100644
--- a/src/utils/mlock.cpp
+++ b/src/utils/mlock.cpp
@@ -5,7 +5,7 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/mlock.h>
+#include <botan/internal/mlock.h>
#if defined(BOTAN_TARGET_OS_HAS_POSIX_MLOCK)
#include <sys/types.h>
diff --git a/src/utils/mlock.h b/src/utils/mlock.h
index 0811e8190..66ced9e63 100644
--- a/src/utils/mlock.h
+++ b/src/utils/mlock.h
@@ -18,14 +18,14 @@ namespace Botan {
* @param length the length of the memory block in bytes
* @returns true if successful, false otherwise
*/
-BOTAN_DLL bool lock_mem(void* addr, u32bit length);
+bool lock_mem(void* addr, u32bit length);
/**
* Unlock memory locked with lock_mem()
* @param addr the start of the memory block
* @param length the length of the memory block in bytes
*/
-BOTAN_DLL void unlock_mem(void* addr, u32bit length);
+void unlock_mem(void* addr, u32bit length);
}
diff --git a/src/utils/parsing.cpp b/src/utils/parsing.cpp
index 3412cf02b..7f637eef8 100644
--- a/src/utils/parsing.cpp
+++ b/src/utils/parsing.cpp
@@ -8,7 +8,7 @@
#include <botan/parsing.h>
#include <botan/exceptn.h>
#include <botan/charset.h>
-#include <botan/loadstor.h>
+#include <botan/internal/loadstor.h>
namespace Botan {
diff --git a/src/utils/simd_32/info.txt b/src/utils/simd_32/info.txt
index 883096a5d..08cbdfa52 100644
--- a/src/utils/simd_32/info.txt
+++ b/src/utils/simd_32/info.txt
@@ -1,3 +1,10 @@
define SIMD_32
load_on always
+
+<header:internal>
+simd_32.h
+simd_sse.h
+simd_scalar.h
+simd_altivec.h
+</header:internal>
diff --git a/src/utils/simd_32/simd_32.h b/src/utils/simd_32/simd_32.h
index 324db1a7d..38ea078d0 100644
--- a/src/utils/simd_32/simd_32.h
+++ b/src/utils/simd_32/simd_32.h
@@ -12,17 +12,17 @@
#if defined(BOTAN_TARGET_CPU_HAS_SSE2)
- #include <botan/simd_sse.h>
+ #include <botan/internal/simd_sse.h>
namespace Botan { typedef SIMD_SSE2 SIMD_32; }
#elif defined(BOTAN_TARGET_CPU_HAS_ALTIVEC)
- #include <botan/simd_altivec.h>
+ #include <botan/internal/simd_altivec.h>
namespace Botan { typedef SIMD_Altivec SIMD_32; }
#else
- #include <botan/simd_scalar.h>
+ #include <botan/internal/simd_scalar.h>
namespace Botan { typedef SIMD_Scalar SIMD_32; }
#endif
diff --git a/src/utils/simd_32/simd_altivec.h b/src/utils/simd_32/simd_altivec.h
index e1704e76c..d24c7e73f 100644
--- a/src/utils/simd_32/simd_altivec.h
+++ b/src/utils/simd_32/simd_altivec.h
@@ -8,7 +8,9 @@
#ifndef BOTAN_SIMD_ALTIVEC_H__
#define BOTAN_SIMD_ALTIVEC_H__
-#include <botan/loadstor.h>
+#if defined(BOTAN_TARGET_CPU_HAS_ALTIVEC)
+
+#include <botan/internal/loadstor.h>
#include <botan/cpuid.h>
#include <altivec.h>
@@ -207,3 +209,5 @@ class SIMD_Altivec
}
#endif
+
+#endif
diff --git a/src/utils/simd_32/simd_scalar.h b/src/utils/simd_32/simd_scalar.h
index 148b76c35..e8e46db44 100644
--- a/src/utils/simd_32/simd_scalar.h
+++ b/src/utils/simd_32/simd_scalar.h
@@ -8,8 +8,8 @@
#ifndef BOTAN_SIMD_SCALAR_H__
#define BOTAN_SIMD_SCALAR_H__
-#include <botan/loadstor.h>
-#include <botan/bswap.h>
+#include <botan/internal/loadstor.h>
+#include <botan/internal/bswap.h>
namespace Botan {
diff --git a/src/utils/simd_32/simd_sse.h b/src/utils/simd_32/simd_sse.h
index 9f03b3733..31bbce2c7 100644
--- a/src/utils/simd_32/simd_sse.h
+++ b/src/utils/simd_32/simd_sse.h
@@ -8,8 +8,9 @@
#ifndef BOTAN_SIMD_SSE_H__
#define BOTAN_SIMD_SSE_H__
-#include <botan/cpuid.h>
+#if defined(BOTAN_TARGET_CPU_HAS_SSE2)
+#include <botan/cpuid.h>
#include <emmintrin.h>
namespace Botan {
@@ -159,3 +160,5 @@ class SIMD_SSE2
}
#endif
+
+#endif