Tool for measuring entropy quality?

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

sudo apt-get install ent
head -c 1M /dev/urandom > /tmp/out
ent /tmp/out

"ent" is an excellent command line tool for a simple and quick estimation of entropy.

I've used it to help learn how linear congruential generators work. But if by "measuring entropy" you mean "measuring randomness"... the problem becomes more complex.

For a more robust test of randomness you should checkout the dieharder test suite: http://www.phy.duke.edu/~rgb/General/dieharder.php

It is not as easy to use as "ent" but it is far more rigorous.

For more in depth study, "Cipher's by Ritter" also provides a good selection of links:

http://www.ciphersbyritter.com/NETLINKS.HTM#RandomnessLinks


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.

Tags:

Linux

Random