# Crypto: How to feed a new entropy source



## kavitakr (Oct 30, 2020)

I understand there are are sysctl parameters
kern.random.random_sources:

I did go through this script /etc/rc.d/random, Do you need to modify feed_dev_random?

Anything equivalent to RNDADDENTROPY ioctl  (like in linux ) exists in freebsd ?


----------



## a6h (Oct 30, 2020)

Good question. The short answer no and you don't need one (I'm 99% sure!) in FreeBSD, thus it's better to send an email to freebsd-hackers mailing list aka freebsd-hackers@freebsd.org. In the meantime, do what I'm doing right now: compare these man pages side by side: random(4) and random(4) [OpenBSD] and random(4) [Linux]
Also take a look at this https://lists.freebsd.org/pipermail/freebsd-hackers/2015-July/047969.html. I think there's some typos in that thread, but that's ok!

Few tips: 
On FreeBSD /dev/random blocks if there's no entropy in the pool.
On OpenBSD /dev/random is an alias for /dev/urandom
Use random(4) for script
Use arc4random (3) for C


----------

