mbedtls_ecp_check_pub_priv() function
This function checks that the keypair objects \p pub and \p prv have the same group and the same public point, and that the private key in \p prv is consistent with the public key.
Arguments
pub
The keypair structure holding the public key. This must be initialized. If it contains a private key, that part is ignored.
prv
The keypair structure holding the full keypair. This must be initialized.
Return value
\c 0 on success, meaning that the keys are valid and match. #MBEDTLS_ERR_ECP_BAD_INPUT_DATA if the keys are invalid or do not match. An \c MBEDTLS_ERR_ECP_XXX or an \c MBEDTLS_ERR_MPI_XXX error code on calculation failure.