SDK สำหรับ TESAIoT Dev Kit
คู่มืออ้างอิง API และ Tutorial (ModusToolbox)
Loading...
Searching...
No Matches
optiga_lib_config_mtb.h
Go to the documentation of this file.
1/******************************************************************************
2* File Name: optiga_lib_config_mtb.h
3*
4* Description: This file contains part of the Platform Abstraction Layer.
5* This is a platform specific file. This file provides a
6* configuration for the optiga-trust-m middleware
7*
8* Related Document: See README.md
9*
10*
11*******************************************************************************
12* Copyright 2020-2025, Cypress Semiconductor Corporation (an Infineon company) or
13* an affiliate of Cypress Semiconductor Corporation. All rights reserved.
14*
15* This software, including source code, documentation and related
16* materials ("Software") is owned by Cypress Semiconductor Corporation
17* or one of its affiliates ("Cypress") and is protected by and subject to
18* worldwide patent protection (United States and foreign),
19* United States copyright laws and international treaty provisions.
20* Therefore, you may use this Software only as provided in the license
21* agreement accompanying the software package from which you
22* obtained this Software ("EULA").
23* If no EULA applies, Cypress hereby grants you a personal, non-exclusive,
24* non-transferable license to copy, modify, and compile the Software
25* source code solely for use in connection with Cypress's
26* integrated circuit products. Any reproduction, modification, translation,
27* compilation, or representation of this Software except as specified
28* above is prohibited without the express written permission of Cypress.
29*
30* Disclaimer: THIS SOFTWARE IS PROVIDED AS-IS, WITH NO WARRANTY OF ANY KIND,
31* EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT, IMPLIED
32* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cypress
33* reserves the right to make changes to the Software without notice. Cypress
34* does not assume any liability arising out of the application or use of the
35* Software or any product or circuit described in the Software. Cypress does
36* not authorize its products for use in any products where a malfunction or
37* failure of the Cypress product may reasonably be expected to result in
38* significant property damage, injury or death ("High Risk Product"). By
39* including Cypress's product in a High Risk Product, the manufacturer
40* of such system or application assumes all risk of such use and in doing
41* so agrees to indemnify Cypress against all liability.
42*******************************************************************************/
43#ifndef _OPTIGA_LIB_CONFIG_M_V3_H_
44#define _OPTIGA_LIB_CONFIG_M_V3_H_
45
46#include "cy_pdl.h"
47#include "mtb_hal.h"
48#include "cybsp.h"
49
50#ifdef __cplusplus
51extern "C" {
52#endif
53
55 #define OPTIGA_CRYPT_RANDOM_ENABLED
57 #define OPTIGA_CRYPT_HASH_ENABLED
59 #define OPTIGA_CRYPT_ECC_GENERATE_KEYPAIR_ENABLED
61 #define OPTIGA_CRYPT_ECDSA_SIGN_ENABLED
63 #define OPTIGA_CRYPT_ECDSA_VERIFY_ENABLED
65 #define OPTIGA_CRYPT_ECDH_ENABLED
67 #define OPTIGA_CRYPT_ECC_NIST_P_521_ENABLED
69 #define OPTIGA_CRYPT_ECC_BRAINPOOL_P_R1_ENABLED
71 #define OPTIGA_CRYPT_TLS_PRF_SHA256_ENABLED
73 #define OPTIGA_CRYPT_TLS_PRF_SHA384_ENABLED
75 #define OPTIGA_CRYPT_TLS_PRF_SHA512_ENABLED
77 #define OPTIGA_CRYPT_RSA_GENERATE_KEYPAIR_ENABLED
79 #define OPTIGA_CRYPT_RSA_SIGN_ENABLED
81 #define OPTIGA_CRYPT_RSA_VERIFY_ENABLED
83 #define OPTIGA_CRYPT_RSA_ENCRYPT_ENABLED
85 #define OPTIGA_CRYPT_RSA_DECRYPT_ENABLED
87 #define OPTIGA_CRYPT_RSA_PRE_MASTER_SECRET_ENABLED
89 #define OPTIGA_CRYPT_RSA_SSA_SHA512_ENABLED
91 #define OPTIGA_CRYPT_SYM_ENCRYPT_ENABLED
93 #define OPTIGA_CRYPT_SYM_DECRYPT_ENABLED
95 #define OPTIGA_CRYPT_HMAC_ENABLED
97 #define OPTIGA_CRYPT_HKDF_ENABLED
99 #define OPTIGA_CRYPT_SYM_GENERATE_KEY_ENABLED
101 #define OPTIGA_CRYPT_GENERATE_AUTH_CODE_ENABLED
103 #define OPTIGA_CRYPT_HMAC_VERIFY_ENABLED
105 #define OPTIGA_CRYPT_CLEAR_AUTO_STATE_ENABLED
106
110 #define OPTIGA_COMMS_SHIELDED_CONNECTION
111
113 #define OPTIGA_COMMS_DEFAULT_PROTECTION_LEVEL OPTIGA_COMMS_NO_PROTECTION
114
118 #define OPTIGA_LIB_DEBUG_NULL_CHECK
120 #define OPTIGA_CMD_MAX_REGISTRATIONS (0x06)
122 #define OPTIGA_MAX_COMMS_BUFFER_SIZE (0x615) //1557 in decimal
123
129// #define OPTIGA_LIB_ENABLE_LOGGING
131 #define OPTIGA_PAL_INIT_ENABLED
133#ifdef OPTIGA_LIB_ENABLE_LOGGING
135 #define OPTIGA_LIB_ENABLE_UTIL_LOGGING
137 #define OPTIGA_LIB_ENABLE_CRYPT_LOGGING
139 #define OPTIGA_LIB_ENABLE_CMD_LOGGING
141 #define OPTIGA_LIB_ENABLE_COMMS_LOGGING
142#endif
144
145 /* Below are the example macros for protected update not for any feature */
147 #define EXAMPLE_OPTIGA_UTIL_PROTECTED_UPDATE_CONFIDENTIALITY_ENABLED
149 #define EXAMPLE_OPTIGA_UTIL_PROTECTED_UPDATE_OBJECT_KEY_ENABLED
151 #define EXAMPLE_OPTIGA_UTIL_PROTECTED_UPDATE_OBJECT_METADATA_ENABLED
152
153 /*
154 * The following GPIO settings are only ModusToolbox and specific PSoC6 family board relevant
155 */
156
157#define OPTIGA_TRUSTM_SCL CYBSP_TRUSTM_I2C_SCL
158
159
160
161#define OPTIGA_TRUSTM_SDA CYBSP_TRUSTM_I2C_SDA
162
163
164#if defined(CYBSP_TRUSTM_RST)
165 #define OPTIGA_TRUSTM_RST CYBSP_TRUSTM_RST
166#endif
167#if defined(CYBSP_TRUSTM_VDD)
168 #define OPTIGA_TRUSTM_VDD CYBSP_TRUSTM_VDD
169#endif
170
177#if defined(CYBSP_TRUSTM_RST) || defined(CYBSP_TRUSTM_VDD)
178 #define OPTIGA_COMMS_DEFAULT_RESET_TYPE (0U)
179#elif !defined(CYBSP_TRUSTM_RST) && !defined(CYBSP_TRUSTM_VDD)
180 #define OPTIGA_COMMS_DEFAULT_RESET_TYPE (1U)
181#elif defined(CYBSP_TRUSTM_RST) && !defined(CYBSP_TRUSTM_VDD)
182 #define OPTIGA_COMMS_DEFAULT_RESET_TYPE (0U)
183#endif
184
185
186
187#ifdef __cplusplus
188}
189#endif
190
191#endif /* _OPTIGA_LIB_CONFIG_M_V3_H_*/