Function esp_idf_svc::hal::sys::mbedtls_rsa_import
source ยท pub unsafe extern "C" fn mbedtls_rsa_import(
ctx: *mut mbedtls_rsa_context,
N: *const mbedtls_mpi,
P: *const mbedtls_mpi,
Q: *const mbedtls_mpi,
D: *const mbedtls_mpi,
E: *const mbedtls_mpi,
) -> i32
Expand description
\brief This function imports a set of core parameters into an RSA context.
\note This function can be called multiple times for successive imports, if the parameters are not simultaneously present.
Any sequence of calls to this function should be followed
by a call to mbedtls_rsa_complete(), which checks and
completes the provided information to a ready-for-use
public or private RSA key.
\note See mbedtls_rsa_complete() for more information on which parameters are necessary to set up a private or public RSA key.
\note The imported parameters are copied and need not be preserved for the lifetime of the RSA context being set up.
\param ctx The initialized RSA context to store the parameters in. \param N The RSA modulus. This may be \c NULL. \param P The first prime factor of \p N. This may be \c NULL. \param Q The second prime factor of \p N. This may be \c NULL. \param D The private exponent. This may be \c NULL. \param E The public exponent. This may be \c NULL.
\return \c 0 on success. \return A non-zero error code on failure.