Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1 | /** |
Gilles Peskine | 66920ce | 2018-03-03 21:49:49 +0100 | [diff] [blame] | 2 | * \file config-psa-crypto.h |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 3 | * |
Gilles Peskine | 66920ce | 2018-03-03 21:49:49 +0100 | [diff] [blame] | 4 | * \brief Configuration with all cryptography features and no X.509 or TLS. |
Paul Bakker | 37ca75d | 2011-01-06 12:28:03 +0000 | [diff] [blame] | 5 | * |
Gilles Peskine | 66920ce | 2018-03-03 21:49:49 +0100 | [diff] [blame] | 6 | * This configuration is intended to prototype the PSA reference implementation. |
Darryl Green | a40a101 | 2018-01-05 15:33:17 +0000 | [diff] [blame] | 7 | */ |
| 8 | /* |
Thomas Fossati | 656864b | 2016-07-17 08:51:22 +0100 | [diff] [blame] | 9 | * Copyright (C) 2006-2018, ARM Limited, All Rights Reserved |
Manuel Pégourié-Gonnard | 37ff140 | 2015-09-04 14:21:07 +0200 | [diff] [blame] | 10 | * SPDX-License-Identifier: Apache-2.0 |
| 11 | * |
| 12 | * Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 13 | * not use this file except in compliance with the License. |
| 14 | * You may obtain a copy of the License at |
| 15 | * |
| 16 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 17 | * |
| 18 | * Unless required by applicable law or agreed to in writing, software |
| 19 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 21 | * See the License for the specific language governing permissions and |
| 22 | * limitations under the License. |
Paul Bakker | b96f154 | 2010-07-18 20:36:00 +0000 | [diff] [blame] | 23 | * |
Manuel Pégourié-Gonnard | fe44643 | 2015-03-06 13:17:10 +0000 | [diff] [blame] | 24 | * This file is part of mbed TLS (https://tls.mbed.org) |
Manuel Pégourié-Gonnard | e2b0efe | 2015-08-11 10:38:37 +0200 | [diff] [blame] | 25 | */ |
| 26 | |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 27 | #ifndef MBEDTLS_CONFIG_H |
| 28 | #define MBEDTLS_CONFIG_H |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 29 | |
Paul Bakker | cce9d77 | 2011-11-18 14:26:47 +0000 | [diff] [blame] | 30 | #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 31 | #define _CRT_SECURE_NO_DEPRECATE 1 |
| 32 | #endif |
| 33 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 34 | /** |
Paul Bakker | 0a62cd1 | 2011-01-21 11:00:08 +0000 | [diff] [blame] | 35 | * \name SECTION: System support |
| 36 | * |
| 37 | * This section sets system specific settings. |
| 38 | * \{ |
| 39 | */ |
| 40 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 41 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 42 | * \def MBEDTLS_HAVE_ASM |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 43 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 44 | * The compiler has support for asm(). |
Paul Bakker | 68041ec | 2009-04-19 21:17:55 +0000 | [diff] [blame] | 45 | * |
| 46 | * Requires support for asm() in compiler. |
| 47 | * |
| 48 | * Used in: |
Manuel Pégourié-Gonnard | 26b54fa | 2018-02-27 12:20:20 +0100 | [diff] [blame] | 49 | * library/aria.c |
Paul Bakker | 68041ec | 2009-04-19 21:17:55 +0000 | [diff] [blame] | 50 | * library/timing.c |
Manuel Pégourié-Gonnard | 7f80997 | 2015-03-09 17:05:11 +0000 | [diff] [blame] | 51 | * include/mbedtls/bn_mul.h |
Paul Bakker | 68041ec | 2009-04-19 21:17:55 +0000 | [diff] [blame] | 52 | * |
Manuel Pégourié-Gonnard | 26b54fa | 2018-02-27 12:20:20 +0100 | [diff] [blame] | 53 | * Required by: |
| 54 | * MBEDTLS_AESNI_C |
| 55 | * MBEDTLS_PADLOCK_C |
| 56 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 57 | * Comment to disable the use of assembly code. |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 58 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 59 | #define MBEDTLS_HAVE_ASM |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 60 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 61 | /** |
Gilles Peskine | b1a977f | 2017-06-08 15:19:20 +0200 | [diff] [blame] | 62 | * \def MBEDTLS_NO_UDBL_DIVISION |
| 63 | * |
| 64 | * The platform lacks support for double-width integer division (64-bit |
| 65 | * division on a 32-bit platform, 128-bit division on a 64-bit platform). |
| 66 | * |
| 67 | * Used in: |
| 68 | * include/mbedtls/bignum.h |
| 69 | * library/bignum.c |
| 70 | * |
| 71 | * The bignum code uses double-width division to speed up some operations. |
| 72 | * Double-width division is often implemented in software that needs to |
| 73 | * be linked with the program. The presence of a double-width integer |
| 74 | * type is usually detected automatically through preprocessor macros, |
| 75 | * but the automatic detection cannot know whether the code needs to |
| 76 | * and can be linked with an implementation of division for that type. |
| 77 | * By default division is assumed to be usable if the type is present. |
| 78 | * Uncomment this option to prevent the use of double-width division. |
| 79 | * |
| 80 | * Note that division for the native integer type is always required. |
| 81 | * Furthermore, a 64-bit type is always required even on a 32-bit |
Andres Amaya Garcia | c630ce6 | 2017-07-21 10:56:22 +0100 | [diff] [blame] | 82 | * platform, but it need not support multiplication or division. In some |
| 83 | * cases it is also desirable to disable some double-width operations. For |
| 84 | * example, if double-width division is implemented in software, disabling |
| 85 | * it can reduce code size in some embedded targets. |
Gilles Peskine | b1a977f | 2017-06-08 15:19:20 +0200 | [diff] [blame] | 86 | */ |
| 87 | //#define MBEDTLS_NO_UDBL_DIVISION |
| 88 | |
| 89 | /** |
Manuel Pégourié-Gonnard | 2adb375 | 2018-06-07 10:51:44 +0200 | [diff] [blame] | 90 | * \def MBEDTLS_NO_64BIT_MULTIPLICATION |
| 91 | * |
| 92 | * The platform lacks support for 32x32 -> 64-bit multiplication. |
| 93 | * |
| 94 | * Used in: |
| 95 | * library/poly1305.c |
| 96 | * |
| 97 | * Some parts of the library may use multiplication of two unsigned 32-bit |
| 98 | * operands with a 64-bit result in order to speed up computations. On some |
| 99 | * platforms, this is not available in hardware and has to be implemented in |
| 100 | * software, usually in a library provided by the toolchain. |
| 101 | * |
| 102 | * Sometimes it is not desirable to have to link to that library. This option |
| 103 | * removes the dependency of that library on platforms that lack a hardware |
| 104 | * 64-bit multiplier by embedding a software implementation in Mbed TLS. |
| 105 | * |
| 106 | * Note that depending on the compiler, this may decrease performance compared |
| 107 | * to using the library function provided by the toolchain. |
| 108 | */ |
| 109 | //#define MBEDTLS_NO_64BIT_MULTIPLICATION |
| 110 | |
| 111 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 112 | * \def MBEDTLS_HAVE_SSE2 |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 113 | * |
Paul Bakker | e23c315 | 2012-10-01 14:42:47 +0000 | [diff] [blame] | 114 | * CPU supports SSE2 instruction set. |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 115 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 116 | * Uncomment if the CPU supports SSE2 (IA-32 specific). |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 117 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 118 | //#define MBEDTLS_HAVE_SSE2 |
Paul Bakker | fa9b100 | 2013-07-03 15:31:03 +0200 | [diff] [blame] | 119 | |
| 120 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 121 | * \def MBEDTLS_PLATFORM_MEMORY |
Paul Bakker | defc0ca | 2014-02-04 17:30:24 +0100 | [diff] [blame] | 122 | * |
| 123 | * Enable the memory allocation layer. |
| 124 | * |
Manuel Pégourié-Gonnard | b9ef118 | 2015-05-26 16:15:20 +0200 | [diff] [blame] | 125 | * By default mbed TLS uses the system-provided calloc() and free(). |
Paul Bakker | defc0ca | 2014-02-04 17:30:24 +0100 | [diff] [blame] | 126 | * This allows different allocators (self-implemented or provided) to be |
| 127 | * provided to the platform abstraction layer. |
| 128 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 129 | * Enabling MBEDTLS_PLATFORM_MEMORY without the |
Manuel Pégourié-Gonnard | b9ef118 | 2015-05-26 16:15:20 +0200 | [diff] [blame] | 130 | * MBEDTLS_PLATFORM_{FREE,CALLOC}_MACROs will provide |
| 131 | * "mbedtls_platform_set_calloc_free()" allowing you to set an alternative calloc() and |
Rich Evans | 16f8cd8 | 2015-02-06 16:14:34 +0000 | [diff] [blame] | 132 | * free() function pointer at runtime. |
| 133 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 134 | * Enabling MBEDTLS_PLATFORM_MEMORY and specifying |
Manuel Pégourié-Gonnard | b9ef118 | 2015-05-26 16:15:20 +0200 | [diff] [blame] | 135 | * MBEDTLS_PLATFORM_{CALLOC,FREE}_MACROs will allow you to specify the |
Rich Evans | 16f8cd8 | 2015-02-06 16:14:34 +0000 | [diff] [blame] | 136 | * alternate function at compile time. |
Paul Bakker | defc0ca | 2014-02-04 17:30:24 +0100 | [diff] [blame] | 137 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 138 | * Requires: MBEDTLS_PLATFORM_C |
Paul Bakker | defc0ca | 2014-02-04 17:30:24 +0100 | [diff] [blame] | 139 | * |
| 140 | * Enable this layer to allow use of alternative memory allocators. |
| 141 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 142 | //#define MBEDTLS_PLATFORM_MEMORY |
Paul Bakker | defc0ca | 2014-02-04 17:30:24 +0100 | [diff] [blame] | 143 | |
| 144 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 145 | * \def MBEDTLS_PLATFORM_NO_STD_FUNCTIONS |
Paul Bakker | 088c5c5 | 2014-04-25 11:11:10 +0200 | [diff] [blame] | 146 | * |
Manuel Pégourié-Gonnard | b9ef118 | 2015-05-26 16:15:20 +0200 | [diff] [blame] | 147 | * Do not assign standard functions in the platform layer (e.g. calloc() to |
| 148 | * MBEDTLS_PLATFORM_STD_CALLOC and printf() to MBEDTLS_PLATFORM_STD_PRINTF) |
Paul Bakker | 088c5c5 | 2014-04-25 11:11:10 +0200 | [diff] [blame] | 149 | * |
| 150 | * This makes sure there are no linking errors on platforms that do not support |
| 151 | * these functions. You will HAVE to provide alternatives, either at runtime |
| 152 | * via the platform_set_xxx() functions or at compile time by setting |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 153 | * the MBEDTLS_PLATFORM_STD_XXX defines, or enabling a |
| 154 | * MBEDTLS_PLATFORM_XXX_MACRO. |
Paul Bakker | 088c5c5 | 2014-04-25 11:11:10 +0200 | [diff] [blame] | 155 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 156 | * Requires: MBEDTLS_PLATFORM_C |
Paul Bakker | 088c5c5 | 2014-04-25 11:11:10 +0200 | [diff] [blame] | 157 | * |
| 158 | * Uncomment to prevent default assignment of standard functions in the |
| 159 | * platform layer. |
| 160 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 161 | //#define MBEDTLS_PLATFORM_NO_STD_FUNCTIONS |
Paul Bakker | 088c5c5 | 2014-04-25 11:11:10 +0200 | [diff] [blame] | 162 | |
| 163 | /** |
Janos Follath | c351d18 | 2016-03-21 08:43:59 +0000 | [diff] [blame] | 164 | * \def MBEDTLS_PLATFORM_EXIT_ALT |
Paul Bakker | 747a83a | 2014-02-01 22:50:07 +0100 | [diff] [blame] | 165 | * |
Manuel Pégourié-Gonnard | 76da60c | 2016-01-04 13:51:01 +0100 | [diff] [blame] | 166 | * MBEDTLS_PLATFORM_XXX_ALT: Uncomment a macro to let mbed TLS support the |
| 167 | * function in the platform abstraction layer. |
Paul Bakker | 747a83a | 2014-02-01 22:50:07 +0100 | [diff] [blame] | 168 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 169 | * Example: In case you uncomment MBEDTLS_PLATFORM_PRINTF_ALT, mbed TLS will |
| 170 | * provide a function "mbedtls_platform_set_printf()" that allows you to set an |
Paul Bakker | 747a83a | 2014-02-01 22:50:07 +0100 | [diff] [blame] | 171 | * alternative printf function pointer. |
| 172 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 173 | * All these define require MBEDTLS_PLATFORM_C to be defined! |
Paul Bakker | 747a83a | 2014-02-01 22:50:07 +0100 | [diff] [blame] | 174 | * |
Manuel Pégourié-Gonnard | 9db2887 | 2015-06-26 10:52:01 +0200 | [diff] [blame] | 175 | * \note MBEDTLS_PLATFORM_SNPRINTF_ALT is required on Windows; |
| 176 | * it will be enabled automatically by check_config.h |
| 177 | * |
Manuel Pégourié-Gonnard | 6c0c8e0 | 2015-06-22 10:23:34 +0200 | [diff] [blame] | 178 | * \warning MBEDTLS_PLATFORM_XXX_ALT cannot be defined at the same time as |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 179 | * MBEDTLS_PLATFORM_XXX_MACRO! |
Rich Evans | 16f8cd8 | 2015-02-06 16:14:34 +0000 | [diff] [blame] | 180 | * |
Paul Bakker | 747a83a | 2014-02-01 22:50:07 +0100 | [diff] [blame] | 181 | * Uncomment a macro to enable alternate implementation of specific base |
| 182 | * platform function |
| 183 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 184 | //#define MBEDTLS_PLATFORM_EXIT_ALT |
| 185 | //#define MBEDTLS_PLATFORM_FPRINTF_ALT |
| 186 | //#define MBEDTLS_PLATFORM_PRINTF_ALT |
| 187 | //#define MBEDTLS_PLATFORM_SNPRINTF_ALT |
Paul Bakker | cf0a9f9 | 2016-06-01 11:25:44 +0100 | [diff] [blame] | 188 | //#define MBEDTLS_PLATFORM_NV_SEED_ALT |
Andres Amaya Garcia | d91f99f | 2017-07-18 10:23:04 +0100 | [diff] [blame] | 189 | //#define MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT |
Manuel Pégourié-Gonnard | c70581c | 2015-03-23 13:58:27 +0100 | [diff] [blame] | 190 | |
| 191 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 192 | * \def MBEDTLS_DEPRECATED_WARNING |
Manuel Pégourié-Gonnard | c70581c | 2015-03-23 13:58:27 +0100 | [diff] [blame] | 193 | * |
| 194 | * Mark deprecated functions so that they generate a warning if used. |
| 195 | * Functions deprecated in one version will usually be removed in the next |
| 196 | * version. You can enable this to help you prepare the transition to a new |
| 197 | * major version by making sure your code is not using these functions. |
| 198 | * |
| 199 | * This only works with GCC and Clang. With other compilers, you may want to |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 200 | * use MBEDTLS_DEPRECATED_REMOVED |
Manuel Pégourié-Gonnard | c70581c | 2015-03-23 13:58:27 +0100 | [diff] [blame] | 201 | * |
| 202 | * Uncomment to get warnings on using deprecated functions. |
| 203 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 204 | //#define MBEDTLS_DEPRECATED_WARNING |
Manuel Pégourié-Gonnard | c70581c | 2015-03-23 13:58:27 +0100 | [diff] [blame] | 205 | |
| 206 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 207 | * \def MBEDTLS_DEPRECATED_REMOVED |
Manuel Pégourié-Gonnard | c70581c | 2015-03-23 13:58:27 +0100 | [diff] [blame] | 208 | * |
| 209 | * Remove deprecated functions so that they generate an error if used. |
| 210 | * Functions deprecated in one version will usually be removed in the next |
| 211 | * version. You can enable this to help you prepare the transition to a new |
| 212 | * major version by making sure your code is not using these functions. |
| 213 | * |
| 214 | * Uncomment to get errors on using deprecated functions. |
| 215 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 216 | //#define MBEDTLS_DEPRECATED_REMOVED |
Manuel Pégourié-Gonnard | c70581c | 2015-03-23 13:58:27 +0100 | [diff] [blame] | 217 | |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 218 | /* \} name SECTION: System support */ |
Paul Bakker | 0a62cd1 | 2011-01-21 11:00:08 +0000 | [diff] [blame] | 219 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 220 | /** |
Manuel Pégourié-Gonnard | b4fe3cb | 2015-01-22 16:11:05 +0000 | [diff] [blame] | 221 | * \name SECTION: mbed TLS feature support |
Paul Bakker | 0a62cd1 | 2011-01-21 11:00:08 +0000 | [diff] [blame] | 222 | * |
| 223 | * This section sets support for features that are or are not needed |
| 224 | * within the modules that are enabled. |
| 225 | * \{ |
| 226 | */ |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 227 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 228 | /** |
Manuel Pégourié-Gonnard | 76da60c | 2016-01-04 13:51:01 +0100 | [diff] [blame] | 229 | * \def MBEDTLS_AES_ALT |
Paul Bakker | 90995b5 | 2013-06-24 19:20:35 +0200 | [diff] [blame] | 230 | * |
Manuel Pégourié-Gonnard | 76da60c | 2016-01-04 13:51:01 +0100 | [diff] [blame] | 231 | * MBEDTLS__MODULE_NAME__ALT: Uncomment a macro to let mbed TLS use your |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 232 | * alternate core implementation of a symmetric crypto, an arithmetic or hash |
| 233 | * module (e.g. platform specific assembly optimized implementations). Keep |
| 234 | * in mind that the function prototypes should remain the same. |
Paul Bakker | 90995b5 | 2013-06-24 19:20:35 +0200 | [diff] [blame] | 235 | * |
Manuel Pégourié-Gonnard | 427b672 | 2015-03-31 18:32:50 +0200 | [diff] [blame] | 236 | * This replaces the whole module. If you only want to replace one of the |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 237 | * functions, use one of the MBEDTLS__FUNCTION_NAME__ALT flags. |
Manuel Pégourié-Gonnard | 427b672 | 2015-03-31 18:32:50 +0200 | [diff] [blame] | 238 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 239 | * Example: In case you uncomment MBEDTLS_AES_ALT, mbed TLS will no longer |
Janos Follath | ee782bc | 2016-11-07 15:41:26 +0000 | [diff] [blame] | 240 | * provide the "struct mbedtls_aes_context" definition and omit the base |
| 241 | * function declarations and implementations. "aes_alt.h" will be included from |
Paul Bakker | 90995b5 | 2013-06-24 19:20:35 +0200 | [diff] [blame] | 242 | * "aes.h" to include the new function definitions. |
| 243 | * |
Manuel Pégourié-Gonnard | 427b672 | 2015-03-31 18:32:50 +0200 | [diff] [blame] | 244 | * Uncomment a macro to enable alternate implementation of the corresponding |
| 245 | * module. |
Hanno Becker | bbca8c5 | 2017-09-25 14:53:51 +0100 | [diff] [blame] | 246 | * |
| 247 | * \warning MD2, MD4, MD5, ARC4, DES and SHA-1 are considered weak and their |
| 248 | * use constitutes a security risk. If possible, we recommend |
| 249 | * avoiding dependencies on them, and considering stronger message |
| 250 | * digests and ciphers instead. |
| 251 | * |
Paul Bakker | 90995b5 | 2013-06-24 19:20:35 +0200 | [diff] [blame] | 252 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 253 | //#define MBEDTLS_AES_ALT |
| 254 | //#define MBEDTLS_ARC4_ALT |
Markku-Juhani O. Saarinen | 0fb47fe | 2017-12-01 15:41:38 +0000 | [diff] [blame] | 255 | //#define MBEDTLS_ARIA_ALT |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 256 | //#define MBEDTLS_BLOWFISH_ALT |
| 257 | //#define MBEDTLS_CAMELLIA_ALT |
Steven Cooreman | 222e2ff | 2017-04-04 11:37:15 +0200 | [diff] [blame] | 258 | //#define MBEDTLS_CCM_ALT |
Daniel King | 34b822c | 2016-05-15 17:28:08 -0300 | [diff] [blame] | 259 | //#define MBEDTLS_CHACHA20_ALT |
Manuel Pégourié-Gonnard | e533b22 | 2018-06-04 12:23:19 +0200 | [diff] [blame] | 260 | //#define MBEDTLS_CHACHAPOLY_ALT |
Steven Cooreman | 6334277 | 2017-04-04 11:47:16 +0200 | [diff] [blame] | 261 | //#define MBEDTLS_CMAC_ALT |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 262 | //#define MBEDTLS_DES_ALT |
nirekh01 | d569ecf | 2018-01-09 16:43:21 +0000 | [diff] [blame] | 263 | //#define MBEDTLS_DHM_ALT |
Hanno Becker | 616d1ca | 2018-01-24 10:25:05 +0000 | [diff] [blame] | 264 | //#define MBEDTLS_ECJPAKE_ALT |
Jaeden Amero | 1526330 | 2017-09-21 12:53:48 +0100 | [diff] [blame] | 265 | //#define MBEDTLS_GCM_ALT |
Ron Eldor | 466a57f | 2018-05-03 16:54:28 +0300 | [diff] [blame] | 266 | //#define MBEDTLS_NIST_KW_ALT |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 267 | //#define MBEDTLS_MD2_ALT |
| 268 | //#define MBEDTLS_MD4_ALT |
| 269 | //#define MBEDTLS_MD5_ALT |
Daniel King | adc32c0 | 2016-05-16 18:25:45 -0300 | [diff] [blame] | 270 | //#define MBEDTLS_POLY1305_ALT |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 271 | //#define MBEDTLS_RIPEMD160_ALT |
Hanno Becker | 88683b2 | 2018-01-04 18:26:54 +0000 | [diff] [blame] | 272 | //#define MBEDTLS_RSA_ALT |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 273 | //#define MBEDTLS_SHA1_ALT |
| 274 | //#define MBEDTLS_SHA256_ALT |
| 275 | //#define MBEDTLS_SHA512_ALT |
Hanno Becker | 88683b2 | 2018-01-04 18:26:54 +0000 | [diff] [blame] | 276 | //#define MBEDTLS_XTEA_ALT |
Markku-Juhani O. Saarinen | 0fb47fe | 2017-12-01 15:41:38 +0000 | [diff] [blame] | 277 | |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 278 | /* |
| 279 | * When replacing the elliptic curve module, pleace consider, that it is |
| 280 | * implemented with two .c files: |
| 281 | * - ecp.c |
| 282 | * - ecp_curves.c |
Janos Follath | ee782bc | 2016-11-07 15:41:26 +0000 | [diff] [blame] | 283 | * You can replace them very much like all the other MBEDTLS__MODULE_NAME__ALT |
| 284 | * macros as described above. The only difference is that you have to make sure |
| 285 | * that you provide functionality for both .c files. |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 286 | */ |
| 287 | //#define MBEDTLS_ECP_ALT |
Paul Bakker | 90995b5 | 2013-06-24 19:20:35 +0200 | [diff] [blame] | 288 | |
| 289 | /** |
Manuel Pégourié-Gonnard | 76da60c | 2016-01-04 13:51:01 +0100 | [diff] [blame] | 290 | * \def MBEDTLS_MD2_PROCESS_ALT |
Manuel Pégourié-Gonnard | 427b672 | 2015-03-31 18:32:50 +0200 | [diff] [blame] | 291 | * |
Manuel Pégourié-Gonnard | 76da60c | 2016-01-04 13:51:01 +0100 | [diff] [blame] | 292 | * MBEDTLS__FUNCTION_NAME__ALT: Uncomment a macro to let mbed TLS use you |
| 293 | * alternate core implementation of symmetric crypto or hash function. Keep in |
| 294 | * mind that function prototypes should remain the same. |
Manuel Pégourié-Gonnard | 427b672 | 2015-03-31 18:32:50 +0200 | [diff] [blame] | 295 | * |
| 296 | * This replaces only one function. The header file from mbed TLS is still |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 297 | * used, in contrast to the MBEDTLS__MODULE_NAME__ALT flags. |
Manuel Pégourié-Gonnard | 427b672 | 2015-03-31 18:32:50 +0200 | [diff] [blame] | 298 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 299 | * Example: In case you uncomment MBEDTLS_SHA256_PROCESS_ALT, mbed TLS will |
| 300 | * no longer provide the mbedtls_sha1_process() function, but it will still provide |
| 301 | * the other function (using your mbedtls_sha1_process() function) and the definition |
| 302 | * of mbedtls_sha1_context, so your implementation of mbedtls_sha1_process must be compatible |
Manuel Pégourié-Gonnard | 427b672 | 2015-03-31 18:32:50 +0200 | [diff] [blame] | 303 | * with this definition. |
| 304 | * |
Hanno Becker | 6d84ae7 | 2017-06-26 12:46:19 +0100 | [diff] [blame] | 305 | * \note Because of a signature change, the core AES encryption and decryption routines are |
| 306 | * currently named mbedtls_aes_internal_encrypt and mbedtls_aes_internal_decrypt, |
| 307 | * respectively. When setting up alternative implementations, these functions should |
| 308 | * be overriden, but the wrapper functions mbedtls_aes_decrypt and mbedtls_aes_encrypt |
Hanno Becker | ca1cdb2 | 2017-07-20 09:50:59 +0100 | [diff] [blame] | 309 | * must stay untouched. |
Hanno Becker | 6d84ae7 | 2017-06-26 12:46:19 +0100 | [diff] [blame] | 310 | * |
| 311 | * \note If you use the AES_xxx_ALT macros, then is is recommended to also set |
| 312 | * MBEDTLS_AES_ROM_TABLES in order to help the linker garbage-collect the AES |
| 313 | * tables. |
Manuel Pégourié-Gonnard | 31993f2 | 2015-05-12 15:41:08 +0200 | [diff] [blame] | 314 | * |
Manuel Pégourié-Gonnard | 427b672 | 2015-03-31 18:32:50 +0200 | [diff] [blame] | 315 | * Uncomment a macro to enable alternate implementation of the corresponding |
| 316 | * function. |
Hanno Becker | bbca8c5 | 2017-09-25 14:53:51 +0100 | [diff] [blame] | 317 | * |
| 318 | * \warning MD2, MD4, MD5, DES and SHA-1 are considered weak and their use |
| 319 | * constitutes a security risk. If possible, we recommend avoiding |
| 320 | * dependencies on them, and considering stronger message digests |
| 321 | * and ciphers instead. |
| 322 | * |
Manuel Pégourié-Gonnard | 427b672 | 2015-03-31 18:32:50 +0200 | [diff] [blame] | 323 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 324 | //#define MBEDTLS_MD2_PROCESS_ALT |
| 325 | //#define MBEDTLS_MD4_PROCESS_ALT |
| 326 | //#define MBEDTLS_MD5_PROCESS_ALT |
| 327 | //#define MBEDTLS_RIPEMD160_PROCESS_ALT |
| 328 | //#define MBEDTLS_SHA1_PROCESS_ALT |
| 329 | //#define MBEDTLS_SHA256_PROCESS_ALT |
| 330 | //#define MBEDTLS_SHA512_PROCESS_ALT |
Manuel Pégourié-Gonnard | 70a5010 | 2015-05-12 15:02:45 +0200 | [diff] [blame] | 331 | //#define MBEDTLS_DES_SETKEY_ALT |
| 332 | //#define MBEDTLS_DES_CRYPT_ECB_ALT |
| 333 | //#define MBEDTLS_DES3_CRYPT_ECB_ALT |
Manuel Pégourié-Gonnard | 31993f2 | 2015-05-12 15:41:08 +0200 | [diff] [blame] | 334 | //#define MBEDTLS_AES_SETKEY_ENC_ALT |
| 335 | //#define MBEDTLS_AES_SETKEY_DEC_ALT |
| 336 | //#define MBEDTLS_AES_ENCRYPT_ALT |
| 337 | //#define MBEDTLS_AES_DECRYPT_ALT |
Ron Eldor | a84c1cb | 2017-10-10 19:04:27 +0300 | [diff] [blame] | 338 | //#define MBEDTLS_ECDH_GEN_PUBLIC_ALT |
Ron Eldor | 3226d36 | 2017-10-12 14:17:48 +0300 | [diff] [blame] | 339 | //#define MBEDTLS_ECDH_COMPUTE_SHARED_ALT |
Ron Eldor | 314adb6 | 2017-10-10 18:28:25 +0300 | [diff] [blame] | 340 | //#define MBEDTLS_ECDSA_VERIFY_ALT |
| 341 | //#define MBEDTLS_ECDSA_SIGN_ALT |
| 342 | //#define MBEDTLS_ECDSA_GENKEY_ALT |
Manuel Pégourié-Gonnard | 427b672 | 2015-03-31 18:32:50 +0200 | [diff] [blame] | 343 | |
| 344 | /** |
Janos Follath | c44ab97 | 2016-11-18 16:38:23 +0000 | [diff] [blame] | 345 | * \def MBEDTLS_ECP_INTERNAL_ALT |
| 346 | * |
| 347 | * Expose a part of the internal interface of the Elliptic Curve Point module. |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 348 | * |
| 349 | * MBEDTLS_ECP__FUNCTION_NAME__ALT: Uncomment a macro to let mbed TLS use your |
Janos Follath | 372697b | 2016-10-28 16:53:11 +0100 | [diff] [blame] | 350 | * alternative core implementation of elliptic curve arithmetic. Keep in mind |
| 351 | * that function prototypes should remain the same. |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 352 | * |
| 353 | * This partially replaces one function. The header file from mbed TLS is still |
| 354 | * used, in contrast to the MBEDTLS_ECP_ALT flag. The original implementation |
| 355 | * is still present and it is used for group structures not supported by the |
| 356 | * alternative. |
| 357 | * |
Janos Follath | c44ab97 | 2016-11-18 16:38:23 +0000 | [diff] [blame] | 358 | * Any of these options become available by defining MBEDTLS_ECP_INTERNAL_ALT |
| 359 | * and implementing the following functions: |
| 360 | * unsigned char mbedtls_internal_ecp_grp_capable( |
| 361 | * const mbedtls_ecp_group *grp ) |
| 362 | * int mbedtls_internal_ecp_init( const mbedtls_ecp_group *grp ) |
| 363 | * void mbedtls_internal_ecp_deinit( const mbedtls_ecp_group *grp ) |
| 364 | * The mbedtls_internal_ecp_grp_capable function should return 1 if the |
| 365 | * replacement functions implement arithmetic for the given group and 0 |
| 366 | * otherwise. |
| 367 | * The functions mbedtls_internal_ecp_init and mbedtls_internal_ecp_deinit are |
| 368 | * called before and after each point operation and provide an opportunity to |
| 369 | * implement optimized set up and tear down instructions. |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 370 | * |
Janos Follath | c44ab97 | 2016-11-18 16:38:23 +0000 | [diff] [blame] | 371 | * Example: In case you uncomment MBEDTLS_ECP_INTERNAL_ALT and |
Janos Follath | 4d9c69d | 2016-11-01 13:27:03 +0000 | [diff] [blame] | 372 | * MBEDTLS_ECP_DOUBLE_JAC_ALT, mbed TLS will still provide the ecp_double_jac |
Janos Follath | c44ab97 | 2016-11-18 16:38:23 +0000 | [diff] [blame] | 373 | * function, but will use your mbedtls_internal_ecp_double_jac if the group is |
| 374 | * supported (your mbedtls_internal_ecp_grp_capable function returns 1 when |
| 375 | * receives it as an argument). If the group is not supported then the original |
Janos Follath | ee782bc | 2016-11-07 15:41:26 +0000 | [diff] [blame] | 376 | * implementation is used. The other functions and the definition of |
| 377 | * mbedtls_ecp_group and mbedtls_ecp_point will not change, so your |
Janos Follath | c44ab97 | 2016-11-18 16:38:23 +0000 | [diff] [blame] | 378 | * implementation of mbedtls_internal_ecp_double_jac and |
| 379 | * mbedtls_internal_ecp_grp_capable must be compatible with this definition. |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 380 | * |
| 381 | * Uncomment a macro to enable alternate implementation of the corresponding |
| 382 | * function. |
| 383 | */ |
| 384 | /* Required for all the functions in this section */ |
Janos Follath | c44ab97 | 2016-11-18 16:38:23 +0000 | [diff] [blame] | 385 | //#define MBEDTLS_ECP_INTERNAL_ALT |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 386 | /* Support for Weierstrass curves with Jacobi representation */ |
| 387 | //#define MBEDTLS_ECP_RANDOMIZE_JAC_ALT |
| 388 | //#define MBEDTLS_ECP_ADD_MIXED_ALT |
| 389 | //#define MBEDTLS_ECP_DOUBLE_JAC_ALT |
| 390 | //#define MBEDTLS_ECP_NORMALIZE_JAC_MANY_ALT |
| 391 | //#define MBEDTLS_ECP_NORMALIZE_JAC_ALT |
| 392 | /* Support for curves with Montgomery arithmetic */ |
| 393 | //#define MBEDTLS_ECP_DOUBLE_ADD_MXZ_ALT |
| 394 | //#define MBEDTLS_ECP_RANDOMIZE_MXZ_ALT |
| 395 | //#define MBEDTLS_ECP_NORMALIZE_MXZ_ALT |
| 396 | |
| 397 | /** |
Simon Butcher | ab5df40 | 2016-06-11 02:31:21 +0100 | [diff] [blame] | 398 | * \def MBEDTLS_TEST_NULL_ENTROPY |
Janos Follath | 53de784 | 2016-06-08 15:29:18 +0100 | [diff] [blame] | 399 | * |
Simon Butcher | ab5df40 | 2016-06-11 02:31:21 +0100 | [diff] [blame] | 400 | * Enables testing and use of mbed TLS without any configured entropy sources. |
| 401 | * This permits use of the library on platforms before an entropy source has |
| 402 | * been integrated (see for example the MBEDTLS_ENTROPY_HARDWARE_ALT or the |
| 403 | * MBEDTLS_ENTROPY_NV_SEED switches). |
| 404 | * |
| 405 | * WARNING! This switch MUST be disabled in production builds, and is suitable |
| 406 | * only for development. |
| 407 | * Enabling the switch negates any security provided by the library. |
Janos Follath | 53de784 | 2016-06-08 15:29:18 +0100 | [diff] [blame] | 408 | * |
Janos Follath | f93b8bc | 2016-06-09 13:54:15 +0100 | [diff] [blame] | 409 | * Requires MBEDTLS_ENTROPY_C, MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES |
| 410 | * |
Janos Follath | 53de784 | 2016-06-08 15:29:18 +0100 | [diff] [blame] | 411 | */ |
Simon Butcher | ab5df40 | 2016-06-11 02:31:21 +0100 | [diff] [blame] | 412 | //#define MBEDTLS_TEST_NULL_ENTROPY |
Janos Follath | 53de784 | 2016-06-08 15:29:18 +0100 | [diff] [blame] | 413 | |
| 414 | /** |
Manuel Pégourié-Gonnard | 8ba88f0 | 2015-06-22 12:14:20 +0200 | [diff] [blame] | 415 | * \def MBEDTLS_ENTROPY_HARDWARE_ALT |
Manuel Pégourié-Gonnard | 3f77dfb | 2015-06-19 10:06:21 +0200 | [diff] [blame] | 416 | * |
| 417 | * Uncomment this macro to let mbed TLS use your own implementation of a |
| 418 | * hardware entropy collector. |
| 419 | * |
| 420 | * Your function must be called \c mbedtls_hardware_poll(), have the same |
| 421 | * prototype as declared in entropy_poll.h, and accept NULL as first argument. |
| 422 | * |
| 423 | * Uncomment to use your own hardware entropy collector. |
| 424 | */ |
| 425 | //#define MBEDTLS_ENTROPY_HARDWARE_ALT |
| 426 | |
| 427 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 428 | * \def MBEDTLS_AES_ROM_TABLES |
Paul Bakker | 15566e4 | 2011-04-24 21:19:15 +0000 | [diff] [blame] | 429 | * |
Hanno Becker | 177d3cf | 2017-06-07 15:52:48 +0100 | [diff] [blame] | 430 | * Use precomputed AES tables stored in ROM. |
Paul Bakker | 15566e4 | 2011-04-24 21:19:15 +0000 | [diff] [blame] | 431 | * |
Hanno Becker | 177d3cf | 2017-06-07 15:52:48 +0100 | [diff] [blame] | 432 | * Uncomment this macro to use precomputed AES tables stored in ROM. |
| 433 | * Comment this macro to generate AES tables in RAM at runtime. |
| 434 | * |
Hanno Becker | 4c1dc3c | 2018-03-27 16:52:03 +0100 | [diff] [blame] | 435 | * Tradeoff: Using precomputed ROM tables reduces RAM usage by ~8kb |
| 436 | * (or ~2kb if \c MBEDTLS_AES_FEWER_TABLES is used) and reduces the |
Hanno Becker | 6a92ce6 | 2018-03-28 11:42:05 +0100 | [diff] [blame] | 437 | * initialization time before the first AES operation can be performed. |
| 438 | * It comes at the cost of additional ~8kb ROM use (resp. ~2kb if \c |
| 439 | * MBEDTLS_AES_FEWER_TABLES below is used), and potentially degraded |
| 440 | * performance if ROM access is slower than RAM access. |
Hanno Becker | 177d3cf | 2017-06-07 15:52:48 +0100 | [diff] [blame] | 441 | * |
| 442 | * This option is independent of \c MBEDTLS_AES_FEWER_TABLES. |
| 443 | * |
Paul Bakker | 15566e4 | 2011-04-24 21:19:15 +0000 | [diff] [blame] | 444 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 445 | //#define MBEDTLS_AES_ROM_TABLES |
Paul Bakker | 15566e4 | 2011-04-24 21:19:15 +0000 | [diff] [blame] | 446 | |
| 447 | /** |
Hanno Becker | 177d3cf | 2017-06-07 15:52:48 +0100 | [diff] [blame] | 448 | * \def MBEDTLS_AES_FEWER_TABLES |
Jussi Kivilinna | 2fd1bb8 | 2015-11-12 16:38:31 +0200 | [diff] [blame] | 449 | * |
Hanno Becker | 177d3cf | 2017-06-07 15:52:48 +0100 | [diff] [blame] | 450 | * Use less ROM/RAM for AES tables. |
Jussi Kivilinna | 2fd1bb8 | 2015-11-12 16:38:31 +0200 | [diff] [blame] | 451 | * |
Hanno Becker | 177d3cf | 2017-06-07 15:52:48 +0100 | [diff] [blame] | 452 | * Uncommenting this macro omits 75% of the AES tables from |
| 453 | * ROM / RAM (depending on the value of \c MBEDTLS_AES_ROM_TABLES) |
| 454 | * by computing their values on the fly during operations |
| 455 | * (the tables are entry-wise rotations of one another). |
| 456 | * |
| 457 | * Tradeoff: Uncommenting this reduces the RAM / ROM footprint |
Hanno Becker | 08a5c18 | 2017-06-19 16:33:58 +0100 | [diff] [blame] | 458 | * by ~6kb but at the cost of more arithmetic operations during |
Hanno Becker | 177d3cf | 2017-06-07 15:52:48 +0100 | [diff] [blame] | 459 | * runtime. Specifically, one has to compare 4 accesses within |
| 460 | * different tables to 4 accesses with additional arithmetic |
| 461 | * operations within the same table. The performance gain/loss |
| 462 | * depends on the system and memory details. |
| 463 | * |
| 464 | * This option is independent of \c MBEDTLS_AES_ROM_TABLES. |
| 465 | * |
Jussi Kivilinna | 2fd1bb8 | 2015-11-12 16:38:31 +0200 | [diff] [blame] | 466 | */ |
Hanno Becker | 177d3cf | 2017-06-07 15:52:48 +0100 | [diff] [blame] | 467 | //#define MBEDTLS_AES_FEWER_TABLES |
Jussi Kivilinna | 2fd1bb8 | 2015-11-12 16:38:31 +0200 | [diff] [blame] | 468 | |
| 469 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 470 | * \def MBEDTLS_CAMELLIA_SMALL_MEMORY |
Manuel Pégourié-Gonnard | 62edcc8 | 2015-04-03 16:28:19 +0200 | [diff] [blame] | 471 | * |
| 472 | * Use less ROM for the Camellia implementation (saves about 768 bytes). |
| 473 | * |
| 474 | * Uncomment this macro to use less memory for Camellia. |
| 475 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 476 | //#define MBEDTLS_CAMELLIA_SMALL_MEMORY |
Manuel Pégourié-Gonnard | 62edcc8 | 2015-04-03 16:28:19 +0200 | [diff] [blame] | 477 | |
| 478 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 479 | * \def MBEDTLS_CIPHER_MODE_CBC |
Manuel Pégourié-Gonnard | f7dc378 | 2013-09-13 14:10:44 +0200 | [diff] [blame] | 480 | * |
| 481 | * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers. |
| 482 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 483 | #define MBEDTLS_CIPHER_MODE_CBC |
Manuel Pégourié-Gonnard | f7dc378 | 2013-09-13 14:10:44 +0200 | [diff] [blame] | 484 | |
| 485 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 486 | * \def MBEDTLS_CIPHER_MODE_CFB |
Paul Bakker | b6ecaf5 | 2011-04-19 14:29:23 +0000 | [diff] [blame] | 487 | * |
| 488 | * Enable Cipher Feedback mode (CFB) for symmetric ciphers. |
| 489 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 490 | #define MBEDTLS_CIPHER_MODE_CFB |
Paul Bakker | b6ecaf5 | 2011-04-19 14:29:23 +0000 | [diff] [blame] | 491 | |
| 492 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 493 | * \def MBEDTLS_CIPHER_MODE_CTR |
Paul Bakker | b6ecaf5 | 2011-04-19 14:29:23 +0000 | [diff] [blame] | 494 | * |
| 495 | * Enable Counter Block Cipher mode (CTR) for symmetric ciphers. |
| 496 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 497 | #define MBEDTLS_CIPHER_MODE_CTR |
Paul Bakker | b6ecaf5 | 2011-04-19 14:29:23 +0000 | [diff] [blame] | 498 | |
| 499 | /** |
Jaeden Amero | ff2f493 | 2018-06-14 11:38:50 +0100 | [diff] [blame] | 500 | * \def MBEDTLS_CIPHER_MODE_OFB |
| 501 | * |
| 502 | * Enable Output Feedback mode (OFB) for symmetric ciphers. |
| 503 | */ |
| 504 | #define MBEDTLS_CIPHER_MODE_OFB |
| 505 | |
| 506 | /** |
| 507 | * \def MBEDTLS_CIPHER_MODE_XTS |
| 508 | * |
| 509 | * Enable Xor-encrypt-xor with ciphertext stealing mode (XTS) for AES. |
| 510 | */ |
| 511 | #define MBEDTLS_CIPHER_MODE_XTS |
| 512 | |
| 513 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 514 | * \def MBEDTLS_CIPHER_NULL_CIPHER |
Paul Bakker | fab5c82 | 2012-02-06 16:45:10 +0000 | [diff] [blame] | 515 | * |
| 516 | * Enable NULL cipher. |
| 517 | * Warning: Only do so when you know what you are doing. This allows for |
| 518 | * encryption or channels without any security! |
| 519 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 520 | * Requires MBEDTLS_ENABLE_WEAK_CIPHERSUITES as well to enable |
Paul Bakker | fab5c82 | 2012-02-06 16:45:10 +0000 | [diff] [blame] | 521 | * the following ciphersuites: |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 522 | * MBEDTLS_TLS_ECDH_ECDSA_WITH_NULL_SHA |
| 523 | * MBEDTLS_TLS_ECDH_RSA_WITH_NULL_SHA |
| 524 | * MBEDTLS_TLS_ECDHE_ECDSA_WITH_NULL_SHA |
| 525 | * MBEDTLS_TLS_ECDHE_RSA_WITH_NULL_SHA |
| 526 | * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA384 |
| 527 | * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA256 |
| 528 | * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA |
| 529 | * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA384 |
| 530 | * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA256 |
| 531 | * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA |
| 532 | * MBEDTLS_TLS_RSA_WITH_NULL_SHA256 |
| 533 | * MBEDTLS_TLS_RSA_WITH_NULL_SHA |
| 534 | * MBEDTLS_TLS_RSA_WITH_NULL_MD5 |
| 535 | * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA384 |
| 536 | * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA256 |
| 537 | * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA |
| 538 | * MBEDTLS_TLS_PSK_WITH_NULL_SHA384 |
| 539 | * MBEDTLS_TLS_PSK_WITH_NULL_SHA256 |
| 540 | * MBEDTLS_TLS_PSK_WITH_NULL_SHA |
Paul Bakker | fab5c82 | 2012-02-06 16:45:10 +0000 | [diff] [blame] | 541 | * |
| 542 | * Uncomment this macro to enable the NULL cipher and ciphersuites |
Paul Bakker | fab5c82 | 2012-02-06 16:45:10 +0000 | [diff] [blame] | 543 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 544 | //#define MBEDTLS_CIPHER_NULL_CIPHER |
Paul Bakker | fab5c82 | 2012-02-06 16:45:10 +0000 | [diff] [blame] | 545 | |
| 546 | /** |
Manuel Pégourié-Gonnard | 76da60c | 2016-01-04 13:51:01 +0100 | [diff] [blame] | 547 | * \def MBEDTLS_CIPHER_PADDING_PKCS7 |
Paul Bakker | 48e93c8 | 2013-08-14 12:21:18 +0200 | [diff] [blame] | 548 | * |
Manuel Pégourié-Gonnard | 76da60c | 2016-01-04 13:51:01 +0100 | [diff] [blame] | 549 | * MBEDTLS_CIPHER_PADDING_XXX: Uncomment or comment macros to add support for |
| 550 | * specific padding modes in the cipher layer with cipher modes that support |
| 551 | * padding (e.g. CBC) |
Paul Bakker | 48e93c8 | 2013-08-14 12:21:18 +0200 | [diff] [blame] | 552 | * |
| 553 | * If you disable all padding modes, only full blocks can be used with CBC. |
| 554 | * |
| 555 | * Enable padding modes in the cipher layer. |
| 556 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 557 | #define MBEDTLS_CIPHER_PADDING_PKCS7 |
| 558 | #define MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS |
| 559 | #define MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN |
| 560 | #define MBEDTLS_CIPHER_PADDING_ZEROS |
Paul Bakker | 48e93c8 | 2013-08-14 12:21:18 +0200 | [diff] [blame] | 561 | |
| 562 | /** |
Manuel Pégourié-Gonnard | 76da60c | 2016-01-04 13:51:01 +0100 | [diff] [blame] | 563 | * \def MBEDTLS_ECP_DP_SECP192R1_ENABLED |
Paul Bakker | 5dc6b5f | 2013-06-29 23:26:34 +0200 | [diff] [blame] | 564 | * |
Manuel Pégourié-Gonnard | 76da60c | 2016-01-04 13:51:01 +0100 | [diff] [blame] | 565 | * MBEDTLS_ECP_XXXX_ENABLED: Enables specific curves within the Elliptic Curve |
| 566 | * module. By default all supported curves are enabled. |
Paul Bakker | 5dc6b5f | 2013-06-29 23:26:34 +0200 | [diff] [blame] | 567 | * |
| 568 | * Comment macros to disable the curve and functions for it |
| 569 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 570 | #define MBEDTLS_ECP_DP_SECP192R1_ENABLED |
| 571 | #define MBEDTLS_ECP_DP_SECP224R1_ENABLED |
| 572 | #define MBEDTLS_ECP_DP_SECP256R1_ENABLED |
| 573 | #define MBEDTLS_ECP_DP_SECP384R1_ENABLED |
| 574 | #define MBEDTLS_ECP_DP_SECP521R1_ENABLED |
| 575 | #define MBEDTLS_ECP_DP_SECP192K1_ENABLED |
| 576 | #define MBEDTLS_ECP_DP_SECP224K1_ENABLED |
| 577 | #define MBEDTLS_ECP_DP_SECP256K1_ENABLED |
| 578 | #define MBEDTLS_ECP_DP_BP256R1_ENABLED |
| 579 | #define MBEDTLS_ECP_DP_BP384R1_ENABLED |
| 580 | #define MBEDTLS_ECP_DP_BP512R1_ENABLED |
Manuel Pégourié-Gonnard | 0789433 | 2015-06-23 00:18:41 +0200 | [diff] [blame] | 581 | #define MBEDTLS_ECP_DP_CURVE25519_ENABLED |
Nicholas Wilson | 08f3ef1 | 2015-11-10 13:10:01 +0000 | [diff] [blame] | 582 | #define MBEDTLS_ECP_DP_CURVE448_ENABLED |
Paul Bakker | 5dc6b5f | 2013-06-29 23:26:34 +0200 | [diff] [blame] | 583 | |
| 584 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 585 | * \def MBEDTLS_ECP_NIST_OPTIM |
Manuel Pégourié-Gonnard | c04c530 | 2013-10-23 16:11:52 +0200 | [diff] [blame] | 586 | * |
| 587 | * Enable specific 'modulo p' routines for each NIST prime. |
| 588 | * Depending on the prime and architecture, makes operations 4 to 8 times |
| 589 | * faster on the corresponding curve. |
| 590 | * |
| 591 | * Comment this macro to disable NIST curves optimisation. |
| 592 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 593 | #define MBEDTLS_ECP_NIST_OPTIM |
Manuel Pégourié-Gonnard | c04c530 | 2013-10-23 16:11:52 +0200 | [diff] [blame] | 594 | |
| 595 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 596 | * \def MBEDTLS_ECDSA_DETERMINISTIC |
Manuel Pégourié-Gonnard | 461d416 | 2014-01-06 10:16:28 +0100 | [diff] [blame] | 597 | * |
| 598 | * Enable deterministic ECDSA (RFC 6979). |
| 599 | * Standard ECDSA is "fragile" in the sense that lack of entropy when signing |
| 600 | * may result in a compromise of the long-term signing key. This is avoided by |
| 601 | * the deterministic variant. |
| 602 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 603 | * Requires: MBEDTLS_HMAC_DRBG_C |
Manuel Pégourié-Gonnard | 5b1a573 | 2014-01-07 16:46:17 +0100 | [diff] [blame] | 604 | * |
Manuel Pégourié-Gonnard | 461d416 | 2014-01-06 10:16:28 +0100 | [diff] [blame] | 605 | * Comment this macro to disable deterministic ECDSA. |
| 606 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 607 | #define MBEDTLS_ECDSA_DETERMINISTIC |
Manuel Pégourié-Gonnard | 461d416 | 2014-01-06 10:16:28 +0100 | [diff] [blame] | 608 | |
| 609 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 610 | * \def MBEDTLS_PK_PARSE_EC_EXTENDED |
Manuel Pégourié-Gonnard | 6fac351 | 2014-03-19 16:39:52 +0100 | [diff] [blame] | 611 | * |
| 612 | * Enhance support for reading EC keys using variants of SEC1 not allowed by |
| 613 | * RFC 5915 and RFC 5480. |
| 614 | * |
| 615 | * Currently this means parsing the SpecifiedECDomain choice of EC |
| 616 | * parameters (only known groups are supported, not arbitrary domains, to |
| 617 | * avoid validation issues). |
| 618 | * |
| 619 | * Disable if you only need to support RFC 5915 + 5480 key formats. |
| 620 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 621 | #define MBEDTLS_PK_PARSE_EC_EXTENDED |
Manuel Pégourié-Gonnard | 6fac351 | 2014-03-19 16:39:52 +0100 | [diff] [blame] | 622 | |
| 623 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 624 | * \def MBEDTLS_ERROR_STRERROR_DUMMY |
Paul Bakker | 8fe40dc | 2013-02-02 12:43:08 +0100 | [diff] [blame] | 625 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 626 | * Enable a dummy error function to make use of mbedtls_strerror() in |
| 627 | * third party libraries easier when MBEDTLS_ERROR_C is disabled |
| 628 | * (no effect when MBEDTLS_ERROR_C is enabled). |
Manuel Pégourié-Gonnard | dc16aa7 | 2014-06-25 12:55:12 +0200 | [diff] [blame] | 629 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 630 | * You can safely disable this if MBEDTLS_ERROR_C is enabled, or if you're |
| 631 | * not using mbedtls_strerror() or error_strerror() in your application. |
Paul Bakker | 8fe40dc | 2013-02-02 12:43:08 +0100 | [diff] [blame] | 632 | * |
| 633 | * Disable if you run into name conflicts and want to really remove the |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 634 | * mbedtls_strerror() |
Paul Bakker | 8fe40dc | 2013-02-02 12:43:08 +0100 | [diff] [blame] | 635 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 636 | #define MBEDTLS_ERROR_STRERROR_DUMMY |
Paul Bakker | 8fe40dc | 2013-02-02 12:43:08 +0100 | [diff] [blame] | 637 | |
| 638 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 639 | * \def MBEDTLS_GENPRIME |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 640 | * |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 641 | * Enable the prime-number generation code. |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 642 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 643 | * Requires: MBEDTLS_BIGNUM_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 644 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 645 | #define MBEDTLS_GENPRIME |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 646 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 647 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 648 | * \def MBEDTLS_FS_IO |
Paul Bakker | 335db3f | 2011-04-25 15:28:35 +0000 | [diff] [blame] | 649 | * |
| 650 | * Enable functions that use the filesystem. |
| 651 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 652 | #define MBEDTLS_FS_IO |
Paul Bakker | 335db3f | 2011-04-25 15:28:35 +0000 | [diff] [blame] | 653 | |
| 654 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 655 | * \def MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES |
Paul Bakker | 43655f4 | 2011-12-15 20:11:16 +0000 | [diff] [blame] | 656 | * |
| 657 | * Do not add default entropy sources. These are the platform specific, |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 658 | * mbedtls_timing_hardclock and HAVEGE based poll functions. |
Paul Bakker | 43655f4 | 2011-12-15 20:11:16 +0000 | [diff] [blame] | 659 | * |
Shuo Chen | 95a0d11 | 2014-04-04 21:04:40 -0700 | [diff] [blame] | 660 | * This is useful to have more control over the added entropy sources in an |
Paul Bakker | 43655f4 | 2011-12-15 20:11:16 +0000 | [diff] [blame] | 661 | * application. |
| 662 | * |
| 663 | * Uncomment this macro to prevent loading of default entropy functions. |
Paul Bakker | 43655f4 | 2011-12-15 20:11:16 +0000 | [diff] [blame] | 664 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 665 | //#define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES |
Paul Bakker | 43655f4 | 2011-12-15 20:11:16 +0000 | [diff] [blame] | 666 | |
| 667 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 668 | * \def MBEDTLS_NO_PLATFORM_ENTROPY |
Paul Bakker | 6083fd2 | 2011-12-03 21:45:14 +0000 | [diff] [blame] | 669 | * |
| 670 | * Do not use built-in platform entropy functions. |
| 671 | * This is useful if your platform does not support |
| 672 | * standards like the /dev/urandom or Windows CryptoAPI. |
| 673 | * |
| 674 | * Uncomment this macro to disable the built-in platform entropy functions. |
Paul Bakker | 6083fd2 | 2011-12-03 21:45:14 +0000 | [diff] [blame] | 675 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 676 | //#define MBEDTLS_NO_PLATFORM_ENTROPY |
Paul Bakker | 6083fd2 | 2011-12-03 21:45:14 +0000 | [diff] [blame] | 677 | |
| 678 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 679 | * \def MBEDTLS_ENTROPY_FORCE_SHA256 |
Paul Bakker | 2ceda57 | 2014-02-06 15:55:25 +0100 | [diff] [blame] | 680 | * |
| 681 | * Force the entropy accumulator to use a SHA-256 accumulator instead of the |
| 682 | * default SHA-512 based one (if both are available). |
| 683 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 684 | * Requires: MBEDTLS_SHA256_C |
Paul Bakker | 2ceda57 | 2014-02-06 15:55:25 +0100 | [diff] [blame] | 685 | * |
| 686 | * On 32-bit systems SHA-256 can be much faster than SHA-512. Use this option |
| 687 | * if you have performance concerns. |
| 688 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 689 | * This option is only useful if both MBEDTLS_SHA256_C and |
| 690 | * MBEDTLS_SHA512_C are defined. Otherwise the available hash module is used. |
Paul Bakker | 2ceda57 | 2014-02-06 15:55:25 +0100 | [diff] [blame] | 691 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 692 | //#define MBEDTLS_ENTROPY_FORCE_SHA256 |
Paul Bakker | 2ceda57 | 2014-02-06 15:55:25 +0100 | [diff] [blame] | 693 | |
| 694 | /** |
Paul Bakker | cf0a9f9 | 2016-06-01 11:25:44 +0100 | [diff] [blame] | 695 | * \def MBEDTLS_ENTROPY_NV_SEED |
| 696 | * |
| 697 | * Enable the non-volatile (NV) seed file-based entropy source. |
| 698 | * (Also enables the NV seed read/write functions in the platform layer) |
| 699 | * |
| 700 | * This is crucial (if not required) on systems that do not have a |
| 701 | * cryptographic entropy source (in hardware or kernel) available. |
| 702 | * |
| 703 | * Requires: MBEDTLS_ENTROPY_C, MBEDTLS_PLATFORM_C |
| 704 | * |
Paul Bakker | 71a597a | 2016-06-07 10:59:03 +0100 | [diff] [blame] | 705 | * \note The read/write functions that are used by the entropy source are |
| 706 | * determined in the platform layer, and can be modified at runtime and/or |
| 707 | * compile-time depending on the flags (MBEDTLS_PLATFORM_NV_SEED_*) used. |
| 708 | * |
| 709 | * \note If you use the default implementation functions that read a seedfile |
Paul Bakker | cf0a9f9 | 2016-06-01 11:25:44 +0100 | [diff] [blame] | 710 | * with regular fopen(), please make sure you make a seedfile with the |
| 711 | * proper name (defined in MBEDTLS_PLATFORM_STD_NV_SEED_FILE) and at |
| 712 | * least MBEDTLS_ENTROPY_BLOCK_SIZE bytes in size that can be read from |
Paul Bakker | 71a597a | 2016-06-07 10:59:03 +0100 | [diff] [blame] | 713 | * and written to or you will get an entropy source error! The default |
| 714 | * implementation will only use the first MBEDTLS_ENTROPY_BLOCK_SIZE |
| 715 | * bytes from the file. |
| 716 | * |
| 717 | * \note The entropy collector will write to the seed file before entropy is |
| 718 | * given to an external source, to update it. |
Paul Bakker | cf0a9f9 | 2016-06-01 11:25:44 +0100 | [diff] [blame] | 719 | */ |
| 720 | //#define MBEDTLS_ENTROPY_NV_SEED |
| 721 | |
| 722 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 723 | * \def MBEDTLS_MEMORY_DEBUG |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 724 | * |
| 725 | * Enable debugging of buffer allocator memory issues. Automatically prints |
| 726 | * (to stderr) all (fatal) messages on memory allocation issues. Enables |
| 727 | * function for 'debug output' of allocated memory. |
| 728 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 729 | * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 730 | * |
| 731 | * Uncomment this macro to let the buffer allocator print out error messages. |
Paul Bakker | a7ea6a5 | 2013-10-15 11:55:10 +0200 | [diff] [blame] | 732 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 733 | //#define MBEDTLS_MEMORY_DEBUG |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 734 | |
| 735 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 736 | * \def MBEDTLS_MEMORY_BACKTRACE |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 737 | * |
| 738 | * Include backtrace information with each allocated block. |
| 739 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 740 | * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 741 | * GLIBC-compatible backtrace() an backtrace_symbols() support |
| 742 | * |
| 743 | * Uncomment this macro to include backtrace information |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 744 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 745 | //#define MBEDTLS_MEMORY_BACKTRACE |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 746 | |
| 747 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 748 | * \def MBEDTLS_PK_RSA_ALT_SUPPORT |
Manuel Pégourié-Gonnard | 348bcb3 | 2015-03-31 14:01:33 +0200 | [diff] [blame] | 749 | * |
| 750 | * Support external private RSA keys (eg from a HSM) in the PK layer. |
| 751 | * |
| 752 | * Comment this macro to disable support for external private RSA keys. |
| 753 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 754 | #define MBEDTLS_PK_RSA_ALT_SUPPORT |
Manuel Pégourié-Gonnard | 348bcb3 | 2015-03-31 14:01:33 +0200 | [diff] [blame] | 755 | |
| 756 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 757 | * \def MBEDTLS_PKCS1_V15 |
Paul Bakker | 48377d9 | 2013-08-30 12:06:24 +0200 | [diff] [blame] | 758 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 759 | * Enable support for PKCS#1 v1.5 encoding. |
| 760 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 761 | * Requires: MBEDTLS_RSA_C |
Paul Bakker | 48377d9 | 2013-08-30 12:06:24 +0200 | [diff] [blame] | 762 | * |
Paul Bakker | 48377d9 | 2013-08-30 12:06:24 +0200 | [diff] [blame] | 763 | * This enables support for PKCS#1 v1.5 operations. |
| 764 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 765 | #define MBEDTLS_PKCS1_V15 |
Paul Bakker | 48377d9 | 2013-08-30 12:06:24 +0200 | [diff] [blame] | 766 | |
| 767 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 768 | * \def MBEDTLS_PKCS1_V21 |
Paul Bakker | 9dcc322 | 2011-03-08 14:16:06 +0000 | [diff] [blame] | 769 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 770 | * Enable support for PKCS#1 v2.1 encoding. |
| 771 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 772 | * Requires: MBEDTLS_MD_C, MBEDTLS_RSA_C |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 773 | * |
Paul Bakker | 9dcc322 | 2011-03-08 14:16:06 +0000 | [diff] [blame] | 774 | * This enables support for RSAES-OAEP and RSASSA-PSS operations. |
| 775 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 776 | #define MBEDTLS_PKCS1_V21 |
Paul Bakker | 9dcc322 | 2011-03-08 14:16:06 +0000 | [diff] [blame] | 777 | |
| 778 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 779 | * \def MBEDTLS_RSA_NO_CRT |
Paul Bakker | 0216cc1 | 2011-03-26 13:40:23 +0000 | [diff] [blame] | 780 | * |
Gilles Peskine | 66920ce | 2018-03-03 21:49:49 +0100 | [diff] [blame] | 781 | * Do not use the Chinese Remainder Theorem for the RSA private operation. |
Paul Bakker | 0216cc1 | 2011-03-26 13:40:23 +0000 | [diff] [blame] | 782 | * |
| 783 | * Uncomment this macro to disable the use of CRT in RSA. |
| 784 | * |
Paul Bakker | 0216cc1 | 2011-03-26 13:40:23 +0000 | [diff] [blame] | 785 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 786 | //#define MBEDTLS_RSA_NO_CRT |
Paul Bakker | 15566e4 | 2011-04-24 21:19:15 +0000 | [diff] [blame] | 787 | |
| 788 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 789 | * \def MBEDTLS_SELF_TEST |
Paul Bakker | 15566e4 | 2011-04-24 21:19:15 +0000 | [diff] [blame] | 790 | * |
| 791 | * Enable the checkup functions (*_self_test). |
| 792 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 793 | #define MBEDTLS_SELF_TEST |
Paul Bakker | 5c721f9 | 2011-07-27 16:51:09 +0000 | [diff] [blame] | 794 | |
| 795 | /** |
Manuel Pégourié-Gonnard | eb0d870 | 2015-05-28 12:54:04 +0200 | [diff] [blame] | 796 | * \def MBEDTLS_SHA256_SMALLER |
| 797 | * |
| 798 | * Enable an implementation of SHA-256 that has lower ROM footprint but also |
| 799 | * lower performance. |
| 800 | * |
| 801 | * The default implementation is meant to be a reasonnable compromise between |
| 802 | * performance and size. This version optimizes more aggressively for size at |
| 803 | * the expense of performance. Eg on Cortex-M4 it reduces the size of |
| 804 | * mbedtls_sha256_process() from ~2KB to ~0.5KB for a performance hit of about |
| 805 | * 30%. |
| 806 | * |
| 807 | * Uncomment to enable the smaller implementation of SHA256. |
| 808 | */ |
| 809 | //#define MBEDTLS_SHA256_SMALLER |
| 810 | |
| 811 | /** |
Gilles Peskine | b74a1c7 | 2018-04-24 13:09:22 +0200 | [diff] [blame] | 812 | * \def MBEDTLS_SSL_ASYNC_PRIVATE |
| 813 | * |
| 814 | * Enable asynchronous external private key operations in SSL. This allows |
| 815 | * you to configure an SSL connection to call an external cryptographic |
| 816 | * module to perform private key operations instead of performing the |
| 817 | * operation inside the library. |
| 818 | * |
| 819 | */ |
Jaeden Amero | d9c71da | 2018-06-15 20:31:26 +0100 | [diff] [blame] | 820 | //#define MBEDTLS_SSL_ASYNC_PRIVATE |
Gilles Peskine | b74a1c7 | 2018-04-24 13:09:22 +0200 | [diff] [blame] | 821 | |
| 822 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 823 | * \def MBEDTLS_THREADING_ALT |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 824 | * |
| 825 | * Provide your own alternate threading implementation. |
| 826 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 827 | * Requires: MBEDTLS_THREADING_C |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 828 | * |
| 829 | * Uncomment this to allow your own alternate threading implementation. |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 830 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 831 | //#define MBEDTLS_THREADING_ALT |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 832 | |
| 833 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 834 | * \def MBEDTLS_THREADING_PTHREAD |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 835 | * |
| 836 | * Enable the pthread wrapper layer for the threading layer. |
| 837 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 838 | * Requires: MBEDTLS_THREADING_C |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 839 | * |
| 840 | * Uncomment this to enable pthread mutexes. |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 841 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 842 | //#define MBEDTLS_THREADING_PTHREAD |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 843 | |
| 844 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 845 | * \def MBEDTLS_VERSION_FEATURES |
Paul Bakker | 0f90d7d | 2014-04-30 11:49:44 +0200 | [diff] [blame] | 846 | * |
| 847 | * Allow run-time checking of compile-time enabled features. Thus allowing users |
| 848 | * to check at run-time if the library is for instance compiled with threading |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 849 | * support via mbedtls_version_check_feature(). |
Paul Bakker | 0f90d7d | 2014-04-30 11:49:44 +0200 | [diff] [blame] | 850 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 851 | * Requires: MBEDTLS_VERSION_C |
Paul Bakker | 0f90d7d | 2014-04-30 11:49:44 +0200 | [diff] [blame] | 852 | * |
| 853 | * Comment this to disable run-time checking and save ROM space |
| 854 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 855 | #define MBEDTLS_VERSION_FEATURES |
Paul Bakker | 0f90d7d | 2014-04-30 11:49:44 +0200 | [diff] [blame] | 856 | |
Manuel Pégourié-Gonnard | b4fe3cb | 2015-01-22 16:11:05 +0000 | [diff] [blame] | 857 | /* \} name SECTION: mbed TLS feature support */ |
Paul Bakker | 0a62cd1 | 2011-01-21 11:00:08 +0000 | [diff] [blame] | 858 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 859 | /** |
Manuel Pégourié-Gonnard | b4fe3cb | 2015-01-22 16:11:05 +0000 | [diff] [blame] | 860 | * \name SECTION: mbed TLS modules |
Paul Bakker | 0a62cd1 | 2011-01-21 11:00:08 +0000 | [diff] [blame] | 861 | * |
Manuel Pégourié-Gonnard | b4fe3cb | 2015-01-22 16:11:05 +0000 | [diff] [blame] | 862 | * This section enables or disables entire modules in mbed TLS |
Paul Bakker | 0a62cd1 | 2011-01-21 11:00:08 +0000 | [diff] [blame] | 863 | * \{ |
| 864 | */ |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 865 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 866 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 867 | * \def MBEDTLS_AESNI_C |
Manuel Pégourié-Gonnard | 92ac76f | 2013-12-16 17:12:53 +0100 | [diff] [blame] | 868 | * |
| 869 | * Enable AES-NI support on x86-64. |
| 870 | * |
| 871 | * Module: library/aesni.c |
| 872 | * Caller: library/aes.c |
| 873 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 874 | * Requires: MBEDTLS_HAVE_ASM |
Manuel Pégourié-Gonnard | 92ac76f | 2013-12-16 17:12:53 +0100 | [diff] [blame] | 875 | * |
| 876 | * This modules adds support for the AES-NI instructions on x86-64 |
| 877 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 878 | #define MBEDTLS_AESNI_C |
Manuel Pégourié-Gonnard | 92ac76f | 2013-12-16 17:12:53 +0100 | [diff] [blame] | 879 | |
| 880 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 881 | * \def MBEDTLS_AES_C |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 882 | * |
| 883 | * Enable the AES block cipher. |
| 884 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 885 | * Module: library/aes.c |
Manuel Pégourié-Gonnard | fdd4354 | 2018-02-28 10:49:02 +0100 | [diff] [blame] | 886 | * Caller: library/cipher.c |
Paul Bakker | 96743fc | 2011-02-12 14:30:57 +0000 | [diff] [blame] | 887 | * library/pem.c |
Paul Bakker | 6083fd2 | 2011-12-03 21:45:14 +0000 | [diff] [blame] | 888 | * library/ctr_drbg.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 889 | * |
Paul Bakker | 645ce3a | 2012-10-31 12:32:41 +0000 | [diff] [blame] | 890 | * This module enables the following ciphersuites (if other requisites are |
| 891 | * enabled as well): |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 892 | * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA |
| 893 | * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA |
| 894 | * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA |
| 895 | * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA |
| 896 | * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 |
| 897 | * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 |
| 898 | * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 |
| 899 | * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 |
| 900 | * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 |
| 901 | * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 |
| 902 | * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 |
| 903 | * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 |
| 904 | * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 |
| 905 | * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 |
| 906 | * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 |
| 907 | * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 |
| 908 | * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 |
| 909 | * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 |
| 910 | * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA |
| 911 | * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA |
| 912 | * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA |
| 913 | * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 |
| 914 | * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 |
| 915 | * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 |
| 916 | * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 |
| 917 | * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 |
| 918 | * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 |
| 919 | * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA |
| 920 | * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA |
| 921 | * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA |
| 922 | * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 |
| 923 | * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384 |
| 924 | * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 |
| 925 | * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA |
| 926 | * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA |
| 927 | * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 |
| 928 | * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 |
| 929 | * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 |
| 930 | * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA |
| 931 | * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA |
| 932 | * MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384 |
| 933 | * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256 |
| 934 | * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA |
| 935 | * MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256 |
| 936 | * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256 |
| 937 | * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA |
| 938 | * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 |
| 939 | * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 |
| 940 | * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA |
| 941 | * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 |
| 942 | * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 |
| 943 | * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA |
| 944 | * MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384 |
| 945 | * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384 |
| 946 | * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA |
| 947 | * MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256 |
| 948 | * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256 |
| 949 | * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA |
Paul Bakker | 6deb37e | 2013-02-19 13:17:08 +0100 | [diff] [blame] | 950 | * |
Paul Bakker | cff6842 | 2013-09-15 20:43:33 +0200 | [diff] [blame] | 951 | * PEM_PARSE uses AES for decrypting encrypted keys. |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 952 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 953 | #define MBEDTLS_AES_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 954 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 955 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 956 | * \def MBEDTLS_ARC4_C |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 957 | * |
| 958 | * Enable the ARCFOUR stream cipher. |
| 959 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 960 | * Module: library/arc4.c |
Manuel Pégourié-Gonnard | fdd4354 | 2018-02-28 10:49:02 +0100 | [diff] [blame] | 961 | * Caller: library/cipher.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 962 | * |
Paul Bakker | 41c83d3 | 2013-03-20 14:39:14 +0100 | [diff] [blame] | 963 | * This module enables the following ciphersuites (if other requisites are |
| 964 | * enabled as well): |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 965 | * MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA |
| 966 | * MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA |
| 967 | * MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA |
| 968 | * MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA |
| 969 | * MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA |
| 970 | * MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA |
| 971 | * MBEDTLS_TLS_RSA_WITH_RC4_128_SHA |
| 972 | * MBEDTLS_TLS_RSA_WITH_RC4_128_MD5 |
| 973 | * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA |
| 974 | * MBEDTLS_TLS_PSK_WITH_RC4_128_SHA |
Hanno Becker | bbca8c5 | 2017-09-25 14:53:51 +0100 | [diff] [blame] | 975 | * |
| 976 | * \warning ARC4 is considered a weak cipher and its use constitutes a |
| 977 | * security risk. If possible, we recommend avoidng dependencies on |
| 978 | * it, and considering stronger ciphers instead. |
| 979 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 980 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 981 | #define MBEDTLS_ARC4_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 982 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 983 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 984 | * \def MBEDTLS_ASN1_PARSE_C |
Paul Bakker | efc3029 | 2011-11-10 14:43:23 +0000 | [diff] [blame] | 985 | * |
| 986 | * Enable the generic ASN1 parser. |
| 987 | * |
| 988 | * Module: library/asn1.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 989 | * Caller: library/x509.c |
| 990 | * library/dhm.c |
| 991 | * library/pkcs12.c |
| 992 | * library/pkcs5.c |
| 993 | * library/pkparse.c |
Paul Bakker | efc3029 | 2011-11-10 14:43:23 +0000 | [diff] [blame] | 994 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 995 | #define MBEDTLS_ASN1_PARSE_C |
Paul Bakker | efc3029 | 2011-11-10 14:43:23 +0000 | [diff] [blame] | 996 | |
| 997 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 998 | * \def MBEDTLS_ASN1_WRITE_C |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 999 | * |
| 1000 | * Enable the generic ASN1 writer. |
| 1001 | * |
| 1002 | * Module: library/asn1write.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 1003 | * Caller: library/ecdsa.c |
| 1004 | * library/pkwrite.c |
| 1005 | * library/x509_create.c |
| 1006 | * library/x509write_crt.c |
Simon Butcher | 2cb4739 | 2016-11-04 12:23:11 +0000 | [diff] [blame] | 1007 | * library/x509write_csr.c |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 1008 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1009 | #define MBEDTLS_ASN1_WRITE_C |
Paul Bakker | bdb912d | 2012-02-13 23:11:30 +0000 | [diff] [blame] | 1010 | |
| 1011 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1012 | * \def MBEDTLS_BASE64_C |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1013 | * |
| 1014 | * Enable the Base64 module. |
| 1015 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1016 | * Module: library/base64.c |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1017 | * Caller: library/pem.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1018 | * |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1019 | * This module is required for PEM support (required by X.509). |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1020 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1021 | #define MBEDTLS_BASE64_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1022 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1023 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1024 | * \def MBEDTLS_BIGNUM_C |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1025 | * |
Paul Bakker | 9a73632 | 2012-11-14 12:39:52 +0000 | [diff] [blame] | 1026 | * Enable the multi-precision integer library. |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1027 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1028 | * Module: library/bignum.c |
| 1029 | * Caller: library/dhm.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 1030 | * library/ecp.c |
Manuel Pégourié-Gonnard | bf31977 | 2014-06-25 13:00:17 +0200 | [diff] [blame] | 1031 | * library/ecdsa.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1032 | * library/rsa.c |
Hanno Becker | a565f54 | 2017-10-11 11:00:19 +0100 | [diff] [blame] | 1033 | * library/rsa_internal.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1034 | * library/ssl_tls.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1035 | * |
Manuel Pégourié-Gonnard | bf31977 | 2014-06-25 13:00:17 +0200 | [diff] [blame] | 1036 | * This module is required for RSA, DHM and ECC (ECDH, ECDSA) support. |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1037 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1038 | #define MBEDTLS_BIGNUM_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1039 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1040 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1041 | * \def MBEDTLS_BLOWFISH_C |
Paul Bakker | a9379c0 | 2012-07-04 11:02:11 +0000 | [diff] [blame] | 1042 | * |
| 1043 | * Enable the Blowfish block cipher. |
| 1044 | * |
| 1045 | * Module: library/blowfish.c |
| 1046 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1047 | #define MBEDTLS_BLOWFISH_C |
Paul Bakker | a9379c0 | 2012-07-04 11:02:11 +0000 | [diff] [blame] | 1048 | |
| 1049 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1050 | * \def MBEDTLS_CAMELLIA_C |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1051 | * |
| 1052 | * Enable the Camellia block cipher. |
| 1053 | * |
Paul Bakker | 38119b1 | 2009-01-10 23:31:23 +0000 | [diff] [blame] | 1054 | * Module: library/camellia.c |
Manuel Pégourié-Gonnard | fdd4354 | 2018-02-28 10:49:02 +0100 | [diff] [blame] | 1055 | * Caller: library/cipher.c |
Paul Bakker | 38119b1 | 2009-01-10 23:31:23 +0000 | [diff] [blame] | 1056 | * |
Paul Bakker | 645ce3a | 2012-10-31 12:32:41 +0000 | [diff] [blame] | 1057 | * This module enables the following ciphersuites (if other requisites are |
| 1058 | * enabled as well): |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1059 | * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 1060 | * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 |
| 1061 | * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 1062 | * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 |
| 1063 | * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 |
| 1064 | * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 |
| 1065 | * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 |
| 1066 | * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 |
| 1067 | * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 |
| 1068 | * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 |
| 1069 | * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 |
| 1070 | * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 |
| 1071 | * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 |
| 1072 | * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 |
| 1073 | * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA |
| 1074 | * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 |
| 1075 | * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 |
| 1076 | * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 |
| 1077 | * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 1078 | * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 1079 | * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 1080 | * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA |
| 1081 | * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384 |
| 1082 | * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 |
| 1083 | * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 |
| 1084 | * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256 |
| 1085 | * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 |
| 1086 | * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 |
| 1087 | * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384 |
| 1088 | * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 |
| 1089 | * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA |
| 1090 | * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256 |
| 1091 | * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 |
| 1092 | * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA |
| 1093 | * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384 |
| 1094 | * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 |
| 1095 | * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256 |
| 1096 | * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 |
| 1097 | * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384 |
| 1098 | * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384 |
| 1099 | * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 |
| 1100 | * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 |
Paul Bakker | 38119b1 | 2009-01-10 23:31:23 +0000 | [diff] [blame] | 1101 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1102 | #define MBEDTLS_CAMELLIA_C |
Paul Bakker | 38119b1 | 2009-01-10 23:31:23 +0000 | [diff] [blame] | 1103 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1104 | /** |
Markku-Juhani O. Saarinen | 3c0b53b | 2017-11-30 16:00:34 +0000 | [diff] [blame] | 1105 | * \def MBEDTLS_ARIA_C |
| 1106 | * |
Manuel Pégourié-Gonnard | 525168c | 2018-02-28 10:47:02 +0100 | [diff] [blame] | 1107 | * Enable the ARIA block cipher. |
Markku-Juhani O. Saarinen | 3c0b53b | 2017-11-30 16:00:34 +0000 | [diff] [blame] | 1108 | * |
| 1109 | * Module: library/aria.c |
Manuel Pégourié-Gonnard | 525168c | 2018-02-28 10:47:02 +0100 | [diff] [blame] | 1110 | * Caller: library/cipher.c |
| 1111 | * |
| 1112 | * This module enables the following ciphersuites (if other requisites are |
| 1113 | * enabled as well): |
| 1114 | * |
| 1115 | * MBEDTLS_TLS_RSA_WITH_ARIA_128_CBC_SHA256 |
| 1116 | * MBEDTLS_TLS_RSA_WITH_ARIA_256_CBC_SHA384 |
| 1117 | * MBEDTLS_TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256 |
| 1118 | * MBEDTLS_TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384 |
| 1119 | * MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256 |
| 1120 | * MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384 |
| 1121 | * MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256 |
| 1122 | * MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384 |
| 1123 | * MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256 |
| 1124 | * MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384 |
| 1125 | * MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256 |
| 1126 | * MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384 |
| 1127 | * MBEDTLS_TLS_RSA_WITH_ARIA_128_GCM_SHA256 |
| 1128 | * MBEDTLS_TLS_RSA_WITH_ARIA_256_GCM_SHA384 |
| 1129 | * MBEDTLS_TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256 |
| 1130 | * MBEDTLS_TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384 |
| 1131 | * MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256 |
| 1132 | * MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384 |
| 1133 | * MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256 |
| 1134 | * MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384 |
| 1135 | * MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256 |
| 1136 | * MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384 |
| 1137 | * MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256 |
| 1138 | * MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384 |
| 1139 | * MBEDTLS_TLS_PSK_WITH_ARIA_128_CBC_SHA256 |
| 1140 | * MBEDTLS_TLS_PSK_WITH_ARIA_256_CBC_SHA384 |
| 1141 | * MBEDTLS_TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256 |
| 1142 | * MBEDTLS_TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384 |
| 1143 | * MBEDTLS_TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256 |
| 1144 | * MBEDTLS_TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384 |
| 1145 | * MBEDTLS_TLS_PSK_WITH_ARIA_128_GCM_SHA256 |
| 1146 | * MBEDTLS_TLS_PSK_WITH_ARIA_256_GCM_SHA384 |
| 1147 | * MBEDTLS_TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256 |
| 1148 | * MBEDTLS_TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384 |
| 1149 | * MBEDTLS_TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256 |
| 1150 | * MBEDTLS_TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384 |
| 1151 | * MBEDTLS_TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256 |
| 1152 | * MBEDTLS_TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384 |
Markku-Juhani O. Saarinen | 3c0b53b | 2017-11-30 16:00:34 +0000 | [diff] [blame] | 1153 | */ |
Manuel Pégourié-Gonnard | 2268b96 | 2018-02-27 12:22:36 +0100 | [diff] [blame] | 1154 | //#define MBEDTLS_ARIA_C |
Markku-Juhani O. Saarinen | 3c0b53b | 2017-11-30 16:00:34 +0000 | [diff] [blame] | 1155 | |
| 1156 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1157 | * \def MBEDTLS_CCM_C |
Manuel Pégourié-Gonnard | a6916fa | 2014-05-02 15:17:29 +0200 | [diff] [blame] | 1158 | * |
| 1159 | * Enable the Counter with CBC-MAC (CCM) mode for 128-bit block cipher. |
| 1160 | * |
| 1161 | * Module: library/ccm.c |
| 1162 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1163 | * Requires: MBEDTLS_AES_C or MBEDTLS_CAMELLIA_C |
Manuel Pégourié-Gonnard | a6916fa | 2014-05-02 15:17:29 +0200 | [diff] [blame] | 1164 | * |
| 1165 | * This module enables the AES-CCM ciphersuites, if other requisites are |
| 1166 | * enabled as well. |
| 1167 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1168 | #define MBEDTLS_CCM_C |
Manuel Pégourié-Gonnard | a6916fa | 2014-05-02 15:17:29 +0200 | [diff] [blame] | 1169 | |
| 1170 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1171 | * \def MBEDTLS_CERTS_C |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1172 | * |
| 1173 | * Enable the test certificates. |
| 1174 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1175 | * Module: library/certs.c |
| 1176 | * Caller: |
| 1177 | * |
| 1178 | * This module is used for testing (ssl_client/server). |
| 1179 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1180 | #define MBEDTLS_CERTS_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1181 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1182 | /** |
Daniel King | 34b822c | 2016-05-15 17:28:08 -0300 | [diff] [blame] | 1183 | * \def MBEDTLS_CHACHA20_C |
| 1184 | * |
| 1185 | * Enable the ChaCha20 stream cipher. |
| 1186 | * |
| 1187 | * Module: library/chacha20.c |
| 1188 | */ |
| 1189 | #define MBEDTLS_CHACHA20_C |
| 1190 | |
| 1191 | /** |
Manuel Pégourié-Gonnard | e533b22 | 2018-06-04 12:23:19 +0200 | [diff] [blame] | 1192 | * \def MBEDTLS_CHACHAPOLY_C |
| 1193 | * |
| 1194 | * Enable the ChaCha20-Poly1305 AEAD algorithm. |
| 1195 | * |
| 1196 | * Module: library/chachapoly.c |
| 1197 | * |
| 1198 | * This module requires: MBEDTLS_CHACHA20_C, MBEDTLS_POLY1305_C |
| 1199 | */ |
| 1200 | #define MBEDTLS_CHACHAPOLY_C |
| 1201 | |
| 1202 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1203 | * \def MBEDTLS_CIPHER_C |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1204 | * |
| 1205 | * Enable the generic cipher layer. |
| 1206 | * |
Paul Bakker | 8123e9d | 2011-01-06 15:37:30 +0000 | [diff] [blame] | 1207 | * Module: library/cipher.c |
Paul Bakker | 04784f5 | 2013-08-19 13:30:57 +0200 | [diff] [blame] | 1208 | * Caller: library/ssl_tls.c |
Paul Bakker | 8123e9d | 2011-01-06 15:37:30 +0000 | [diff] [blame] | 1209 | * |
| 1210 | * Uncomment to enable generic cipher wrappers. |
| 1211 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1212 | #define MBEDTLS_CIPHER_C |
Paul Bakker | 8123e9d | 2011-01-06 15:37:30 +0000 | [diff] [blame] | 1213 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1214 | /** |
Robert Cragie | dc5c7b9 | 2015-12-11 15:49:45 +0000 | [diff] [blame] | 1215 | * \def MBEDTLS_CMAC_C |
| 1216 | * |
Simon Butcher | 327398a | 2016-10-05 14:09:11 +0100 | [diff] [blame] | 1217 | * Enable the CMAC (Cipher-based Message Authentication Code) mode for block |
| 1218 | * ciphers. |
Robert Cragie | dc5c7b9 | 2015-12-11 15:49:45 +0000 | [diff] [blame] | 1219 | * |
| 1220 | * Module: library/cmac.c |
| 1221 | * |
Simon Butcher | 69283e5 | 2016-10-06 12:49:58 +0100 | [diff] [blame] | 1222 | * Requires: MBEDTLS_AES_C or MBEDTLS_DES_C |
Robert Cragie | dc5c7b9 | 2015-12-11 15:49:45 +0000 | [diff] [blame] | 1223 | * |
| 1224 | */ |
Gilles Peskine | e59236f | 2018-01-27 23:32:46 +0100 | [diff] [blame] | 1225 | #define MBEDTLS_CMAC_C |
Robert Cragie | dc5c7b9 | 2015-12-11 15:49:45 +0000 | [diff] [blame] | 1226 | |
| 1227 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1228 | * \def MBEDTLS_CTR_DRBG_C |
Paul Bakker | 0e04d0e | 2011-11-27 14:46:59 +0000 | [diff] [blame] | 1229 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 1230 | * Enable the CTR_DRBG AES-256-based random generator. |
Paul Bakker | 0e04d0e | 2011-11-27 14:46:59 +0000 | [diff] [blame] | 1231 | * |
| 1232 | * Module: library/ctr_drbg.c |
| 1233 | * Caller: |
| 1234 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1235 | * Requires: MBEDTLS_AES_C |
Paul Bakker | 6083fd2 | 2011-12-03 21:45:14 +0000 | [diff] [blame] | 1236 | * |
Paul Bakker | 0e04d0e | 2011-11-27 14:46:59 +0000 | [diff] [blame] | 1237 | * This module provides the CTR_DRBG AES-256 random number generator. |
| 1238 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1239 | #define MBEDTLS_CTR_DRBG_C |
Paul Bakker | 0e04d0e | 2011-11-27 14:46:59 +0000 | [diff] [blame] | 1240 | |
| 1241 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1242 | * \def MBEDTLS_DES_C |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1243 | * |
| 1244 | * Enable the DES block cipher. |
| 1245 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1246 | * Module: library/des.c |
Paul Bakker | 6deb37e | 2013-02-19 13:17:08 +0100 | [diff] [blame] | 1247 | * Caller: library/pem.c |
Manuel Pégourié-Gonnard | fdd4354 | 2018-02-28 10:49:02 +0100 | [diff] [blame] | 1248 | * library/cipher.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1249 | * |
Paul Bakker | 645ce3a | 2012-10-31 12:32:41 +0000 | [diff] [blame] | 1250 | * This module enables the following ciphersuites (if other requisites are |
| 1251 | * enabled as well): |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1252 | * MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA |
| 1253 | * MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA |
| 1254 | * MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA |
| 1255 | * MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA |
| 1256 | * MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA |
| 1257 | * MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA |
| 1258 | * MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA |
| 1259 | * MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA |
| 1260 | * MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA |
| 1261 | * MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA |
Paul Bakker | 6deb37e | 2013-02-19 13:17:08 +0100 | [diff] [blame] | 1262 | * |
Paul Bakker | cff6842 | 2013-09-15 20:43:33 +0200 | [diff] [blame] | 1263 | * PEM_PARSE uses DES/3DES for decrypting encrypted keys. |
Hanno Becker | bbca8c5 | 2017-09-25 14:53:51 +0100 | [diff] [blame] | 1264 | * |
| 1265 | * \warning DES is considered a weak cipher and its use constitutes a |
| 1266 | * security risk. We recommend considering stronger ciphers instead. |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1267 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1268 | #define MBEDTLS_DES_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1269 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1270 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1271 | * \def MBEDTLS_DHM_C |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1272 | * |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 1273 | * Enable the Diffie-Hellman-Merkle module. |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1274 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1275 | * Module: library/dhm.c |
| 1276 | * Caller: library/ssl_cli.c |
| 1277 | * library/ssl_srv.c |
| 1278 | * |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 1279 | * This module is used by the following key exchanges: |
| 1280 | * DHE-RSA, DHE-PSK |
Hanno Becker | a2f6b72 | 2017-09-28 10:33:29 +0100 | [diff] [blame] | 1281 | * |
Hanno Becker | f9734b3 | 2017-10-03 12:09:22 +0100 | [diff] [blame] | 1282 | * \warning Using DHE constitutes a security risk as it |
| 1283 | * is not possible to validate custom DH parameters. |
| 1284 | * If possible, it is recommended users should consider |
| 1285 | * preferring other methods of key exchange. |
| 1286 | * See dhm.h for more details. |
Hanno Becker | a2f6b72 | 2017-09-28 10:33:29 +0100 | [diff] [blame] | 1287 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1288 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1289 | #define MBEDTLS_DHM_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1290 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1291 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1292 | * \def MBEDTLS_ECDH_C |
Paul Bakker | d589a0d | 2013-03-13 16:30:17 +0100 | [diff] [blame] | 1293 | * |
| 1294 | * Enable the elliptic curve Diffie-Hellman library. |
| 1295 | * |
| 1296 | * Module: library/ecdh.c |
Paul Bakker | 41c83d3 | 2013-03-20 14:39:14 +0100 | [diff] [blame] | 1297 | * Caller: library/ssl_cli.c |
| 1298 | * library/ssl_srv.c |
| 1299 | * |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 1300 | * This module is used by the following key exchanges: |
| 1301 | * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK |
Paul Bakker | d589a0d | 2013-03-13 16:30:17 +0100 | [diff] [blame] | 1302 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1303 | * Requires: MBEDTLS_ECP_C |
Paul Bakker | d589a0d | 2013-03-13 16:30:17 +0100 | [diff] [blame] | 1304 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1305 | #define MBEDTLS_ECDH_C |
Paul Bakker | d589a0d | 2013-03-13 16:30:17 +0100 | [diff] [blame] | 1306 | |
| 1307 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1308 | * \def MBEDTLS_ECDSA_C |
Paul Bakker | d589a0d | 2013-03-13 16:30:17 +0100 | [diff] [blame] | 1309 | * |
| 1310 | * Enable the elliptic curve DSA library. |
| 1311 | * |
| 1312 | * Module: library/ecdsa.c |
| 1313 | * Caller: |
| 1314 | * |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 1315 | * This module is used by the following key exchanges: |
| 1316 | * ECDHE-ECDSA |
| 1317 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1318 | * Requires: MBEDTLS_ECP_C, MBEDTLS_ASN1_WRITE_C, MBEDTLS_ASN1_PARSE_C |
Paul Bakker | d589a0d | 2013-03-13 16:30:17 +0100 | [diff] [blame] | 1319 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1320 | #define MBEDTLS_ECDSA_C |
Paul Bakker | d589a0d | 2013-03-13 16:30:17 +0100 | [diff] [blame] | 1321 | |
| 1322 | /** |
Manuel Pégourié-Gonnard | 4d8685b | 2015-08-05 15:44:42 +0200 | [diff] [blame] | 1323 | * \def MBEDTLS_ECJPAKE_C |
| 1324 | * |
| 1325 | * Enable the elliptic curve J-PAKE library. |
| 1326 | * |
Manuel Pégourié-Gonnard | 75df902 | 2015-09-16 23:21:01 +0200 | [diff] [blame] | 1327 | * \warning This is currently experimental. EC J-PAKE support is based on the |
| 1328 | * Thread v1.0.0 specification; incompatible changes to the specification |
| 1329 | * might still happen. For this reason, this is disabled by default. |
| 1330 | * |
Manuel Pégourié-Gonnard | 4d8685b | 2015-08-05 15:44:42 +0200 | [diff] [blame] | 1331 | * Module: library/ecjpake.c |
| 1332 | * Caller: |
| 1333 | * |
| 1334 | * This module is used by the following key exchanges: |
| 1335 | * ECJPAKE |
| 1336 | * |
| 1337 | * Requires: MBEDTLS_ECP_C, MBEDTLS_MD_C |
| 1338 | */ |
Gilles Peskine | 66920ce | 2018-03-03 21:49:49 +0100 | [diff] [blame] | 1339 | #define MBEDTLS_ECJPAKE_C |
Manuel Pégourié-Gonnard | 4d8685b | 2015-08-05 15:44:42 +0200 | [diff] [blame] | 1340 | |
| 1341 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1342 | * \def MBEDTLS_ECP_C |
Paul Bakker | d589a0d | 2013-03-13 16:30:17 +0100 | [diff] [blame] | 1343 | * |
| 1344 | * Enable the elliptic curve over GF(p) library. |
| 1345 | * |
| 1346 | * Module: library/ecp.c |
| 1347 | * Caller: library/ecdh.c |
| 1348 | * library/ecdsa.c |
Manuel Pégourié-Gonnard | 4d8685b | 2015-08-05 15:44:42 +0200 | [diff] [blame] | 1349 | * library/ecjpake.c |
Paul Bakker | d589a0d | 2013-03-13 16:30:17 +0100 | [diff] [blame] | 1350 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1351 | * Requires: MBEDTLS_BIGNUM_C and at least one MBEDTLS_ECP_DP_XXX_ENABLED |
Paul Bakker | d589a0d | 2013-03-13 16:30:17 +0100 | [diff] [blame] | 1352 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1353 | #define MBEDTLS_ECP_C |
Paul Bakker | d589a0d | 2013-03-13 16:30:17 +0100 | [diff] [blame] | 1354 | |
| 1355 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1356 | * \def MBEDTLS_ENTROPY_C |
Paul Bakker | 6083fd2 | 2011-12-03 21:45:14 +0000 | [diff] [blame] | 1357 | * |
| 1358 | * Enable the platform-specific entropy code. |
| 1359 | * |
| 1360 | * Module: library/entropy.c |
| 1361 | * Caller: |
| 1362 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1363 | * Requires: MBEDTLS_SHA512_C or MBEDTLS_SHA256_C |
Paul Bakker | 6083fd2 | 2011-12-03 21:45:14 +0000 | [diff] [blame] | 1364 | * |
| 1365 | * This module provides a generic entropy pool |
| 1366 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1367 | #define MBEDTLS_ENTROPY_C |
Paul Bakker | 6083fd2 | 2011-12-03 21:45:14 +0000 | [diff] [blame] | 1368 | |
| 1369 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1370 | * \def MBEDTLS_ERROR_C |
Paul Bakker | 9d78140 | 2011-05-09 16:17:09 +0000 | [diff] [blame] | 1371 | * |
| 1372 | * Enable error code to error string conversion. |
| 1373 | * |
| 1374 | * Module: library/error.c |
| 1375 | * Caller: |
| 1376 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1377 | * This module enables mbedtls_strerror(). |
Paul Bakker | 9d78140 | 2011-05-09 16:17:09 +0000 | [diff] [blame] | 1378 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1379 | #define MBEDTLS_ERROR_C |
Paul Bakker | 9d78140 | 2011-05-09 16:17:09 +0000 | [diff] [blame] | 1380 | |
| 1381 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1382 | * \def MBEDTLS_GCM_C |
Paul Bakker | 89e80c9 | 2012-03-20 13:50:09 +0000 | [diff] [blame] | 1383 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 1384 | * Enable the Galois/Counter Mode (GCM) for AES. |
Paul Bakker | 89e80c9 | 2012-03-20 13:50:09 +0000 | [diff] [blame] | 1385 | * |
| 1386 | * Module: library/gcm.c |
| 1387 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1388 | * Requires: MBEDTLS_AES_C or MBEDTLS_CAMELLIA_C |
Paul Bakker | 645ce3a | 2012-10-31 12:32:41 +0000 | [diff] [blame] | 1389 | * |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 1390 | * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other |
| 1391 | * requisites are enabled as well. |
Paul Bakker | 89e80c9 | 2012-03-20 13:50:09 +0000 | [diff] [blame] | 1392 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1393 | #define MBEDTLS_GCM_C |
Paul Bakker | 89e80c9 | 2012-03-20 13:50:09 +0000 | [diff] [blame] | 1394 | |
| 1395 | /** |
Thomas Fossati | 656864b | 2016-07-17 08:51:22 +0100 | [diff] [blame] | 1396 | * \def MBEDTLS_HKDF_C |
| 1397 | * |
| 1398 | * Enable the HKDF algorithm (RFC 5869). |
| 1399 | * |
| 1400 | * Module: library/hkdf.c |
| 1401 | * Caller: |
| 1402 | * |
| 1403 | * Requires: MBEDTLS_MD_C |
| 1404 | * |
| 1405 | * This module adds support for the Hashed Message Authentication Code |
| 1406 | * (HMAC)-based key derivation function (HKDF). |
| 1407 | */ |
| 1408 | #define MBEDTLS_HKDF_C |
| 1409 | |
| 1410 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1411 | * \def MBEDTLS_HMAC_DRBG_C |
Manuel Pégourié-Gonnard | 490bdf3 | 2014-01-27 14:03:10 +0100 | [diff] [blame] | 1412 | * |
| 1413 | * Enable the HMAC_DRBG random generator. |
| 1414 | * |
| 1415 | * Module: library/hmac_drbg.c |
| 1416 | * Caller: |
| 1417 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1418 | * Requires: MBEDTLS_MD_C |
Manuel Pégourié-Gonnard | 490bdf3 | 2014-01-27 14:03:10 +0100 | [diff] [blame] | 1419 | * |
| 1420 | * Uncomment to enable the HMAC_DRBG random number geerator. |
| 1421 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1422 | #define MBEDTLS_HMAC_DRBG_C |
Manuel Pégourié-Gonnard | 490bdf3 | 2014-01-27 14:03:10 +0100 | [diff] [blame] | 1423 | |
| 1424 | /** |
Ron Eldor | 466a57f | 2018-05-03 16:54:28 +0300 | [diff] [blame] | 1425 | * \def MBEDTLS_NIST_KW_C |
| 1426 | * |
| 1427 | * Enable the Key Wrapping mode for 128-bit block ciphers, |
| 1428 | * as defined in NIST SP 800-38F. Only KW and KWP modes |
| 1429 | * are supported. At the moment, only AES is approved by NIST. |
| 1430 | * |
| 1431 | * Module: library/nist_kw.c |
| 1432 | * |
| 1433 | * Requires: MBEDTLS_AES_C and MBEDTLS_CIPHER_C |
| 1434 | */ |
| 1435 | //#define MBEDTLS_NIST_KW_C |
| 1436 | |
| 1437 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1438 | * \def MBEDTLS_MD_C |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1439 | * |
| 1440 | * Enable the generic message digest layer. |
| 1441 | * |
Simon Butcher | 2cb4739 | 2016-11-04 12:23:11 +0000 | [diff] [blame] | 1442 | * Module: library/md.c |
Paul Bakker | 1737385 | 2011-01-06 14:20:01 +0000 | [diff] [blame] | 1443 | * Caller: |
| 1444 | * |
| 1445 | * Uncomment to enable generic message digest wrappers. |
| 1446 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1447 | #define MBEDTLS_MD_C |
Paul Bakker | 1737385 | 2011-01-06 14:20:01 +0000 | [diff] [blame] | 1448 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1449 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1450 | * \def MBEDTLS_MD2_C |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1451 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 1452 | * Enable the MD2 hash algorithm. |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1453 | * |
Simon Butcher | 2cb4739 | 2016-11-04 12:23:11 +0000 | [diff] [blame] | 1454 | * Module: library/md2.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 1455 | * Caller: |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1456 | * |
| 1457 | * Uncomment to enable support for (rare) MD2-signed X.509 certs. |
Hanno Becker | bbca8c5 | 2017-09-25 14:53:51 +0100 | [diff] [blame] | 1458 | * |
| 1459 | * \warning MD2 is considered a weak message digest and its use constitutes a |
| 1460 | * security risk. If possible, we recommend avoiding dependencies on |
| 1461 | * it, and considering stronger message digests instead. |
| 1462 | * |
Paul Bakker | 6506aff | 2009-07-28 20:52:02 +0000 | [diff] [blame] | 1463 | */ |
Gilles Peskine | 66920ce | 2018-03-03 21:49:49 +0100 | [diff] [blame] | 1464 | #define MBEDTLS_MD2_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1465 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1466 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1467 | * \def MBEDTLS_MD4_C |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1468 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 1469 | * Enable the MD4 hash algorithm. |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1470 | * |
Simon Butcher | 2cb4739 | 2016-11-04 12:23:11 +0000 | [diff] [blame] | 1471 | * Module: library/md4.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 1472 | * Caller: |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1473 | * |
| 1474 | * Uncomment to enable support for (rare) MD4-signed X.509 certs. |
Hanno Becker | bbca8c5 | 2017-09-25 14:53:51 +0100 | [diff] [blame] | 1475 | * |
| 1476 | * \warning MD4 is considered a weak message digest and its use constitutes a |
| 1477 | * security risk. If possible, we recommend avoiding dependencies on |
| 1478 | * it, and considering stronger message digests instead. |
| 1479 | * |
Paul Bakker | 6506aff | 2009-07-28 20:52:02 +0000 | [diff] [blame] | 1480 | */ |
Gilles Peskine | 66920ce | 2018-03-03 21:49:49 +0100 | [diff] [blame] | 1481 | #define MBEDTLS_MD4_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1482 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1483 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1484 | * \def MBEDTLS_MD5_C |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1485 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 1486 | * Enable the MD5 hash algorithm. |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1487 | * |
Simon Butcher | 2cb4739 | 2016-11-04 12:23:11 +0000 | [diff] [blame] | 1488 | * Module: library/md5.c |
| 1489 | * Caller: library/md.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 1490 | * library/pem.c |
Paul Bakker | 6deb37e | 2013-02-19 13:17:08 +0100 | [diff] [blame] | 1491 | * library/ssl_tls.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1492 | * |
Hanno Becker | bbca8c5 | 2017-09-25 14:53:51 +0100 | [diff] [blame] | 1493 | * This module is required for SSL/TLS up to version 1.1, and for TLS 1.2 |
| 1494 | * depending on the handshake parameters. Further, it is used for checking |
| 1495 | * MD5-signed certificates, and for PBKDF1 when decrypting PEM-encoded |
| 1496 | * encrypted keys. |
| 1497 | * |
| 1498 | * \warning MD5 is considered a weak message digest and its use constitutes a |
| 1499 | * security risk. If possible, we recommend avoiding dependencies on |
| 1500 | * it, and considering stronger message digests instead. |
| 1501 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1502 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1503 | #define MBEDTLS_MD5_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1504 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1505 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1506 | * \def MBEDTLS_MEMORY_BUFFER_ALLOC_C |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 1507 | * |
| 1508 | * Enable the buffer allocator implementation that makes use of a (stack) |
Manuel Pégourié-Gonnard | b9ef118 | 2015-05-26 16:15:20 +0200 | [diff] [blame] | 1509 | * based buffer to 'allocate' dynamic memory. (replaces calloc() and free() |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 1510 | * calls) |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 1511 | * |
| 1512 | * Module: library/memory_buffer_alloc.c |
| 1513 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1514 | * Requires: MBEDTLS_PLATFORM_C |
| 1515 | * MBEDTLS_PLATFORM_MEMORY (to use it within mbed TLS) |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 1516 | * |
| 1517 | * Enable this module to enable the buffer memory allocator. |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 1518 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1519 | //#define MBEDTLS_MEMORY_BUFFER_ALLOC_C |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 1520 | |
| 1521 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1522 | * \def MBEDTLS_OID_C |
Paul Bakker | c70b982 | 2013-04-07 22:00:46 +0200 | [diff] [blame] | 1523 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 1524 | * Enable the OID database. |
Paul Bakker | c70b982 | 2013-04-07 22:00:46 +0200 | [diff] [blame] | 1525 | * |
| 1526 | * Module: library/oid.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 1527 | * Caller: library/asn1write.c |
| 1528 | * library/pkcs5.c |
| 1529 | * library/pkparse.c |
| 1530 | * library/pkwrite.c |
| 1531 | * library/rsa.c |
| 1532 | * library/x509.c |
| 1533 | * library/x509_create.c |
Simon Butcher | 2cb4739 | 2016-11-04 12:23:11 +0000 | [diff] [blame] | 1534 | * library/x509_crl.c |
| 1535 | * library/x509_crt.c |
| 1536 | * library/x509_csr.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 1537 | * library/x509write_crt.c |
Simon Butcher | 2cb4739 | 2016-11-04 12:23:11 +0000 | [diff] [blame] | 1538 | * library/x509write_csr.c |
Paul Bakker | c70b982 | 2013-04-07 22:00:46 +0200 | [diff] [blame] | 1539 | * |
| 1540 | * This modules translates between OIDs and internal values. |
| 1541 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1542 | #define MBEDTLS_OID_C |
Paul Bakker | c70b982 | 2013-04-07 22:00:46 +0200 | [diff] [blame] | 1543 | |
| 1544 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1545 | * \def MBEDTLS_PADLOCK_C |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1546 | * |
| 1547 | * Enable VIA Padlock support on x86. |
| 1548 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1549 | * Module: library/padlock.c |
| 1550 | * Caller: library/aes.c |
| 1551 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1552 | * Requires: MBEDTLS_HAVE_ASM |
Manuel Pégourié-Gonnard | 92ac76f | 2013-12-16 17:12:53 +0100 | [diff] [blame] | 1553 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1554 | * This modules adds support for the VIA PadLock on x86. |
| 1555 | */ |
Gilles Peskine | 66920ce | 2018-03-03 21:49:49 +0100 | [diff] [blame] | 1556 | //#define MBEDTLS_PADLOCK_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1557 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1558 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1559 | * \def MBEDTLS_PEM_PARSE_C |
Paul Bakker | 96743fc | 2011-02-12 14:30:57 +0000 | [diff] [blame] | 1560 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 1561 | * Enable PEM decoding / parsing. |
Paul Bakker | 96743fc | 2011-02-12 14:30:57 +0000 | [diff] [blame] | 1562 | * |
| 1563 | * Module: library/pem.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 1564 | * Caller: library/dhm.c |
Paul Bakker | cff6842 | 2013-09-15 20:43:33 +0200 | [diff] [blame] | 1565 | * library/pkparse.c |
Simon Butcher | 2cb4739 | 2016-11-04 12:23:11 +0000 | [diff] [blame] | 1566 | * library/x509_crl.c |
| 1567 | * library/x509_crt.c |
| 1568 | * library/x509_csr.c |
Paul Bakker | 96743fc | 2011-02-12 14:30:57 +0000 | [diff] [blame] | 1569 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1570 | * Requires: MBEDTLS_BASE64_C |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1571 | * |
Paul Bakker | cff6842 | 2013-09-15 20:43:33 +0200 | [diff] [blame] | 1572 | * This modules adds support for decoding / parsing PEM files. |
Paul Bakker | 96743fc | 2011-02-12 14:30:57 +0000 | [diff] [blame] | 1573 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1574 | #define MBEDTLS_PEM_PARSE_C |
Paul Bakker | cff6842 | 2013-09-15 20:43:33 +0200 | [diff] [blame] | 1575 | |
| 1576 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1577 | * \def MBEDTLS_PEM_WRITE_C |
Paul Bakker | cff6842 | 2013-09-15 20:43:33 +0200 | [diff] [blame] | 1578 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 1579 | * Enable PEM encoding / writing. |
Paul Bakker | cff6842 | 2013-09-15 20:43:33 +0200 | [diff] [blame] | 1580 | * |
| 1581 | * Module: library/pem.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 1582 | * Caller: library/pkwrite.c |
| 1583 | * library/x509write_crt.c |
Simon Butcher | 2cb4739 | 2016-11-04 12:23:11 +0000 | [diff] [blame] | 1584 | * library/x509write_csr.c |
Paul Bakker | cff6842 | 2013-09-15 20:43:33 +0200 | [diff] [blame] | 1585 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1586 | * Requires: MBEDTLS_BASE64_C |
Paul Bakker | cff6842 | 2013-09-15 20:43:33 +0200 | [diff] [blame] | 1587 | * |
| 1588 | * This modules adds support for encoding / writing PEM files. |
| 1589 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1590 | #define MBEDTLS_PEM_WRITE_C |
Paul Bakker | 96743fc | 2011-02-12 14:30:57 +0000 | [diff] [blame] | 1591 | |
| 1592 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1593 | * \def MBEDTLS_PK_C |
Manuel Pégourié-Gonnard | c40b4c3 | 2013-08-22 13:29:31 +0200 | [diff] [blame] | 1594 | * |
| 1595 | * Enable the generic public (asymetric) key layer. |
| 1596 | * |
| 1597 | * Module: library/pk.c |
Manuel Pégourié-Gonnard | 1a48383 | 2013-09-20 12:29:15 +0200 | [diff] [blame] | 1598 | * Caller: library/ssl_tls.c |
Manuel Pégourié-Gonnard | c40b4c3 | 2013-08-22 13:29:31 +0200 | [diff] [blame] | 1599 | * library/ssl_cli.c |
| 1600 | * library/ssl_srv.c |
| 1601 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1602 | * Requires: MBEDTLS_RSA_C or MBEDTLS_ECP_C |
Manuel Pégourié-Gonnard | 1a48383 | 2013-09-20 12:29:15 +0200 | [diff] [blame] | 1603 | * |
Manuel Pégourié-Gonnard | c40b4c3 | 2013-08-22 13:29:31 +0200 | [diff] [blame] | 1604 | * Uncomment to enable generic public key wrappers. |
| 1605 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1606 | #define MBEDTLS_PK_C |
Manuel Pégourié-Gonnard | c40b4c3 | 2013-08-22 13:29:31 +0200 | [diff] [blame] | 1607 | |
| 1608 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1609 | * \def MBEDTLS_PK_PARSE_C |
Paul Bakker | 4606c73 | 2013-09-15 17:04:23 +0200 | [diff] [blame] | 1610 | * |
| 1611 | * Enable the generic public (asymetric) key parser. |
| 1612 | * |
| 1613 | * Module: library/pkparse.c |
Simon Butcher | 2cb4739 | 2016-11-04 12:23:11 +0000 | [diff] [blame] | 1614 | * Caller: library/x509_crt.c |
| 1615 | * library/x509_csr.c |
Paul Bakker | 4606c73 | 2013-09-15 17:04:23 +0200 | [diff] [blame] | 1616 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1617 | * Requires: MBEDTLS_PK_C |
Paul Bakker | 4606c73 | 2013-09-15 17:04:23 +0200 | [diff] [blame] | 1618 | * |
| 1619 | * Uncomment to enable generic public key parse functions. |
| 1620 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1621 | #define MBEDTLS_PK_PARSE_C |
Paul Bakker | 4606c73 | 2013-09-15 17:04:23 +0200 | [diff] [blame] | 1622 | |
| 1623 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1624 | * \def MBEDTLS_PK_WRITE_C |
Paul Bakker | 4606c73 | 2013-09-15 17:04:23 +0200 | [diff] [blame] | 1625 | * |
Paul Bakker | f20ba4b | 2013-09-16 22:46:20 +0200 | [diff] [blame] | 1626 | * Enable the generic public (asymetric) key writer. |
Paul Bakker | 4606c73 | 2013-09-15 17:04:23 +0200 | [diff] [blame] | 1627 | * |
| 1628 | * Module: library/pkwrite.c |
| 1629 | * Caller: library/x509write.c |
| 1630 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1631 | * Requires: MBEDTLS_PK_C |
Paul Bakker | 4606c73 | 2013-09-15 17:04:23 +0200 | [diff] [blame] | 1632 | * |
| 1633 | * Uncomment to enable generic public key write functions. |
| 1634 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1635 | #define MBEDTLS_PK_WRITE_C |
Paul Bakker | 4606c73 | 2013-09-15 17:04:23 +0200 | [diff] [blame] | 1636 | |
| 1637 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1638 | * \def MBEDTLS_PKCS5_C |
Paul Bakker | b0c19a4 | 2013-06-24 19:26:38 +0200 | [diff] [blame] | 1639 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 1640 | * Enable PKCS#5 functions. |
Paul Bakker | b0c19a4 | 2013-06-24 19:26:38 +0200 | [diff] [blame] | 1641 | * |
| 1642 | * Module: library/pkcs5.c |
| 1643 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1644 | * Requires: MBEDTLS_MD_C |
Paul Bakker | b0c19a4 | 2013-06-24 19:26:38 +0200 | [diff] [blame] | 1645 | * |
| 1646 | * This module adds support for the PKCS#5 functions. |
| 1647 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1648 | #define MBEDTLS_PKCS5_C |
Paul Bakker | b0c19a4 | 2013-06-24 19:26:38 +0200 | [diff] [blame] | 1649 | |
| 1650 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1651 | * \def MBEDTLS_PKCS11_C |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1652 | * |
Paul Bakker | eb2c658 | 2012-09-27 19:15:01 +0000 | [diff] [blame] | 1653 | * Enable wrapper for PKCS#11 smartcard support. |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1654 | * |
Manuel Pégourié-Gonnard | 51be559 | 2013-08-22 13:35:53 +0200 | [diff] [blame] | 1655 | * Module: library/pkcs11.c |
| 1656 | * Caller: library/pk.c |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1657 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1658 | * Requires: MBEDTLS_PK_C |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1659 | * |
Paul Bakker | eb2c658 | 2012-09-27 19:15:01 +0000 | [diff] [blame] | 1660 | * This module enables SSL/TLS PKCS #11 smartcard support. |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1661 | * Requires the presence of the PKCS#11 helper library (libpkcs11-helper) |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1662 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1663 | //#define MBEDTLS_PKCS11_C |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1664 | |
| 1665 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1666 | * \def MBEDTLS_PKCS12_C |
Paul Bakker | f1f21fe | 2013-06-24 19:17:19 +0200 | [diff] [blame] | 1667 | * |
Manuel Pégourié-Gonnard | 09fff7e | 2013-09-20 13:45:36 +0200 | [diff] [blame] | 1668 | * Enable PKCS#12 PBE functions. |
Paul Bakker | f1f21fe | 2013-06-24 19:17:19 +0200 | [diff] [blame] | 1669 | * Adds algorithms for parsing PKCS#8 encrypted private keys |
| 1670 | * |
| 1671 | * Module: library/pkcs12.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 1672 | * Caller: library/pkparse.c |
Paul Bakker | f1f21fe | 2013-06-24 19:17:19 +0200 | [diff] [blame] | 1673 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1674 | * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_CIPHER_C, MBEDTLS_MD_C |
| 1675 | * Can use: MBEDTLS_ARC4_C |
Paul Bakker | f1f21fe | 2013-06-24 19:17:19 +0200 | [diff] [blame] | 1676 | * |
| 1677 | * This module enables PKCS#12 functions. |
| 1678 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1679 | #define MBEDTLS_PKCS12_C |
Paul Bakker | f1f21fe | 2013-06-24 19:17:19 +0200 | [diff] [blame] | 1680 | |
| 1681 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1682 | * \def MBEDTLS_PLATFORM_C |
Paul Bakker | 747a83a | 2014-02-01 22:50:07 +0100 | [diff] [blame] | 1683 | * |
| 1684 | * Enable the platform abstraction layer that allows you to re-assign |
Manuel Pégourié-Gonnard | 6c0c8e0 | 2015-06-22 10:23:34 +0200 | [diff] [blame] | 1685 | * functions like calloc(), free(), snprintf(), printf(), fprintf(), exit(). |
Paul Bakker | 747a83a | 2014-02-01 22:50:07 +0100 | [diff] [blame] | 1686 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1687 | * Enabling MBEDTLS_PLATFORM_C enables to use of MBEDTLS_PLATFORM_XXX_ALT |
| 1688 | * or MBEDTLS_PLATFORM_XXX_MACRO directives, allowing the functions mentioned |
Rich Evans | 16f8cd8 | 2015-02-06 16:14:34 +0000 | [diff] [blame] | 1689 | * above to be specified at runtime or compile time respectively. |
Paul Bakker | 747a83a | 2014-02-01 22:50:07 +0100 | [diff] [blame] | 1690 | * |
Manuel Pégourié-Gonnard | 6c0c8e0 | 2015-06-22 10:23:34 +0200 | [diff] [blame] | 1691 | * \note This abstraction layer must be enabled on Windows (including MSYS2) |
| 1692 | * as other module rely on it for a fixed snprintf implementation. |
| 1693 | * |
Paul Bakker | 747a83a | 2014-02-01 22:50:07 +0100 | [diff] [blame] | 1694 | * Module: library/platform.c |
| 1695 | * Caller: Most other .c files |
| 1696 | * |
| 1697 | * This module enables abstraction of common (libc) functions. |
| 1698 | */ |
Manuel Pégourié-Gonnard | b9ef118 | 2015-05-26 16:15:20 +0200 | [diff] [blame] | 1699 | #define MBEDTLS_PLATFORM_C |
Paul Bakker | 747a83a | 2014-02-01 22:50:07 +0100 | [diff] [blame] | 1700 | |
| 1701 | /** |
Daniel King | adc32c0 | 2016-05-16 18:25:45 -0300 | [diff] [blame] | 1702 | * \def MBEDTLS_POLY1305_C |
| 1703 | * |
| 1704 | * Enable the Poly1305 MAC algorithm. |
| 1705 | * |
| 1706 | * Module: library/poly1305.c |
Manuel Pégourié-Gonnard | dca3a5d | 2018-05-07 10:43:27 +0200 | [diff] [blame] | 1707 | * Caller: library/chachapoly.c |
Daniel King | adc32c0 | 2016-05-16 18:25:45 -0300 | [diff] [blame] | 1708 | */ |
| 1709 | #define MBEDTLS_POLY1305_C |
| 1710 | |
| 1711 | /** |
Gilles Peskine | e59236f | 2018-01-27 23:32:46 +0100 | [diff] [blame] | 1712 | * \def MBEDTLS_PSA_CRYPTO_C |
| 1713 | * |
| 1714 | * Enable the Platform Security Architecture cryptography API. |
| 1715 | * |
| 1716 | * Module: library/psa_crypto.c |
| 1717 | * |
| 1718 | * Requires: MBEDTLS_CTR_DRBG_C, MBEDTLS_ENTROPY_C |
| 1719 | * |
| 1720 | */ |
| 1721 | #define MBEDTLS_PSA_CRYPTO_C |
| 1722 | |
| 1723 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1724 | * \def MBEDTLS_RIPEMD160_C |
Manuel Pégourié-Gonnard | cab4a88 | 2014-01-17 12:42:35 +0100 | [diff] [blame] | 1725 | * |
| 1726 | * Enable the RIPEMD-160 hash algorithm. |
| 1727 | * |
Simon Butcher | 2cb4739 | 2016-11-04 12:23:11 +0000 | [diff] [blame] | 1728 | * Module: library/ripemd160.c |
| 1729 | * Caller: library/md.c |
Manuel Pégourié-Gonnard | cab4a88 | 2014-01-17 12:42:35 +0100 | [diff] [blame] | 1730 | * |
| 1731 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1732 | #define MBEDTLS_RIPEMD160_C |
Manuel Pégourié-Gonnard | cab4a88 | 2014-01-17 12:42:35 +0100 | [diff] [blame] | 1733 | |
| 1734 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1735 | * \def MBEDTLS_RSA_C |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1736 | * |
| 1737 | * Enable the RSA public-key cryptosystem. |
| 1738 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1739 | * Module: library/rsa.c |
Hanno Becker | a565f54 | 2017-10-11 11:00:19 +0100 | [diff] [blame] | 1740 | * library/rsa_internal.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1741 | * Caller: library/ssl_cli.c |
| 1742 | * library/ssl_srv.c |
| 1743 | * library/ssl_tls.c |
| 1744 | * library/x509.c |
| 1745 | * |
Manuel Pégourié-Gonnard | 9d70373 | 2013-10-25 18:01:50 +0200 | [diff] [blame] | 1746 | * This module is used by the following key exchanges: |
| 1747 | * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK |
Paul Bakker | 5690efc | 2011-05-26 13:16:06 +0000 | [diff] [blame] | 1748 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1749 | * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_OID_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1750 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1751 | #define MBEDTLS_RSA_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1752 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1753 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1754 | * \def MBEDTLS_SHA1_C |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1755 | * |
| 1756 | * Enable the SHA1 cryptographic hash algorithm. |
| 1757 | * |
Simon Butcher | 2cb4739 | 2016-11-04 12:23:11 +0000 | [diff] [blame] | 1758 | * Module: library/sha1.c |
| 1759 | * Caller: library/md.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 1760 | * library/ssl_cli.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1761 | * library/ssl_srv.c |
| 1762 | * library/ssl_tls.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 1763 | * library/x509write_crt.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1764 | * |
Gilles Peskine | 5e79cb3 | 2017-05-04 16:17:21 +0200 | [diff] [blame] | 1765 | * This module is required for SSL/TLS up to version 1.1, for TLS 1.2 |
| 1766 | * depending on the handshake parameters, and for SHA1-signed certificates. |
Hanno Becker | bbca8c5 | 2017-09-25 14:53:51 +0100 | [diff] [blame] | 1767 | * |
| 1768 | * \warning SHA-1 is considered a weak message digest and its use constitutes |
| 1769 | * a security risk. If possible, we recommend avoiding dependencies |
| 1770 | * on it, and considering stronger message digests instead. |
| 1771 | * |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1772 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1773 | #define MBEDTLS_SHA1_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1774 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1775 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1776 | * \def MBEDTLS_SHA256_C |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1777 | * |
| 1778 | * Enable the SHA-224 and SHA-256 cryptographic hash algorithms. |
| 1779 | * |
Simon Butcher | 2cb4739 | 2016-11-04 12:23:11 +0000 | [diff] [blame] | 1780 | * Module: library/sha256.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 1781 | * Caller: library/entropy.c |
Simon Butcher | 2cb4739 | 2016-11-04 12:23:11 +0000 | [diff] [blame] | 1782 | * library/md.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 1783 | * library/ssl_cli.c |
| 1784 | * library/ssl_srv.c |
| 1785 | * library/ssl_tls.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1786 | * |
| 1787 | * This module adds support for SHA-224 and SHA-256. |
Paul Bakker | 769075d | 2012-11-24 11:26:46 +0100 | [diff] [blame] | 1788 | * This module is required for the SSL/TLS 1.2 PRF function. |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1789 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1790 | #define MBEDTLS_SHA256_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1791 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1792 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1793 | * \def MBEDTLS_SHA512_C |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1794 | * |
| 1795 | * Enable the SHA-384 and SHA-512 cryptographic hash algorithms. |
| 1796 | * |
Simon Butcher | 2cb4739 | 2016-11-04 12:23:11 +0000 | [diff] [blame] | 1797 | * Module: library/sha512.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 1798 | * Caller: library/entropy.c |
Simon Butcher | 2cb4739 | 2016-11-04 12:23:11 +0000 | [diff] [blame] | 1799 | * library/md.c |
Manuel Pégourié-Gonnard | fe28646 | 2013-09-20 14:10:14 +0200 | [diff] [blame] | 1800 | * library/ssl_cli.c |
| 1801 | * library/ssl_srv.c |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1802 | * |
| 1803 | * This module adds support for SHA-384 and SHA-512. |
| 1804 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1805 | #define MBEDTLS_SHA512_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1806 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1807 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1808 | * \def MBEDTLS_THREADING_C |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 1809 | * |
| 1810 | * Enable the threading abstraction layer. |
Manuel Pégourié-Gonnard | b4fe3cb | 2015-01-22 16:11:05 +0000 | [diff] [blame] | 1811 | * By default mbed TLS assumes it is used in a non-threaded environment or that |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 1812 | * contexts are not shared between threads. If you do intend to use contexts |
| 1813 | * between threads, you will need to enable this layer to prevent race |
Manuel Pégourié-Gonnard | 02049dc | 2016-02-22 16:42:51 +0000 | [diff] [blame] | 1814 | * conditions. See also our Knowledge Base article about threading: |
| 1815 | * https://tls.mbed.org/kb/development/thread-safety-and-multi-threading |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 1816 | * |
| 1817 | * Module: library/threading.c |
| 1818 | * |
| 1819 | * This allows different threading implementations (self-implemented or |
| 1820 | * provided). |
| 1821 | * |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1822 | * You will have to enable either MBEDTLS_THREADING_ALT or |
| 1823 | * MBEDTLS_THREADING_PTHREAD. |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 1824 | * |
Manuel Pégourié-Gonnard | b4fe3cb | 2015-01-22 16:11:05 +0000 | [diff] [blame] | 1825 | * Enable this layer to allow use of mutexes within mbed TLS |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 1826 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1827 | //#define MBEDTLS_THREADING_C |
Paul Bakker | 2466d93 | 2013-09-28 14:40:38 +0200 | [diff] [blame] | 1828 | |
| 1829 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1830 | * \def MBEDTLS_VERSION_C |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1831 | * |
| 1832 | * Enable run-time version information. |
| 1833 | * |
Paul Bakker | 0a62cd1 | 2011-01-21 11:00:08 +0000 | [diff] [blame] | 1834 | * Module: library/version.c |
| 1835 | * |
| 1836 | * This module provides run-time version information. |
| 1837 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1838 | #define MBEDTLS_VERSION_C |
Paul Bakker | 0a62cd1 | 2011-01-21 11:00:08 +0000 | [diff] [blame] | 1839 | |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1840 | /** |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1841 | * \def MBEDTLS_XTEA_C |
Paul Bakker | 5121ce5 | 2009-01-03 21:22:43 +0000 | [diff] [blame] | 1842 | * |
Paul Bakker | f3b86c1 | 2011-01-27 15:24:17 +0000 | [diff] [blame] | 1843 | * Enable the XTEA block cipher. |
| 1844 | * |
Paul Bakker | 7a7c78f | 2009-01-04 18:15:48 +0000 | [diff] [blame] | 1845 | * Module: library/xtea.c |
| 1846 | * Caller: |
| 1847 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1848 | #define MBEDTLS_XTEA_C |
Manuel Pégourié-Gonnard | 39d2adb | 2012-10-31 09:26:55 +0100 | [diff] [blame] | 1849 | |
Manuel Pégourié-Gonnard | b4fe3cb | 2015-01-22 16:11:05 +0000 | [diff] [blame] | 1850 | /* \} name SECTION: mbed TLS modules */ |
Paul Bakker | 7a7c78f | 2009-01-04 18:15:48 +0000 | [diff] [blame] | 1851 | |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 1852 | /** |
| 1853 | * \name SECTION: Module configuration options |
| 1854 | * |
| 1855 | * This section allows for the setting of module specific sizes and |
| 1856 | * configuration options. The default values are already present in the |
| 1857 | * relevant header files and should suffice for the regular use cases. |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 1858 | * |
Paul Bakker | 088c5c5 | 2014-04-25 11:11:10 +0200 | [diff] [blame] | 1859 | * Our advice is to enable options and change their values here |
| 1860 | * only if you have a good reason and know the consequences. |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 1861 | * |
| 1862 | * Please check the respective header file for documentation on these |
| 1863 | * parameters (to prevent duplicate documentation). |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 1864 | * \{ |
| 1865 | */ |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 1866 | |
Paul Bakker | 088c5c5 | 2014-04-25 11:11:10 +0200 | [diff] [blame] | 1867 | /* MPI / BIGNUM options */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1868 | //#define MBEDTLS_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */ |
| 1869 | //#define MBEDTLS_MPI_MAX_SIZE 1024 /**< Maximum number of bytes for usable MPIs. */ |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 1870 | |
Paul Bakker | 088c5c5 | 2014-04-25 11:11:10 +0200 | [diff] [blame] | 1871 | /* CTR_DRBG options */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1872 | //#define MBEDTLS_CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */ |
| 1873 | //#define MBEDTLS_CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */ |
| 1874 | //#define MBEDTLS_CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */ |
| 1875 | //#define MBEDTLS_CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */ |
| 1876 | //#define MBEDTLS_CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */ |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 1877 | |
Paul Bakker | 088c5c5 | 2014-04-25 11:11:10 +0200 | [diff] [blame] | 1878 | /* HMAC_DRBG options */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1879 | //#define MBEDTLS_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */ |
| 1880 | //#define MBEDTLS_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */ |
| 1881 | //#define MBEDTLS_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */ |
| 1882 | //#define MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */ |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 1883 | |
Paul Bakker | 088c5c5 | 2014-04-25 11:11:10 +0200 | [diff] [blame] | 1884 | /* ECP options */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1885 | //#define MBEDTLS_ECP_MAX_BITS 521 /**< Maximum bit size of groups */ |
| 1886 | //#define MBEDTLS_ECP_WINDOW_SIZE 6 /**< Maximum window size used */ |
| 1887 | //#define MBEDTLS_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */ |
Manuel Pégourié-Gonnard | 0520b60 | 2014-01-30 19:43:46 +0100 | [diff] [blame] | 1888 | |
Paul Bakker | 088c5c5 | 2014-04-25 11:11:10 +0200 | [diff] [blame] | 1889 | /* Entropy options */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1890 | //#define MBEDTLS_ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */ |
| 1891 | //#define MBEDTLS_ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */ |
Andres AG | 7abc974 | 2016-09-23 17:58:49 +0100 | [diff] [blame] | 1892 | //#define MBEDTLS_ENTROPY_MIN_HARDWARE 32 /**< Default minimum number of bytes required for the hardware entropy source mbedtls_hardware_poll() before entropy is released */ |
Paul Bakker | e1b665e | 2013-12-11 16:02:58 +0100 | [diff] [blame] | 1893 | |
Paul Bakker | 088c5c5 | 2014-04-25 11:11:10 +0200 | [diff] [blame] | 1894 | /* Memory buffer allocator options */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1895 | //#define MBEDTLS_MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */ |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 1896 | |
Paul Bakker | 088c5c5 | 2014-04-25 11:11:10 +0200 | [diff] [blame] | 1897 | /* Platform options */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1898 | //#define MBEDTLS_PLATFORM_STD_MEM_HDR <stdlib.h> /**< Header to include if MBEDTLS_PLATFORM_NO_STD_FUNCTIONS is defined. Don't define if no header is needed. */ |
Manuel Pégourié-Gonnard | b9ef118 | 2015-05-26 16:15:20 +0200 | [diff] [blame] | 1899 | //#define MBEDTLS_PLATFORM_STD_CALLOC calloc /**< Default allocator to use, can be undefined */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1900 | //#define MBEDTLS_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */ |
| 1901 | //#define MBEDTLS_PLATFORM_STD_EXIT exit /**< Default exit to use, can be undefined */ |
Andres Amaya Garcia | 1e4ec66 | 2016-07-20 10:16:25 +0100 | [diff] [blame] | 1902 | //#define MBEDTLS_PLATFORM_STD_TIME time /**< Default time to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1903 | //#define MBEDTLS_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */ |
| 1904 | //#define MBEDTLS_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */ |
Manuel Pégourié-Gonnard | 6c0c8e0 | 2015-06-22 10:23:34 +0200 | [diff] [blame] | 1905 | /* Note: your snprintf must correclty zero-terminate the buffer! */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1906 | //#define MBEDTLS_PLATFORM_STD_SNPRINTF snprintf /**< Default snprintf to use, can be undefined */ |
Janos Follath | 9194744 | 2016-03-18 13:49:27 +0000 | [diff] [blame] | 1907 | //#define MBEDTLS_PLATFORM_STD_EXIT_SUCCESS 0 /**< Default exit value to use, can be undefined */ |
| 1908 | //#define MBEDTLS_PLATFORM_STD_EXIT_FAILURE 1 /**< Default exit value to use, can be undefined */ |
Paul Bakker | cf0a9f9 | 2016-06-01 11:25:44 +0100 | [diff] [blame] | 1909 | //#define MBEDTLS_PLATFORM_STD_NV_SEED_READ mbedtls_platform_std_nv_seed_read /**< Default nv_seed_read function to use, can be undefined */ |
| 1910 | //#define MBEDTLS_PLATFORM_STD_NV_SEED_WRITE mbedtls_platform_std_nv_seed_write /**< Default nv_seed_write function to use, can be undefined */ |
| 1911 | //#define MBEDTLS_PLATFORM_STD_NV_SEED_FILE "seedfile" /**< Seed file to read/write with default implementation */ |
Paul Bakker | 6e339b5 | 2013-07-03 13:37:05 +0200 | [diff] [blame] | 1912 | |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1913 | /* To Use Function Macros MBEDTLS_PLATFORM_C must be enabled */ |
| 1914 | /* MBEDTLS_PLATFORM_XXX_MACRO and MBEDTLS_PLATFORM_XXX_ALT cannot both be defined */ |
Manuel Pégourié-Gonnard | b9ef118 | 2015-05-26 16:15:20 +0200 | [diff] [blame] | 1915 | //#define MBEDTLS_PLATFORM_CALLOC_MACRO calloc /**< Default allocator macro to use, can be undefined */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1916 | //#define MBEDTLS_PLATFORM_FREE_MACRO free /**< Default free macro to use, can be undefined */ |
| 1917 | //#define MBEDTLS_PLATFORM_EXIT_MACRO exit /**< Default exit macro to use, can be undefined */ |
Andres Amaya Garcia | 1e4ec66 | 2016-07-20 10:16:25 +0100 | [diff] [blame] | 1918 | //#define MBEDTLS_PLATFORM_TIME_MACRO time /**< Default time macro to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled */ |
| 1919 | //#define MBEDTLS_PLATFORM_TIME_TYPE_MACRO time_t /**< Default time macro to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1920 | //#define MBEDTLS_PLATFORM_FPRINTF_MACRO fprintf /**< Default fprintf macro to use, can be undefined */ |
| 1921 | //#define MBEDTLS_PLATFORM_PRINTF_MACRO printf /**< Default printf macro to use, can be undefined */ |
Manuel Pégourié-Gonnard | 6c0c8e0 | 2015-06-22 10:23:34 +0200 | [diff] [blame] | 1922 | /* Note: your snprintf must correclty zero-terminate the buffer! */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1923 | //#define MBEDTLS_PLATFORM_SNPRINTF_MACRO snprintf /**< Default snprintf macro to use, can be undefined */ |
Paul Bakker | cf0a9f9 | 2016-06-01 11:25:44 +0100 | [diff] [blame] | 1924 | //#define MBEDTLS_PLATFORM_NV_SEED_READ_MACRO mbedtls_platform_std_nv_seed_read /**< Default nv_seed_read function to use, can be undefined */ |
| 1925 | //#define MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO mbedtls_platform_std_nv_seed_write /**< Default nv_seed_write function to use, can be undefined */ |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 1926 | |
Paul Bakker | 088c5c5 | 2014-04-25 11:11:10 +0200 | [diff] [blame] | 1927 | /* SSL Cache options */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1928 | //#define MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */ |
| 1929 | //#define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */ |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 1930 | |
Paul Bakker | 088c5c5 | 2014-04-25 11:11:10 +0200 | [diff] [blame] | 1931 | /* SSL options */ |
Angus Gratton | d8213d0 | 2016-05-25 20:56:48 +1000 | [diff] [blame] | 1932 | |
| 1933 | /** \def MBEDTLS_SSL_MAX_CONTENT_LEN |
| 1934 | * |
| 1935 | * Maximum fragment length in bytes. |
| 1936 | * |
| 1937 | * Determines the size of both the incoming and outgoing TLS I/O buffers. |
| 1938 | * |
| 1939 | * Uncommenting MBEDTLS_SSL_IN_CONTENT_LEN and/or MBEDTLS_SSL_OUT_CONTENT_LEN |
| 1940 | * will override this length by setting maximum incoming and/or outgoing |
| 1941 | * fragment length, respectively. |
| 1942 | */ |
| 1943 | //#define MBEDTLS_SSL_MAX_CONTENT_LEN 16384 |
| 1944 | |
| 1945 | /** \def MBEDTLS_SSL_IN_CONTENT_LEN |
| 1946 | * |
| 1947 | * Maximum incoming fragment length in bytes. |
| 1948 | * |
| 1949 | * Uncomment to set the size of the inward TLS buffer independently of the |
| 1950 | * outward buffer. |
| 1951 | */ |
| 1952 | //#define MBEDTLS_SSL_IN_CONTENT_LEN 16384 |
| 1953 | |
| 1954 | /** \def MBEDTLS_SSL_OUT_CONTENT_LEN |
| 1955 | * |
| 1956 | * Maximum outgoing fragment length in bytes. |
| 1957 | * |
| 1958 | * Uncomment to set the size of the outward TLS buffer independently of the |
| 1959 | * inward buffer. |
| 1960 | * |
| 1961 | * It is possible to save RAM by setting a smaller outward buffer, while keeping |
| 1962 | * the default inward 16384 byte buffer to conform to the TLS specification. |
| 1963 | * |
| 1964 | * The minimum required outward buffer size is determined by the handshake |
| 1965 | * protocol's usage. Handshaking will fail if the outward buffer is too small. |
| 1966 | * The specific size requirement depends on the configured ciphers and any |
| 1967 | * certificate data which is sent during the handshake. |
| 1968 | * |
| 1969 | * For absolute minimum RAM usage, it's best to enable |
| 1970 | * MBEDTLS_SSL_MAX_FRAGMENT_LENGTH and reduce MBEDTLS_SSL_MAX_CONTENT_LEN. This |
| 1971 | * reduces both incoming and outgoing buffer sizes. However this is only |
| 1972 | * guaranteed if the other end of the connection also supports the TLS |
| 1973 | * max_fragment_len extension. Otherwise the connection may fail. |
| 1974 | */ |
| 1975 | //#define MBEDTLS_SSL_OUT_CONTENT_LEN 16384 |
| 1976 | |
Hanno Becker | e0b150f | 2018-08-21 15:51:03 +0100 | [diff] [blame] | 1977 | /** \def MBEDTLS_SSL_DTLS_MAX_BUFFERING |
| 1978 | * |
| 1979 | * Maximum number of heap-allocated bytes for the purpose of |
| 1980 | * DTLS handshake message reassembly and future message buffering. |
| 1981 | * |
Hanno Becker | 97a1c13 | 2018-08-28 14:42:15 +0100 | [diff] [blame] | 1982 | * This should be at least 9/8 * MBEDTLSSL_IN_CONTENT_LEN |
Hanno Becker | 2800751 | 2018-08-28 09:46:44 +0100 | [diff] [blame] | 1983 | * to account for a reassembled handshake message of maximum size, |
| 1984 | * together with its reassembly bitmap. |
| 1985 | * |
Hanno Becker | 97a1c13 | 2018-08-28 14:42:15 +0100 | [diff] [blame] | 1986 | * A value of 2 * MBEDTLS_SSL_IN_CONTENT_LEN (32768 by default) |
Hanno Becker | 2800751 | 2018-08-28 09:46:44 +0100 | [diff] [blame] | 1987 | * should be sufficient for all practical situations as it allows |
| 1988 | * to reassembly a large handshake message (such as a certificate) |
| 1989 | * while buffering multiple smaller handshake messages. |
| 1990 | * |
Hanno Becker | e0b150f | 2018-08-21 15:51:03 +0100 | [diff] [blame] | 1991 | */ |
Hanno Becker | 159a37f | 2018-08-24 15:07:29 +0100 | [diff] [blame] | 1992 | //#define MBEDTLS_SSL_DTLS_MAX_BUFFERING 32768 |
Hanno Becker | e0b150f | 2018-08-21 15:51:03 +0100 | [diff] [blame] | 1993 | |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 1994 | //#define MBEDTLS_SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */ |
| 1995 | //#define MBEDTLS_PSK_MAX_LEN 32 /**< Max size of TLS pre-shared keys, in bytes (default 256 bits) */ |
| 1996 | //#define MBEDTLS_SSL_COOKIE_TIMEOUT 60 /**< Default expiration delay of DTLS cookies, in seconds if HAVE_TIME, or in number of cookies issued */ |
Paul Bakker | 9bcf16c | 2013-06-24 19:31:17 +0200 | [diff] [blame] | 1997 | |
Manuel Pégourié-Gonnard | dfc7df0 | 2014-06-30 17:59:55 +0200 | [diff] [blame] | 1998 | /** |
| 1999 | * Complete list of ciphersuites to use, in order of preference. |
| 2000 | * |
| 2001 | * \warning No dependency checking is done on that field! This option can only |
| 2002 | * be used to restrict the set of available ciphersuites. It is your |
| 2003 | * responsibility to make sure the needed modules are active. |
| 2004 | * |
| 2005 | * Use this to save a few hundred bytes of ROM (default ordering of all |
| 2006 | * available ciphersuites) and a few to a few hundred bytes of RAM. |
| 2007 | * |
| 2008 | * The value below is only an example, not the default. |
| 2009 | */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 2010 | //#define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 |
Manuel Pégourié-Gonnard | dfc7df0 | 2014-06-30 17:59:55 +0200 | [diff] [blame] | 2011 | |
Manuel Pégourié-Gonnard | fd6c85c | 2014-11-20 16:34:20 +0100 | [diff] [blame] | 2012 | /* X509 options */ |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 2013 | //#define MBEDTLS_X509_MAX_INTERMEDIATE_CA 8 /**< Maximum number of intermediate CAs in a verification chain. */ |
Andres AG | f911319 | 2016-09-02 14:06:04 +0100 | [diff] [blame] | 2014 | //#define MBEDTLS_X509_MAX_FILE_PATH_LEN 512 /**< Maximum length of a path/filename string in bytes including the null terminator character ('\0'). */ |
Manuel Pégourié-Gonnard | fd6c85c | 2014-11-20 16:34:20 +0100 | [diff] [blame] | 2015 | |
Gilles Peskine | 5e79cb3 | 2017-05-04 16:17:21 +0200 | [diff] [blame] | 2016 | /** |
Gilles Peskine | 5d2511c | 2017-05-12 13:16:40 +0200 | [diff] [blame] | 2017 | * Allow SHA-1 in the default TLS configuration for certificate signing. |
| 2018 | * Without this build-time option, SHA-1 support must be activated explicitly |
| 2019 | * through mbedtls_ssl_conf_cert_profile. Turning on this option is not |
Hanno Becker | bbca8c5 | 2017-09-25 14:53:51 +0100 | [diff] [blame] | 2020 | * recommended because of it is possible to generate SHA-1 collisions, however |
Gilles Peskine | 5d2511c | 2017-05-12 13:16:40 +0200 | [diff] [blame] | 2021 | * this may be safe for legacy infrastructure where additional controls apply. |
Hanno Becker | bbca8c5 | 2017-09-25 14:53:51 +0100 | [diff] [blame] | 2022 | * |
| 2023 | * \warning SHA-1 is considered a weak message digest and its use constitutes |
| 2024 | * a security risk. If possible, we recommend avoiding dependencies |
| 2025 | * on it, and considering stronger message digests instead. |
| 2026 | * |
Gilles Peskine | 5e79cb3 | 2017-05-04 16:17:21 +0200 | [diff] [blame] | 2027 | */ |
Gilles Peskine | 5d2511c | 2017-05-12 13:16:40 +0200 | [diff] [blame] | 2028 | // #define MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_CERTIFICATES |
| 2029 | |
| 2030 | /** |
| 2031 | * Allow SHA-1 in the default TLS configuration for TLS 1.2 handshake |
| 2032 | * signature and ciphersuite selection. Without this build-time option, SHA-1 |
| 2033 | * support must be activated explicitly through mbedtls_ssl_conf_sig_hashes. |
| 2034 | * The use of SHA-1 in TLS <= 1.1 and in HMAC-SHA-1 is always allowed by |
| 2035 | * default. At the time of writing, there is no practical attack on the use |
| 2036 | * of SHA-1 in handshake signatures, hence this option is turned on by default |
Hanno Becker | bbca8c5 | 2017-09-25 14:53:51 +0100 | [diff] [blame] | 2037 | * to preserve compatibility with existing peers, but the general |
| 2038 | * warning applies nonetheless: |
| 2039 | * |
| 2040 | * \warning SHA-1 is considered a weak message digest and its use constitutes |
| 2041 | * a security risk. If possible, we recommend avoiding dependencies |
| 2042 | * on it, and considering stronger message digests instead. |
| 2043 | * |
Gilles Peskine | 5d2511c | 2017-05-12 13:16:40 +0200 | [diff] [blame] | 2044 | */ |
| 2045 | #define MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_KEY_EXCHANGE |
Gilles Peskine | 5e79cb3 | 2017-05-04 16:17:21 +0200 | [diff] [blame] | 2046 | |
Andres Amaya Garcia | b1262a3 | 2017-10-25 09:51:14 +0100 | [diff] [blame] | 2047 | /** |
Andres Amaya Garcia | b1262a3 | 2017-10-25 09:51:14 +0100 | [diff] [blame] | 2048 | * Uncomment the macro to let mbed TLS use your alternate implementation of |
Andres Amaya Garcia | c58787f | 2018-04-17 10:21:45 -0500 | [diff] [blame] | 2049 | * mbedtls_platform_zeroize(). This replaces the default implementation in |
| 2050 | * platform_util.c. |
Andres Amaya Garcia | 6606d5c | 2018-03-08 20:25:29 +0000 | [diff] [blame] | 2051 | * |
Andres Amaya Garcia | c58787f | 2018-04-17 10:21:45 -0500 | [diff] [blame] | 2052 | * mbedtls_platform_zeroize() is a widely used function across the library to |
| 2053 | * zero a block of memory. The implementation is expected to be secure in the |
| 2054 | * sense that it has been written to prevent the compiler from removing calls |
| 2055 | * to mbedtls_platform_zeroize() as part of redundant code elimination |
| 2056 | * optimizations. However, it is difficult to guarantee that calls to |
| 2057 | * mbedtls_platform_zeroize() will not be optimized by the compiler as older |
| 2058 | * versions of the C language standards do not provide a secure implementation |
| 2059 | * of memset(). Therefore, MBEDTLS_PLATFORM_ZEROIZE_ALT enables users to |
| 2060 | * configure their own implementation of mbedtls_platform_zeroize(), for |
Andres Amaya Garcia | d0ef468 | 2018-04-24 08:31:34 -0500 | [diff] [blame] | 2061 | * example by using directives specific to their compiler, features from newer |
| 2062 | * C standards (e.g using memset_s() in C11) or calling a secure memset() from |
Andres Amaya Garcia | c58787f | 2018-04-17 10:21:45 -0500 | [diff] [blame] | 2063 | * their system (e.g explicit_bzero() in BSD). |
Andres Amaya Garcia | b1262a3 | 2017-10-25 09:51:14 +0100 | [diff] [blame] | 2064 | */ |
Andres Amaya Garcia | c58787f | 2018-04-17 10:21:45 -0500 | [diff] [blame] | 2065 | //#define MBEDTLS_PLATFORM_ZEROIZE_ALT |
Andres Amaya Garcia | b1262a3 | 2017-10-25 09:51:14 +0100 | [diff] [blame] | 2066 | |
Simon Butcher | 30b5f97 | 2016-06-08 19:00:23 +0100 | [diff] [blame] | 2067 | /* \} name SECTION: Customisation configuration options */ |
Manuel Pégourié-Gonnard | 43569a9 | 2015-07-31 15:37:29 +0200 | [diff] [blame] | 2068 | |
Simon Butcher | b2c81b1 | 2016-06-23 13:56:06 +0100 | [diff] [blame] | 2069 | /* Target and application specific configurations */ |
Ron Eldor | 6fd941f | 2017-05-14 16:17:33 +0300 | [diff] [blame] | 2070 | //#define YOTTA_CFG_MBEDTLS_TARGET_CONFIG_FILE "target_config.h" |
Simon Butcher | 1d46a2d | 2016-07-11 10:17:03 +0100 | [diff] [blame] | 2071 | |
| 2072 | #if defined(TARGET_LIKE_MBED) && defined(YOTTA_CFG_MBEDTLS_TARGET_CONFIG_FILE) |
| 2073 | #include YOTTA_CFG_MBEDTLS_TARGET_CONFIG_FILE |
| 2074 | #endif |
Simon Butcher | b2c81b1 | 2016-06-23 13:56:06 +0100 | [diff] [blame] | 2075 | |
Manuel Pégourié-Gonnard | 32da9f6 | 2015-07-31 15:52:30 +0200 | [diff] [blame] | 2076 | /* |
| 2077 | * Allow user to override any previous default. |
| 2078 | * |
| 2079 | * Use two macro names for that, as: |
| 2080 | * - with yotta the prefix YOTTA_CFG_ is forced |
| 2081 | * - without yotta is looks weird to have a YOTTA prefix. |
| 2082 | */ |
| 2083 | #if defined(YOTTA_CFG_MBEDTLS_USER_CONFIG_FILE) |
| 2084 | #include YOTTA_CFG_MBEDTLS_USER_CONFIG_FILE |
| 2085 | #elif defined(MBEDTLS_USER_CONFIG_FILE) |
| 2086 | #include MBEDTLS_USER_CONFIG_FILE |
| 2087 | #endif |
| 2088 | |
Gilles Peskine | 66920ce | 2018-03-03 21:49:49 +0100 | [diff] [blame] | 2089 | #include "mbedtls/check_config.h" |
Manuel Pégourié-Gonnard | 92ac76f | 2013-12-16 17:12:53 +0100 | [diff] [blame] | 2090 | |
Manuel Pégourié-Gonnard | 2cf5a7c | 2015-04-08 12:49:31 +0200 | [diff] [blame] | 2091 | #endif /* MBEDTLS_CONFIG_H */ |