yamt opened a new issue, #16760:
URL: https://github.com/apache/nuttx/issues/16760

   ### Description / Steps to reproduce the issue
   
   nuttx's rand() implementation is a bit poor and, with the default
   CONFIG_LIBC_RAND_ORDER=1, it seems to produce the same values for
   every 903 calls. 903 seems too small to me.
   
   i observed this when playing with mbedtls benchmark.
   mbedtls's programs/test/benchmark.c uses rand() for the entropy source.
   i guess it's ok because it's just a benchmark.
   with its default parameters, mbedtls_mpi_gen_prime happens to consume
   231168 bytes random values, which is unfortunately a multiple of sizeof(int) 
* 903.
   it means successive mbedtls_mpi_gen_prime calls always produce identical 
primes.
   it makes mbedtls_rsa_gen_key run forever for its attempt to produce two 
different
   primes, which does never succeed.
   
   
   ### On which OS does this issue occur?
   
   [OS: Mac]
   
   ### What is the version of your OS?
   
   macOS 15.5
   
   ### NuttX Version
   
   master
   
   ### Issue Architecture
   
   [Arch: xtensa]
   
   ### Issue Area
   
   [Area: OS Components]
   
   ### Host information
   
   esp32s3
   
   ### Verification
   
   - [x] I have verified before submitting the report.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to