#include
int main(void)
{
ecc_key mykey;
prng_state prng;
int err;
/* register yarrow */
if (register_prng(&yarrow_desc) == -1) {
printf("Error registering Yarrow\n");
return -1;
}
/* setup the PRNG */
if ((err = rng_make_prng(128, find_prng("yarrow"), &prng, NULL))
!= CRYPT_OK) {
printf("Error setting up PRNG, %s\n", error_to_string(err));
return -1;
}
/* make a 192-bit ECC key */
if ((err = ecc_make_key(&prng, find_prng("yarrow"), 24, &mykey))
!= CRYPT_OK) {
printf("Error making key: %s\n", error_to_string(err));
return -1;
}
return 0;
}