@@ -192,11 +192,17 @@ static inline void psa_clear_key_slot_number(
192192 * \retval #PSA_ERROR_NOT_PERMITTED
193193 * The caller is not authorized to register the specified key slot.
194194 * \retval #PSA_ERROR_INSUFFICIENT_MEMORY
195+ * There is not enough memory to register the key.
195196 * \retval #PSA_ERROR_INSUFFICIENT_STORAGE
197+ * There is not enough storage to register the key.
196198 * \retval #PSA_ERROR_COMMUNICATION_FAILURE
199+ * There was a failure in communication with the secure element.
197200 * \retval #PSA_ERROR_DATA_INVALID
201+ * The key data is not valid.
198202 * \retval #PSA_ERROR_DATA_CORRUPT
203+ * The key data is corrupted.
199204 * \retval #PSA_ERROR_CORRUPTION_DETECTED
205+ * The key data has been corrupted.
200206 * \retval #PSA_ERROR_BAD_STATE
201207 * The library has not been previously initialized by psa_crypto_init().
202208 * It is implementation-dependent whether a failure to initialize
@@ -495,9 +501,15 @@ psa_status_t mbedtls_psa_inject_entropy(const uint8_t *seed,
495501 * \param data_length Size of the \p data buffer in bytes.
496502 *
497503 * \retval #PSA_SUCCESS
504+ * Success.
498505 * \retval #PSA_ERROR_INVALID_ARGUMENT
506+ * \p type is not a supported key type, or the key type does not
507+ * support domain parameters, or the domain parameters are not
508+ * valid for the key type.
499509 * \retval #PSA_ERROR_NOT_SUPPORTED
510+ * The key type does not support domain parameters.
500511 * \retval #PSA_ERROR_INSUFFICIENT_MEMORY
512+ * There was insufficient memory to store the domain parameters.
501513 */
502514psa_status_t psa_set_key_domain_parameters (psa_key_attributes_t * attributes ,
503515 psa_key_type_t type ,
@@ -525,7 +537,10 @@ psa_status_t psa_set_key_domain_parameters(psa_key_attributes_t *attributes,
525537 * that make up the key domain parameters data.
526538 *
527539 * \retval #PSA_SUCCESS
540+ * Success.
528541 * \retval #PSA_ERROR_BUFFER_TOO_SMALL
542+ * \p data_size is too small. You can determine a sufficient buffer
543+ * size by calling PSA_KEY_DOMAIN_PARAMETERS_SIZE().
529544 */
530545psa_status_t psa_get_key_domain_parameters (
531546 const psa_key_attributes_t * attributes ,
@@ -1354,8 +1369,12 @@ static psa_pake_operation_t psa_pake_operation_init(void);
13541369 * \retval #PSA_ERROR_NOT_SUPPORTED
13551370 * The \p cipher_suite is not supported or is not valid.
13561371 * \retval #PSA_ERROR_COMMUNICATION_FAILURE
1372+ * Communication with the peer failed.
13571373 * \retval #PSA_ERROR_HARDWARE_FAILURE
1374+ * A failure of the random generator hardware.
13581375 * \retval #PSA_ERROR_CORRUPTION_DETECTED
1376+ * The implementation detected a potential corruption of its internal
1377+ * data structures.
13591378 * \retval #PSA_ERROR_BAD_STATE
13601379 * The library has not been previously initialized by psa_crypto_init().
13611380 * It is implementation-dependent whether a failure to initialize
@@ -1389,11 +1408,18 @@ psa_status_t psa_pake_setup(psa_pake_operation_t *operation,
13891408 * \retval #PSA_ERROR_BAD_STATE
13901409 * The operation state is not valid (it must have been set up.)
13911410 * \retval #PSA_ERROR_CORRUPTION_DETECTED
1411+ * The implementation detected a potential corruption of its internal
1412+ * data structures.
13921413 * \retval #PSA_ERROR_INVALID_HANDLE
1414+ * \p password is not a valid key identifier.
13931415 * \retval #PSA_ERROR_COMMUNICATION_FAILURE
1416+ * Communication with the key store failed.
13941417 * \retval #PSA_ERROR_HARDWARE_FAILURE
1418+ * A failure of the key store hardware.
13951419 * \retval #PSA_ERROR_STORAGE_FAILURE
1420+ * Storage failure preventing the key from being retrieved.
13961421 * \retval #PSA_ERROR_NOT_PERMITTED
1422+ * The key policy does not allow the requested operation.
13971423 * \retval #PSA_ERROR_INVALID_ARGUMENT
13981424 * \p key is not compatible with the algorithm or the cipher suite.
13991425 * \retval #PSA_ERROR_BAD_STATE
@@ -1430,9 +1456,14 @@ psa_status_t psa_pake_set_password_key(psa_pake_operation_t *operation,
14301456 * \retval #PSA_ERROR_BAD_STATE
14311457 * The operation state is not valid.
14321458 * \retval #PSA_ERROR_INSUFFICIENT_MEMORY
1459+ * There was insufficient memory to perform the operation.
14331460 * \retval #PSA_ERROR_COMMUNICATION_FAILURE
1461+ * Communication with the peer failed.
14341462 * \retval #PSA_ERROR_HARDWARE_FAILURE
1463+ * A failure of the random generator hardware.
14351464 * \retval #PSA_ERROR_CORRUPTION_DETECTED
1465+ * The implementation detected a potential corruption of its internal
1466+ * data structures.
14361467 * \retval #PSA_ERROR_INVALID_ARGUMENT
14371468 * \p user_id is NULL.
14381469 * \retval #PSA_ERROR_BAD_STATE
@@ -1472,9 +1503,14 @@ psa_status_t psa_pake_set_user(psa_pake_operation_t *operation,
14721503 * \retval #PSA_ERROR_NOT_SUPPORTED
14731504 * The algorithm doesn't associate a second identity with the session.
14741505 * \retval #PSA_ERROR_INSUFFICIENT_MEMORY
1506+ * There was insufficient memory to perform the operation.
14751507 * \retval #PSA_ERROR_COMMUNICATION_FAILURE
1508+ * Communication with the peer failed.
14761509 * \retval #PSA_ERROR_HARDWARE_FAILURE
1510+ * A failure of the random generator hardware.
14771511 * \retval #PSA_ERROR_CORRUPTION_DETECTED
1512+ * The implementation detected a potential corruption of its internal
1513+ * data structures.
14781514 * \retval #PSA_ERROR_INVALID_ARGUMENT
14791515 * \p user_id is NULL.
14801516 * \retval #PSA_ERROR_BAD_STATE
@@ -1515,8 +1551,12 @@ psa_status_t psa_pake_set_peer(psa_pake_operation_t *operation,
15151551 * \retval #PSA_ERROR_NOT_SUPPORTED
15161552 * The \p side for this algorithm is not supported or is not valid.
15171553 * \retval #PSA_ERROR_COMMUNICATION_FAILURE
1554+ * Communication with the peer failed.
15181555 * \retval #PSA_ERROR_HARDWARE_FAILURE
1556+ * A failure of the random generator hardware.
15191557 * \retval #PSA_ERROR_CORRUPTION_DETECTED
1558+ * The implementation detected a potential corruption of its internal
1559+ * data structures.
15201560 * \retval #PSA_ERROR_BAD_STATE
15211561 * The library has not been previously initialized by psa_crypto_init().
15221562 * It is implementation-dependent whether a failure to initialize
@@ -1562,10 +1602,16 @@ psa_status_t psa_pake_set_side(psa_pake_operation_t *operation,
15621602 * \retval #PSA_ERROR_BUFFER_TOO_SMALL
15631603 * The size of the \p output buffer is too small.
15641604 * \retval #PSA_ERROR_INSUFFICIENT_MEMORY
1605+ * There was insufficient memory to perform the operation.
15651606 * \retval #PSA_ERROR_COMMUNICATION_FAILURE
1607+ * Communication with the peer failed.
15661608 * \retval #PSA_ERROR_HARDWARE_FAILURE
1609+ * A failure of the random generator hardware.
15671610 * \retval #PSA_ERROR_CORRUPTION_DETECTED
1611+ * The implementation detected a potential corruption of its internal
1612+ * data structures.
15681613 * \retval #PSA_ERROR_STORAGE_FAILURE
1614+ * Storage failure preventing the key from being retrieved.
15691615 * \retval #PSA_ERROR_BAD_STATE
15701616 * The library has not been previously initialized by psa_crypto_init().
15711617 * It is implementation-dependent whether a failure to initialize
@@ -1606,10 +1652,16 @@ psa_status_t psa_pake_output(psa_pake_operation_t *operation,
16061652 * The operation state is not valid (it must be active, but beyond that
16071653 * validity is specific to the algorithm).
16081654 * \retval #PSA_ERROR_INSUFFICIENT_MEMORY
1655+ * There was insufficient memory to perform the operation.
16091656 * \retval #PSA_ERROR_COMMUNICATION_FAILURE
1657+ * Communication with the peer failed.
16101658 * \retval #PSA_ERROR_HARDWARE_FAILURE
1659+ * A failure of the random generator hardware.
16111660 * \retval #PSA_ERROR_CORRUPTION_DETECTED
1661+ * The implementation detected a potential corruption of its internal
1662+ * data structures.
16121663 * \retval #PSA_ERROR_STORAGE_FAILURE
1664+ * Storage failure preventing the key from being retrieved.
16131665 * \retval #PSA_ERROR_INVALID_ARGUMENT
16141666 * The input is not valid for the algorithm, ciphersuite or \p step.
16151667 * \retval #PSA_ERROR_BAD_STATE
@@ -1669,10 +1721,16 @@ psa_status_t psa_pake_input(psa_pake_operation_t *operation,
16691721 * #PSA_KEY_DERIVATION_INPUT_SECRET is not compatible with the output’s
16701722 * algorithm.
16711723 * \retval #PSA_ERROR_INSUFFICIENT_MEMORY
1724+ * There was insufficient memory to perform the operation.
16721725 * \retval #PSA_ERROR_COMMUNICATION_FAILURE
1726+ * Communication with the peer failed.
16731727 * \retval #PSA_ERROR_HARDWARE_FAILURE
1728+ * A failure of the random generator hardware.
16741729 * \retval #PSA_ERROR_CORRUPTION_DETECTED
1730+ * The implementation detected a potential corruption of its internal
1731+ * data structures.
16751732 * \retval #PSA_ERROR_STORAGE_FAILURE
1733+ * Storage failure preventing the key from being retrieved.
16761734 * \retval #PSA_ERROR_BAD_STATE
16771735 * The library has not been previously initialized by psa_crypto_init().
16781736 * It is implementation-dependent whether a failure to initialize
0 commit comments