Skip to main content

Thank you for visiting You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

Device-independent randomness expansion against quantum side information


The ability to produce random numbers that are unknown to any outside party is crucial for many applications. Device-independent randomness generation1,2,3,4 does not require trusted devices and therefore provides strong guarantees of the security of the output, but it comes at the price of requiring the violation of a Bell inequality for implementation. A further challenge is to make the bounds in the security proofs tight enough to allow randomness expansion with contemporary technology. Although randomness has been generated in recent experiments5,6,7,8,9, the amount of randomness consumed in doing so has been too high to certify expansion based on existing theory. Here we present an experiment that demonstrates device-independent randomness expansion1,2,3,10,11,12,13,14,15. By developing a Bell test setup with a single-photon detection efficiency of around 84% and by using a spot-checking protocol, we achieve a net gain of 2.57 × 108 certified bits with a soundness error of 3.09 × 10−12. The experiment ran for 19.2 h, which corresponds to an average rate of randomness generation of 13,527 bits per second. By developing the entropy accumulation theorem4,16,17, we establish security against quantum adversaries. We anticipate that this work will lead to further improvements that push device-independence towards commercial viability.

This is a preview of subscription content, access via your institution

Relevant articles

Open Access articles citing this article.

Access options

Rent or buy this article

Get just this article for as long as you need it


Prices may be subject to local taxes which are calculated during checkout

Fig. 1: Conceptual sketch of the DIRNE protocol setup.
Fig. 2: Schematic of the experiment.

Data availability

Source data are provided with this paper. All other data that support the plots within this paper and other findings of this study are available from the corresponding authors upon reasonable request.

Code availability

