#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //firt generate ECC/RA key. //check for deterministic consistency //seed RNGs with CDI //let's see how it goes //add entropy source? //seed RNG //create ctx //init //gen keypair void main() { mbedtls_pk_context key; mbedtls_entropy_context entropy; mbedtls_ctr_drbg_context ctr_drbg; mbedtls_pk_type_t pk_alg = MBEDTLS_PK_ECKEY; mbedtls_pk_init(&key); mbedtls_entropy_init( &entropy ); mbedtls_ctr_drbg_init(&ctr_drbg); int ret = mbedtls_pk_setup(&key, mbedtls_pk_info_from_type(pk_alg)); ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, (const unsigned char *) "ecdsa", strlen(pers) ); ret = mbedtls_ecp_gen_key(MBEDTLS_ECP_DP_SECP256R, mbedtls_pk_ec(key), mbedtls_ctr_drbg_random, &ctr_drbg ); printf("done\n\n"); printf("I wonder what the key is\n\n"); printf("key : %s", key) }