33 #ifndef ti_drivers_sha2_SHA2CC26X4_s__include 34 #define ti_drivers_sha2_SHA2CC26X4_s__include 43 #include <third_party/tfm/interface/include/psa/error.h> 44 #include <third_party/tfm/interface/include/psa/service.h> 46 #if defined(TFM_PSA_API) 47 #include "ti_drivers_config.h" 60 #define SHA2_S_MSG_TYPE_CONSTRUCT (CRYPTO_S_MSG_TYPE_INDEX_SHA2 | ((int32_t)1 << (CRYPTO_S_MSG_TYPE_SHIFT + 0U))) 61 #define SHA2_S_MSG_TYPE_OPEN (CRYPTO_S_MSG_TYPE_INDEX_SHA2 | ((int32_t)1 << (CRYPTO_S_MSG_TYPE_SHIFT + 1U))) 62 #define SHA2_S_MSG_TYPE_REGISTER_CALLBACK \ 63 (CRYPTO_S_MSG_TYPE_INDEX_SHA2 | ((int32_t)1 << (CRYPTO_S_MSG_TYPE_SHIFT + 2U))) 64 #define SHA2_S_MSG_TYPE_CLOSE (CRYPTO_S_MSG_TYPE_INDEX_SHA2 | ((int32_t)1 << (CRYPTO_S_MSG_TYPE_SHIFT + 3U))) 65 #define SHA2_S_MSG_TYPE_HASH_DATA (CRYPTO_S_MSG_TYPE_INDEX_SHA2 | ((int32_t)1 << (CRYPTO_S_MSG_TYPE_SHIFT + 4U))) 66 #define SHA2_S_MSG_TYPE_HMAC (CRYPTO_S_MSG_TYPE_INDEX_SHA2 | ((int32_t)1 << (CRYPTO_S_MSG_TYPE_SHIFT + 5U))) 67 #define SHA2_S_MSG_TYPE_SET_HASH_TYPE (CRYPTO_S_MSG_TYPE_INDEX_SHA2 | ((int32_t)1 << (CRYPTO_S_MSG_TYPE_SHIFT + 6U))) 68 #define SHA2_S_MSG_TYPE_SETUP_HMAC (CRYPTO_S_MSG_TYPE_INDEX_SHA2 | ((int32_t)1 << (CRYPTO_S_MSG_TYPE_SHIFT + 7U))) 69 #define SHA2_S_MSG_TYPE_ADD_DATA (CRYPTO_S_MSG_TYPE_INDEX_SHA2 | ((int32_t)1 << (CRYPTO_S_MSG_TYPE_SHIFT + 8U))) 70 #define SHA2_S_MSG_TYPE_FINALIZE (CRYPTO_S_MSG_TYPE_INDEX_SHA2 | ((int32_t)1 << (CRYPTO_S_MSG_TYPE_SHIFT + 9U))) 71 #define SHA2_S_MSG_TYPE_FINALIZE_HMAC (CRYPTO_S_MSG_TYPE_INDEX_SHA2 | ((int32_t)1 << (CRYPTO_S_MSG_TYPE_SHIFT + 10U))) 72 #define SHA2_S_MSG_TYPE_CANCEL_OPERATION \ 73 (CRYPTO_S_MSG_TYPE_INDEX_SHA2 | ((int32_t)1 << (CRYPTO_S_MSG_TYPE_SHIFT + 11U))) 74 #define SHA2_S_MSG_TYPE_RESET (CRYPTO_S_MSG_TYPE_INDEX_SHA2 | ((int32_t)1 << (CRYPTO_S_MSG_TYPE_SHIFT + 12U))) 80 #ifndef CONFIG_SHA2_S_CONFIG_POOL_SIZE 81 #define CONFIG_SHA2_S_CONFIG_POOL_SIZE 1 84 #define SHA2_SECURE_CALLBACK_COUNT (CONFIG_TI_DRIVERS_SHA2_COUNT + CONFIG_SHA2_S_CONFIG_POOL_SIZE) const void * data
Definition: SHA2CC26X4_s.h:141
Definition: SHA2CC26X4_s.h:89
SHA2_Handle handle
Definition: SHA2CC26X4_s.h:160
psa_status_t SHA2_s_handlePsaMsg(psa_msg_t *msg)
Handles PSA messages for SHA2 secure driver.
Definition: SecureCallback.h:51
SHA2_s_SecureCallback * callback
Definition: SHA2CC26X4_s.h:121
SHA2_Handle handle
Definition: SHA2CC26X4_s.h:179
SHA2_Handle handle
Definition: SHA2CC26X4_s.h:126
int_fast16_t returnStatus
Definition: SHA2CC26X4_s.h:94
Definition: SHA2CC26X4_s.h:152
void * digest
Definition: SHA2CC26X4_s.h:134
SHA2_Handle handle
Definition: SHA2CC26X4_s.h:174
const SHA2_Params * params
Definition: SHA2CC26X4_s.h:109
SHA2 Global configuration.
Definition: SHA2.h:446
CryptoKey datastructure.
Definition: CryptoKey.h:192
SHA2_HashType type
Definition: SHA2CC26X4_s.h:149
const void * data
Definition: SHA2CC26X4_s.h:132
size_t dataLength
Definition: SHA2CC26X4_s.h:142
SHA2_Handle handle
Definition: SHA2CC26X4_s.h:168
uint_least8_t index
Definition: SHA2CC26X4_s.h:114
Definition: SHA2CC26X4_s.h:158
Definition: SHA2CC26X4_s.h:166
Definition: SHA2CC26X4_s.h:146
SHA2_Handle handle
Definition: SHA2CC26X4_s.h:131
const SHA2_Params * params
Definition: SHA2CC26X4_s.h:115
void * hmac
Definition: SHA2CC26X4_s.h:143
SHA2_Handle handle
Definition: SHA2CC26X4_s.h:139
Definition: SHA2CC26X4_s.h:177
Definition: SHA2CC26X4_s.h:118
Definition: SHA2CC26X4_s.h:112
SHA2_Handle handle
Definition: SHA2CC26X4_s.h:93
size_t dataLength
Definition: SHA2CC26X4_s.h:133
Definition: SHA2CC26X4_s.h:172
SHA2_HashType
Enum for the hash types supported by the driver.
Definition: SHA2.h:395
SHA2_Handle handle
Definition: SHA2CC26X4_s.h:120
CryptoKey * key
Definition: SHA2CC26X4_s.h:155
CryptoKey * key
Definition: SHA2CC26X4_s.h:140
Definition: SHA2CC26X4_s.h:129
Definition: SHA2CC26X4_s.h:124
void SHA2_s_init(void)
Initializes the SHA2 secure driver.
SHA2_Handle handle
Definition: SHA2CC26X4_s.h:154
void * digestOrHmac
Definition: SHA2CC26X4_s.h:169
SecureCallback_Object object
Definition: SHA2CC26X4_s.h:91
Definition: SHA2CC26X4_s.h:106
const void * data
Definition: SHA2CC26X4_s.h:161
SHA2 Parameters.
Definition: SHA2.h:480
SHA2_Config * config
Definition: SHA2CC26X4_s.h:108
SHA2_Handle handle
Definition: SHA2CC26X4_s.h:148
size_t length
Definition: SHA2CC26X4_s.h:162
Definition: SHA2CC26X4_s.h:137