All relevant codes or algorithms are available from the corresponding authors upon reasonable request.


  1. Colbeck, R. Quantum and Relativistic Protocols for Secure Multi-Party Computation. PhD thesis, Univ. Cambridge (2007);

  2. Colbeck, R. & Kent, A. Private randomness expansion with untrusted devices. J. Phys. A 44, 095305 (2011).

    Article  ADS  MathSciNet  Google Scholar 

  3. Pironio, S. et al. Random numbers certified by Bell’s theorem. Nature 464, 1021–1024 (2010).

    Article  ADS  Google Scholar 

  4. Arnon-Friedman, R., Dupuis, F., Fawzi, O., Renner, R. & Vidick, T. Practical device-independent quantum cryptography via entropy accumulation. Nat. Commun. 9, 459 (2018).

    Article  ADS  Google Scholar 

  5. Liu, Y. et al. High-speed device-independent quantum random number generation without a detection loophole. Phys. Rev. Lett. 120, 010503 (2018).

    Article  ADS  Google Scholar 

  6. Shen, L. et al. Randomness extraction from Bell violation with continuous parametric down-conversion. Phys. Rev. Lett. 121, 150402 (2018).

    Article  ADS  Google Scholar 

  7. Bierhorst, P. et al. Experimentally generated randomness certified by the impossibility of superluminal signals. Nature 556, 223–226 (2018).

    Article  ADS  Google Scholar 

  8. Liu, Y. et al. Device-independent quantum random-number generation. Nature 562, 548–551 (2018).

    Article  ADS  Google Scholar 

  9. Zhang, Y. et al. Experimental low-latency device-independent quantum randomness. Phys. Rev. Lett. 124, 010505 (2020).

    Article  ADS  Google Scholar 

  10. Fehr, S., Gelles, R. & Schaffner, C. Security and composability of randomness expansion from Bell inequalities. Phys. Rev. A 87, 012335 (2013).

    Article  ADS  Google Scholar 

  11. Coudron, M. & Yuen, H. Infinite randomness expansion with a constant number of devices. In Proc. 46th Annual ACM Symposium on Theory of Computing 427–436 (Association for Computing Machinery, 2014).

  12. Miller, C. A. & Shi, Y. Robust protocols for securely expanding randomness and distributing keys using untrusted quantum devices. In Proc. 46th Annual ACM Symposium on Theory of Computing 417–426 (Association for Computing Machinery, 2014).

  13. Miller, C. A. & Shi, Y. Universal security for randomness expansion from the spot-checking protocol. SIAM J. Comput. 46, 1304–1335 (2017).

    Article  MathSciNet  Google Scholar 

  14. Vazirani, U. & Vidick, T. Certifiable quantum dice: or, true random number generation secure against quantum adversaries. In Proc. 44th Annual ACM Symposium on Theory of Computing 61–76 (Association for Computing Machinery, 2012).

  15. Brown, P. J., Ragy, S. & Colbeck, R. A framework for quantum-secure device-independent randomness expansion. IEEE Trans. Inf. Theory 66, 2964–2987 (2020).

    Article  MathSciNet  Google Scholar 

  16. Dupuis, F., Fawzi, O. & Renner, R. Entropy accumulation. Commun. Math. Phys. 379, 867–913 (2020).

    Article  ADS  MathSciNet  Google Scholar 

  17. Dupuis, F. & Fawzi, O. Entropy accumulation with improved second-order term. IEEE Trans. Inf. Theory 65, 7596–7612 (2019).

    Article  MathSciNet  Google Scholar 

  18. Acín, A. & Masanes, L. Certified randomness in quantum physics. Nature 540, 213–219 (2016).

    Article  ADS  Google Scholar 

  19. Herrero-Collantes, M. & Garcia-Escartin, J. C. Quantum random number generators. Rev. Mod. Phys. 89, 015004 (2017).

    Article  ADS  MathSciNet  Google Scholar 

  20. Gerhardt, I. et al. Full-field implementation of a perfect eavesdropper on a quantum cryptography system. Nat. Commun. 2, 349 (2011).

    Article  ADS  Google Scholar 

  21. Clauser, J. F., Horne, M. A., Shimony, A. & Holt, R. A. Proposed experiment to test local hidden-variable theories. Phys. Rev. Lett. 23, 880–884 (1969).

    Article  ADS  Google Scholar 

  22. Murta, G., van Dam, S. B., Ribeiro, J., Hanson, R. & Wehner, S. Towards a realization of device-independent quantum key distribution. Quantum Sci. Technol. 4, 035011 (2019).

    Article  ADS  Google Scholar 

  23. Konig, R. & Renner, R. Sampling of min-entropy relative to quantum knowledge. IEEE Trans. Inf. Theory 57, 4760–4787 (2011).

    Article  MathSciNet  Google Scholar 

  24. Hensen, B. et al. Loophole-free Bell inequality violation using electron spins separated by 1.3 kilometres. Nature 526, 682–686 (2015).

    Article  ADS  Google Scholar 

  25. Shalm, L. K. et al. Strong loophole-free test of local realism. Phys. Rev. Lett. 115, 250402 (2015).

    Article  ADS  Google Scholar 

  26. Giustina, M. et al. Significant-loophole-free test of Bell’s theorem with entangled photons. Phys. Rev. Lett. 115, 250401 (2015).

    Article  ADS  Google Scholar 

  27. Rosenfeld, W. et al. Event-ready Bell test using entangled atoms simultaneously closing detection and locality loopholes. Phys. Rev. Lett. 119, 010402 (2017).

    Article  ADS  Google Scholar 

  28. Li, M.-H. et al. Test of local realism into the past without detection and locality loopholes. Phys. Rev. Lett. 121, 080404 (2018).

    Article  ADS  Google Scholar 

  29. Barrett, J., Colbeck, R. & Kent, A. Memory attacks on device-independent quantum cryptography. Phys. Rev. Lett. 110, 010503 (2013).

    Article  ADS  Google Scholar 

  30. Colbeck, R. & Renner, R. Free randomness can be amplified. Nat. Phys. 8, 450–453 (2012).

    Article  Google Scholar 

  31. Canetti, R. Security and composition of multiparty cryptographic protocols. J. Cryptol. 13, 143–202 (2000).

    Article  MathSciNet  Google Scholar 

  32. Ben-Or, M. & Mayers, D. General security definition and composability for quantum & classical protocols. Preprint at (2004).

  33. Portmann, C. & Renner, R. Cryptographic security of quantum key distribution. Preprint at (2014).

  34. Renner, R. Security of Quantum Key Distribution. PhD thesis, Swiss Federal Institute of Technology (2005);

  35. Konig, R., Renner, R. & Schaffner, C. The operational meaning of min- and max-entropy. IEEE Trans. Inf. Theory 55, 4337–4347 (2009).

    Article  MathSciNet  Google Scholar 

  36. Tomamichel, M., Colbeck, R. & Renner, R. Duality between smooth min- and max-entropies. IEEE Trans. Inf. Theory 56, 4674–4681 (2010).

    Article  MathSciNet  Google Scholar 

  37. Hao, T. S. & Hoshi, M. Interval algorithm for random number generation. IEEE Trans. Inf. Theory 43, 599–611 (1997).

    Article  MathSciNet  Google Scholar 

