Function esp_idf_svc::hal::sys::mbedtls_ecp_export

source ·
pub unsafe extern "C" fn mbedtls_ecp_export(
    key: *const mbedtls_ecp_keypair,
    grp: *mut mbedtls_ecp_group,
    d: *mut mbedtls_mpi,
    Q: *mut mbedtls_ecp_point,
) -> i32
Expand description

\brief This function exports generic key-pair parameters.

             Each of the output parameters can be a null pointer
             if you do not need that parameter.

\note If the private key or the public key was not set in \p key, the corresponding output is unspecified. Future versions may return an error in that case.

\param key The key pair to export from. \param grp Slot for exported ECP group. It must either be null or point to an initialized ECP group. \param d Slot for the exported secret value. It must either be null or point to an initialized mpi. \param Q Slot for the exported public value. It must either be null or point to an initialized ECP point.

\return \c 0 on success, \return #MBEDTLS_ERR_MPI_ALLOC_FAILED on memory-allocation failure. \return #MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE if key id doesn’t correspond to a known group. \return Another negative error code on other kinds of failure.