nullspook/libpsijent — reverse-engineered prompt
Reverse engineered prompt
Build me a small C library that generates true random bytes from timing jitter, aimed at psi style experiments. I want the default behavior to be raw output with no required postprocessing, but please support a few optional switches when asking for bytes, one for LFSR style decorrelation, one for masking with a PRNG, and one for random walk bias amplification. Keep the public API simple, basically create the generator, fill a byte buffer, and free it again.
Please include a minimal example program that prints some random bytes, and make it easy to build and install with CMake so I can use it from another C project. If it makes sense, add a small sanity check or demo so I can confirm it is working. Keep the code clean and documented, and make the defaults sensible for someone who just wants random bytes without fiddling with settings. You can look up current docs or references online if you need to.
Want more depth? Deep Reverse