How to integrated a PRNG into the system?

After I register a PRNG via the crypto API it seems that the driver is never called?

Who / What is suppose to call the driver to enhance entropy / generate random numbers?

I am aware of rng-tools but those are for True RNG / HW RNG ??

I looked at the sunxi PRNG code and that seems to suggest that it should be used in combination with "libkcapi" ?

Any suggestion for a forum / mailing list "specific" for linux crypto drivers would also be very helpful.

I think you are right with your assessment there. The PRNG API is relatively new so there aren't many users and not a specific testcase yet. I could see that OpenSSL 1.1++ could pick it up through something like their new AFALG in the future, but currently you are pretty much limited to run testcases with the libkcapi.

There's always . Personally, I think you should try to upstream your driver there. Because once the driver is accepted upstream, it makes the openwrt owners/comitter job much easier, since from what I can tell they pretty much auto-accept backport patches that are sent to the github/openwrt-mailinglist.

Thanks for your advice. I have subscribed to the mailing list but I feel I'm a bit out of my league (I'm just a simple amateur regarding this). The PRNG is part of a work-in-progress full crypto/digest/authentication driver with possibly ESP header offload.

For now I will concentrate on the crypto/digest parts and see how that goes.

1 Like

Do you have a link to your WIP? I can take a look.

Also, since you plan to look into crypto/digest/auth you should definitely re-enable the kernel's crypto tests when you are developing with OpenWrt kernels. Because OpenWrt ships with the out-of-tree hack-patch 260-crypto_test_dependencies.patch that disables all of the (sanity, conformance, speed/throughput/performance) tests in favor of saving valuable space.