1 /** 2 * \file config-ccm-psk-tls1_2.h 3 * 4 * \brief Minimal configuration for TLS 1.2 with PSK and AES-CCM ciphersuites 5 */ 6 /* 7 * Copyright The Mbed TLS Contributors 8 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 9 */ 10 /* 11 * Minimal configuration for TLS 1.2 with PSK and AES-CCM ciphersuites 12 * 13 * Distinguishing features: 14 * - Optimized for small code size, low bandwidth (on a reliable transport), 15 * and low RAM usage. 16 * - No asymmetric cryptography (no certificates, no Diffie-Hellman key 17 * exchange). 18 * - Fully modern and secure (provided the pre-shared keys are generated and 19 * stored securely). 20 * - Very low record overhead with CCM-8. 21 * 22 * See README.txt for usage instructions. 23 */ 24 25 /* Mbed TLS modules */ 26 #define MBEDTLS_NET_C 27 #define MBEDTLS_SSL_CLI_C 28 #define MBEDTLS_SSL_SRV_C 29 #define MBEDTLS_SSL_TLS_C 30 31 /* TLS protocol feature support */ 32 #define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED 33 #define MBEDTLS_SSL_PROTO_TLS1_2 34 35 /* 36 * Use only CCM_8 ciphersuites, and 37 * save ROM and a few bytes of RAM by specifying our own ciphersuite list 38 */ 39 #define MBEDTLS_SSL_CIPHERSUITES \ 40 MBEDTLS_TLS_PSK_WITH_AES_256_CCM_8, \ 41 MBEDTLS_TLS_PSK_WITH_AES_128_CCM_8 42 43 /* 44 * Save RAM at the expense of interoperability: do this only if you control 45 * both ends of the connection! (See comments in "mbedtls/ssl.h".) 46 * The optimal size here depends on the typical size of records. 47 */ 48 #define MBEDTLS_SSL_IN_CONTENT_LEN 1024 49 #define MBEDTLS_SSL_OUT_CONTENT_LEN 1024 50 51 52 /* Save some RAM by adjusting to your exact needs */ 53 #define MBEDTLS_PSK_MAX_LEN 16 /* 128-bits keys are generally enough */ 54 55 /* Error messages and TLS debugging traces 56 * (huge code size increase, needed for tests/ssl-opt.sh) */ 57 //#define MBEDTLS_DEBUG_C 58 //#define MBEDTLS_ERROR_C 59