1

(5 replies, posted in wolfSSL)

Hi Kaleb,

I think I got it.    

Instead of trying to get public key using EC_KEY_get0_public_key() and then try to convert it to byte array, found that the generated key contains a field (WOLFSSL_EC_KEY->internal) pointing to ecc_key which can be used to export in x9.63 format.

ret = wc_ecc_export_x963((ecc_key*)ecckey->internal, out, &outLen);

Hope my understanding is correct.

Thank
Sandeep

2

(5 replies, posted in wolfSSL)

Hi Kaleb,

I am porting my host application replacing OpenSSL calls with WolfSSL, before moving to bare-metal.

Current application generates ECC Keypair and sets the public key in the smart card for subsequent secure communication.The public key generated is converted to flat binary array using EC_POINT_point2bn() and BN_bn2bin() APIs in OpenSSL. But in WolfSSL I could not find an API similar to EC_POINT_point2bn().

Is there any way to do convert the EC_POINT public key to a flat byte array? Purpose is to set this public key in a smart card that expects the key in plain uncompressed binary format.

Thanks
Sandeep

3

(5 replies, posted in wolfSSL)

Hi Kaleb,

Thank you for the answers.

BR
Sandeep

4

(5 replies, posted in wolfSSL)

Hi all,

I have an application running on a windows PC which communicates with a smart card securely. It is using OpenSSL currently.

My project is to port this application to a PowerPC based embedded device as a bare-metal program.

Current application uses OpenSSL to generate RSA and ECC key pairs, sign and verify messages. The signature is expected to be in ANSI X9.62 format.

We are trying to find an equivalent of OpenSSL which can be used in embedded devices. WolfSSL seems to be a good choice.

My queries are:
1. Can we easily port WolfSSL to bare-metal environment having no file systems, threads, sockets?

2. Can we easily replace OpenSSL with WolfSSL? From the documentation I see that there is an OpenSSL compatibility layer which makes the migration from OpenSSL to WolfSSL easier. However, there a few APIs which seems missing that are used by current application - CMAC_CTX, CMAC_CTX_new, CMAC_Init, CMAC_Update, CMAC_Final, CMAC_CTX_free, RSA_PKCS1_SSLeay, RSA_padding_add_PKCS1_PSS, RSA_private_encrypt, RSA_private_decrypt, RSA_verify_PKCS1_PSS, RSA_padding_check_PKCS1_OAEP, EC_POINT_point2bn, EC_POINT_oct2point, ECDSA_verify. Can I get the equivalent functionalities working using wolfSSL?

3. Does it support ECDSA signature generation in X9.62 format?

Thanks
Sandeep