[Toybox] Ok, what am I doing wrong here.

Rob Landley rob at landley.net
Tue Feb 4 12:30:13 PST 2025


On 2/4/25 14:24, Rob Landley wrote:
> I tried to chop the uuid code out into a standalone thingy to show 
> somebody, and:
...
> Why is my getrandom() not random? I tried both getentropy() and 
> getrandom(), on both glibc and musl toolchains. The output of /dev/ 
> random is properly random. It's gotta be something really stupid I'm not 
> seeing...

It was. When combining the creation and display functions, I also 
combined the input and output buffers, not something staring at strace 
will show you. Nor reading kernel code. :)

(Don't mind me, I just get a bit paranoid when I wander too close to 
cryptographic mindsets...)

Rob


More information about the Toybox mailing list