Topic: how to reduce ECC memory(RAM) requirement

Hi,

I ported ECC part of wolfSSL embedded SSL to cortexM0 and got it working.

But the memory requirement is huge (9k including heap and stack).

1. Is it expected?

2. How to reduce RAM requirement?
    I tried setting SMALL_STACK, but it does not works on my port. And actually as per document it will decrease stack but increase heap, so net gain will not be that much.


PS.
I posted a related question at
http://www.yassl.com/forums/topic407-ec … iable.html

Share

Re: how to reduce ECC memory(RAM) requirement

Hi,

Have you tried building with both the regular big integer math library as well as the fastmath library to see if one gave you a smaller memory usage?

If you are doing a source build (not using the ./configure system), the big integer library is enabled by default.  If you are building with the ./configure system, the fastmath library is enabled by default on 64-bit systems.  You can use the --enable-fastmath or --disable-fastmath build options to turn on/off fastmath, or define USE_FAST_MATH to turn it on when not using ./configure.

When building with fastmath, there are a few options you can try which may reduce memory size.  You can define TFM_TIMING_RESISTANT, which will reduce stack usage and disable timing side channel attacks.  And the other define you can try using is POSITIVE_EXP_ONLY, which will reduce stack use even more when we assume no negative exponents. RSA, ECC, and DH only use positive exponents..

Best Regards,
Chris