Avoid using add_entry in elliptic curve scalar multiplication and minimum memory footprint
Hi,
I am using a program which relied on OpenSLL for elliptic curve and field arithmetics and SHA256, but wanted to switch to WolfSSL to improve memory efficiency. Everything works.
However, I am curious to know what flags could be used to avoid using add_entry in wc_ecc_mulmod_ex. This portion of the code seem to lead to several hundreds of KiB of stored partial results. So far, I had the FP_ENTRIES length set to 1 but for memory efficiency, it would be great to completely get rid of all these allocations.
Would you have any information or tips which could reduce memory consumption to a minimum? What could be configuration settings which would disable most if not all WolfSSL internal allocations except for the ones explicitly mentioned in the main program?
Current compilation flags on x86:
-enable-all-crypto --enable-opensslall --enable-sp-asm --enable-debug CFLAGS="-DWOLF_SMALL_STACK -DFP_ENTRIES=0.
Thank you in advance for your kind help.
Hello @a-def
Thanks for your interest in the wolfSSL project!
Try these configure options ./configure --enable-sp --enable-sp-math -enable-all-crypto --enable-opensslall --enable-sp-asm --enable-debug CFLAGS="-DWOLF_SMALL_STACK"
If you do not need the TLS stack, try adding --enable-cryptonly and removing --enable-opensslall. This will require you to use the wolfSSL API in your application.
Can you tell us a bit about your project using wolfSSL?
Thanks, Eric - wolfSSL Support
Since we never heard back I will go ahead and close out this support inquiry. If any other questions come up please do not hesitate to open a new issue anytime by emailing [email protected] or through the zendesk portal at https://wolfssl.zendesk.com/. We are always happy to help out in any way we can.
Until next time all the best and thank you for using wolfSSL support.