Topic: How to Generate Public and Private Key in Der format (separate Buffer)

Hi,

I want to generate Public key and Private Key in DER format. I was able to generate  ecc key using  wc_ecc_make_key function. Please help me to identify a API to generate Public key and Private Key DER array.

Thanks
Manoj

Share

Re: How to Generate Public and Private Key in Der format (separate Buffer)

Hi Manoj,

I think the API you are looking for is wc_EccKeyToDer for private key and wc_EccPublicKeyToDer for public key located in wolfssl/wolfcrypt/asn_public.h. Example uses of these function can be seen in wolfcrypt/test/test.c around line 9935 in the function ecc_test_key_gen.

Regards,
Jacob

Share