user_settings.h
1 /* user_settings.h
2  *
3  * Copyright (C) 2006-2020 wolfSSL Inc.
4  *
5  * This file is part of wolfSSL.
6  *
7  * wolfSSL is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * wolfSSL is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
20  */
21 
22 /*
23  * user_settings.h
24  *
25  * Created on: Mar 20, 2020
26  * Generated using:
27  * ./configure --enable-cryptonly --enable-armasm --enable-ecc --enable-aesgcm --enable-pwdbased --enable-sp --enable-sp-asm \
28  * --disable-dh --disable-sha --disable-md5 --disable-sha224 --disable-aescbc --disable-shake256
29  * Result: wolfssl/options.h
30  */
31 
32 #ifndef SRC_USER_SETTINGS_H_
33 #define SRC_USER_SETTINGS_H_
34 
35 /* Disable all TLS support, only wolfCrypt features */
36 #define WOLFCRYPT_ONLY
37 
38 /* Xilinx SDK */
39 #define WOLFSSL_XILINX
40 #define SINGLE_THREADED
41 #define NO_FILESYSTEM
42 
43 /* Platform - remap printf */
44 #include "xil_printf.h"
45 #define XPRINTF xil_printf
46 
47 /* Enable ARMv8 (Aarch64) assembly speedups - SHA256 / AESGCM */
48 /* Note: Requires CFLAGS="-mcpu=generic+crypto -mstrict-align" */
49 #define WOLFSSL_ARMASM
50 
51 /* Math */
52 #define USE_FAST_MATH
53 #define FP_MAX_BITS (4096 * 2) /* Max RSA 4096-bit */
54 
55 /* Use Single Precision assembly math speedups for ECC */
56 #define WOLFSSL_SP
57 #define WOLFSSL_SP_ASM
58 #define WOLFSSL_SP_ARM64_ASM
59 #define WOLFSSL_HAVE_SP_ECC
60 #define WOLFSSL_HAVE_SP_RSA
61 
62 /* Random: HashDRGB / P-RNG (SHA256) */
63 #define HAVE_HASHDRBG
64 extern unsigned char my_rng_seed_gen(void);
65 #define CUSTOM_RAND_GENERATE my_rng_seed_gen
66 
67 /* Timing Resistance */
68 #define TFM_TIMING_RESISTANT
69 #define ECC_TIMING_RESISTANT
70 #define WC_RSA_BLINDING
71 
72 /* ECC */
73 #define HAVE_ECC
74 #define TFM_ECC256
75 #define ECC_SHAMIR
76 
77 /* DH */
78 #undef NO_DH
79 #define WOLFSSL_DH_CONST
80 #define HAVE_FFDHE_2048
81 #define HAVE_FFDHE_4096
82 
83 /* Curve25519 / Ed25519 */
84 #define HAVE_CURVE25519
85 #define HAVE_ED25519 /* ED25519 Requires SHA512 */
86 /* 25519 assumes UINT128_T is available for Aarch64 */
87 #ifndef HAVE___UINT128_T
88 #define HAVE___UINT128_T
89 #endif
90 
91 /* ChaCha20 / Poly1305 */
92 #define HAVE_CHACHA
93 #define HAVE_POLY1305
94 
95 /* AES-GCM Only */
96 #define NO_AES_CBC
97 #define HAVE_AESGCM
98 
99 /* Hashing */
100 #define WOLFSSL_SHA512
101 #define WOLFSSL_SHA384
102 #define WOLFSSL_SHA3
103 #define WOLFSSL_NO_HASH_RAW /* not supported with ARMASM */
104 
105 /* HKDF */
106 #define HAVE_HKDF
107 
108 /* Disable Algorithms */
109 #define NO_DSA
110 #define NO_RC4
111 #define NO_MD4
112 #define NO_MD5
113 #define NO_SHA
114 #define NO_HC128
115 #define NO_RABBIT
116 #define NO_PSK
117 #define NO_DES3
118 
119 /* Other */
120 #define WOLFSSL_IGNORE_FILE_WARN /* Ignore file include warnings */
121 #define NO_MAIN_DRIVER /* User supplied "main" entry point */
122 #define BENCH_EMBEDDED /* Use smaller buffers for benchmarking */
123 
124 /* Test with "wolfssl/certs_test.h" buffers - no file system */
125 #define USE_CERT_BUFFERS_256
126 #define USE_CERT_BUFFERS_2048
127 
128 /* Debugging */
129 #if 0
130  #define DEBUG_WOLFSSL
131 #endif
132 
133 #endif /* SRC_USER_SETTINGS_H_ */