quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

config-thread.h (2062B)


      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 /* System support */
     24 #define MBEDTLS_HAVE_ASM
     25 
     26 /* Mbed TLS feature support */
     27 #define MBEDTLS_AES_ROM_TABLES
     28 #define MBEDTLS_ECP_DP_SECP256R1_ENABLED
     29 #define MBEDTLS_ECP_NIST_OPTIM
     30 #define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
     31 #define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
     32 #define MBEDTLS_SSL_PROTO_TLS1_2
     33 #define MBEDTLS_SSL_PROTO_DTLS
     34 #define MBEDTLS_SSL_DTLS_ANTI_REPLAY
     35 #define MBEDTLS_SSL_DTLS_HELLO_VERIFY
     36 
     37 /* Mbed TLS modules */
     38 #define MBEDTLS_AES_C
     39 #define MBEDTLS_ASN1_PARSE_C
     40 #define MBEDTLS_ASN1_WRITE_C
     41 #define MBEDTLS_BIGNUM_C
     42 #define MBEDTLS_CCM_C
     43 #define MBEDTLS_CIPHER_C
     44 #define MBEDTLS_CTR_DRBG_C
     45 #define MBEDTLS_CMAC_C
     46 #define MBEDTLS_ECJPAKE_C
     47 #define MBEDTLS_ECP_C
     48 #define MBEDTLS_ENTROPY_C
     49 #define MBEDTLS_HMAC_DRBG_C
     50 #define MBEDTLS_MD_C
     51 #define MBEDTLS_OID_C
     52 #define MBEDTLS_PK_C
     53 #define MBEDTLS_PK_PARSE_C
     54 #define MBEDTLS_SHA256_C
     55 #define MBEDTLS_SSL_COOKIE_C
     56 #define MBEDTLS_SSL_CLI_C
     57 #define MBEDTLS_SSL_SRV_C
     58 #define MBEDTLS_SSL_TLS_C
     59 
     60 /* For tests using ssl-opt.sh */
     61 #define MBEDTLS_NET_C
     62 #define MBEDTLS_TIMING_C
     63 
     64 /* Save RAM at the expense of ROM */
     65 #define MBEDTLS_AES_ROM_TABLES
     66 
     67 /* Save RAM by adjusting to our exact needs */
     68 #define MBEDTLS_MPI_MAX_SIZE              32 // 256-bit EC curve = 32 bytes
     69 
     70 /* Save ROM and a few bytes of RAM by specifying our own ciphersuite list */
     71 #define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8
     72 
     73 /* These defines are present so that the config modifying scripts can enable
     74  * them during tests/scripts/test-ref-configs.pl */
     75 //#define MBEDTLS_USE_PSA_CRYPTO
     76 //#define MBEDTLS_PSA_CRYPTO_C