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 #define BENCH_EMBEDDED
23 #define USE_CERT_BUFFERS_2048
24 
25 /* TLS 1.3 */
26 #define WOLFSSL_TLS13
27 #define HAVE_TLS_EXTENSIONS
28 #define WC_RSA_PSS
29 #define HAVE_HKDF
30 #define HAVE_AEAD
31 #define HAVE_SUPPORTED_CURVES
32 
33 /* when you want to use SINGLE THREAD */
34 /* #define SINGLE_THREADED */
35 #define NO_FILESYSTEM
36 
37 #define HAVE_AESGCM
38 /* when you want to use SHA384 */
39 /* #define WOLFSSL_SHA384 */
40 #define WOLFSSL_SHA512
41 #define HAVE_ECC
42 #define HAVE_CURVE25519
43 #define CURVE25519_SMALL
44 #define HAVE_ED25519
45 
46 /* when you want to use aes counter mode */
47 /* #define WOLFSSL_AES_DIRECT */
48 /* #define WOLFSSL_AES_COUNTER */
49 
50 /* esp32-wroom-32se specific definition */
51 #if defined(WOLFSSL_ESPWROOM32SE)
52  #define WOLFSSL_ATECC508A
53  #define HAVE_PK_CALLBACKS
54  /* when you want to use a custom slot allocation for ATECC608A */
55  /* unless your configuration is unusual, you can use default */
56  /* implementation. */
57  /* #define CUSTOM_SLOT_ALLOCATION */
58 #endif
59 
60 /* rsa primitive specific definition */
61 #if defined(WOLFSSL_ESPWROOM32) || defined(WOLFSSL_ESPWROOM32SE)
62  /* Define USE_FAST_MATH and SMALL_STACK */
63  #define ESP32_USE_RSA_PRIMITIVE
64  /* threshold for performance adjustment for hw primitive use */
65  /* X bits of G^X mod P greater than */
66  #define EPS_RSA_EXPT_XBTIS 36
67  /* X and Y of X * Y mod P greater than */
68  #define ESP_RSA_MULM_BITS 2000
69 #endif
70 
71 /* debug options */
72 /* #define DEBUG_WOLFSSL */
73 /* #define WOLFSSL_ESP32WROOM32_CRYPT_DEBUG */
74 /* #define WOLFSSL_ATECC508A_DEBUG */
75 
76 /* date/time */
77 /* if it cannot adjust time in the device, */
78 /* enable macro below */
79 /* #define NO_ASN_TIME */
80 /* #define XTIME time */
81 
82 /* when you want not to use HW acceleration */
83 /* #define NO_ESP32WROOM32_CRYPT */
84 /* #define NO_WOLFSSL_ESP32WROOM32_CRYPT_HASH*/
85 /* #define NO_WOLFSSL_ESP32WROOM32_CRYPT_AES */
86 /* #define NO_WOLFSSL_ESP32WROOM32_CRYPT_RSA_PRI */