Download references


We thank C.-L. Li for experimental assistance and J.-D. Bancal and E. Tan for comments on an earlier draft. This work was supported by the National Key R&D Program of China (grant nos. 2017YFA0303900 and 2017YFA0304000), the National Natural Science Foundation of China, the Chinese Academy of Sciences, the Shanghai Municipal Science and Technology Major Project (grant no. 2019SHZDZX01), the Anhui Initiative in Quantum Information Technologies, the Guangdong Innovative and Entrepreneurial Research Team Program (grant no. 2019ZT08X324), the Key Area R&D Program of Guangdong Province (grant no. 2020B0303010001), the Quantum Communications Hub of the Engineering and Physical Sciences Research Council (EPSRC) (grant nos. EP/M013472/1 and EP/T001011/1) and an EPSRC First Grant (grant no. EP/P016588/1). We are grateful for computational support from the University of York High Performance Computing service, Viking, which was used for the randomness extraction.

Author information

Authors and Affiliations



R.C., J.F., Q.Z. and J.-W.P. conceived the research. Y.L., J.F., Q.Z. and J.-W.P. designed the experiment. W.-Z.L., M.-H.L., S.-R.Z. and Y.L. designed and implemented the entangled photon pair source. W.-Z.L. designed the data acquisition software. B.B. and J.Z. designed the biased and unbiased quantum random number generators for measurement setting choices. S.R., P.J.B. and R.C. developed the theory. S.R., P.J.B., W.-Z.L. and R.C. performed the protocol analysis, numerical modelling and randomness extraction. All authors contributed to the experimental realization, data analysis and manuscript preparation.

Corresponding authors

Correspondence to Roger Colbeck, Jingyun Fan, Qiang Zhang or Jian-Wei Pan.

Ethics declarations

Competing interests

The authors declare no competing interests.

Additional information

Peer review informationNature Physics thanks Thomas Vidick and the other, anonymous, reviewer(s) for their contribution to the peer review of this work.

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Extended data

Extended Data Fig. 1 Rounds needed and expansion rate for the main and space-like experiments.

a, We estimate the minimum number of experimental runs with our revised EAT theory to witness randomness expansion as a function of CHSH violation (smooth curve) with a soundness error 3.09 × 10−12. The red square, yellow circle and green cross indicate the previous8, space-like and main experimental conditions, respectively. b, We estimate the randomness expansion rate based on our revised EAT theory as a function of number of rounds (smooth line) and the asymptotic rate (dashed line) with a soundness error 3.09 × 10−12. The cross and circle indicate the experimental parameters used, red indicates the main experiment and blue indicates the space-like experiment.

Source data

Supplementary information

Supplementary Information

Supplementary Figs. 1–5, discussion and Tables 1–7.

Source data

Source Data Extended Data Fig. 1

Source data for Extended Data Fig. 1. In a, the first column always represents the CHSH score and the second column represents the number of rounds, n. In b, the first and the third columns alway represent the number of rounds n for main setup and space-like setup, respectively. The second and the fourth columns alway represent the rate of randomness expansion for main setup and space-like setup, respectively.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Liu, WZ., Li, MH., Ragy, S. et al. Device-independent randomness expansion against quantum side information. Nat. Phys. 17, 448–451 (2021).

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI:

This article is cited by


Quick links

Nature Briefing

Sign up for the Nature Briefing newsletter — what matters in science, free to your inbox daily.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing