mbedtls_ecp_mul_restartable() function
This function performs multiplication of a point by an integer: \p R = \p m * \p P in a restartable way. \see mbedtls_ecp_mul()
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. This must be initialized.
P
The point to multiply. This must be initialized.
f_rng
The RNG function. This may be \c NULL if randomization of intermediate results isn't desired (discouraged).
p_rng
The RNG context to be passed to \p p_rng.
rs_ctx
The restart context (NULL disables restart).
Return value
\c 0 on success. #MBEDTLS_ERR_ECP_INVALID_KEY if \p m is not a valid private key, or \p P is not a valid public key. #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 does the same as \c mbedtls_ecp_mul(), but it can return early and restart according to the limit set with \c mbedtls_ecp_set_max_ops() to reduce blocking.