[LEDE-DEV] [PATCH] base-files: seed /dev/urandom

Felix Fietkau nbd at nbd.name
Sun Jun 12 03:45:10 PDT 2016


On 2016-06-11 08:37, Etienne CHAMPETIER wrote:
> This commit:
> 1) seed /dev/urandom with a saved seed as early as possible
>    (using /lib/preinit/81_urandom_seed)
> 2) save a new seed using getrandom() so we are sure /dev/urandom
>    pool is initialized (using /etc/init.d/urandom_seed)
> 
> seed size is 512 bytes (ie /proc/sys/kernel/random/poolsize / 8)
> it's the same size as in ubuntu 14.04 and all systemd systems
> 
> seed file is /etc/urandom.seed (need a writable path)
> 
> seeding /dev/urandom doesn't change entropy estimation, so we still have
> "random: ubus urandom read with 4 bits of entropy available"
> messages in the logs, but we can now ignore them
> 
> We could also add an urandom.seed at build time to improve first boot
I'm not sure writing to flash on every single boot on every device is a
good default behavior.

- Felix



More information about the Lede-dev mailing list