Wednesday, March 25, 2015

Seed /dev/random Instead of Wasting Data on /dev/null

Instead of throwing data that you don't have any other use for into the proverbial bit grinder of /dev/null, why not redirect that data to /dev/random and seed the random data entropy pool?

This excerpt is from the IBM Knowledge Center regarding AIX - but it works similarly on Linux and other Unix variants - if you know better please leave a comment, thanks.

Data written to either of the random devices will also contribute to the pool of stored random input and can influence the output, thus writing to these devices should be a privileged operation.    urandom and random Devices

I took a quick backup of my data and then changed all of my scripts in one simple sed:

sed -i 's@/dev/null@/dev/random@g' * 

I did this a few months ago and I felt quite a relief about it, I still recall how relieved I felt at making that change.

No comments:

Post a Comment