nuttx/drivers/crypto
hanzhijian 9e467388de stdlib/rand: replace weak LCG with xorshift32 PRNG
The existing first-order LCG (seed = 470001 * seed % 999563) has several
quality problems:
- Output range limited to [1, 999562] (~20 bits) instead of full 32-bit
- Lower bits have very short periods (8-bit period = 1, 16-bit = 105)
- Overall period only ~1M, far too short for many applications
- Causes mbedtls_rsa_gen_key to loop forever when rand() consumption
  aligns with the cycle length (issue #16760)

Replace the entire order-based LCG implementation (CONFIG_LIBC_RAND_ORDER
0-3) with Marsaglia's xorshift32:
- Full 32-bit output range
- Period 2^32 - 1 (~4.29 billion)
- Fast: just three XOR/shift operations
- No floating-point math needed
- No CONFIG_LIBC_RAND_ORDER configuration required

Remove the CONFIG_LIBC_RAND_ORDER Kconfig option and clean up all
defconfig references (12 boards) and related comments.

Signed-off-by: hanzhijian <hanzhijian@zepp.com>
2026-07-03 15:08:12 +08:00
..
pnt nuttx/drivers/crypto/pnt/pnt_se05x_api: Minor Overflow in Secure Element 2026-06-29 13:50:16 +08:00
CMakeLists.txt drivers/crypto: add Microchip RNG90 driver 2026-06-14 18:41:09 +08:00
dev_urandom.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
Kconfig stdlib/rand: replace weak LCG with xorshift32 PRNG 2026-07-03 15:08:12 +08:00
Make.defs drivers/crypto: add Microchip RNG90 driver 2026-06-14 18:41:09 +08:00
rng90.c drivers/crypto: add Microchip RNG90 driver 2026-06-14 18:41:09 +08:00
se05x.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
se05x_internal.h drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00