| /* |
| * |
| * <COPYRIGHT> |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| #ifndef EFR32_MBEDTLS_CONFIG_H |
| #define EFR32_MBEDTLS_CONFIG_H |
| |
| #include "em_device.h" |
| #include "em_se.h" |
| |
| /** |
| * Enable FreeRTOS threading support |
| */ |
| #define MBEDTLS_FREERTOS |
| #define MBEDTLS_THREADING_C |
| #define MBEDTLS_THREADING_ALT |
| |
| /** |
| * Enable Crypto and Entropy modules |
| */ |
| #define MBEDTLS_AES_C |
| #define MBEDTLS_ECP_C |
| #define MBEDTLS_ECDH_C |
| #define MBEDTLS_ENTROPY_C |
| #define MBEDTLS_SHA1_C |
| #define MBEDTLS_SHA256_C |
| #define MBEDTLS_TRNG_C |
| #define MBEDTLS_CIPHER_MODE_CTR |
| |
| /** |
| * \def MBEDTLS_AES_ALT |
| * |
| * Enable hardware acceleration for the AES block cipher |
| * |
| * Module: sl_crypto/src/crypto_aes.c for devices with CRYPTO |
| * sl_crypto/src/aes_aes.c for devices with AES |
| * |
| * See MBEDTLS_AES_C for more information. |
| */ |
| #define MBEDTLS_AES_ALT |
| |
| /** |
| * \def MBEDTLS_ENTROPY_HARDWARE_ALT |
| * |
| * Integrate the provided default entropy source into the mbed |
| * TLS entropy infrastructure. |
| * |
| */ |
| #define MBEDTLS_ENTROPY_HARDWARE_ALT |
| |
| /** |
| * \def MBEDTLS_ECP_INTERNAL_ALT |
| * \def ECP_SHORTWEIERSTRASS |
| * \def MBEDTLS_ECP_ADD_MIXED_ALT |
| * \def MBEDTLS_ECP_DOUBLE_JAC_ALT |
| * \def MBEDTLS_ECP_NORMALIZE_JAC_MANY_ALT |
| * \def MBEDTLS_ECP_NORMALIZE_JAC_ALT |
| * |
| * Enable hardware acceleration for the elliptic curve over GF(p) library. |
| * |
| * Module: sl_crypto/src/crypto_ecp.c |
| * Caller: library/ecp.c |
| * |
| * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_ECP_C and at least one |
| * MBEDTLS_ECP_DP_XXX_ENABLED and (CRYPTO_COUNT > 0) |
| */ |
| #if defined(CRYPTO_COUNT) && (CRYPTO_COUNT > 0) |
| #define MBEDTLS_ECP_INTERNAL_ALT |
| #define ECP_SHORTWEIERSTRASS |
| #define MBEDTLS_ECP_ADD_MIXED_ALT |
| #define MBEDTLS_ECP_DOUBLE_JAC_ALT |
| #define MBEDTLS_ECP_NORMALIZE_JAC_MANY_ALT |
| #define MBEDTLS_ECP_NORMALIZE_JAC_ALT |
| #define MBEDTLS_ECP_RANDOMIZE_JAC_ALT |
| #endif |
| |
| /** |
| * \def MBEDTLS_SHA1_ALT |
| * |
| * Enable hardware acceleration for the SHA-224 and SHA-256 cryptographic |
| * hash algorithms. |
| * Module: sl_crypto/src/crypto_sha.c |
| * Caller: library/mbedtls_md.c |
| * library/ssl_cli.c |
| * library/ssl_srv.c |
| * library/ssl_tls.c |
| * library/x509write_crt.c |
| * |
| * Requires: MBEDTLS_SHA1_C and (CRYPTO_COUNT > 0) |
| * See MBEDTLS_SHA1_C for more information. |
| */ |
| #if defined(CRYPTO_COUNT) && (CRYPTO_COUNT > 0) |
| #define MBEDTLS_SHA1_ALT |
| #endif |
| |
| /** |
| * \def MBEDTLS_SHA256_ALT |
| * |
| * Enable hardware acceleration for the SHA-224 and SHA-256 cryptographic |
| * hash algorithms. |
| * |
| * Module: sl_crypto/src/crypto_sha.c |
| * Caller: library/entropy.c |
| * library/mbedtls_md.c |
| * library/ssl_cli.c |
| * library/ssl_srv.c |
| * library/ssl_tls.c |
| * |
| * Requires: MBEDTLS_SHA256_C and (CRYPTO_COUNT > 0) |
| * See MBEDTLS_SHA256_C for more information. |
| */ |
| #if defined(CRYPTO_COUNT) && (CRYPTO_COUNT > 0) |
| #define MBEDTLS_SHA256_ALT |
| #endif |
| |
| #endif // EFR32_MBEDTLS_CONFIG_H |