@@ -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.
@@ -261,11 +244,9 @@ psa_status_t psa_close_key(psa_key_handle_t handle);
261
244
* according to a different format.
262
245
*
263
246
* \param handle Handle to the slot where the key will be stored.
264
- * This must be a valid slot for a key of the chosen
265
- * type: it must have been obtained by calling
266
- * psa_allocate_key() or psa_create_key() with the
267
- * correct \p type and with a maximum size that is
268
- * compatible with \p data.
247
+ * It must have been obtained by calling
248
+ * psa_allocate_key() or psa_create_key() and must
249
+ * not contain key material yet.
269
250
* \param type Key type (a \c PSA_KEY_TYPE_XXX value). On a successful
270
251
* import, the key slot will contain a key of this type.
271
252
* \param[in] data Buffer containing the key data. The content of this
@@ -2005,12 +1986,9 @@ psa_status_t psa_generator_read(psa_crypto_generator_t *generator,
2005
1986
* the key material is not exposed outside the isolation boundary.
2006
1987
*
2007
1988
* \param handle Handle to the slot where the key will be stored.
2008
- * This must be a valid slot for a key of the chosen
2009
- * type: it must have been obtained by calling
2010
- * psa_allocate_key() or psa_create_key() with the
2011
- * correct \p type and with a maximum size that is
2012
- * compatible with \p bits.
2013
- * It must not contain any key material yet.
1989
+ * It must have been obtained by calling
1990
+ * psa_allocate_key() or psa_create_key() and must
1991
+ * not contain key material yet.
2014
1992
* \param type Key type (a \c PSA_KEY_TYPE_XXX value).
2015
1993
* This must be a symmetric key type.
2016
1994
* \param bits Key size in bits.
@@ -2232,12 +2210,9 @@ typedef struct {
2232
2210
* \brief Generate a key or key pair.
2233
2211
*
2234
2212
* \param handle Handle to the slot where the key will be stored.
2235
- * This must be a valid slot for a key of the chosen
2236
- * type: it must have been obtained by calling
2237
- * psa_allocate_key() or psa_create_key() with the
2238
- * correct \p type and with a maximum size that is
2239
- * compatible with \p bits.
2240
- * It must not contain any key material yet.
2213
+ * It must have been obtained by calling
2214
+ * psa_allocate_key() or psa_create_key() and must
2215
+ * not contain key material yet.
2241
2216
* \param type Key type (a \c PSA_KEY_TYPE_XXX value).
2242
2217
* \param bits Key size in bits.
2243
2218
* \param[in] extra Extra parameters for key generation. The
0 commit comments