  Device-independent randomness generation and quantum key distribution
protocols rely on a fundamental relation between the non-locality of quantum
theory and its random character. This relation is usually expressed in terms of
a trade-off between the probability of guessing correctly the outcomes of
measurements performed on quantum systems and the amount of violation of a
given Bell inequality. However, a more accurate assessment of the randomness
produced in Bell experiments can be obtained if the value of several Bell
expressions is simultaneously taken into account, or if the full set of
probabilities characterizing the behavior of the device is considered. We
introduce protocols for device-independent randomness generation, secure
against classical side information, that rely on the estimation of an arbitrary
number of Bell expressions or even directly on the experimental frequencies of
measurement outcomes. Asymptotically, this results in an optimal generation of
randomness from experimental data (as measured by the min-entropy), without
having to assume beforehand that the devices violate a specific Bell
inequality.
