/* Initial function for ECDSA key generator for Key Store.  */
int32_t RNG_ECDSA_Init(uint32_t u32KeySize, uint32_t au32ECC_N[18])
/* Initial function for ECDSA key generator for Key Store.  */
int32_t RNG_ECDSA_Init(uint32_t u32KeySize, uint32_t au32ECC_N[18])
{
    int32_t i;
    if (RNG_Open())
        return -1;
    for (i = 0; i < 18; i++)
        CRPT->ECC_N[i] = au32ECC_N[i];
    CRPT->PRNG_KSCTL = (KS_OWNER_ECC << CRPT_PRNG_KSCTL_OWNER_Pos) |
                       CRPT_PRNG_KSCTL_ECDSA_Msk |
                       (CRPT_PRNG_KSCTL_WDST_Msk) |
                       (KS_SRAM << CRPT_PRNG_KSCTL_WSDST_Pos);
    return 0;
}