Function esp_idf_svc::hal::sys::mbedtls_mpi_inv_mod

source ยท
pub unsafe extern "C" fn mbedtls_mpi_inv_mod(
    X: *mut mbedtls_mpi,
    A: *const mbedtls_mpi,
    N: *const mbedtls_mpi,
) -> i32
Expand description

\brief Compute the modular inverse: X = A^-1 mod N

\param X The destination MPI. This must point to an initialized MPI. \param A The MPI to calculate the modular inverse of. This must point to an initialized MPI. \param N The base of the modular inversion. This 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 \p N is less than or equal to one. \return #MBEDTLS_ERR_MPI_NOT_ACCEPTABLE if \p A has no modular inverse with respect to \p N.