zephyr/drivers/entropy
Alberto Escolar Piedras b3407f04e7 drivers: entropy: fix native_posix driver for more than 3 byte requests
Fix the native_posix fake entropy driver for more than 3 byte requests,
and specially for native_sim//64 builds.

The host random() provides a number between 0 and 2**31-1 (INT_MAX),
so bit 32 was always 0.
So when filling a buffer with more than 3 bytes we would be filling
each 4th byte with a byte which always had its MSbit as 0.

For LP64 native_sim//64 builds, this was even worse, as the driver had
another bug where we assumed random() returned the whole long filled,
and therefore all 4 upper bytes would be 0.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-01-20 20:55:48 +01:00
..
CMakeLists.txt drivers: entropy: Add support for SCE7 to entropy driver 2024-12-09 03:54:50 +01:00
entropy_b91_trng.c
entropy_bt_hci.c
entropy_cc13xx_cc26xx.c
entropy_esp32.c drivers: entropy: update espressif source 2025-01-15 15:05:13 +01:00
entropy_gecko_se.c
entropy_gecko_trng.c
entropy_handlers.c
entropy_litex.c
entropy_max32.c
entropy_mcux_caam.c
entropy_mcux_rng.c
entropy_mcux_rnga.c
entropy_mcux_trng.c
entropy_neorv32_trng.c
entropy_npcx_drbg.c
entropy_nrf5.c
entropy_psa_crypto.c
entropy_renesas_ra.c drivers: entropy: Add support for SCE9 to entropy driver 2025-01-13 08:44:53 +01:00
entropy_rv32m1_trng.c
entropy_sam.c
entropy_smartbond.c
entropy_stm32.c
fake_entropy_native_bottom.c
fake_entropy_native_bottom.h
fake_entropy_native_posix.c drivers: entropy: fix native_posix driver for more than 3 byte requests 2025-01-20 20:55:48 +01:00
Kconfig Revert "drivers: entropy: enable ENTROPY_GENERATOR if "zephyr,entropy" is set in DT" 2024-12-12 00:15:39 +00:00
Kconfig.b91
Kconfig.bt_hci
Kconfig.cc13xx_cc26xx
Kconfig.esp32
Kconfig.gecko
Kconfig.litex
Kconfig.max32
Kconfig.mcux Revert "drivers: entropy: mcux_rnga: add "depends on SYS_CLOCK_EXISTS"" 2024-12-12 00:15:39 +00:00
Kconfig.native_posix
Kconfig.neorv32
Kconfig.npcx
Kconfig.nrf5 Revert "drivers: entropy: nrf5: add "depends on MULTITHREADING"" 2024-12-12 00:15:39 +00:00
Kconfig.psa_crypto
Kconfig.renesas_ra drivers: entropy: Add support for SCE9 to entropy driver 2025-01-13 08:44:53 +01:00
Kconfig.rv32m1
Kconfig.sam
Kconfig.smartbond
Kconfig.stm32