Botan 3.7.1
Crypto and TLS for C&
build.h
Go to the documentation of this file.
1#ifndef BOTAN_BUILD_CONFIG_H_
2#define BOTAN_BUILD_CONFIG_H_
3
4/**
5* @file build.h
6* @brief Build configuration for Botan 3.7.1
7*
8* Automatically generated from
9* 'configure.py --with-doxygen --with-sphinx --with-build-dir=/tmp/botan_website_mnf7pi2x'
10*
11* Target
12* - Compiler: g++ -fstack-protector -m64 -pthread -std=c++20 -D_REENTRANT -O3
13* - Arch: x86_64
14* - OS: linux
15*/
16
17/**
18 * @defgroup buildinfo Build Information
19 */
20
21/**
22 * @ingroup buildinfo
23 * @defgroup buildinfo_version Build version information
24 * @{
25 */
26
27/// The major version of the release
28#define BOTAN_VERSION_MAJOR 3
29/// The minor version of the release
30#define BOTAN_VERSION_MINOR 7
31/// The patch version of the release
32#define BOTAN_VERSION_PATCH 1
33
34/**
35 * Expands to an integer of the form YYYYMMDD if this is an official
36 * release, or 0 otherwise. For instance, 2.19.0, which was released
37 * on January 19, 2022, has a `BOTAN_VERSION_DATESTAMP` of 20220119.
38 */
39#define BOTAN_VERSION_DATESTAMP 0
40
41
42#define BOTAN_VERSION_RELEASE_TYPE "unreleased"
43
44/**
45 * A macro expanding to a string that is set to a revision identifier
46 * corresponding to the source, or "unknown" if this could not be
47 * determined. It is set for all official releases, and for builds that
48 * originated from within a git checkout.
49 */
50#define BOTAN_VERSION_VC_REVISION "git:09cc7f97ceb828c19461b2a63f820d3226bb921b"
51
52/**
53 * A macro expanding to a string that is set at build time using the
54 * `--distribution-info` option. It allows a packager of the library
55 * to specify any distribution-specific patches. If no value is given
56 * at build time, the value is the string "unspecified".
57 */
58#define BOTAN_DISTRIBUTION_INFO "unspecified"
59
60/**
61 * @}
62 */
63
64/**
65 * @ingroup buildinfo
66 * @defgroup buildinfo_configuration Build configurations
67 * @{
68 */
69
70/** How many bits per limb in a BigInt */
71#define BOTAN_MP_WORD_BITS 64
72
73
74
75
76#define BOTAN_INSTALL_PREFIX R"(/usr/local)"
77#define BOTAN_INSTALL_HEADER_DIR R"(include/botan-3)"
78#define BOTAN_INSTALL_LIB_DIR R"(/usr/local/lib)"
79#define BOTAN_LIB_LINK "-ldl -lrt"
80#define BOTAN_LINK_FLAGS "-fstack-protector -m64 -pthread"
81
82#define BOTAN_SYSTEM_CERT_BUNDLE "/etc/ssl/certs/ca-certificates.crt"
83
84#ifndef BOTAN_DLL
85 #define BOTAN_DLL __attribute__((visibility("default")))
86#endif
87
88/* Target identification and feature test macros */
89
90#define BOTAN_TARGET_OS_IS_LINUX
91
92#define BOTAN_TARGET_OS_HAS_ATOMICS
93#define BOTAN_TARGET_OS_HAS_CLOCK_GETTIME
94#define BOTAN_TARGET_OS_HAS_DEV_RANDOM
95#define BOTAN_TARGET_OS_HAS_EXPLICIT_BZERO
96#define BOTAN_TARGET_OS_HAS_FILESYSTEM
97#define BOTAN_TARGET_OS_HAS_GETAUXVAL
98#define BOTAN_TARGET_OS_HAS_GETENTROPY
99#define BOTAN_TARGET_OS_HAS_GETRANDOM
100#define BOTAN_TARGET_OS_HAS_POSIX1
101#define BOTAN_TARGET_OS_HAS_POSIX_MLOCK
102#define BOTAN_TARGET_OS_HAS_PRCTL
103#define BOTAN_TARGET_OS_HAS_SOCKETS
104#define BOTAN_TARGET_OS_HAS_SYSTEM_CLOCK
105#define BOTAN_TARGET_OS_HAS_THREAD_LOCAL
106#define BOTAN_TARGET_OS_HAS_THREADS
107
108
109#define BOTAN_BUILD_COMPILER_IS_GCC
110
111#define BOTAN_USE_GCC_INLINE_ASM
112
113#define BOTAN_CT_VALUE_BARRIER_USE_ASM
114
115
116
117#define BOTAN_TARGET_ARCH "x86_64"
118#define BOTAN_TARGET_ARCH_IS_X86_64
119#define BOTAN_TARGET_CPU_IS_LITTLE_ENDIAN
120#define BOTAN_TARGET_CPU_IS_X86_FAMILY
121#define BOTAN_TARGET_CPU_HAS_NATIVE_64BIT
122
123#define BOTAN_TARGET_SUPPORTS_AESNI
124#define BOTAN_TARGET_SUPPORTS_AVX2
125#define BOTAN_TARGET_SUPPORTS_AVX512
126#define BOTAN_TARGET_SUPPORTS_BMI2
127#define BOTAN_TARGET_SUPPORTS_GFNI
128#define BOTAN_TARGET_SUPPORTS_RDRAND
129#define BOTAN_TARGET_SUPPORTS_RDSEED
130#define BOTAN_TARGET_SUPPORTS_SHA
131#define BOTAN_TARGET_SUPPORTS_SHA512
132#define BOTAN_TARGET_SUPPORTS_SM3
133#define BOTAN_TARGET_SUPPORTS_SM4
134#define BOTAN_TARGET_SUPPORTS_SSE2
135#define BOTAN_TARGET_SUPPORTS_SSE41
136#define BOTAN_TARGET_SUPPORTS_SSSE3
137#define BOTAN_TARGET_SUPPORTS_VAES
138
139
140
141
142
143
144/**
145 * @}
146 */
147
148/**
149 * @ingroup buildinfo
150 * @defgroup buildinfo_modules Enabled modules and API versions
151 * @{
152 */
153
154/*
155* Module availability definitions
156*/
157#define BOTAN_HAS_ADLER32 20131128
158#define BOTAN_HAS_AEAD_CCM 20131128
159#define BOTAN_HAS_AEAD_CHACHA20_POLY1305 20180807
160#define BOTAN_HAS_AEAD_EAX 20131128
161#define BOTAN_HAS_AEAD_GCM 20131128
162#define BOTAN_HAS_AEAD_MODES 20131128
163#define BOTAN_HAS_AEAD_OCB 20131128
164#define BOTAN_HAS_AEAD_SIV 20131202
165#define BOTAN_HAS_AES 20131128
166#define BOTAN_HAS_AES_CRYSTALS_XOF 20230816
167#define BOTAN_HAS_AES_NI 20131128
168#define BOTAN_HAS_AES_VAES 20240803
169#define BOTAN_HAS_AES_VPERM 20190901
170#define BOTAN_HAS_ANSI_X919_MAC 20131128
171#define BOTAN_HAS_ARGON2 20210407
172#define BOTAN_HAS_ARGON2_AVX2 20221216
173#define BOTAN_HAS_ARGON2_FMT 20210407
174#define BOTAN_HAS_ARGON2_SSSE3 20220303
175#define BOTAN_HAS_ARIA 20170415
176#define BOTAN_HAS_ASN1 20201106
177#define BOTAN_HAS_AUTO_RNG 20161126
178#define BOTAN_HAS_AUTO_SEEDING_RNG 20160821
179#define BOTAN_HAS_BASE32_CODEC 20180418
180#define BOTAN_HAS_BASE58_CODEC 20181209
181#define BOTAN_HAS_BASE64_CODEC 20131128
182#define BOTAN_HAS_BCRYPT 20131128
183#define BOTAN_HAS_BIGINT 20240529
184#define BOTAN_HAS_BIGINT_MP 20151225
185#define BOTAN_HAS_BITVECTOR 20241202
186#define BOTAN_HAS_BLAKE2B 20130131
187#define BOTAN_HAS_BLAKE2BMAC 20201123
188#define BOTAN_HAS_BLAKE2S 20231028
189#define BOTAN_HAS_BLOCK_CIPHER 20131128
190#define BOTAN_HAS_BLOWFISH 20180718
191#define BOTAN_HAS_CAMELLIA 20150922
192#define BOTAN_HAS_CASCADE 20131128
193#define BOTAN_HAS_CAST 20131128
194#define BOTAN_HAS_CAST_128 20171203
195#define BOTAN_HAS_CERTSTOR_FLATFILE 20190410
196#define BOTAN_HAS_CERTSTOR_SQL 20160818
197#define BOTAN_HAS_CERTSTOR_SYSTEM 20190411
198#define BOTAN_HAS_CHACHA 20180807
199#define BOTAN_HAS_CHACHA_AVX2 20180418
200#define BOTAN_HAS_CHACHA_AVX512 20230101
201#define BOTAN_HAS_CHACHA_RNG 20170728
202#define BOTAN_HAS_CHACHA_SIMD32 20181104
203#define BOTAN_HAS_CIPHER_MODES 20180124
204#define BOTAN_HAS_CIPHER_MODE_PADDING 20131128
205#define BOTAN_HAS_CLASSICMCELIECE 20231023
206#define BOTAN_HAS_CMAC 20131128
207#define BOTAN_HAS_CODEC_FILTERS 20131128
208#define BOTAN_HAS_COMB4P 20131128
209#define BOTAN_HAS_CPUID 20170917
210#define BOTAN_HAS_CRC24 20131128
211#define BOTAN_HAS_CRC32 20131128
212#define BOTAN_HAS_CRYPTO_BOX 20131128
213#define BOTAN_HAS_CSHAKE_XOF 20230911
214#define BOTAN_HAS_CTR_BE 20131128
215#define BOTAN_HAS_CURVE_25519 20170621
216#define BOTAN_HAS_CURVE_448_UTILS 20240301
217#define BOTAN_HAS_DES 20200926
218#define BOTAN_HAS_DIFFIE_HELLMAN 20131128
219#define BOTAN_HAS_DILITHIUM 20221018
220#define BOTAN_HAS_DILITHIUM_AES 20221018
221#define BOTAN_HAS_DILITHIUM_COMMON 20221018
222#define BOTAN_HAS_DILITHIUM_ROUND3 20240916
223#define BOTAN_HAS_DILITHIUM_SHAKE_XOF 20240728
224#define BOTAN_HAS_DLIES 20160713
225#define BOTAN_HAS_DL_GROUP 20131128
226#define BOTAN_HAS_DL_SCHEME 20230101
227#define BOTAN_HAS_DSA 20131128
228#define BOTAN_HAS_DYNAMIC_LOADER 20160310
229#define BOTAN_HAS_ECC_GROUP 20250101
230#define BOTAN_HAS_ECC_KEY 20190801
231#define BOTAN_HAS_ECC_PUBLIC_KEY_CRYPTO 20131128
232#define BOTAN_HAS_ECDH 20131128
233#define BOTAN_HAS_ECDSA 20131128
234#define BOTAN_HAS_ECGDSA 20160301
235#define BOTAN_HAS_ECIES 20160128
236#define BOTAN_HAS_ECKCDSA 20160413
237#define BOTAN_HAS_EC_CURVE_GFP 20250101
238#define BOTAN_HAS_EC_HASH_TO_CURVE 20210420
239#define BOTAN_HAS_ED25519 20170607
240#define BOTAN_HAS_ED448 20240223
241#define BOTAN_HAS_ELGAMAL 20131128
242#define BOTAN_HAS_EME_OAEP 20180305
243#define BOTAN_HAS_EME_PKCS1 20190426
244#define BOTAN_HAS_EME_PKCS1v15 20131128
245#define BOTAN_HAS_EME_RAW 20150313
246#define BOTAN_HAS_EMSA_PKCS1 20140118
247#define BOTAN_HAS_EMSA_PSSR 20131128
248#define BOTAN_HAS_EMSA_RAW 20131128
249#define BOTAN_HAS_EMSA_X931 20140118
250#define BOTAN_HAS_ENTROPY_SOURCE 20151120
251#define BOTAN_HAS_ENTROPY_SRC_GETENTROPY 20170327
252#define BOTAN_HAS_ENTROPY_SRC_RDSEED 20151218
253#define BOTAN_HAS_FFI 20240408
254#define BOTAN_HAS_FILTERS 20160415
255#define BOTAN_HAS_FPE_FE1 20131128
256#define BOTAN_HAS_FRODOKEM 20230801
257#define BOTAN_HAS_FRODOKEM_AES 20231103
258#define BOTAN_HAS_FRODOKEM_SHAKE 20231114
259#define BOTAN_HAS_GHASH 20201002
260#define BOTAN_HAS_GHASH_CLMUL_CPU 20201002
261#define BOTAN_HAS_GHASH_CLMUL_VPERM 20201002
262#define BOTAN_HAS_GMAC 20160207
263#define BOTAN_HAS_GOST_28147_89 20131128
264#define BOTAN_HAS_GOST_34_10_2001 20131128
265#define BOTAN_HAS_GOST_34_10_2012 20190801
266#define BOTAN_HAS_GOST_34_11 20131128
267#define BOTAN_HAS_HASH 20180112
268#define BOTAN_HAS_HASH_ID 20131128
269#define BOTAN_HAS_HEX_CODEC 20131128
270#define BOTAN_HAS_HKDF 20170927
271#define BOTAN_HAS_HMAC 20131128
272#define BOTAN_HAS_HMAC_DRBG 20140319
273#define BOTAN_HAS_HOTP 20180816
274#define BOTAN_HAS_HSS_LMS 20230925
275#define BOTAN_HAS_HTTP_UTIL 20171003
276#define BOTAN_HAS_IDEA 20131128
277#define BOTAN_HAS_IDEA_SSE2 20131128
278#define BOTAN_HAS_ISO_9796 20161121
279#define BOTAN_HAS_KDF1 20131128
280#define BOTAN_HAS_KDF1_18033 20160128
281#define BOTAN_HAS_KDF2 20131128
282#define BOTAN_HAS_KDF_BASE 20131128
283#define BOTAN_HAS_KECCAK 20131128
284#define BOTAN_HAS_KECCAK_PERM 20230613
285#define BOTAN_HAS_KECCAK_PERM_BMI2 20230612
286#define BOTAN_HAS_KMAC 20230601
287#define BOTAN_HAS_KUZNYECHIK 20230820
288#define BOTAN_HAS_KYBER 20220107
289#define BOTAN_HAS_KYBER_90S 20220107
290#define BOTAN_HAS_KYBER_COMMON 20220107
291#define BOTAN_HAS_KYBER_ROUND3 20240117
292#define BOTAN_HAS_LEGACY_EC_POINT 20250101
293#define BOTAN_HAS_LION 20131128
294#define BOTAN_HAS_LOCKING_ALLOCATOR 20131128
295#define BOTAN_HAS_MAC 20150626
296#define BOTAN_HAS_MCELIECE 20150922
297#define BOTAN_HAS_MD4 20131128
298#define BOTAN_HAS_MD5 20131128
299#define BOTAN_HAS_MDX_HASH_FUNCTION 20131128
300#define BOTAN_HAS_MEM_POOL 20180309
301#define BOTAN_HAS_MGF1 20140118
302#define BOTAN_HAS_ML_DSA 20240729
303#define BOTAN_HAS_ML_KEM 20240821
304#define BOTAN_HAS_MODES 20150626
305#define BOTAN_HAS_MODE_CBC 20131128
306#define BOTAN_HAS_MODE_CFB 20131128
307#define BOTAN_HAS_MODE_XTS 20131128
308#define BOTAN_HAS_NIST_KEYWRAP 20171119
309#define BOTAN_HAS_NOEKEON 20131128
310#define BOTAN_HAS_NOEKEON_SIMD 20160903
311#define BOTAN_HAS_NUMBERTHEORY 20201108
312#define BOTAN_HAS_OAEP 20250130
313#define BOTAN_HAS_OCSP 20201106
314#define BOTAN_HAS_OFB 20131128
315#define BOTAN_HAS_OS_UTILS 20241202
316#define BOTAN_HAS_PARALLEL_HASH 20131128
317#define BOTAN_HAS_PASSHASH9 20131128
318#define BOTAN_HAS_PASSWORD_HASHING 20210419
319#define BOTAN_HAS_PBKDF 20180902
320#define BOTAN_HAS_PBKDF2 20180902
321#define BOTAN_HAS_PBKDF_BCRYPT 20190531
322#define BOTAN_HAS_PCURVES 20240404
323#define BOTAN_HAS_PCURVES_BRAINPOOL256R1 20240608
324#define BOTAN_HAS_PCURVES_BRAINPOOL384R1 20240608
325#define BOTAN_HAS_PCURVES_BRAINPOOL512R1 20240608
326#define BOTAN_HAS_PCURVES_FRP256V1 20240608
327#define BOTAN_HAS_PCURVES_IMPL 20240714
328#define BOTAN_HAS_PCURVES_NUMSP512D1 20240723
329#define BOTAN_HAS_PCURVES_SECP192R1 20240709
330#define BOTAN_HAS_PCURVES_SECP224R1 20240716
331#define BOTAN_HAS_PCURVES_SECP256K1 20240608
332#define BOTAN_HAS_PCURVES_SECP256R1 20240608
333#define BOTAN_HAS_PCURVES_SECP384R1 20240608
334#define BOTAN_HAS_PCURVES_SECP521R1 20240608
335#define BOTAN_HAS_PCURVES_SM2P256V1 20240608
336#define BOTAN_HAS_PEM_CODEC 20131128
337#define BOTAN_HAS_PGP_S2K 20170527
338#define BOTAN_HAS_PIPE_UNIXFD_IO 20131128
339#define BOTAN_HAS_PKCS11 20160219
340#define BOTAN_HAS_PKCS5_PBES2 20141119
341#define BOTAN_HAS_PKCSV15_ENCRYPTION_PADDING 20250126
342#define BOTAN_HAS_PKCSV15_SIGNATURE_PADDING 20250126
343#define BOTAN_HAS_PK_PADDING 20131128
344#define BOTAN_HAS_POLY1305 20141227
345#define BOTAN_HAS_POLY_DBL 20170927
346#define BOTAN_HAS_PQCRYSTALS 20240228
347#define BOTAN_HAS_PROCESSOR_RNG 20200508
348#define BOTAN_HAS_PSK_DB 20171119
349#define BOTAN_HAS_PSS 20250130
350#define BOTAN_HAS_PUBLIC_KEY_BLINDING 20250125
351#define BOTAN_HAS_PUBLIC_KEY_CRYPTO 20131128
352#define BOTAN_HAS_RAW_HASH_FN 20230221
353#define BOTAN_HAS_RC4 20131128
354#define BOTAN_HAS_RFC3394_KEYWRAP 20131128
355#define BOTAN_HAS_RFC4880 20210407
356#define BOTAN_HAS_RFC6979_GENERATOR 20140321
357#define BOTAN_HAS_RIPEMD_160 20131128
358#define BOTAN_HAS_ROUGHTIME 20190220
359#define BOTAN_HAS_RSA 20160730
360#define BOTAN_HAS_SALSA20 20171114
361#define BOTAN_HAS_SCRYPT 20180902
362#define BOTAN_HAS_SEED 20131128
363#define BOTAN_HAS_SERPENT 20131128
364#define BOTAN_HAS_SERPENT_AVX2 20180824
365#define BOTAN_HAS_SERPENT_AVX512 20230101
366#define BOTAN_HAS_SERPENT_SIMD 20160903
367#define BOTAN_HAS_SHA1 20131128
368#define BOTAN_HAS_SHA1_SSE2 20160803
369#define BOTAN_HAS_SHA1_X86_SHA_NI 20170518
370#define BOTAN_HAS_SHA2_32 20131128
371#define BOTAN_HAS_SHA2_32_X86 20170518
372#define BOTAN_HAS_SHA2_32_X86_BMI2 20180526
373#define BOTAN_HAS_SHA2_64 20131128
374#define BOTAN_HAS_SHA2_64_BMI2 20190117
375#define BOTAN_HAS_SHA3 20161018
376#define BOTAN_HAS_SHACAL2 20170813
377#define BOTAN_HAS_SHACAL2_AVX2 20180826
378#define BOTAN_HAS_SHACAL2_SIMD 20170813
379#define BOTAN_HAS_SHACAL2_X86 20170814
380#define BOTAN_HAS_SHAKE 20161009
381#define BOTAN_HAS_SHAKE_CIPHER 20161018
382#define BOTAN_HAS_SHAKE_XOF 20230815
383#define BOTAN_HAS_SHA_224 20250130
384#define BOTAN_HAS_SHA_256 20250130
385#define BOTAN_HAS_SHA_384 20250130
386#define BOTAN_HAS_SHA_512 20250130
387#define BOTAN_HAS_SHA_512_256 20250130
388#define BOTAN_HAS_SIMD_32 20131128
389#define BOTAN_HAS_SIMD_AVX2 20180824
390#define BOTAN_HAS_SIMD_AVX512 20230101
391#define BOTAN_HAS_SIPHASH 20150110
392#define BOTAN_HAS_SKEIN_512 20131128
393#define BOTAN_HAS_SLH_DSA_WITH_SHA2 20240806
394#define BOTAN_HAS_SLH_DSA_WITH_SHAKE 20240808
395#define BOTAN_HAS_SM2 20180801
396#define BOTAN_HAS_SM3 20170402
397#define BOTAN_HAS_SM4 20170716
398#define BOTAN_HAS_SM4_GFNI 20240803
399#define BOTAN_HAS_SOCKETS 20171216
400#define BOTAN_HAS_SODIUM_API 20190615
401#define BOTAN_HAS_SP800_108 20160128
402#define BOTAN_HAS_SP800_56A 20170501
403#define BOTAN_HAS_SP800_56C 20160211
404#define BOTAN_HAS_SPHINCS_PLUS_COMMON 20230426
405#define BOTAN_HAS_SPHINCS_PLUS_SHA2_BASE 20240807
406#define BOTAN_HAS_SPHINCS_PLUS_SHAKE_BASE 20240809
407#define BOTAN_HAS_SPHINCS_PLUS_WITH_SHA2 20230531
408#define BOTAN_HAS_SPHINCS_PLUS_WITH_SHAKE 20230531
409#define BOTAN_HAS_SRP6 20161017
410#define BOTAN_HAS_STATEFUL_RNG 20160819
411#define BOTAN_HAS_STREAM_CIPHER 20131128
412#define BOTAN_HAS_STREEBOG 20170623
413#define BOTAN_HAS_SYSTEM_RNG 20141202
414#define BOTAN_HAS_THREAD_UTILS 20190922
415#define BOTAN_HAS_THREEFISH_512 20131224
416#define BOTAN_HAS_THRESHOLD_SECRET_SHARING 20131128
417#define BOTAN_HAS_TLS 20201128
418#define BOTAN_HAS_TLS_12 20210608
419#define BOTAN_HAS_TLS_13 20241208
420#define BOTAN_HAS_TLS_13_PQC 20241208
421#define BOTAN_HAS_TLS_CBC 20161008
422#define BOTAN_HAS_TLS_SESSION_MANAGER_SQL_DB 20141219
423#define BOTAN_HAS_TLS_V12_PRF 20131128
424#define BOTAN_HAS_TOTP 20180816
425#define BOTAN_HAS_TREE_HASH 20231006
426#define BOTAN_HAS_TRUNCATED_HASH 20230215
427#define BOTAN_HAS_TWOFISH 20131128
428#define BOTAN_HAS_UTIL_FUNCTIONS 20180903
429#define BOTAN_HAS_UUID 20180930
430#define BOTAN_HAS_WHIRLPOOL 20131128
431#define BOTAN_HAS_X25519 20240412
432#define BOTAN_HAS_X448 20240219
433#define BOTAN_HAS_X509 20201106
434#define BOTAN_HAS_X509_CERTIFICATES 20201106
435#define BOTAN_HAS_X942_PRF 20131128
436#define BOTAN_HAS_XMD 20240404
437#define BOTAN_HAS_XMSS_RFC8391 20201101
438#define BOTAN_HAS_XOF 20230815
439#define BOTAN_HAS_ZFEC 20211211
440#define BOTAN_HAS_ZFEC_SSE2 20211211
441#define BOTAN_HAS_ZFEC_VPERM 20211211
442
443
444/**
445 * @}
446 */
447
448/**
449 * @addtogroup buildinfo_configuration
450 * @{
451 */
452
453/** Local/misc configuration options (if any) follow */
454
455
456/*
457* Things you can edit (but probably shouldn't)
458*/
459
460/** How much to allocate for a buffer of no particular size */
461#define BOTAN_DEFAULT_BUFFER_SIZE 4096
462
463#if defined(BOTAN_HAS_VALGRIND) || defined(BOTAN_ENABLE_DEBUG_ASSERTS)
464 /**
465 * @brief Prohibits access to unused memory pages in Botan's memory pool
466 *
467 * If BOTAN_MEM_POOL_USE_MMU_PROTECTIONS is defined, the Memory_Pool
468 * class used for mlock'ed memory will use OS calls to set page
469 * permissions so as to prohibit access to pages on the free list, then
470 * enable read/write access when the page is set to be used. This will
471 * turn (some) use after free bugs into a crash.
472 *
473 * The additional syscalls have a substantial performance impact, which
474 * is why this option is not enabled by default. It is used when built for
475 * running in valgrind or debug assertions are enabled.
476 */
477 #define BOTAN_MEM_POOL_USE_MMU_PROTECTIONS
478#endif
479
480#if defined(BOTAN_HAS_VALGRIND)
481 /**
482 * If `BOTAN_CT_POISON_ENABLED` is defined, then the `CT::poison` and
483 * `CT::unpoison` functions have an effect and do not just compile to no-ops.
484 *
485 * At the moment that is only the case when building with valgrind support. We
486 * could potentially add support for other tools in the future.
487 */
488 #define BOTAN_CT_POISON_ENABLED
489#endif
490
491/**
492* If enabled uses memset via volatile function pointer to zero memory,
493* otherwise does a byte at a time write via a volatile pointer.
494*/
495#define BOTAN_USE_VOLATILE_MEMSET_FOR_ZERO 1
496
497/**
498* Normally blinding is performed by choosing a random starting point (plus
499* its inverse, of a form appropriate to the algorithm being blinded), and
500* then choosing new blinding operands by successive squaring of both
501* values. This is much faster than computing a new starting point but
502* introduces some possible corelation
503*
504* To avoid possible leakage problems in long-running processes, the blinder
505* periodically reinitializes the sequence. This value specifies how often
506* a new sequence should be started.
507*/
508#define BOTAN_BLINDING_REINIT_INTERVAL 64
509
510/**
511* Userspace RNGs like HMAC_DRBG will reseed after a specified number
512* of outputs are generated. Set to zero to disable automatic reseeding.
513*/
514#define BOTAN_RNG_DEFAULT_RESEED_INTERVAL 1024
515
516/** Number of entropy bits polled for reseeding userspace RNGs like HMAC_DRBG */
517#define BOTAN_RNG_RESEED_POLL_BITS 256
518
519#define BOTAN_RNG_RESEED_DEFAULT_TIMEOUT std::chrono::milliseconds(50)
520
521/**
522* Specifies (in order) the list of entropy sources that will be used
523* to seed an in-memory RNG.
524*/
525#define BOTAN_ENTROPY_DEFAULT_SOURCES \
526 { "rdseed", "hwrng", "getentropy", "system_rng", "system_stats" }
527
528/** Multiplier on a block cipher's native parallelism */
529#define BOTAN_BLOCK_CIPHER_PAR_MULT 4
530
531/**
532 * @}
533 */
534
535/* Check for a common build problem */
536
537#if defined(BOTAN_TARGET_ARCH_IS_X86_64) && ((defined(_MSC_VER) && !defined(_WIN64)) || \
538 (defined(__clang__) && !defined(__x86_64__)) || \
539 (defined(__GNUG__) && !defined(__x86_64__)))
540 #error "Trying to compile Botan configured as x86_64 with non-x86_64 compiler."
541#endif
542
543#if defined(BOTAN_TARGET_ARCH_IS_X86_32) && ((defined(_MSC_VER) && defined(_WIN64)) || \
544 (defined(__clang__) && !defined(__i386__)) || \
545 (defined(__GNUG__) && !defined(__i386__)))
546
547 #error "Trying to compile Botan configured as x86_32 with non-x86_32 compiler."
548#endif
549
550#endif