1 /*
2  * mbed Microcontroller Library
3  * Copyright (c) 2019 Cypress Semiconductor Corporation
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 /**
19  * \file    mcuboot_crypto_acc_config.h
20  * \version 1.1
21  */
22 
23 #ifndef MCUBOOT_MBEDTLS_DEVICE_H
24 #define MCUBOOT_MBEDTLS_DEVICE_H
25 
26 /* Currently this target supports SHA1 */
27 // #define MBEDTLS_SHA1_C
28 
29 #define MBEDTLS_SHA1_ALT
30 #define MBEDTLS_SHA256_ALT
31 #define MBEDTLS_SHA512_ALT
32 
33 /* Currently this target supports CBC, CFB, OFB, CTR and XTS cipher modes */
34 #define MBEDTLS_AES_ALT
35 // #define MBEDTLS_CIPHER_MODE_CBC
36 // #define MBEDTLS_CIPHER_MODE_CFB
37 // #define MBEDTLS_CIPHER_MODE_OFB
38 #ifdef MCUBOOT_ENC_IMAGES
39 #define MBEDTLS_CIPHER_MODE_CTR
40 #endif
41 // #define MBEDTLS_CIPHER_MODE_XTS
42 
43 /* Only NIST-P curves are currently supported */
44 #define MBEDTLS_ECP_ALT
45 // #define MBEDTLS_ECP_DP_SECP192R1_ENABLED
46 // #define MBEDTLS_ECP_DP_SECP224R1_ENABLED
47 // #define MBEDTLS_ECP_DP_SECP256R1_ENABLED
48 // #define MBEDTLS_ECP_DP_SECP384R1_ENABLED
49 // #define MBEDTLS_ECP_DP_SECP521R1_ENABLED
50 
51 #define MBEDTLS_ECDSA_SIGN_ALT
52 #define MBEDTLS_ECDSA_VERIFY_ALT
53 
54 #endif /* MCUBOOT_MBEDTLS_DEVICE_H */
55