Real-world encryption systems are often not broken algorithmically but because the implementation has a bug. Sometimes the bug only happens in circumstances that could not have been foreseen, such as weak random numbers, or an error in a library causing e.g. predictable IVs.
So I wonder, are there workable methods of estimating randomness or entropy that could be helpful to detect (a subset of) actual failures in cryptographic systems?
As a simple example, such an estimator could be fed with consecutive CTR IVs and alert higher protocol layers when there is an apparent failure, because all IVs are identical for example. Or an estimator could be fed with encrypted DES output to detect a bug in the implemention.