|
36 | 36 | */ |
37 | 37 |
|
38 | 38 | /** |
39 | | - * \brief Host key provisioning in plaintext |
40 | | - * \details This API perform host key provisioning in plaintext, \n |
| 39 | + * \brief Host secure channel keys provisioning in plaintext |
| 40 | + * \details This API perform host secure channel keys provisioning in plaintext, \n |
41 | 41 | * it use the put attribute command if the device isn't a STSAFE-A120 \n |
42 | 42 | * and it use the "write host key" command if it is a STSAFE-A120 |
43 | | - * \param[in] pSTSE Pointer to STSE Handler |
44 | | - * \param[in] host_ecc_key_type Key type |
45 | | - * \param[in] host_keys Pointer to the key structure |
| 43 | + * \param[in] pSTSE Pointer to STSE Handler |
| 44 | + * \param[in] host_mac_key Pointer to host MAC key (AES key structure) to be provisioned |
| 45 | + * \param[in] host_cipher_key Pointer to Host cipher key (AES key structure) to be provisioned |
| 46 | + * \param[out] host_mac_key_index Pointer to the index assigned to the stored host MAC key in secure storage |
| 47 | + * \param[out] host_mac_key_index Pointer to the index assigned to the stored host cipher key in secure storage |
46 | 48 | * \return \ref STSE_OK on success ; \ref stse_ReturnCode_t error code otherwise |
47 | 49 | * \details \include{doc} stse_host_key_provisioning.dox |
48 | 50 | */ |
49 | | -stse_ReturnCode_t stse_host_key_provisioning( |
| 51 | +stse_ReturnCode_t stse_host_secure_channel_keys_provisioning( |
50 | 52 | stse_Handle_t *pSTSE, |
51 | | - stsafea_host_key_type_t host_ecc_key_type, |
52 | | - stsafea_host_keys_t *host_keys); |
| 53 | + stse_aes_key_t *host_mac_key, |
| 54 | + stse_aes_key_t *host_cipher_key, |
| 55 | + PLAT_UI32 *host_mac_key_index, |
| 56 | + PLAT_UI32 *host_cipher_key_index); |
53 | 57 |
|
54 | 58 | /** |
55 | | - * \brief Host key provisioning wrapped |
56 | | - * \details This API perform host key provisioning with the key wrapped using a volatile KEK session |
57 | | - * \param[in] pSTSE Pointer to STSE Handler |
58 | | - * \param[in] host_key_type Key type |
59 | | - * \param[in] host_keys Pointer to the key structure |
| 59 | + * \brief Host secure channel keys provisioning wrapped |
| 60 | + * \details This API perform host secure channel keys provisioning with the key wrapped using a volatile KEK session |
| 61 | + * \param[in] pSTSE Pointer to STSE Handler |
| 62 | + * \param[in] host_mac_key Pointer to host MAC key (AES key structure) to be provisioned |
| 63 | + * \param[in] host_cipher_key Pointer to Host cipher key (AES key structure) to be provisioned |
60 | 64 | * \param[in] ecdhe_key_type ECC key type to use in KEK session |
| 65 | + * \param[out] host_mac_key_index Pointer to the index assigned to the stored host MAC key in secure storage |
| 66 | + * \param[out] host_mac_key_index Pointer to the index assigned to the stored host cipher key in secure storage |
61 | 67 | * \return \ref STSE_OK on success ; \ref stse_ReturnCode_t error code otherwise |
62 | 68 | * \details \include{doc} stse_host_key_provisioning_wrapped.dox |
63 | 69 | */ |
64 | | -stse_ReturnCode_t stse_host_key_provisioning_wrapped( |
| 70 | +stse_ReturnCode_t stse_host_secure_channel_keys_provisioning_wrapped( |
65 | 71 | stse_Handle_t *pSTSE, |
66 | | - stsafea_host_key_type_t host_key_type, |
67 | | - stsafea_host_keys_t *host_keys, |
68 | | - stse_ecc_key_type_t ecdhe_key_type); |
| 72 | + stse_aes_key_t *host_mac_key, |
| 73 | + stse_aes_key_t *host_cipher_key, |
| 74 | + stse_ecc_key_type_t ecdhe_ecc_key_type, |
| 75 | + PLAT_UI32 *host_mac_key_index, |
| 76 | + PLAT_UI32 *host_cipher_key_index); |
69 | 77 |
|
70 | 78 | /** |
71 | | - * \brief Host key provisioning wrapped and authenticated |
72 | | - * \details This API perform host key provisioning with the key wrapped using an authenticated volatile KEK session |
| 79 | + * \brief Host secure channel keys provisioning wrapped and authenticated |
| 80 | + * \details This API perform host secure channel keys provisioning with the key wrapped using an authenticated volatile KEK session |
73 | 81 | * \param[in] pSTSE Pointer to STSE Handler |
74 | | - * \param[in] host_key_type Key type |
75 | | - * \param[in] host_keys Pointer to the key structure |
| 82 | + * \param[in] host_mac_key Pointer to host MAC key (AES key structure) to be provisioned |
| 83 | + * \param[in] host_cipher_key Pointer to Host cipher key (AES key structure) to be provisioned |
76 | 84 | * \param[in] ecdhe_key_type ECC key type to use in KEK session |
77 | 85 | * \param[in] signature_public_key_slot_number Slot number of the public key used in authentication |
78 | 86 | * \param[in] signature_hash_algo Hash algo used for the signature digest |
79 | 87 | * \param[in] signature_private_key_type Key type of the private key used in authentication |
80 | 88 | * \param[in] signature_private_key Private key used in authentication |
| 89 | + * \param[out] host_mac_key_index Pointer to the index assigned to the stored host MAC key in secure storage |
| 90 | + * \param[out] host_mac_key_index Pointer to the index assigned to the stored host cipher key in secure storage |
81 | 91 | * \return \ref STSE_OK on success ; \ref stse_ReturnCode_t error code otherwise |
82 | 92 | * \details \include{doc} stse_host_key_provisioning_wrapped_authenticated.dox |
83 | 93 | * \warning Few specific cryptographic library required to have public key concatenated to private key for EdDSA mechanism. In such case, pPrivate_key pointer shall reference concatenated key pair buffer's address. |
84 | 94 | */ |
85 | | -stse_ReturnCode_t stse_host_key_provisioning_wrapped_authenticated( |
| 95 | +stse_ReturnCode_t stse_host_secure_channel_keys_provisioning_wrapped_authenticated( |
86 | 96 | stse_Handle_t *pSTSE, |
87 | | - stsafea_host_key_type_t host_key_type, |
88 | | - stsafea_host_keys_t *host_keys, |
89 | | - stse_ecc_key_type_t ecdhe_key_type, |
| 97 | + stse_aes_key_t *host_mac_key, |
| 98 | + stse_aes_key_t *host_cipher_key, |
| 99 | + stse_ecc_key_type_t ecdhe_ecc_key_type, |
90 | 100 | PLAT_UI8 signature_public_key_slot_number, |
91 | 101 | stse_hash_algorithm_t signature_hash_algo, |
92 | | - stse_ecc_key_type_t signature_private_key_type, |
93 | | - PLAT_UI8 *signature_private_key); |
| 102 | + stse_ecc_key_type_t signature_private_ecc_key_type, |
| 103 | + PLAT_UI8 *signature_private_key, |
| 104 | + PLAT_UI32 *host_mac_key_index, |
| 105 | + PLAT_UI32 *host_cipher_key_index); |
94 | 106 |
|
95 | 107 | /** |
96 | | - * \brief Host key establishment |
97 | | - * \details This API establish host key (from STSAFE-A120) |
| 108 | + * \brief Host secure channel keys establishment |
| 109 | + * \details This API establish host secure channel keys (from STSAFE-A120) |
98 | 110 | * \param[in] pSTSE Pointer to STSE Handler |
99 | 111 | * \param[in] ecdh_key_type ECDH key pair type |
100 | | - * \param[in] host_secure_channel_keys_type Host secure channel keys type |
101 | | - * \param[in] host_mac_key Pointer to the host mac key buffer |
102 | | - * \param[in] host_cipher_key Pointer to the host cipher key buffer |
| 112 | + * \param[in] host_secure_channel_keys_type Host secure channel keys type |
| 113 | + * \param[out] host_mac_key_index Index of the MAC key in platform secure storage to be used under the session |
| 114 | + * \param[out] host_cipher_key_index Index of the cipher key in platform secure storage to be used under the session |
103 | 115 | * \return \ref STSE_OK on success ; \ref stse_ReturnCode_t error code otherwise |
104 | 116 | * \details \include{doc} stse_host_key_provisioning.dox |
105 | 117 | */ |
106 | | -stse_ReturnCode_t stse_establish_host_key( |
| 118 | +stse_ReturnCode_t stse_establish_host_secure_channel_keys( |
107 | 119 | stse_Handle_t *pSTSE, |
108 | 120 | stse_ecc_key_type_t ecdh_key_type, |
109 | | - stsafea_host_key_type_t host_secure_channel_keys_type, |
110 | | - PLAT_UI8 *host_mac_key, |
111 | | - PLAT_UI8 *host_cipher_key); |
| 121 | + stse_aes_key_type_t host_secure_channel_keys_type, |
| 122 | + PLAT_UI32 *host_mac_key_index, |
| 123 | + PLAT_UI32 *host_cipher_key_index); |
112 | 124 |
|
113 | 125 | /** |
114 | | - * \brief Host key establishment authenticated |
115 | | - * \details This API establish host key after verifying entity signature (from STSAFE-A120) |
| 126 | + * \brief Host secure channel keys establishment authenticated |
| 127 | + * \details This API establish host secure channel keys after verifying entity signature (from STSAFE-A120) |
116 | 128 | * \param[in] pSTSE Pointer to STSE Handler |
117 | 129 | * \param[in] ecdh_key_type ECDH key pair type |
118 | 130 | * \param[in] host_secure_channel_keys_type Host secure channel keys type |
119 | 131 | * \param[in] tbs_hash_algo Hashing algorithm used for the signature |
120 | 132 | * \param[in] tbs_public_key_slot Public key slot used for the signature |
121 | 133 | * \param[in] tbs_private_key Private key associated to public key slot used for the signature |
122 | | - * \param[in] host_mac_key Pointer to the host mac key buffer |
123 | | - * \param[in] host_cipher_key Pointer to the host cipher key buffer |
| 134 | + * \param[out] host_mac_key_index Index of the MAC key in platform secure storage to be used under the session |
| 135 | + * \param[out] host_cipher_key_index Index of the cipher key in platform secure storage to be used under the session |
124 | 136 | * \return \ref STSE_OK on success ; \ref stse_ReturnCode_t error code otherwise |
125 | 137 | * \details \include{doc} stse_host_key_provisioning.dox |
126 | 138 | * \warning Few specific cryptographic library required to have public key concatenated to private key for EdDSA mechanism. In such case, pPrivate_key pointer shall reference concatenated key pair buffer's address. |
127 | 139 | */ |
128 | | -stse_ReturnCode_t stse_establish_host_key_authenticated( |
| 140 | +stse_ReturnCode_t stse_establish_host_secure_channel_keys_authenticated( |
129 | 141 | stse_Handle_t *pSTSE, |
130 | 142 | stse_ecc_key_type_t ecdh_key_type, |
131 | | - stsafea_host_key_type_t host_secure_channel_keys_type, |
| 143 | + stse_aes_key_type_t host_secure_channel_keys_type, |
132 | 144 | stse_hash_algorithm_t tbs_hash_algo, |
133 | 145 | PLAT_UI8 tbs_public_key_slot, |
134 | 146 | PLAT_UI8 *tbs_private_key, |
135 | | - PLAT_UI8 *host_mac_key, |
136 | | - PLAT_UI8 *host_cipher_key); |
| 147 | + PLAT_UI32 *host_mac_key_index, |
| 148 | + PLAT_UI32 *host_cipher_key_index); |
137 | 149 |
|
138 | 150 | /** |
139 | 151 | * \brief Get symmetric key slot count |
|
0 commit comments