Add psa_key_agreement_iop_get_num_ops() docs

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
Paul Elliott 2024-07-18 19:33:17 +01:00
parent 03d62b1958
commit d791062fee
2 changed files with 35 additions and 0 deletions

View File

@ -592,5 +592,15 @@ exit:
} }
#endif /* MBEDTLS_PSA_BUILTIN_ALG_ECDH */ #endif /* MBEDTLS_PSA_BUILTIN_ALG_ECDH */
/****************************************************************/
/* Interruptible ECC Key Agreement */
/****************************************************************/
uint32_t psa_key_agreement_iop_get_num_ops(
psa_key_agreement_iop_t *operation)
{
(void) operation;
return 0;
}
#endif /* MBEDTLS_PSA_CRYPTO_C */ #endif /* MBEDTLS_PSA_CRYPTO_C */

View File

@ -4852,6 +4852,31 @@ psa_status_t psa_verify_hash_abort(
*/ */
typedef struct psa_key_agreement_iop_s psa_key_agreement_iop_t; typedef struct psa_key_agreement_iop_s psa_key_agreement_iop_t;
/**
* \brief Get the number of ops that a key agreement
* operation has taken so far. If the operation has
* completed, then this will represent the number of
* ops required for the entire operation.
* After initialization or calling \c
* psa_key_agreement_iop_abort() on the operation,
* a value of 0 will be returned.
*
* \warning This is a beta API, and thus subject to change
* at any point. It is not bound by the usual
* interface stability promises.
*
* This is a helper provided to help you tune the
* value passed to \c
* psa_interruptible_set_max_ops().
*
* \param operation The \c psa_key_agreement_iop_t to use. This must
* be initialized first.
*
* \return Number of ops that the operation has taken so
* far.
*/
uint32_t psa_key_agreement_iop_get_num_ops(psa_key_agreement_iop_t *operation);
/**@}*/ /**@}*/
#ifdef __cplusplus #ifdef __cplusplus