@@ -42,17 +42,16 @@ typedef enum psa_sec_function_s {
42
42
PSA_CRYPTO_INVALID ,
43
43
PSA_CRYPTO_INIT ,
44
44
PSA_IMPORT_KEY ,
45
+ PSA_ALLOCATE_KEY ,
46
+ PSA_CREATE_KEY ,
47
+ PSA_OPEN_KEY ,
48
+ PSA_CLOSE_KEY ,
45
49
PSA_DESTROY_KEY ,
46
50
PSA_GET_KEY_INFORMATION ,
47
51
PSA_EXPORT_KEY ,
48
52
PSA_EXPORT_PUBLIC_KEY ,
49
- PSA_KEY_POLICY_INIT ,
50
- PSA_KEY_POLICY_SET_USAGE ,
51
- PSA_KEY_POLICY_GET_USAGE ,
52
- PSA_KEY_POLICY_GET_ALGORITHM ,
53
53
PSA_SET_KEY_POLICY ,
54
54
PSA_GET_KEY_POLICY ,
55
- PSA_SET_KEY_LIFETIME ,
56
55
PSA_GET_KEY_LIFETIME ,
57
56
PSA_HASH_SETUP ,
58
57
PSA_HASH_UPDATE ,
@@ -95,52 +94,50 @@ typedef enum psa_sec_function_s {
95
94
*/
96
95
97
96
/** psa_crypto_ipc_s struct used for some of the
98
- * PSA Crypto APIs that need psa_key_slot_t and psa_algorithm_t arguments
97
+ * PSA Crypto APIs that need psa_key_handle_t and psa_algorithm_t arguments
99
98
* and in order to use the existing infrastructure of the SPM-IPC we provide a struct to
100
99
* pack them together.
101
100
*/
102
-
103
101
typedef struct psa_crypto_ipc_s {
104
102
psa_sec_function_t func ;
105
- psa_key_slot_t key ;
103
+ psa_key_handle_t handle ;
106
104
psa_algorithm_t alg ;
107
105
} psa_crypto_ipc_t ;
108
106
109
107
/** psa_crypto_derivation_ipc_s struct used for some of the
110
- * PSA Crypto APIs that need psa_key_slot_t and psa_algorithm_t arguments
108
+ * PSA Crypto APIs that need psa_key_handle_t and psa_algorithm_t arguments
111
109
* and in order to use the existing infrastructure of the SPM-IPC we provide a struct to
112
110
* pack them together.
113
111
*/
114
112
typedef struct psa_crypto_derivation_ipc_s {
115
113
psa_sec_function_t func ;
116
- psa_key_slot_t key ;
114
+ psa_key_handle_t handle ;
117
115
psa_algorithm_t alg ;
118
116
size_t capacity ;
119
117
} psa_crypto_derivation_ipc_t ;
120
118
121
119
/** psa_key_mng_ipc_s struct used for some of the
122
- * PSA Crypto APIs that need psa_key_slot_t and psa_algorithm_t arguments
120
+ * PSA Crypto APIs that need psa_key_handle_t and psa_algorithm_t arguments
123
121
* and in order to use the existing infrastructure of the SPM-IPC we provide a struct to
124
122
* pack them together.
125
123
*/
126
-
127
124
typedef struct psa_key_mng_ipc_s {
128
- psa_key_slot_t key ;
125
+ psa_key_handle_t handle ;
126
+ psa_key_lifetime_t lifetime ;
129
127
psa_key_type_t type ;
130
128
psa_sec_function_t func ;
131
129
} psa_key_mng_ipc_t ;
132
130
133
131
/** psa_crypto_ipc_aead_s struct used for AEAD integrated
134
- * PSA Crypto APIs that need psa_key_slot_t and psa_algorithm_t and extra arguments
132
+ * PSA Crypto APIs that need psa_key_handle_t and psa_algorithm_t and extra arguments
135
133
* and in order to use the existing infrastructure of the SPM-IPC we provide a struct to
136
134
* pack them together.
137
135
*/
138
-
139
136
// Max length supported for nonce is 16 bytes.
140
137
#define PSA_AEAD_MAX_NONCE_SIZE 16
141
138
typedef struct psa_crypto_ipc_aead_s {
142
139
psa_sec_function_t func ;
143
- psa_key_slot_t key ;
140
+ psa_key_handle_t handle ;
144
141
psa_algorithm_t alg ;
145
142
uint16_t nonce_size ;
146
143
size_t additional_data_length ;
@@ -149,19 +146,18 @@ typedef struct psa_crypto_ipc_aead_s {
149
146
} psa_crypto_ipc_aead_t ;
150
147
151
148
/** psa_crypto_ipc_asymmetric_s struct used for asymmetric
152
- * PSA Crypto APIs that need psa_key_slot_t and psa_algorithm_t arguments
149
+ * PSA Crypto APIs that need psa_key_handle_t and psa_algorithm_t arguments
153
150
* and in order to use the existing infrastructure of the SPM-IPC we provide a struct to
154
151
* pack them together.
155
152
*/
156
153
typedef struct psa_crypto_ipc_asymmetric_s {
157
154
psa_sec_function_t func ;
158
- psa_key_slot_t key ;
155
+ psa_key_handle_t handle ;
159
156
psa_algorithm_t alg ;
160
157
size_t input_length ;
161
158
size_t salt_length ;
162
159
} psa_crypto_ipc_asymmetric_t ;
163
160
164
-
165
161
/**@}*/
166
162
167
163
#endif /* PSA_CRYPTO_SPE_PLATFORM_H */
0 commit comments