1

(3 replies, posted in wolfSSL)

thanks Chris for the reply...

Below are the defines with which the application is compiled in addition to whatever is enabled default in the .c and .h files
HAVE_CONFIG_H, SINGLE_THREADED, CYASSL_KEY_GEN

I will go through the link you have posted...

Few more details...

I am trying to get the RSA based signature verification done via the below API calls, available as part of rsa.c:

SSL_Sign
SSL_Verify

I suppose hashing the message is done as part of this call and doesn't need to be separately done.

Heap size allocation is 3KB. I hope this should be sufficient enough for all the dynamic memory allocation involved.

Anything specific needs to be taken care as I am trying to get this done on a bare metal system.(No OS involved)

Hard fault happens in random prime number generation part of RSA key generation.

Update:
---------

I was able to get the key generated by increasing the heap size. 8 KB for a 512 bit key and 12 KB for a 1024 bit key. Is this as expected or am I doing something wrong?

Another thing that requires clarification is if I sign a byte array does it encrypt it as well or just creates a signature of the byte array and returns me back. The reason why I am asking this is when I verify the output byte array of Sign call I get back my input byte array(the one I was interested in signing).

Please suggest.

2

(3 replies, posted in wolfSSL)

Hello all.. I am trying to get the RSA cryptography part of the wolfSSL library 3.3.0 work with a Cortex M3 based microcontroller(No operating system involved) with the Keil IDE. All I am trying to do is sign a byte array and verify it back using the private and public key available as  part of the MakeRsaKey() function call respectively.

However I am stuck with this MakeRsaKey function call. For a 512 bit key, the system is crashing with a hard fault whereas for a 1024 bit key, I am getting an out of memory error.

Any thoughts??