• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * \file config-thread.h
3  *
4  * \brief Minimal configuration for using TLS as part of Thread
5  */
6 /*
7  *  Copyright The Mbed TLS Contributors
8  *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
9  */
10 
11 /*
12  * Minimal configuration for using TLS a part of Thread
13  * http://threadgroup.org/
14  *
15  * Distinguishing features:
16  * - no RSA or classic DH, fully based on ECC
17  * - no X.509
18  * - support for experimental EC J-PAKE key exchange
19  *
20  * See README.txt for usage instructions.
21  */
22 
23 #ifndef MBEDTLS_CONFIG_H
24 #define MBEDTLS_CONFIG_H
25 
26 /* System support */
27 #define MBEDTLS_HAVE_ASM
28 
29 /* Mbed TLS feature support */
30 #define MBEDTLS_AES_ROM_TABLES
31 #define MBEDTLS_ECP_DP_SECP256R1_ENABLED
32 #define MBEDTLS_ECP_NIST_OPTIM
33 #define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
34 #define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
35 #define MBEDTLS_SSL_PROTO_TLS1_2
36 #define MBEDTLS_SSL_PROTO_DTLS
37 #define MBEDTLS_SSL_DTLS_ANTI_REPLAY
38 #define MBEDTLS_SSL_DTLS_HELLO_VERIFY
39 #define MBEDTLS_SSL_EXPORT_KEYS
40 
41 /* Mbed TLS modules */
42 #define MBEDTLS_AES_C
43 #define MBEDTLS_ASN1_PARSE_C
44 #define MBEDTLS_ASN1_WRITE_C
45 #define MBEDTLS_BIGNUM_C
46 #define MBEDTLS_CCM_C
47 #define MBEDTLS_CIPHER_C
48 #define MBEDTLS_CTR_DRBG_C
49 #define MBEDTLS_CMAC_C
50 #define MBEDTLS_ECJPAKE_C
51 #define MBEDTLS_ECP_C
52 #define MBEDTLS_ENTROPY_C
53 #define MBEDTLS_HMAC_DRBG_C
54 #define MBEDTLS_MD_C
55 #define MBEDTLS_OID_C
56 #define MBEDTLS_PK_C
57 #define MBEDTLS_PK_PARSE_C
58 #define MBEDTLS_SHA256_C
59 #define MBEDTLS_SSL_COOKIE_C
60 #define MBEDTLS_SSL_CLI_C
61 #define MBEDTLS_SSL_SRV_C
62 #define MBEDTLS_SSL_TLS_C
63 
64 /* For tests using ssl-opt.sh */
65 #define MBEDTLS_NET_C
66 #define MBEDTLS_TIMING_C
67 
68 /* Save RAM at the expense of ROM */
69 #define MBEDTLS_AES_ROM_TABLES
70 
71 /* Save RAM by adjusting to our exact needs */
72 #define MBEDTLS_MPI_MAX_SIZE              32 // 32 bytes for a 256-bit elliptic curve
73 
74 /* Save ROM and a few bytes of RAM by specifying our own ciphersuite list */
75 #define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8
76 
77 /* These defines are present so that the config modifying scripts can enable
78  * them during tests/scripts/test-ref-configs.pl */
79 //#define MBEDTLS_USE_PSA_CRYPTO
80 //#define MBEDTLS_PSA_CRYPTO_C
81 
82 #include "mbedtls/check_config.h"
83 
84 #endif /* MBEDTLS_CONFIG_H */
85