Manuel Pégourié-Gonnard | 684e9dc | 2013-09-20 15:11:44 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Minimal configuration for TLS NSA Suite B Profile (RFC 6460) |
| 3 | * |
Manuel Pégourié-Gonnard | e38eb0b | 2014-06-24 17:30:05 +0200 | [diff] [blame] | 4 | * Distinguishing features: |
| 5 | * - no RSA or classic DH, fully based on ECC |
| 6 | * - optimized for low RAM usage |
| 7 | * |
| 8 | * Possible improvements: |
| 9 | * - if 128-bit security is enough, disable secp384r1 and SHA-512 |
| 10 | * - use embedded certs in DER format and disable PEM_PARSE_C and BASE64_C |
| 11 | * |
Manuel Pégourié-Gonnard | 0bc1f23 | 2014-04-30 11:53:50 +0200 | [diff] [blame] | 12 | * See README.txt for usage instructions. |
Manuel Pégourié-Gonnard | 684e9dc | 2013-09-20 15:11:44 +0200 | [diff] [blame] | 13 | */ |
| 14 | |
Manuel Pégourié-Gonnard | 0bc1f23 | 2014-04-30 11:53:50 +0200 | [diff] [blame] | 15 | #ifndef POLARSSL_CONFIG_H |
| 16 | #define POLARSSL_CONFIG_H |
| 17 | |
| 18 | /* System support */ |
| 19 | #define POLARSSL_HAVE_ASM |
| 20 | #define POLARSSL_HAVE_TIME |
| 21 | #define POLARSSL_HAVE_IPV6 |
| 22 | |
Manuel Pégourié-Gonnard | b4fe3cb | 2015-01-22 16:11:05 +0000 | [diff] [blame] | 23 | /* mbed TLS feature support */ |
Manuel Pégourié-Gonnard | 684e9dc | 2013-09-20 15:11:44 +0200 | [diff] [blame] | 24 | #define POLARSSL_ECP_DP_SECP256R1_ENABLED |
| 25 | #define POLARSSL_ECP_DP_SECP384R1_ENABLED |
| 26 | #define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED |
| 27 | #define POLARSSL_SSL_PROTO_TLS1_2 |
Manuel Pégourié-Gonnard | 86b2908 | 2014-11-06 02:28:34 +0100 | [diff] [blame] | 28 | #define POLARSSL_SSL_DISABLE_RENEGOTIATION |
Manuel Pégourié-Gonnard | 684e9dc | 2013-09-20 15:11:44 +0200 | [diff] [blame] | 29 | |
Manuel Pégourié-Gonnard | b4fe3cb | 2015-01-22 16:11:05 +0000 | [diff] [blame] | 30 | /* mbed TLS modules */ |
Manuel Pégourié-Gonnard | 684e9dc | 2013-09-20 15:11:44 +0200 | [diff] [blame] | 31 | #define POLARSSL_AES_C |
| 32 | #define POLARSSL_ASN1_PARSE_C |
| 33 | #define POLARSSL_ASN1_WRITE_C |
| 34 | #define POLARSSL_BIGNUM_C |
| 35 | #define POLARSSL_CIPHER_C |
| 36 | #define POLARSSL_CTR_DRBG_C |
| 37 | #define POLARSSL_ECDH_C |
| 38 | #define POLARSSL_ECDSA_C |
| 39 | #define POLARSSL_ECP_C |
| 40 | #define POLARSSL_ENTROPY_C |
| 41 | #define POLARSSL_GCM_C |
| 42 | #define POLARSSL_MD_C |
| 43 | #define POLARSSL_NET_C |
| 44 | #define POLARSSL_OID_C |
| 45 | #define POLARSSL_PK_C |
| 46 | #define POLARSSL_PK_PARSE_C |
| 47 | #define POLARSSL_SHA256_C |
| 48 | #define POLARSSL_SHA512_C |
| 49 | #define POLARSSL_SSL_CLI_C |
| 50 | #define POLARSSL_SSL_SRV_C |
| 51 | #define POLARSSL_SSL_TLS_C |
Manuel Pégourié-Gonnard | 684e9dc | 2013-09-20 15:11:44 +0200 | [diff] [blame] | 52 | #define POLARSSL_X509_CRT_PARSE_C |
| 53 | #define POLARSSL_X509_USE_C |
| 54 | |
| 55 | /* For test certificates */ |
| 56 | #define POLARSSL_BASE64_C |
| 57 | #define POLARSSL_CERTS_C |
| 58 | #define POLARSSL_PEM_PARSE_C |
| 59 | |
Manuel Pégourié-Gonnard | e38eb0b | 2014-06-24 17:30:05 +0200 | [diff] [blame] | 60 | /* Save RAM at the expense of ROM */ |
| 61 | #define POLARSSL_AES_ROM_TABLES |
| 62 | |
| 63 | /* Save RAM by adjusting to our exact needs */ |
Manuel Pégourié-Gonnard | e38eb0b | 2014-06-24 17:30:05 +0200 | [diff] [blame] | 64 | #define POLARSSL_ECP_MAX_BITS 384 |
Manuel Pégourié-Gonnard | 417670a | 2014-06-24 17:50:22 +0200 | [diff] [blame] | 65 | #define POLARSSL_MPI_MAX_SIZE 48 // 384 bits is 48 bytes |
Manuel Pégourié-Gonnard | e38eb0b | 2014-06-24 17:30:05 +0200 | [diff] [blame] | 66 | |
| 67 | /* Save RAM at the expense of speed, see ecp.h */ |
| 68 | #define POLARSSL_ECP_WINDOW_SIZE 2 |
| 69 | #define POLARSSL_ECP_FIXED_POINT_OPTIM 0 |
| 70 | |
Manuel Pégourié-Gonnard | 0de7f94 | 2014-12-01 12:21:01 +0100 | [diff] [blame] | 71 | /* Significant speed benefit at the expense of some ROM */ |
| 72 | #define POLARSSL_ECP_NIST_OPTIM |
Manuel Pégourié-Gonnard | e38eb0b | 2014-06-24 17:30:05 +0200 | [diff] [blame] | 73 | |
| 74 | /* |
| 75 | * You should adjust this to the exact number of sources you're using: default |
Manuel Pégourié-Gonnard | 66e20c6 | 2014-06-24 17:47:40 +0200 | [diff] [blame] | 76 | * is the "platform_entropy_poll" source, but you may want to add other ones. |
Manuel Pégourié-Gonnard | e38eb0b | 2014-06-24 17:30:05 +0200 | [diff] [blame] | 77 | * Minimum is 2 for the entropy test suite. |
| 78 | */ |
| 79 | #define ENTROPY_MAX_SOURCES 2 |
| 80 | |
Manuel Pégourié-Gonnard | cc10f4d | 2014-06-30 19:22:44 +0200 | [diff] [blame] | 81 | /* Save ROM and a few bytes of RAM by specifying our own ciphersuite list */ |
| 82 | #define SSL_CIPHERSUITES \ |
| 83 | TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, \ |
| 84 | TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 |
| 85 | |
Manuel Pégourié-Gonnard | e38eb0b | 2014-06-24 17:30:05 +0200 | [diff] [blame] | 86 | /* |
| 87 | * Save RAM at the expense of interoperability: do this only if you control |
| 88 | * both ends of the connection! (See coments in "polarssl/ssl.h".) |
| 89 | * The minimum size here depends on the certificate chain used as well as the |
| 90 | * typical size of records. |
| 91 | */ |
| 92 | #define SSL_MAX_CONTENT_LEN 1024 |
Manuel Pégourié-Gonnard | 684e9dc | 2013-09-20 15:11:44 +0200 | [diff] [blame] | 93 | |
Manuel Pégourié-Gonnard | 725e7f4 | 2014-06-23 20:08:39 +0200 | [diff] [blame] | 94 | #include "polarssl/check_config.h" |
Manuel Pégourié-Gonnard | 14d5595 | 2014-04-30 12:35:08 +0200 | [diff] [blame] | 95 | |
Manuel Pégourié-Gonnard | 0bc1f23 | 2014-04-30 11:53:50 +0200 | [diff] [blame] | 96 | #endif /* POLARSSL_CONFIG_H */ |