mbed TLS Build
Dependents: Encrypt_Decrypt1 mbed_blink_tls encrypt encrypt
configs/config-suite-b.h@0:cdf462088d13, 2017-01-05 (annotated)
- Committer:
- markrad
- Date:
- Thu Jan 05 00:18:44 2017 +0000
- Revision:
- 0:cdf462088d13
Initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
markrad | 0:cdf462088d13 | 1 | /* |
markrad | 0:cdf462088d13 | 2 | * Minimal configuration for TLS NSA Suite B Profile (RFC 6460) |
markrad | 0:cdf462088d13 | 3 | * |
markrad | 0:cdf462088d13 | 4 | * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved |
markrad | 0:cdf462088d13 | 5 | * SPDX-License-Identifier: Apache-2.0 |
markrad | 0:cdf462088d13 | 6 | * |
markrad | 0:cdf462088d13 | 7 | * Licensed under the Apache License, Version 2.0 (the "License"); you may |
markrad | 0:cdf462088d13 | 8 | * not use this file except in compliance with the License. |
markrad | 0:cdf462088d13 | 9 | * You may obtain a copy of the License at |
markrad | 0:cdf462088d13 | 10 | * |
markrad | 0:cdf462088d13 | 11 | * http://www.apache.org/licenses/LICENSE-2.0 |
markrad | 0:cdf462088d13 | 12 | * |
markrad | 0:cdf462088d13 | 13 | * Unless required by applicable law or agreed to in writing, software |
markrad | 0:cdf462088d13 | 14 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
markrad | 0:cdf462088d13 | 15 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
markrad | 0:cdf462088d13 | 16 | * See the License for the specific language governing permissions and |
markrad | 0:cdf462088d13 | 17 | * limitations under the License. |
markrad | 0:cdf462088d13 | 18 | * |
markrad | 0:cdf462088d13 | 19 | * This file is part of mbed TLS (https://tls.mbed.org) |
markrad | 0:cdf462088d13 | 20 | */ |
markrad | 0:cdf462088d13 | 21 | /* |
markrad | 0:cdf462088d13 | 22 | * Minimal configuration for TLS NSA Suite B Profile (RFC 6460) |
markrad | 0:cdf462088d13 | 23 | * |
markrad | 0:cdf462088d13 | 24 | * Distinguishing features: |
markrad | 0:cdf462088d13 | 25 | * - no RSA or classic DH, fully based on ECC |
markrad | 0:cdf462088d13 | 26 | * - optimized for low RAM usage |
markrad | 0:cdf462088d13 | 27 | * |
markrad | 0:cdf462088d13 | 28 | * Possible improvements: |
markrad | 0:cdf462088d13 | 29 | * - if 128-bit security is enough, disable secp384r1 and SHA-512 |
markrad | 0:cdf462088d13 | 30 | * - use embedded certs in DER format and disable PEM_PARSE_C and BASE64_C |
markrad | 0:cdf462088d13 | 31 | * |
markrad | 0:cdf462088d13 | 32 | * See README.txt for usage instructions. |
markrad | 0:cdf462088d13 | 33 | */ |
markrad | 0:cdf462088d13 | 34 | |
markrad | 0:cdf462088d13 | 35 | #ifndef MBEDTLS_CONFIG_H |
markrad | 0:cdf462088d13 | 36 | #define MBEDTLS_CONFIG_H |
markrad | 0:cdf462088d13 | 37 | |
markrad | 0:cdf462088d13 | 38 | /* System support */ |
markrad | 0:cdf462088d13 | 39 | #define MBEDTLS_HAVE_ASM |
markrad | 0:cdf462088d13 | 40 | #define MBEDTLS_HAVE_TIME |
markrad | 0:cdf462088d13 | 41 | |
markrad | 0:cdf462088d13 | 42 | /* mbed TLS feature support */ |
markrad | 0:cdf462088d13 | 43 | #define MBEDTLS_ECP_DP_SECP256R1_ENABLED |
markrad | 0:cdf462088d13 | 44 | #define MBEDTLS_ECP_DP_SECP384R1_ENABLED |
markrad | 0:cdf462088d13 | 45 | #define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED |
markrad | 0:cdf462088d13 | 46 | #define MBEDTLS_SSL_PROTO_TLS1_2 |
markrad | 0:cdf462088d13 | 47 | |
markrad | 0:cdf462088d13 | 48 | /* mbed TLS modules */ |
markrad | 0:cdf462088d13 | 49 | #define MBEDTLS_AES_C |
markrad | 0:cdf462088d13 | 50 | #define MBEDTLS_ASN1_PARSE_C |
markrad | 0:cdf462088d13 | 51 | #define MBEDTLS_ASN1_WRITE_C |
markrad | 0:cdf462088d13 | 52 | #define MBEDTLS_BIGNUM_C |
markrad | 0:cdf462088d13 | 53 | #define MBEDTLS_CIPHER_C |
markrad | 0:cdf462088d13 | 54 | #define MBEDTLS_CTR_DRBG_C |
markrad | 0:cdf462088d13 | 55 | #define MBEDTLS_ECDH_C |
markrad | 0:cdf462088d13 | 56 | #define MBEDTLS_ECDSA_C |
markrad | 0:cdf462088d13 | 57 | #define MBEDTLS_ECP_C |
markrad | 0:cdf462088d13 | 58 | #define MBEDTLS_ENTROPY_C |
markrad | 0:cdf462088d13 | 59 | #define MBEDTLS_GCM_C |
markrad | 0:cdf462088d13 | 60 | #define MBEDTLS_MD_C |
markrad | 0:cdf462088d13 | 61 | #define MBEDTLS_NET_C |
markrad | 0:cdf462088d13 | 62 | #define MBEDTLS_OID_C |
markrad | 0:cdf462088d13 | 63 | #define MBEDTLS_PK_C |
markrad | 0:cdf462088d13 | 64 | #define MBEDTLS_PK_PARSE_C |
markrad | 0:cdf462088d13 | 65 | #define MBEDTLS_SHA256_C |
markrad | 0:cdf462088d13 | 66 | #define MBEDTLS_SHA512_C |
markrad | 0:cdf462088d13 | 67 | #define MBEDTLS_SSL_CLI_C |
markrad | 0:cdf462088d13 | 68 | #define MBEDTLS_SSL_SRV_C |
markrad | 0:cdf462088d13 | 69 | #define MBEDTLS_SSL_TLS_C |
markrad | 0:cdf462088d13 | 70 | #define MBEDTLS_X509_CRT_PARSE_C |
markrad | 0:cdf462088d13 | 71 | #define MBEDTLS_X509_USE_C |
markrad | 0:cdf462088d13 | 72 | |
markrad | 0:cdf462088d13 | 73 | /* For test certificates */ |
markrad | 0:cdf462088d13 | 74 | #define MBEDTLS_BASE64_C |
markrad | 0:cdf462088d13 | 75 | #define MBEDTLS_CERTS_C |
markrad | 0:cdf462088d13 | 76 | #define MBEDTLS_PEM_PARSE_C |
markrad | 0:cdf462088d13 | 77 | |
markrad | 0:cdf462088d13 | 78 | /* Save RAM at the expense of ROM */ |
markrad | 0:cdf462088d13 | 79 | #define MBEDTLS_AES_ROM_TABLES |
markrad | 0:cdf462088d13 | 80 | |
markrad | 0:cdf462088d13 | 81 | /* Save RAM by adjusting to our exact needs */ |
markrad | 0:cdf462088d13 | 82 | #define MBEDTLS_ECP_MAX_BITS 384 |
markrad | 0:cdf462088d13 | 83 | #define MBEDTLS_MPI_MAX_SIZE 48 // 384 bits is 48 bytes |
markrad | 0:cdf462088d13 | 84 | |
markrad | 0:cdf462088d13 | 85 | /* Save RAM at the expense of speed, see ecp.h */ |
markrad | 0:cdf462088d13 | 86 | #define MBEDTLS_ECP_WINDOW_SIZE 2 |
markrad | 0:cdf462088d13 | 87 | #define MBEDTLS_ECP_FIXED_POINT_OPTIM 0 |
markrad | 0:cdf462088d13 | 88 | |
markrad | 0:cdf462088d13 | 89 | /* Significant speed benefit at the expense of some ROM */ |
markrad | 0:cdf462088d13 | 90 | #define MBEDTLS_ECP_NIST_OPTIM |
markrad | 0:cdf462088d13 | 91 | |
markrad | 0:cdf462088d13 | 92 | /* |
markrad | 0:cdf462088d13 | 93 | * You should adjust this to the exact number of sources you're using: default |
markrad | 0:cdf462088d13 | 94 | * is the "mbedtls_platform_entropy_poll" source, but you may want to add other ones. |
markrad | 0:cdf462088d13 | 95 | * Minimum is 2 for the entropy test suite. |
markrad | 0:cdf462088d13 | 96 | */ |
markrad | 0:cdf462088d13 | 97 | #define MBEDTLS_ENTROPY_MAX_SOURCES 2 |
markrad | 0:cdf462088d13 | 98 | |
markrad | 0:cdf462088d13 | 99 | /* Save ROM and a few bytes of RAM by specifying our own ciphersuite list */ |
markrad | 0:cdf462088d13 | 100 | #define MBEDTLS_SSL_CIPHERSUITES \ |
markrad | 0:cdf462088d13 | 101 | MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, \ |
markrad | 0:cdf462088d13 | 102 | MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 |
markrad | 0:cdf462088d13 | 103 | |
markrad | 0:cdf462088d13 | 104 | /* |
markrad | 0:cdf462088d13 | 105 | * Save RAM at the expense of interoperability: do this only if you control |
markrad | 0:cdf462088d13 | 106 | * both ends of the connection! (See coments in "mbedtls/ssl.h".) |
markrad | 0:cdf462088d13 | 107 | * The minimum size here depends on the certificate chain used as well as the |
markrad | 0:cdf462088d13 | 108 | * typical size of records. |
markrad | 0:cdf462088d13 | 109 | */ |
markrad | 0:cdf462088d13 | 110 | #define MBEDTLS_SSL_MAX_CONTENT_LEN 1024 |
markrad | 0:cdf462088d13 | 111 | |
markrad | 0:cdf462088d13 | 112 | #include "mbedtls/check_config.h" |
markrad | 0:cdf462088d13 | 113 | |
markrad | 0:cdf462088d13 | 114 | #endif /* MBEDTLS_CONFIG_H */ |