int ctr_instantiate(RAND_DRBG *drbg,
                    const unsigned char *ent, size_t entlen,
                    const unsigned char *nonce, size_t noncelen,
                    const unsigned char *pers, size_t perslen)
{
    RAND_DRBG_CTR *ctr = &drbg->ctr;

    memset(ctr->K, 0, sizeof(ctr->K));
    memset(ctr->V, 0, sizeof(ctr->V));
    AES_set_encrypt_key(ctr->K, drbg->strength, &ctr->ks);
    ctr_update(drbg, ent, entlen, pers, perslen, nonce, noncelen);
    return 1;
}