Topic: How many bytes stack size needed for FAST_MATH
Hello,
I wonder how many bytes of stack is needed to enable fast math?
Thanks.
You are not logged in. Please login or register.
Please post questions or comments you have about wolfSSL products here. It is helpful to be as descriptive as possible when asking your questions.
ReferenceswolfSSL - Embedded SSL Library → wolfSSL → How many bytes stack size needed for FAST_MATH
Hello,
I wonder how many bytes of stack is needed to enable fast math?
Thanks.
Hi burakkirazli,
It depends on the algorithms enabled/used and the FP_MAX_BITS you have defined. The ECC and RSA algorithms use fast math.
Typically during a TLS connection you'll have several of these on the stack. I recommend starting with 10KB of stack and then looking at your stack high watermark to determine how much to reduce.
For RSA the FP_MAX_BITS is double the maximum key size. For RSA 2048-bit requires double max bits so 4096. If you have just ECC defined than FP_MAX_BITS can be ECC max key size + 32. For both RSA and ECC you can reduce ECC stack usage by defining ALT_ECC_SIZE, which will use heap for the ECC point instead of stack.
We have some good examples for configuration the math library cases here:
https://github.com/wolfSSL/wolfssl/blob … settings.h
Thanks,
David Garske, wolfSSL
wolfSSL - Embedded SSL Library → wolfSSL → How many bytes stack size needed for FAST_MATH
Powered by PunBB, supported by Informer Technologies, Inc.
Generated in 0.017 seconds (90% PHP - 10% DB) with 12 queries