44 #ifndef ti_drivers_cryptoutils_cryptokey_CryptoKeyKeyStore_PSA_s__include 45 #define ti_drivers_cryptoutils_cryptokey_CryptoKeyKeyStore_PSA_s__include 52 #include <third_party/tfm/interface/include/psa/crypto.h> 53 #include <third_party/tfm/interface/include/psa/service.h> 56 #include <third_party/tfm/interface/include/psa/crypto_client_struct.h> 58 #define KEYSTORE_PSA_S_MSG_CALC(a) (CRYPTO_S_MSG_TYPE_INDEX_KEYSTORE | ((int32_t)1 << (CRYPTO_S_MSG_TYPE_SHIFT + a))) 63 #define KEYSTORE_PSA_S_MSG_TYPE_GET_KEY KEYSTORE_PSA_S_MSG_CALC(0U) 64 #define KEYSTORE_PSA_S_MSG_TYPE_GENERATE_KEY KEYSTORE_PSA_S_MSG_CALC(1U) 65 #define KEYSTORE_PSA_S_MSG_TYPE_EXPORT_CERTIFICATE KEYSTORE_PSA_S_MSG_CALC(2U) 66 #define KEYSTORE_PSA_S_MSG_TYPE_EXPORT_PUBLIC_KEY KEYSTORE_PSA_S_MSG_CALC(3U) 67 #define KEYSTORE_PSA_S_MSG_TYPE_EXPORT_KEY KEYSTORE_PSA_S_MSG_CALC(4U) 68 #define KEYSTORE_PSA_S_MSG_TYPE_DESTROY_CERTIFICATE KEYSTORE_PSA_S_MSG_CALC(5U) 69 #define KEYSTORE_PSA_S_MSG_TYPE_DESTROY_KEY KEYSTORE_PSA_S_MSG_CALC(6U) 70 #define KEYSTORE_PSA_S_MSG_TYPE_IMPORT_CERTIFICATE KEYSTORE_PSA_S_MSG_CALC(7U) 71 #define KEYSTORE_PSA_S_MSG_TYPE_IMPORT_KEY KEYSTORE_PSA_S_MSG_CALC(8U) 72 #define KEYSTORE_PSA_S_MSG_TYPE_PURGE_KEY KEYSTORE_PSA_S_MSG_CALC(9U) 73 #define KEYSTORE_PSA_S_MSG_TYPE_GET_KEY_ATTRIBUTES KEYSTORE_PSA_S_MSG_CALC(10U) 74 #define KEYSTORE_PSA_S_MSG_TYPE_RESET_KEY_ATTRIBUTES KEYSTORE_PSA_S_MSG_CALC(11U) 175 psa_key_attributes_t *keyAttributes);
Definition: CryptoKeyKeyStore_PSA_s.h:118
size_t dataSize
Definition: CryptoKeyKeyStore_PSA_s.h:106
psa_key_usage_t KeyStore_PSA_KeyUsage
Encoding of permitted usage on a key.
Definition: CryptoKeyKeyStore_PSA.h:124
uint32_t key
Definition: CryptoKeyKeyStore_PSA_s.h:87
uint32_t * key
Definition: CryptoKeyKeyStore_PSA_s.h:123
KeyStore_PSA_Algorithm alg
Definition: CryptoKeyKeyStore_PSA_s.h:91
uint32_t key
Definition: CryptoKeyKeyStore_PSA_s.h:134
uint32_t key
Definition: CryptoKeyKeyStore_PSA_s.h:129
CryptoKeyKeyStore_PSA driver header.
Definition: CryptoKeyKeyStore_PSA_s.h:127
psa_status_t KeyStore_s_handlePsaMsg(psa_msg_t *msg)
Handles PSA messages for KeyStore secure driver.
psa_key_file_id_t KeyStore_PSA_KeyFileId
Definition: CryptoKeyKeyStore_PSA.h:762
KeyStore_PSA_KeyUsage usage
Definition: CryptoKeyKeyStore_PSA_s.h:92
struct psa_client_key_attributes_s * attributes
Definition: CryptoKeyKeyStore_PSA_s.h:135
Definition: CryptoKeyKeyStore_PSA_s.h:85
uint8_t * data
Definition: CryptoKeyKeyStore_PSA_s.h:105
uint32_t key
Definition: CryptoKeyKeyStore_PSA_s.h:104
uint8_t * data
Definition: CryptoKeyKeyStore_PSA_s.h:121
Definition: CryptoKeyKeyStore_PSA_s.h:95
uint32_t * key
Definition: CryptoKeyKeyStore_PSA_s.h:113
uint8_t * data
Definition: CryptoKeyKeyStore_PSA_s.h:114
size_t * dataLength
Definition: CryptoKeyKeyStore_PSA_s.h:90
KeyStore_PSA_KeyFileId * key
Definition: CryptoKeyKeyStore_PSA_s.h:98
struct psa_client_key_attributes_s * attributes
Definition: CryptoKeyKeyStore_PSA_s.h:112
void KeyStore_s_copyKeyIDFromClient(KeyStore_PSA_KeyFileId *keyID, int32_t clientId, uint32_t *clientKeyID)
Copies client key ID from non-secure side to secure side.
Definition: CryptoKeyKeyStore_PSA_s.h:102
size_t dataLength
Definition: CryptoKeyKeyStore_PSA_s.h:115
size_t dataLength
Definition: CryptoKeyKeyStore_PSA_s.h:122
psa_algorithm_t KeyStore_PSA_Algorithm
Encoding of a cryptographic algorithm.
Definition: CryptoKeyKeyStore_PSA.h:440
psa_status_t KeyStore_s_copyKeyAttributesFromClient(struct psa_client_key_attributes_s *clientKeyAttr, int32_t clientId, psa_key_attributes_t *keyAttributes)
Gets key attributes from client key attributes. Follows tfm_crypto_key_attributes_from_client() ...
struct psa_client_key_attributes_s * attributes
Definition: CryptoKeyKeyStore_PSA_s.h:140
Definition: CryptoKeyKeyStore_PSA_s.h:132
Definition: CryptoKeyKeyStore_PSA_s.h:110
size_t dataSize
Definition: CryptoKeyKeyStore_PSA_s.h:89
struct psa_client_key_attributes_s * attributes
Definition: CryptoKeyKeyStore_PSA_s.h:120
Definition: CryptoKeyKeyStore_PSA_s.h:138
struct psa_client_key_attributes_s * attributes
Definition: CryptoKeyKeyStore_PSA_s.h:97
size_t * dataLength
Definition: CryptoKeyKeyStore_PSA_s.h:107
uint8_t * data
Definition: CryptoKeyKeyStore_PSA_s.h:88
void KeyStore_s_init(void)
Initializes the KeyStore secure driver.