mbedtls_ecp_muladd_restartable() function
This function performs multiplication and addition of two points by integers: \p R = \p m * \p P + \p n * \p Q in a restartable way. \see \c mbedtls_ecp_muladd()
Arguments
grp
The ECP group to use. This must be initialized and have group parameters set, for example through mbedtls_ecp_group_load().
R
The point in which to store the result of the calculation. This must be initialized.
m
The integer by which to multiply \p P. This must be initialized.
P
The point to multiply by \p m. This must be initialized.
n
The integer by which to multiply \p Q. This must be initialized.
Q
The point to be multiplied by \p n. This must be initialized.
rs_ctx
The restart context (NULL disables restart).
Return value
\c 0 on success. #MBEDTLS_ERR_ECP_INVALID_KEY if \p m or \p n are not valid private keys, or \p P or \p Q are not valid public keys. #MBEDTLS_ERR_MPI_ALLOC_FAILED on memory-allocation failure. #MBEDTLS_ERR_ECP_IN_PROGRESS if maximum number of operations was reached: see \c mbedtls_ecp_set_max_ops(). Another negative error code on other kinds of failure.
Notes
This function works the same as \c mbedtls_ecp_muladd(), but it can return early and restart according to the limit set with \c mbedtls_ecp_set_max_ops() to reduce blocking.