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.