ricardgb commented on PR #19400:
URL: https://github.com/apache/nuttx/pull/19400#issuecomment-5067732825
@linguini1 on-hardware test logs from a Raspberry Pi Pico 2 W (RP2350),
NuttX 13.0.0-RC0, with `CONFIG_RP23XX_TRNG=y` (`DEV_RANDOM=y`,
`DEV_URANDOM_ARCH=y`).
**Both devices register:**
```
nsh> ls /dev
/dev:
console null random telnet ttyACM0 urandom zero
```
**`/dev/urandom` reads at the hardware ring-oscillator latency (~10 ms /
block, not the software PRNG):**
```
nsh> dd if=/dev/urandom of=/dev/null bs=64 count=1
64 bytes (1 blocks) copied, 10000 usec, 6 KB/s
```
**Two independent `/dev/urandom` samples differ (high entropy, no repeats /
constants / runs):**
```
sample A: 62 5e 5f 88 c4 f3 e3 68 12 91 68 4c 03 03 38 c0 ed 18 71 fe a9 2d
67 be ...
sample B: de f9 c7 27 df 42 89 91 dc 94 c1 9e 69 fd 7b 65 c8 aa 49 6f d7 cb
ad a3 ...
```
**`/dev/random` (blocking hardware source) returns real entropy — slower, as
it draws fresh conditioned bits through the VN/CRNGT/autocorrelation health
tests:**
```
nsh> dd if=/dev/random of=/dev/null bs=32 count=1
32 bytes (1 blocks) copied, 500000 usec, 0 KB/s
nsh> dd if=/dev/random of=/dev/null bs=64 count=1
64 bytes (1 blocks) copied, 370000 usec, 0 KB/s
```
The boot self-test gates the source (a failed source is marked unhealthy and
every read returns `-EIO`); all reads above succeed, so the source is healthy.
*Disclosure: these tests were run and captured with the help of an AI agent
(Claude Code, Anthropic); results are from real hardware and human-reviewed.*
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]