Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is there a tool available for Linux systems that can measure the "quality" of entropy on the system?

I know how to count the entropy:

cat /proc/sys/kernel/random/entropy_avail

And I know that some systems have "good" sources of entropy (hardware entropy keys), and some don't (virtual machines).

But is there a tool that can provide a metric as to the "quality" of the entropy on the system?

share|improve this question

migrated from crypto.stackexchange.com Feb 15 '12 at 19:03

This question came from our site for software developers, mathematicians and others interested in cryptography.

Im interested, Why would you want to calculate entropy of a system? –  whoami Feb 16 '12 at 11:45

3 Answers 3

up vote 6 down vote accepted

http://www.fourmilab.ch/random/ works for me.

sudo apt-get install ent
head -c 1M /dev/urandom > /tmp/out
ent /tmp/out
share|improve this answer
this is good thanks @Marcin –  Nikhil Mulley Feb 16 '12 at 23:46
Cool tool. You can check a device in just one command with dd if=/dev/urandom bs=1M count=1 | ent –  l0b0 Jun 13 '13 at 15:22

Tools can only ever give you an upper bound on the entropy. For most uses, in particular security related uses you're more interested in a lower bound.

Calculating the entropy of an arbitrary file is mathematically impossible, so there can be no tool that can do it.

I can easily write a file generator that generates very low entropy files, but will still pass your entropy tests. Just use a crypto PRNG with a small seed.

share|improve this answer

I think you are looking for:

cat /proc/sys/kernel/random/entropy_avail
share|improve this answer
Sorry, no, I'm well aware of entropy_avail. I'm trying to measure the quality of that entropy. –  Dustin Kirkland Feb 15 '12 at 22:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.