pub unsafe extern "C" fn mbedtls_ecp_muladd_restartable(
    grp: *mut mbedtls_ecp_group,
    R: *mut mbedtls_ecp_point,
    m: *const mbedtls_mpi,
    P: *const mbedtls_ecp_point,
    n: *const mbedtls_mpi,
    Q: *const mbedtls_ecp_point,
    rs_ctx: *mut mbedtls_ecp_restart_ctx
) -> c_int
Expand description

\brief 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()

\note 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.

\note This function is only defined for short Weierstrass curves. It may not be included in builds without any short Weierstrass curve.

\param grp The ECP group to use. This must be initialized and have group parameters set, for example through mbedtls_ecp_group_load(). \param R The point in which to store the result of the calculation. This must be initialized. \param m The integer by which to multiply \p P. This must be initialized. \param P The point to multiply by \p m. This must be initialized. \param n The integer by which to multiply \p Q. This must be initialized. \param Q The point to be multiplied by \p n. This must be initialized. \param rs_ctx The restart context (NULL disables restart).

\return \c 0 on success. \return #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. \return #MBEDTLS_ERR_MPI_ALLOC_FAILED on memory-allocation failure. \return #MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE if \p grp does not designate a short Weierstrass curve. \return #MBEDTLS_ERR_ECP_IN_PROGRESS if maximum number of operations was reached: see \c mbedtls_ecp_set_max_ops(). \return Another negative error code on other kinds of failure.