1 (edited by abcdefg 2017-03-06 08:50:55)

Topic: what is the minimum buffer size to use ECC with static memory?

I have seen that the buffer size is defined as 50000 in wolfcrypt benchmark.c  (when using #define BENCH_EMBEDDED )

but, the buffer size is big to use on my device ( Nrf52, 64k ram )

so, my questions are..

1) what is the minimum buffer size to use the ECC with WOLFSSL_STATIC_MEMORY?

2) Is there some guide how to use the ECC on Nordic nrf52 without heap memory?

thanks.

Share

Re: what is the minimum buffer size to use ECC with static memory?

Hi abcdefg,

We do not have an exact amount that would be needed, there are unfortunately too many variables.

We chose a size that would work for nearly every configuration. Depending on your build you may be able to reduce that significantly. I regret the best suggestion at this time would be to look at our example in <wolfssl-root>/examples/server/server.c to see how we use the WOLFSSL_TRACK_MEMORY define to check how much memory is being used. Then test out reducing the size of that buffer to fit your environment and build.

We do not have a guide for ECC on Nordic nrf52. If that is something you would like us to look into please let us know and we can put you in touch with the business manager for your region to begin coordinating that effort.


Warm Regards,

Kaleb

3 (edited by dawoodk828686 2026-09-18 22:17:35)

Re: what is the minimum buffer size to use ECC with static memory?

Professional office fit-out services can help transform an empty workspace into a functional and well-designed environment.
A complete office fit-out in Dubai can cover space planning, partitions, ceilings, flooring, lighting, electrical, and finishing works.
For businesses planning an office upgrade, commercial fit-out services
can provide a practical solution from design through execution.
A well-planned office renovation and fit-out can improve both the appearance and functionality of a workplace.
Turnkey office fit-out solutions can handle the project from initial planning and design to final finishing.
Professional office interior fit-out helps create a workspace that reflects the company’s needs, brand, and working style.
From partition and ceiling works to flooring, MEP, painting, and custom joinery, a complete fit-out can bring the entire office together.

Share

Re: what is the minimum buffer size to use ECC with static memory?

The 50000 buffer size in wolfcrypt/benchmark.c is mainly intended for benchmarking and should not be considered the minimum RAM requirement for ECC.

With WOLFSSL_STATIC_MEMORY, there is no universal minimum buffer size. The required memory depends on the ECC curve, enabled wolfCrypt features, and the operation being performed. On an nRF52 with 64 KB RAM, using a smaller static buffer and measuring actual peak usage is recommended.

You can use wc_LoadStaticMemory() to provide a fixed memory pool and wc_ecc_init_ex() to initialize ECC with that pool. Enabling memory tracking can also help determine the required size.

For nRF52, consider enabling only the required ECC curve (such as P-256), disabling unused algorithms, and using WOLFSSL_NO_MALLOC if completely avoiding heap allocation.

The key is to benchmark your specific ECC operation rather than copying the 50 KB benchmark buffer—much like optimizing memory before tackling a demanding geometry dash level.

Share