You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The sliding window for the sliding-window exponentiation is allocated (on the stack) with:
W[ 2 << MBEDTLS_MPI_WINDOW_SIZE ]
this should (most likely) be:
W[ 1 << MBEDTLS_MPI_WINDOW_SIZE ]
I ran the tests with this modification and they passed. To ensure the tests would catch actually fail if the array would be to small, I also ran them with a W[ (1 << MBEDTLS_MPI_WINDOW_SIZE) - 1], and they failed as expected.
This change will also reduce stack usage (during this function), by nearly a factor of 2! 🤩
The sliding window for the sliding-window exponentiation is allocated (on the stack) with:
W[ 2 << MBEDTLS_MPI_WINDOW_SIZE ]
this should (most likely) be:
W[ 1 << MBEDTLS_MPI_WINDOW_SIZE ]
I ran the tests with this modification and they passed. To ensure the tests would catch actually fail if the array would be to small, I also ran them with a
W[ (1 << MBEDTLS_MPI_WINDOW_SIZE) - 1]
, and they failed as expected.This change will also reduce stack usage (during this function), by nearly a factor of 2! 🤩
The PR #3592 contains the modification.
The text was updated successfully, but these errors were encountered: