/* Check if the private key is located in valid range of curve.  */
int ECC_IsPrivateKeyValid(CRPT_T *crpt, E_ECC_CURVE ecc_curve, char private_k[])
/* Check if the private key is located in valid range of curve.  */
int ECC_IsPrivateKeyValid(CRPT_T *crpt, E_ECC_CURVE ecc_curve, char private_k[])
{
    uint32_t  i;
    (void)crpt;
    pCurve = get_curve(ecc_curve);
    if (pCurve == NULL)
    {
        return -1;
    }
    if (strlen(private_k) < strlen(pCurve->Eorder))
    {
        return 1;
    }
    if (strlen(private_k) > strlen(pCurve->Eorder))
    {
        return 0;
    }
    for (i = 0U; i < strlen(private_k); i++)
    {
        if (get_nibble_value(private_k[i]) < get_nibble_value(pCurve->Eorder[i]))
        {
            return 1;
        }
        if (get_nibble_value(private_k[i]) > get_nibble_value(pCurve->Eorder[i]))
        {
            return 0;
        }
    }
    return 0;
}