waywardgeek / infnoise

The world's easiest TRNG to get right
Creative Commons Zero v1.0 Universal
723 stars 99 forks source link

Linux kernel driver for in-kernel users of infnoise #50

Closed sbates130272 closed 5 years ago

sbates130272 commented 6 years ago

Great project! Has anyone looked at an in-kernel version of infnoise to provide TRNG services to other parts of the kernel? It could also expose the infnoise devices in the device tree to make consumption by user-space easier?

sbates130272 commented 6 years ago

Perhaps modelled on something that already exists in the kernel like:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/usb/misc/chaoskey.c?h=v4.16

manuel-domke commented 6 years ago

Also thought about this, but its probably a long road to go and I'm not so sure if whitening has its place in a kernel driver.

Anyway, the Infinite Noise TRNG driver can feed the kernels entropy pool so other "parts" can access its entropy. Or is there a downside of the current approach I'm not aware of?

I think we should stick to the libinfnoise idea (#51) for integration in custom applications and infnoise for use with shell scripts or /dev/random mode. (for now)

Based on the lib it will be a lot easier to implement a kernel driver.

sbates130272 commented 6 years ago

Hi

Yes I agree we can just take the entropy pool approach to feed the TRNG entropy into the kernel. I'd be happy to close this now as I don't think we even need it as an enhancement.

Stephen