Botan 3.0.0-alpha0
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.0.0-alpha0
7*
8* Automatically generated from
9* 'configure.py --with-doxygen --with-sphinx --with-build-dir=/home/jack/var/tmp/botan_website_q2eaeyhn'
10*
11* Target
12* - Compiler: g++ -fstack-protector -m64 -pthread -std=c++17 -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#define BOTAN_VERSION_MAJOR 3
28#define BOTAN_VERSION_MINOR 0
29#define BOTAN_VERSION_PATCH 0
30#define BOTAN_VERSION_DATESTAMP 0
31
32#define BOTAN_VERSION_SUFFIX -alpha0
33#define BOTAN_VERSION_SUFFIX_STR "-alpha0"
34
35#define BOTAN_VERSION_RELEASE_TYPE "unreleased"
36
37#define BOTAN_VERSION_VC_REVISION "git:3b15cd6a1d9eb7048807cfa21ab3129b712cc221"
38
39#define BOTAN_DISTRIBUTION_INFO "unspecified"
40
41/**
42 * @}
43 */
44
45/**
46 * @ingroup buildinfo
47 * @defgroup buildinfo_configuration Build configurations
48 * @{
49 */
50
51/** How many bits per limb in a BigInt */
52#define BOTAN_MP_WORD_BITS 64
53
54
55#define BOTAN_INSTALL_PREFIX R"(/usr/local)"
56#define BOTAN_INSTALL_HEADER_DIR R"(include/botan-3)"
57#define BOTAN_INSTALL_LIB_DIR R"(/usr/local/lib)"
58#define BOTAN_LIB_LINK "-ldl -lrt"
59#define BOTAN_LINK_FLAGS "-fstack-protector -m64 -pthread"
60
61#define BOTAN_SYSTEM_CERT_BUNDLE "/etc/ssl/certs/ca-certificates.crt"
62
63#ifndef BOTAN_DLL
64 #define BOTAN_DLL __attribute__((visibility("default")))
65#endif
66
67/* Target identification and feature test macros */
68
69#define BOTAN_TARGET_OS_IS_LINUX
70
71#define BOTAN_TARGET_OS_HAS_ATOMICS
72#define BOTAN_TARGET_OS_HAS_CLOCK_GETTIME
73#define BOTAN_TARGET_OS_HAS_DEV_RANDOM
74#define BOTAN_TARGET_OS_HAS_FILESYSTEM
75#define BOTAN_TARGET_OS_HAS_GETAUXVAL
76#define BOTAN_TARGET_OS_HAS_POSIX1
77#define BOTAN_TARGET_OS_HAS_POSIX_MLOCK
78#define BOTAN_TARGET_OS_HAS_PRCTL
79#define BOTAN_TARGET_OS_HAS_PROC_FS
80#define BOTAN_TARGET_OS_HAS_SOCKETS
81#define BOTAN_TARGET_OS_HAS_THREAD_LOCAL
82#define BOTAN_TARGET_OS_HAS_THREADS
83
84
85#define BOTAN_BUILD_COMPILER_IS_GCC
86
87
88
89
90#define BOTAN_TARGET_ARCH_IS_X86_64
91#define BOTAN_TARGET_CPU_IS_LITTLE_ENDIAN
92#define BOTAN_TARGET_CPU_IS_X86_FAMILY
93#define BOTAN_TARGET_CPU_HAS_NATIVE_64BIT
94
95#define BOTAN_TARGET_SUPPORTS_AESNI
96#define BOTAN_TARGET_SUPPORTS_AVX2
97#define BOTAN_TARGET_SUPPORTS_BMI2
98#define BOTAN_TARGET_SUPPORTS_RDRAND
99#define BOTAN_TARGET_SUPPORTS_RDSEED
100#define BOTAN_TARGET_SUPPORTS_SHA
101#define BOTAN_TARGET_SUPPORTS_SSE2
102#define BOTAN_TARGET_SUPPORTS_SSE41
103#define BOTAN_TARGET_SUPPORTS_SSE42
104#define BOTAN_TARGET_SUPPORTS_SSSE3
105
106
107
108
109
110
111/**
112 * @}
113 */
114
115/**
116 * @ingroup buildinfo
117 * @defgroup buildinfo_modules Enabled modules and API versions
118 * @{
119 */
120
121/*
122* Module availability definitions
123*/
124#define BOTAN_HAS_ADLER32 20131128
125#define BOTAN_HAS_AEAD_CCM 20131128
126#define BOTAN_HAS_AEAD_CHACHA20_POLY1305 20180807
127#define BOTAN_HAS_AEAD_EAX 20131128
128#define BOTAN_HAS_AEAD_GCM 20131128
129#define BOTAN_HAS_AEAD_MODES 20131128
130#define BOTAN_HAS_AEAD_OCB 20131128
131#define BOTAN_HAS_AEAD_SIV 20131202
132#define BOTAN_HAS_AES 20131128
133#define BOTAN_HAS_AES_NI 20131128
134#define BOTAN_HAS_AES_VPERM 20190901
135#define BOTAN_HAS_ANSI_X919_MAC 20131128
136#define BOTAN_HAS_ARGON2 20210407
137#define BOTAN_HAS_ARGON2_FMT 20210407
138#define BOTAN_HAS_ARGON2_SSSE3 20220303
139#define BOTAN_HAS_ARIA 20170415
140#define BOTAN_HAS_ASN1 20201106
141#define BOTAN_HAS_AUTO_RNG 20161126
142#define BOTAN_HAS_AUTO_SEEDING_RNG 20160821
143#define BOTAN_HAS_BASE32_CODEC 20180418
144#define BOTAN_HAS_BASE58_CODEC 20181209
145#define BOTAN_HAS_BASE64_CODEC 20131128
146#define BOTAN_HAS_BCRYPT 20131128
147#define BOTAN_HAS_BIGINT 20210423
148#define BOTAN_HAS_BIGINT_MP 20151225
149#define BOTAN_HAS_BLAKE2B 20130131
150#define BOTAN_HAS_BLAKE2BMAC 20201123
151#define BOTAN_HAS_BLOCK_CIPHER 20131128
152#define BOTAN_HAS_BLOWFISH 20180718
153#define BOTAN_HAS_CAMELLIA 20150922
154#define BOTAN_HAS_CASCADE 20131128
155#define BOTAN_HAS_CAST 20131128
156#define BOTAN_HAS_CAST_128 20171203
157#define BOTAN_HAS_CECPQ1 20161116
158#define BOTAN_HAS_CERTSTOR_FLATFILE 20190410
159#define BOTAN_HAS_CERTSTOR_SQL 20160818
160#define BOTAN_HAS_CERTSTOR_SYSTEM 20190411
161#define BOTAN_HAS_CHACHA 20180807
162#define BOTAN_HAS_CHACHA_AVX2 20180418
163#define BOTAN_HAS_CHACHA_RNG 20170728
164#define BOTAN_HAS_CHACHA_SIMD32 20181104
165#define BOTAN_HAS_CIPHER_MODES 20180124
166#define BOTAN_HAS_CIPHER_MODE_PADDING 20131128
167#define BOTAN_HAS_CMAC 20131128
168#define BOTAN_HAS_CODEC_FILTERS 20131128
169#define BOTAN_HAS_COMB4P 20131128
170#define BOTAN_HAS_CPUID 20170917
171#define BOTAN_HAS_CRC24 20131128
172#define BOTAN_HAS_CRC32 20131128
173#define BOTAN_HAS_CRYPTO_BOX 20131128
174#define BOTAN_HAS_CTR_BE 20131128
175#define BOTAN_HAS_CURVE_25519 20170621
176#define BOTAN_HAS_DES 20200926
177#define BOTAN_HAS_DIFFIE_HELLMAN 20131128
178#define BOTAN_HAS_DLIES 20160713
179#define BOTAN_HAS_DL_GROUP 20131128
180#define BOTAN_HAS_DL_PUBLIC_KEY_FAMILY 20131128
181#define BOTAN_HAS_DSA 20131128
182#define BOTAN_HAS_DYNAMIC_LOADER 20160310
183#define BOTAN_HAS_ECC_GROUP 20170225
184#define BOTAN_HAS_ECC_KEY 20190801
185#define BOTAN_HAS_ECC_PUBLIC_KEY_CRYPTO 20131128
186#define BOTAN_HAS_ECDH 20131128
187#define BOTAN_HAS_ECDSA 20131128
188#define BOTAN_HAS_ECGDSA 20160301
189#define BOTAN_HAS_ECIES 20160128
190#define BOTAN_HAS_ECKCDSA 20160413
191#define BOTAN_HAS_EC_CURVE_GFP 20131128
192#define BOTAN_HAS_EC_HASH_TO_CURVE 20210420
193#define BOTAN_HAS_ED25519 20170607
194#define BOTAN_HAS_ELGAMAL 20131128
195#define BOTAN_HAS_EME_OAEP 20180305
196#define BOTAN_HAS_EME_PKCS1 20190426
197#define BOTAN_HAS_EME_PKCS1v15 20131128
198#define BOTAN_HAS_EME_RAW 20150313
199#define BOTAN_HAS_EMSA1 20131128
200#define BOTAN_HAS_EMSA_PKCS1 20140118
201#define BOTAN_HAS_EMSA_PSSR 20131128
202#define BOTAN_HAS_EMSA_RAW 20131128
203#define BOTAN_HAS_EMSA_X931 20140118
204#define BOTAN_HAS_ENTROPY_SOURCE 20151120
205#define BOTAN_HAS_ENTROPY_SRC_RDSEED 20151218
206#define BOTAN_HAS_FFI 20210628
207#define BOTAN_HAS_FILTERS 20160415
208#define BOTAN_HAS_FPE_FE1 20131128
209#define BOTAN_HAS_GHASH 20201002
210#define BOTAN_HAS_GHASH_CLMUL_CPU 20201002
211#define BOTAN_HAS_GHASH_CLMUL_VPERM 20201002
212#define BOTAN_HAS_GMAC 20160207
213#define BOTAN_HAS_GOST_28147_89 20131128
214#define BOTAN_HAS_GOST_34_10_2001 20131128
215#define BOTAN_HAS_GOST_34_10_2012 20190801
216#define BOTAN_HAS_GOST_34_11 20131128
217#define BOTAN_HAS_HASH 20180112
218#define BOTAN_HAS_HASH_ID 20131128
219#define BOTAN_HAS_HEX_CODEC 20131128
220#define BOTAN_HAS_HKDF 20170927
221#define BOTAN_HAS_HMAC 20131128
222#define BOTAN_HAS_HMAC_DRBG 20140319
223#define BOTAN_HAS_HOTP 20180816
224#define BOTAN_HAS_HTTP_UTIL 20171003
225#define BOTAN_HAS_IDEA 20131128
226#define BOTAN_HAS_IDEA_SSE2 20131128
227#define BOTAN_HAS_ISO_9796 20161121
228#define BOTAN_HAS_KDF1 20131128
229#define BOTAN_HAS_KDF1_18033 20160128
230#define BOTAN_HAS_KDF2 20131128
231#define BOTAN_HAS_KDF_BASE 20131128
232#define BOTAN_HAS_KECCAK 20131128
233#define BOTAN_HAS_KYBER 20220107
234#define BOTAN_HAS_KYBER_90S 20220107
235#define BOTAN_HAS_KYBER_COMMON 20220107
236#define BOTAN_HAS_LION 20131128
237#define BOTAN_HAS_LOCKING_ALLOCATOR 20131128
238#define BOTAN_HAS_MAC 20150626
239#define BOTAN_HAS_MCELIECE 20150922
240#define BOTAN_HAS_MD4 20131128
241#define BOTAN_HAS_MD5 20131128
242#define BOTAN_HAS_MDX_HASH_FUNCTION 20131128
243#define BOTAN_HAS_MEM_POOL 20180309
244#define BOTAN_HAS_MGF1 20140118
245#define BOTAN_HAS_MODES 20150626
246#define BOTAN_HAS_MODE_CBC 20131128
247#define BOTAN_HAS_MODE_CFB 20131128
248#define BOTAN_HAS_MODE_XTS 20131128
249#define BOTAN_HAS_NEWHOPE 20161018
250#define BOTAN_HAS_NIST_KEYWRAP 20171119
251#define BOTAN_HAS_NOEKEON 20131128
252#define BOTAN_HAS_NOEKEON_SIMD 20160903
253#define BOTAN_HAS_NUMBERTHEORY 20201108
254#define BOTAN_HAS_OCSP 20201106
255#define BOTAN_HAS_OFB 20131128
256#define BOTAN_HAS_PARALLEL_HASH 20131128
257#define BOTAN_HAS_PASSHASH9 20131128
258#define BOTAN_HAS_PASSWORD_HASHING 20210419
259#define BOTAN_HAS_PBKDF 20180902
260#define BOTAN_HAS_PBKDF2 20180902
261#define BOTAN_HAS_PBKDF_BCRYPT 20190531
262#define BOTAN_HAS_PEM_CODEC 20131128
263#define BOTAN_HAS_PGP_S2K 20170527
264#define BOTAN_HAS_PIPE_UNIXFD_IO 20131128
265#define BOTAN_HAS_PKCS11 20160219
266#define BOTAN_HAS_PKCS5_PBES2 20141119
267#define BOTAN_HAS_PK_PADDING 20131128
268#define BOTAN_HAS_POLY1305 20141227
269#define BOTAN_HAS_POLY_DBL 20170927
270#define BOTAN_HAS_PROCESSOR_RNG 20200508
271#define BOTAN_HAS_PSK_DB 20171119
272#define BOTAN_HAS_PUBLIC_KEY_CRYPTO 20131128
273#define BOTAN_HAS_RC4 20131128
274#define BOTAN_HAS_RFC3394_KEYWRAP 20131128
275#define BOTAN_HAS_RFC4880 20210407
276#define BOTAN_HAS_RFC6979_GENERATOR 20140321
277#define BOTAN_HAS_RIPEMD_160 20131128
278#define BOTAN_HAS_ROUGHTIME 20190220
279#define BOTAN_HAS_RSA 20160730
280#define BOTAN_HAS_SALSA20 20171114
281#define BOTAN_HAS_SCRYPT 20180902
282#define BOTAN_HAS_SEED 20131128
283#define BOTAN_HAS_SERPENT 20131128
284#define BOTAN_HAS_SERPENT_AVX2 20180824
285#define BOTAN_HAS_SERPENT_SIMD 20160903
286#define BOTAN_HAS_SHA1 20131128
287#define BOTAN_HAS_SHA1_SSE2 20160803
288#define BOTAN_HAS_SHA1_X86_SHA_NI 20170518
289#define BOTAN_HAS_SHA2_32 20131128
290#define BOTAN_HAS_SHA2_32_X86 20170518
291#define BOTAN_HAS_SHA2_32_X86_BMI2 20180526
292#define BOTAN_HAS_SHA2_64 20131128
293#define BOTAN_HAS_SHA2_64_BMI2 20190117
294#define BOTAN_HAS_SHA3 20161018
295#define BOTAN_HAS_SHA3_BMI2 20190117
296#define BOTAN_HAS_SHACAL2 20170813
297#define BOTAN_HAS_SHACAL2_AVX2 20180826
298#define BOTAN_HAS_SHACAL2_SIMD 20170813
299#define BOTAN_HAS_SHACAL2_X86 20170814
300#define BOTAN_HAS_SHAKE 20161009
301#define BOTAN_HAS_SHAKE_CIPHER 20161018
302#define BOTAN_HAS_SIMD_32 20131128
303#define BOTAN_HAS_SIMD_AVX2 20180824
304#define BOTAN_HAS_SIPHASH 20150110
305#define BOTAN_HAS_SKEIN_512 20131128
306#define BOTAN_HAS_SM2 20180801
307#define BOTAN_HAS_SM3 20170402
308#define BOTAN_HAS_SM4 20170716
309#define BOTAN_HAS_SOCKETS 20171216
310#define BOTAN_HAS_SODIUM_API 20190615
311#define BOTAN_HAS_SP800_108 20160128
312#define BOTAN_HAS_SP800_56A 20170501
313#define BOTAN_HAS_SP800_56C 20160211
314#define BOTAN_HAS_SRP6 20161017
315#define BOTAN_HAS_STATEFUL_RNG 20160819
316#define BOTAN_HAS_STREAM_CIPHER 20131128
317#define BOTAN_HAS_STREEBOG 20170623
318#define BOTAN_HAS_SYSTEM_RNG 20141202
319#define BOTAN_HAS_THREAD_UTILS 20190922
320#define BOTAN_HAS_THREEFISH_512 20131224
321#define BOTAN_HAS_THREEFISH_512_AVX2 20160903
322#define BOTAN_HAS_THRESHOLD_SECRET_SHARING 20131128
323#define BOTAN_HAS_TLS 20201128
324#define BOTAN_HAS_TLS_12 20210608
325#define BOTAN_HAS_TLS_13 20210721
326#define BOTAN_HAS_TLS_CBC 20161008
327#define BOTAN_HAS_TLS_SESSION_MANAGER_SQL_DB 20141219
328#define BOTAN_HAS_TLS_V12_PRF 20131128
329#define BOTAN_HAS_TOTP 20180816
330#define BOTAN_HAS_TWOFISH 20131128
331#define BOTAN_HAS_UTIL_FUNCTIONS 20180903
332#define BOTAN_HAS_UUID 20180930
333#define BOTAN_HAS_WHIRLPOOL 20131128
334#define BOTAN_HAS_X25519 20180910
335#define BOTAN_HAS_X509 20201106
336#define BOTAN_HAS_X509_CERTIFICATES 20201106
337#define BOTAN_HAS_X942_PRF 20131128
338#define BOTAN_HAS_XMSS_RFC8391 20201101
339#define BOTAN_HAS_ZFEC 20211211
340#define BOTAN_HAS_ZFEC_SSE2 20211211
341#define BOTAN_HAS_ZFEC_VPERM 20211211
342
343
344/**
345 * @}
346 */
347
348/**
349 * @addtogroup buildinfo_configuration
350 * @{
351 */
352
353/** Local/misc configuration options (if any) follow */
354
355
356/*
357* Things you can edit (but probably shouldn't)
358*/
359
360/** How much to allocate for a buffer of no particular size */
361#define BOTAN_DEFAULT_BUFFER_SIZE 1024
362
363/**
364* Total maximum amount of RAM (in KiB) we will lock into memory, even
365* if the OS would let us lock more
366*/
367#define BOTAN_MLOCK_ALLOCATOR_MAX_LOCKED_KB 512
368
369#if defined(BOTAN_HAS_VALGRIND) || defined(BOTAN_ENABLE_DEBUG_ASSERTS)
370 /**
371 * @brief Prohibits access to unused memory pages in Botan's memory pool
372 *
373 * If BOTAN_MEM_POOL_USE_MMU_PROTECTIONS is defined, the Memory_Pool
374 * class used for mlock'ed memory will use OS calls to set page
375 * permissions so as to prohibit access to pages on the free list, then
376 * enable read/write access when the page is set to be used. This will
377 * turn (some) use after free bugs into a crash.
378 *
379 * The additional syscalls have a substantial performance impact, which
380 * is why this option is not enabled by default. It is used when built for
381 * running in valgrind or debug assertions are enabled.
382 */
383 #define BOTAN_MEM_POOL_USE_MMU_PROTECTIONS
384#endif
385
386/**
387* If enabled uses memset via volatile function pointer to zero memory,
388* otherwise does a byte at a time write via a volatile pointer.
389*/
390#define BOTAN_USE_VOLATILE_MEMSET_FOR_ZERO 1
391
392/**
393* Normally blinding is performed by choosing a random starting point (plus
394* its inverse, of a form appropriate to the algorithm being blinded), and
395* then choosing new blinding operands by successive squaring of both
396* values. This is much faster than computing a new starting point but
397* introduces some possible corelation
398*
399* To avoid possible leakage problems in long-running processes, the blinder
400* periodically reinitializes the sequence. This value specifies how often
401* a new sequence should be started.
402*/
403#define BOTAN_BLINDING_REINIT_INTERVAL 64
404
405/**
406* Userspace RNGs like HMAC_DRBG will reseed after a specified number
407* of outputs are generated. Set to zero to disable automatic reseeding.
408*/
409#define BOTAN_RNG_DEFAULT_RESEED_INTERVAL 1024
410
411/** Number of entropy bits polled for reseeding userspace RNGs like HMAC_DRBG */
412#define BOTAN_RNG_RESEED_POLL_BITS 256
413
414#define BOTAN_RNG_AUTO_RESEED_TIMEOUT std::chrono::milliseconds(10)
415#define BOTAN_RNG_RESEED_DEFAULT_TIMEOUT std::chrono::milliseconds(50)
416
417/**
418* Specifies (in order) the list of entropy sources that will be used
419* to seed an in-memory RNG.
420*/
421#define BOTAN_ENTROPY_DEFAULT_SOURCES \
422 { "rdseed", "hwrng", "getentropy", "system_rng", "system_stats" }
423
424/** Multiplier on a block cipher's native parallelism */
425#define BOTAN_BLOCK_CIPHER_PAR_MULT 4
426
427/**
428* This directory will be monitored by ProcWalking_EntropySource and
429* the contents provided as entropy inputs to the RNG. May also be
430* usefully set to something like "/sys", depending on the system being
431* deployed to. Set to an empty string to disable.
432*/
433#define BOTAN_ENTROPY_PROC_FS_PATH "/proc"
434
435/*
436* These paramaters control how many bytes to read from the system
437* PRNG, and how long to block if applicable. The timeout only applies
438* to reading /dev/urandom and company.
439*/
440#define BOTAN_SYSTEM_RNG_POLL_REQUEST 64
441#define BOTAN_SYSTEM_RNG_POLL_TIMEOUT_MS 20
442
443/**
444* When a PBKDF is self-tuning parameters, it will attempt to take about this
445* amount of time to self-benchmark.
446*/
447#define BOTAN_PBKDF_TUNING_TIME std::chrono::milliseconds(10)
448
449/**
450* If no way of dynamically determining the cache line size for the
451* system exists, this value is used as the default. Used by the side
452* channel countermeasures rather than for alignment purposes, so it is
453* better to be on the smaller side if the exact value cannot be
454* determined. Typically 32 or 64 bytes on modern CPUs.
455*/
456#if !defined(BOTAN_TARGET_CPU_DEFAULT_CACHE_LINE_SIZE)
457 #define BOTAN_TARGET_CPU_DEFAULT_CACHE_LINE_SIZE 32
458#endif
459
460#if !defined(BOTAN_AUTO_RNG_HMAC)
461
462 #if defined(BOTAN_HAS_SHA2_64)
463 /** Controls how AutoSeeded_RNG is instantiated */
464 #define BOTAN_AUTO_RNG_HMAC "HMAC(SHA-384)"
465 #elif defined(BOTAN_HAS_SHA2_32)
466 /** Controls how AutoSeeded_RNG is instantiated */
467 #define BOTAN_AUTO_RNG_HMAC "HMAC(SHA-256)"
468 #elif defined(BOTAN_HAS_SHA3)
469 /** Controls how AutoSeeded_RNG is instantiated */
470 #define BOTAN_AUTO_RNG_HMAC "HMAC(SHA-3(256))"
471 #elif defined(BOTAN_HAS_SHA1)
472 /** Controls how AutoSeeded_RNG is instantiated */
473 #define BOTAN_AUTO_RNG_HMAC "HMAC(SHA-1)"
474 #endif
475
476 /* Otherwise, no hash found: leave BOTAN_AUTO_RNG_HMAC undefined */
477
478#endif
479
480/* Check for a common build problem */
481
482#if defined(BOTAN_TARGET_ARCH_IS_X86_64) && ((defined(_MSC_VER) && !defined(_WIN64)) || \
483 (defined(__clang__) && !defined(__x86_64__)) || \
484 (defined(__GNUG__) && !defined(__x86_64__)))
485 #error "Trying to compile Botan configured as x86_64 with non-x86_64 compiler."
486#endif
487
488#if defined(BOTAN_TARGET_ARCH_IS_X86_32) && ((defined(_MSC_VER) && defined(_WIN64)) || \
489 (defined(__clang__) && !defined(__i386__)) || \
490 (defined(__GNUG__) && !defined(__i386__)))
491
492 #error "Trying to compile Botan configured as x86_32 with non-x86_32 compiler."
493#endif
494
495#include <botan/compiler.h>
496
497#endif
498