Function esp_idf_svc::hal::sys::mbedtls_mpi_exp_mod_soft
source ยท pub unsafe extern "C" fn mbedtls_mpi_exp_mod_soft(
X: *mut mbedtls_mpi,
A: *const mbedtls_mpi,
E: *const mbedtls_mpi,
N: *const mbedtls_mpi,
_RR: *mut mbedtls_mpi,
) -> i32
Expand description
@brief Perform a sliding-window exponentiation: X = A^E mod N
@param X The destination MPI. This must point to an initialized MPI. @param A The base of the exponentiation. This must point to an initialized MPI. @param E The exponent MPI. This must point to an initialized MPI. @param N The base for the modular reduction. This must point to an initialized MPI. @param _RR A helper MPI depending solely on \p N which can be used to speed-up multiple modular exponentiations for the same value of \p N. This may be \c NULL. If it is not \c NULL, it must point to an initialized MPI.
@return \c 0 if successful. @return #MBEDTLS_ERR_MPI_ALLOC_FAILED if a memory allocation failed. @return #MBEDTLS_ERR_MPI_BAD_INPUT_DATA if \c N is negative or even, or if \c E is negative. @return Another negative error code on different kinds of failures.