Function esp_idf_sys::mbedtls_rsa_public

source ยท
pub unsafe extern "C" fn mbedtls_rsa_public(
    ctx: *mut mbedtls_rsa_context,
    input: *const c_uchar,
    output: *mut c_uchar,
) -> c_int
Expand description

\brief This function performs an RSA public key operation.

\param ctx The initialized RSA context to use. \param input The input buffer. This must be a readable buffer of length \c ctx->len Bytes. For example, \c 256 Bytes for an 2048-bit RSA modulus. \param output The output buffer. This must be a writable buffer of length \c ctx->len Bytes. For example, \c 256 Bytes for an 2048-bit RSA modulus.

\note This function does not handle message padding.

\note Make sure to set \p input[0] = 0 or ensure that input is smaller than \c N.

\return \c 0 on success. \return An \c MBEDTLS_ERR_RSA_XXX error code on failure.