@@ -124,14 +124,6 @@ psa_status_t psa_get_key_lifetime(psa_key_handle_t handle,
124
124
* application calls psa_close_key() or psa_destroy_key() or until the
125
125
* application terminates.
126
126
*
127
- * This function takes a key type and maximum size as arguments so that
128
- * the implementation can reserve a corresponding amount of memory.
129
- * Implementations are not required to enforce this limit: if the application
130
- * later tries to create a larger key or a key of a different type, it
131
- * is implementation-defined whether this may succeed.
132
- *
133
- * \param type The type of key that the slot will contain.
134
- * \param max_bits The maximum key size that the slot will contain.
135
127
* \param[out] handle On success, a handle to a volatile key slot.
136
128
*
137
129
* \retval #PSA_SUCCESS
@@ -140,13 +132,8 @@ psa_status_t psa_get_key_lifetime(psa_key_handle_t handle,
140
132
* \retval #PSA_ERROR_INSUFFICIENT_MEMORY
141
133
* There was not enough memory, or the maximum number of key slots
142
134
* has been reached.
143
- * \retval #PSA_ERROR_INVALID_ARGUMENT
144
- * This implementation does not support this key type.
145
135
*/
146
-
147
- psa_status_t psa_allocate_key (psa_key_type_t type ,
148
- size_t max_bits ,
149
- psa_key_handle_t * handle );
136
+ psa_status_t psa_allocate_key (psa_key_handle_t * handle );
150
137
151
138
/** Open a handle to an existing persistent key.
152
139
*
@@ -192,8 +179,6 @@ psa_status_t psa_open_key(psa_key_lifetime_t lifetime,
192
179
* area where the key material is stored. This must not
193
180
* be #PSA_KEY_LIFETIME_VOLATILE.
194
181
* \param id The persistent identifier of the key.
195
- * \param type The type of key that the slot will contain.
196
- * \param max_bits The maximum key size that the slot will contain.
197
182
* \param[out] handle On success, a handle to the newly created key slot.
198
183
* When key material is later created in this key slot,
199
184
* it will be saved to the specified persistent location.
@@ -218,8 +203,6 @@ psa_status_t psa_open_key(psa_key_lifetime_t lifetime,
218
203
*/
219
204
psa_status_t psa_create_key (psa_key_lifetime_t lifetime ,
220
205
psa_key_id_t id ,
221
- psa_key_type_t type ,
222
- size_t max_bits ,
223
206
psa_key_handle_t * handle );
224
207
225
208
/** Close a key handle.
@@ -264,11 +247,9 @@ psa_status_t psa_close_key(psa_key_handle_t handle);
264
247
* according to a different format.
265
248
*
266
249
* \param handle Handle to the slot where the key will be stored.
267
- * This must be a valid slot for a key of the chosen
268
- * type: it must have been obtained by calling
269
- * psa_allocate_key() or psa_create_key() with the
270
- * correct \p type and with a maximum size that is
271
- * compatible with \p data.
250
+ * It must have been obtained by calling
251
+ * psa_allocate_key() or psa_create_key() and must
252
+ * not contain key material yet.
272
253
* \param type Key type (a \c PSA_KEY_TYPE_XXX value). On a successful
273
254
* import, the key slot will contain a key of this type.
274
255
* \param[in] data Buffer containing the key data. The content of this
@@ -2841,12 +2822,9 @@ psa_status_t psa_generator_read(psa_crypto_generator_t *generator,
2841
2822
* the key material is not exposed outside the isolation boundary.
2842
2823
*
2843
2824
* \param handle Handle to the slot where the key will be stored.
2844
- * This must be a valid slot for a key of the chosen
2845
- * type: it must have been obtained by calling
2846
- * psa_allocate_key() or psa_create_key() with the
2847
- * correct \p type and with a maximum size that is
2848
- * compatible with \p bits.
2849
- * It must not contain any key material yet.
2825
+ * It must have been obtained by calling
2826
+ * psa_allocate_key() or psa_create_key() and must
2827
+ * not contain key material yet.
2850
2828
* \param type Key type (a \c PSA_KEY_TYPE_XXX value).
2851
2829
* This must be a symmetric key type.
2852
2830
* \param bits Key size in bits.
@@ -3207,12 +3185,9 @@ typedef struct {
3207
3185
* \brief Generate a key or key pair.
3208
3186
*
3209
3187
* \param handle Handle to the slot where the key will be stored.
3210
- * This must be a valid slot for a key of the chosen
3211
- * type: it must have been obtained by calling
3212
- * psa_allocate_key() or psa_create_key() with the
3213
- * correct \p type and with a maximum size that is
3214
- * compatible with \p bits.
3215
- * It must not contain any key material yet.
3188
+ * It must have been obtained by calling
3189
+ * psa_allocate_key() or psa_create_key() and must
3190
+ * not contain key material yet.
3216
3191
* \param type Key type (a \c PSA_KEY_TYPE_XXX value).
3217
3192
* \param bits Key size in bits.
3218
3193
* \param[in] extra Extra parameters for key generation. The
0 commit comments