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 | 684e9dc | 2013-09-20 15:11:44 +0200 | [diff] [blame] | 23 | /* PolarSSL feature support */ |
| 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 |
| 28 | |
| 29 | /* PolarSSL modules */ |
| 30 | #define POLARSSL_AES_C |
| 31 | #define POLARSSL_ASN1_PARSE_C |
| 32 | #define POLARSSL_ASN1_WRITE_C |
| 33 | #define POLARSSL_BIGNUM_C |
| 34 | #define POLARSSL_CIPHER_C |
| 35 | #define POLARSSL_CTR_DRBG_C |
| 36 | #define POLARSSL_ECDH_C |
| 37 | #define POLARSSL_ECDSA_C |
| 38 | #define POLARSSL_ECP_C |
| 39 | #define POLARSSL_ENTROPY_C |
| 40 | #define POLARSSL_GCM_C |
| 41 | #define POLARSSL_MD_C |
| 42 | #define POLARSSL_NET_C |
| 43 | #define POLARSSL_OID_C |
| 44 | #define POLARSSL_PK_C |
| 45 | #define POLARSSL_PK_PARSE_C |
| 46 | #define POLARSSL_SHA256_C |
| 47 | #define POLARSSL_SHA512_C |
| 48 | #define POLARSSL_SSL_CLI_C |
| 49 | #define POLARSSL_SSL_SRV_C |
| 50 | #define POLARSSL_SSL_TLS_C |
Manuel Pégourié-Gonnard | 684e9dc | 2013-09-20 15:11:44 +0200 | [diff] [blame] | 51 | #define POLARSSL_X509_CRT_PARSE_C |
| 52 | #define POLARSSL_X509_USE_C |
| 53 | |
| 54 | /* For test certificates */ |
| 55 | #define POLARSSL_BASE64_C |
| 56 | #define POLARSSL_CERTS_C |
| 57 | #define POLARSSL_PEM_PARSE_C |
| 58 | |
Manuel Pégourié-Gonnard | e38eb0b | 2014-06-24 17:30:05 +0200 | [diff] [blame] | 59 | /* Save RAM at the expense of ROM */ |
| 60 | #define POLARSSL_AES_ROM_TABLES |
| 61 | |
| 62 | /* Save RAM by adjusting to our exact needs */ |
Manuel Pégourié-Gonnard | e38eb0b | 2014-06-24 17:30:05 +0200 | [diff] [blame] | 63 | #define POLARSSL_ECP_MAX_BITS 384 |
Manuel Pégourié-Gonnard | 417670a | 2014-06-24 17:50:22 +0200 | [diff] [blame] | 64 | #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] | 65 | |
| 66 | /* Save RAM at the expense of speed, see ecp.h */ |
| 67 | #define POLARSSL_ECP_WINDOW_SIZE 2 |
| 68 | #define POLARSSL_ECP_FIXED_POINT_OPTIM 0 |
| 69 | |
| 70 | /* Uncomment for a significant speed benefit at the expense of some ROM */ |
| 71 | //#define POLARSSL_ECP_NIST_OPTIM |
| 72 | |
| 73 | /* |
| 74 | * 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] | 75 | * 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] | 76 | * Minimum is 2 for the entropy test suite. |
| 77 | */ |
| 78 | #define ENTROPY_MAX_SOURCES 2 |
| 79 | |
Manuel Pégourié-Gonnard | cc10f4d | 2014-06-30 19:22:44 +0200 | [diff] [blame^] | 80 | /* Save ROM and a few bytes of RAM by specifying our own ciphersuite list */ |
| 81 | #define SSL_CIPHERSUITES \ |
| 82 | TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, \ |
| 83 | TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 |
| 84 | |
Manuel Pégourié-Gonnard | e38eb0b | 2014-06-24 17:30:05 +0200 | [diff] [blame] | 85 | /* |
| 86 | * Save RAM at the expense of interoperability: do this only if you control |
| 87 | * both ends of the connection! (See coments in "polarssl/ssl.h".) |
| 88 | * The minimum size here depends on the certificate chain used as well as the |
| 89 | * typical size of records. |
| 90 | */ |
| 91 | #define SSL_MAX_CONTENT_LEN 1024 |
Manuel Pégourié-Gonnard | 684e9dc | 2013-09-20 15:11:44 +0200 | [diff] [blame] | 92 | |
Manuel Pégourié-Gonnard | 725e7f4 | 2014-06-23 20:08:39 +0200 | [diff] [blame] | 93 | #include "polarssl/check_config.h" |
Manuel Pégourié-Gonnard | 14d5595 | 2014-04-30 12:35:08 +0200 | [diff] [blame] | 94 | |
Manuel Pégourié-Gonnard | 0bc1f23 | 2014-04-30 11:53:50 +0200 | [diff] [blame] | 95 | #endif /* POLARSSL_CONFIG_H */ |