Quantum random number generator
- 格式:pdf
- 大小:169.01 KB
- 文档页数:9
qrng 应用场景
QRNG(Quantum Random Number Generator)应用场景如下:
1. 加密通信:在密码学中,随机数是加密算法的关键要素之一。
传统的伪随机数生成器(PRNG)生成的随机数是基于一种确
定性的算法,容易受到攻击。
而QRNG生成的是真正的随机数,可以提供更高的安全性和可靠性。
2. 数据采集:在科学实验、天气预测等领域,需要采集大量的随机数据来分析和研究。
QRNG可以生成真正的随机数,可
以用于数据采集和分析,提供更准确和可靠的结果。
3. Monte Carlo 模拟:Monte Carlo模拟是一种通过随机数和概
率统计的方法来解决复杂问题的数学计算模型。
QRNG可以
提供真正的随机数,用于Monte Carlo模拟,可以提高模拟结
果的准确性和可靠性。
4. 金融交易:在金融交易中,随机数被广泛应用于风险评估、投资组合管理等领域。
QRNG可以生成真正的随机数,可以
提供更可靠的金融模型和决策支持。
总之,QRNG可以在需要真正的随机数的场景中提供更高的
安全性、可靠性和准确性。
它的应用场景包括加密通信、数据采集、Monte Carlo模拟和金融交易等领域。
量子信息安全中的量子密钥分发技术与协议量子信息安全是信息与通信技术领域中的前沿研究方向。
传统加密方法在量子计算机的崛起下面临着巨大挑战,而量子密钥分发技术与协议则为解决信息安全问题提供了新的可能性。
本文将重点介绍量子密钥分发技术与协议在量子信息安全中的应用与发展。
量子密钥分发(Quantum Key Distribution,QKD)是一种基于量子力学原理的加密通信方式,能够实现信息的绝对安全传输。
其基本思想是利用量子力学中的不可克隆性和不可逆性原理,确保密钥的安全性。
在量子密钥分发过程中,发送方(Alice)利用量子比特通过光纤传递光子到接收方(Bob),通过测量这些光子状态来建立共享的密钥。
为了实现量子密钥分发,需要借助于量子随机数发生器(Quantum Random Number Generator,QRNG)、单光子源、单光子探测器和量子通道等关键设备。
QRNG用于生成完全随机的比特序列,单光子源能够发射单个光子,单光子探测器则能够对接收到的光子进行精确测量。
量子通道即传输光子的媒介,可以是光纤或者自由空间。
常见的量子密钥分发协议有BB84协议、E91协议和B92协议等。
其中,BB84协议是最早被提出的量子密钥分发协议,其核心原理是利用四种不同的量子比特表示信息,在传输过程中引入随机基的选择。
E91协议则采用了纠缠态,能够对信息的窃听进行检测,并保证传输的信息是绝对安全的。
B92协议则通过减少量子比特的种类来提高传输速率。
随着量子技术的发展,量子密钥分发技术与协议也在不断演进。
研究人员提出了基于连续变量量子密钥分发技术,利用连续变量的量子态进行密钥分发,能够提高传输速率。
同时,基于高斯编码的量子密钥分发技术也引起了广泛关注。
这种方法可以利用现有的通信基础设施,实现高速、高效的量子密钥分发。
此外,量子密钥分发技术也面临着一些挑战和安全性问题。
首先,实际应用中,光子的损耗和干扰会对密钥的传输造成影响。
量子科技在卫星通信领域的应用案例研究随着科技的不断发展,量子科技在许多领域都逐渐展现出强大的潜力。
其中,在卫星通信领域,量子科技的应用被广泛研究,以提高通信的安全性和效率。
本文将通过分析一些具体案例,探讨量子科技在卫星通信领域应用的成果和前景。
一、量子密钥分发卫星通信中最为重要的挑战之一就是确保通信的安全性。
传统的加密方法存在着被破解的可能性,而量子密钥分发(Quantum Key Distribution,简称为QKD)则是一种基于量子力学原理的加密方式,为卫星通信提供了更强大的安全性。
2017年,中国科学家成功实现了首个量子密钥分发卫星——墨子号。
墨子号是世界上第一个将QKD技术应用于卫星通信的实验卫星。
通过墨子号的量子密钥分发,可以实现具有量子安全保障的通信,并且比传统的加密方式更加安全可靠。
二、量子随机数生成随机数在卫星通信中的重要性不言而喻。
然而,传统的计算机生成的随机数都是伪随机数,不具备高度的不确定性,容易被破解。
而利用量子物理特性生成的真随机数则具有极高的不可预测性,在卫星通信中具有重要的应用前景。
瑞士国际物理研究实验室(Swiss Federal Institute of Technology,简称为ETH)与欧空局合作,研究人员成功在瑞士阿尔卑斯山区的千兆字节量子随机数生成器(Quantum Random Number Generator,简称为QRNG)中实现了使用卫星通信传输的实验。
这项研究使得真随机数的生成和传输成为可能。
三、量子纠缠态在卫星通信中的应用量子纠缠态是量子力学中一种特殊的量子态,具有非常神奇的特性,如量子叠加和量子纠缠。
这些特性使得量子纠缠态在卫星通信中应用具有巨大潜力。
日本理化学研究所与东京大学合作,在一次实验中将两颗卫星用激光进行了纠缠连接。
通过量子纠缠态的传输,可以实现遥距离量子通信,并且具备抵御窃听和干扰的能力。
这项实验对量子通信的研究起到了重要的推动作用。
量子随机数生成方法随机数在现代密码学、模拟实验和通信等领域中起着至关重要的作用。
然而,传统的伪随机数生成器往往受到确定性算法的限制,无法提供真正的随机性。
为了解决这一问题,量子随机数生成方法应运而生。
量子随机数生成方法利用了量子力学的特性,能够产生具有真正随机性的随机数。
量子随机数生成方法的基本原理是利用量子系统的不确定性来生成随机数。
量子力学中的不确定性原理表明,对于某个量子系统的测量结果是不可预测的,只能通过概率来描述。
因此,通过对量子系统进行测量,可以得到一系列具有真正随机性的随机数。
目前,有多种量子随机数生成方法被提出和研究。
其中,基于单光子的量子随机数生成方法是最常用和最成熟的方法之一。
这种方法利用了光子的量子特性,通过光子的单光子特性来实现随机数的生成。
具体来说,通过将光源调整到低强度状态,使其只能发射一个光子,然后通过光子的干涉和探测来测量光子的状态,从而生成随机数。
除了基于单光子的方法外,还有其他一些量子随机数生成方法。
例如,基于量子比特的方法利用了量子比特的叠加态和纠缠态来生成随机数。
量子比特是量子计算中的基本单位,它具有多个状态的叠加性质,可以同时处于0和1的状态。
通过对多个量子比特的测量,可以得到一系列具有真正随机性的随机数。
此外,还有一种基于量子力学的随机数生成方法,即基于量子随机行走的方法。
量子随机行走是一种基于量子力学的随机过程,它利用了量子粒子的波粒二象性和叠加态来实现随机性。
通过对量子粒子进行一系列的随机行走,可以生成具有真正随机性的随机数。
总结起来,量子随机数生成方法利用了量子力学的不确定性原理,通过对量子系统的测量来生成具有真正随机性的随机数。
目前,基于单光子、量子比特和量子随机行走等方法被广泛应用于实际应用中。
这些方法不仅能够提供高质量的随机数,而且具有较高的安全性,能够抵抗传统伪随机数生成方法所面临的攻击。
然而,量子随机数生成方法也存在一些挑战和限制。
首先,实现量子随机数生成方法需要高度精密的实验装置和技术,成本较高。
liboqs程序结构liboqs(Open Quantum Safe)是一个开源的软件库,旨在提供量子安全密码学方案的实现。
它的目标是为那些需要保护长期安全性的系统提供一种替代方案,以应对未来可能出现的量子计算攻击。
本文将介绍liboqs的程序结构和主要组成部分。
liboqs主要由以下几个模块组成:1. 随机数生成器模块(Random Number Generator,RNG):该模块负责生成随机数,用于各种密码学算法的密钥生成和加密过程中。
liboqs提供了多种随机数生成器算法,包括基于硬件的真随机数生成器和伪随机数生成器。
2. 密钥交换模块(Key Exchange,KEX):该模块实现了一系列的量子安全密钥交换算法,用于双方在不安全的通信信道上协商一个共享的密钥。
liboqs支持多种密钥交换算法,如McEliece、NTRU 和SIKE等。
3. 数字签名模块(Digital Signature,SIG):该模块提供了一系列的量子安全数字签名算法,用于对消息进行签名和验证。
liboqs支持多种数字签名算法,如Picnic、Dilithium和qTESLA等。
4. 其他辅助模块:除了上述核心模块之外,liboqs还提供了一些辅助模块,如哈希函数模块和矩阵运算模块等,用于支持密码学算法的实现。
liboqs的程序结构如下所示:1. 主程序入口:liboqs的主程序入口负责初始化各个模块,并调用相应的函数来实现具体的功能。
2. 随机数生成器模块:在主程序入口中,首先会初始化随机数生成器模块,并选择合适的随机数生成器算法。
随机数生成器模块负责生成随机数,并提供给其他模块使用。
3. 密钥交换模块:在随机数生成器模块初始化完成后,主程序会初始化密钥交换模块,并选择合适的密钥交换算法。
密钥交换模块提供了一系列的函数,用于执行密钥交换算法的各个步骤,包括密钥生成、共享密钥的协商和密钥的验证等。
4. 数字签名模块:在密钥交换模块初始化完成后,主程序会初始化数字签名模块,并选择合适的数字签名算法。
量子随机数生成器的使用方法与注意事项随机数在现代科学、工程和计算机科学中发挥着重要作用。
而传统的伪随机数生成器往往难以提供真正的随机性。
为了解决这个问题,科学家们研发出了量子随机数生成器,利用了量子力学中的不确定性原理,能够生成真正的随机数。
在本文中,我们将探讨量子随机数生成器的使用方法与注意事项。
一、量子随机数生成器的使用方法1. 准备工作在使用量子随机数生成器之前,首先需要对设备进行准备工作。
通常,这包括以下几个步骤:- 确保设备的安全可靠。
由于量子随机数生成器对环境的要求较高,需要保证设备处于干净的实验室环境中,避免受到干扰。
- 确认设备的正确连接。
检查设备的电源、信号线等连接是否良好,以确保设备能够正常工作。
2. 生成随机数量子随机数生成器的核心功能是生成真正的随机数。
使用方法如下:- 打开设备并进行初始化。
根据设备的操作手册,按照要求初始化设备,确保设备处于正确的工作状态。
- 设置量子随机数生成器的参数。
根据实际需求,选择适当的参数,如随机数的位数、生成速率等。
- 启动随机数生成。
根据设备的操作手册,启动量子随机数生成器,并等待生成随机数。
- 校验随机数。
得到随机数后,使用统计学方法或其他随机性检测算法,对生成的随机数进行校验,以确保其真正的随机性。
3. 应用随机数生成随机数后,可以将其应用于各种领域。
例如,在密码学中,随机数可用作密钥、初始化向量或盐的生成;在模拟实验中,随机数可用于生成随机样本,进行概率分布模拟等。
二、量子随机数生成器的注意事项1. 设备的安全性量子随机数生成器通常较为昂贵,且具有高技术含量。
为了保证设备的安全性和稳定性,需要注意以下几点:- 避免物理损坏。
在使用过程中,应当小心操作设备,避免碰撞、摔落等物理损伤。
- 防止恶意攻击。
量子随机数生成器可能遭受各种恶意攻击,如侧信道攻击、故意干扰等。
因此,需要加强设备的安全保护措施,确保数据的机密性和完整性。
2. 随机数的校验为了确保生成的随机数的真实性,需要进行适当的校验。
量子随机数生成的原理与应用量子随机数生成(Quantum Random Number Generation,简称QRNG)是一种基于量子力学原理的随机数生成方法。
与传统的伪随机数生成方式相比,量子随机数生成具有真正的随机性、不可预测性和不可重现性。
本文将介绍量子随机数生成的原理以及其在密码学、模拟实验和物理模型验证等领域的应用。
一、量子随机数生成的原理量子随机数生成的原理基于量子力学的随机性。
根据量子力学的表述,量子系统在测量之前会处于一个同时存在多个状态的叠加态中,只有进行测量后,才能得到确定的结果。
因此,通过测量量子系统的某些特性,可以获得真正的随机数。
量子随机数生成的原理可以分为两个步骤:量子态准备和测量。
首先,通过特定的方法制备一个量子系统,使其处于能够表现出随机性的叠加态。
然后,对该量子系统进行测量,得到的结果就是真正的随机数。
二、量子随机数生成的应用1. 密码学在密码学中,随机数被广泛应用于密钥的生成、加密算法的初始化、认证协议的建立等。
传统的伪随机数生成方法可能存在被猜测的风险,而量子随机数生成可以提供真正的随机数,增强了密码系统的安全性。
例如,在量子密钥分发(Quantum Key Distribution,简称QKD)中,随机数的生成和传输是确保密钥安全的关键步骤,量子随机数生成可以有效地保护密钥的不可预测性。
2. 模拟实验量子随机数生成在模拟实验中也有广泛的应用。
通过生成真正的随机数,可以模拟一些复杂系统的行为。
例如,天气预报的模拟、金融市场的波动模拟等。
量子随机数生成为这些实验提供了高质量的随机数据,使得模拟结果更加准确可信。
3. 物理模型验证在物理学研究中,验证物理模型的正确性需要进行随机性测试。
传统的伪随机数生成方法可能无法满足这一需求,而量子随机数生成可以提供真正的随机数,用于验证物理模型的随机性属性。
例如,在量子纠缠实验中,随机数的生成和使用是保证实验结果可信度的关键,量子随机数生成可以为该类实验提供所需的随机性。
量子随机数生成器的设计与实现引言随机数在密码学、模拟实验、统计学等领域中起着重要的作用。
传统的伪随机数生成器虽然能够满足一般需求,但由于其基于确定性算法,往往存在可预测性和周期性的问题。
为了解决这些问题,量子随机数生成器应运而生。
本文将介绍量子随机数生成器的设计原理和实现方法。
一、量子随机数生成器的原理量子随机数生成器利用量子力学的随机性原理,通过测量量子系统的性质来产生真正的随机数。
其基本原理可以概括为以下几点:1. 量子态的随机性:量子系统的态可以用波函数表示,波函数的模的平方表示了系统处于某个状态的概率。
由于波函数的幅值是连续的复数,因此在测量时无法预测测量结果。
2. 量子测量的不确定性:量子测量的结果是随机的,具体的测量结果只能通过概率的方式来描述。
测量结果的概率分布是由波函数的模的平方决定的。
3. 量子态的纠缠性:在量子系统中,存在纠缠态,即多个粒子之间的状态是相互依赖的。
通过对其中一个粒子进行测量,可以实现对其他粒子状态的确定性改变。
二、量子随机数生成器的设计设计一个可靠的量子随机数生成器需要考虑以下几个关键因素:1. 量子系统的选择:常用的量子系统包括单光子系统、原子自旋系统和超导量子系统等。
不同的量子系统具有不同的特性和实现难度,需要根据具体需求选择适合的量子系统。
2. 量子测量的选择:量子测量是产生随机数的关键步骤。
常用的量子测量方法包括光子计数、自旋测量和能级测量等。
不同的测量方法对应不同的量子系统,需要根据具体情况选择适合的测量方法。
3. 随机性的验证:为了确保生成的随机数具有真正的随机性,需要对量子随机数生成器进行随机性验证。
常用的验证方法包括熵测试、均匀性测试和相关性测试等。
三、量子随机数生成器的实现实现一个可靠的量子随机数生成器需要进行以下几个步骤:1. 量子系统的构建:根据选择的量子系统,需要搭建相应的实验装置。
例如,对于单光子系统,可以使用光学器件来实现单光子的发射和检测。
量子随机数生成的原理和应用随机数是计算机科学中的重要概念,它不仅帮助我们保护数据的安全,还应用于密码学和模拟等方面。
然而,随机数的生成一直是一个挑战性的问题。
在传统的计算机系统中,生成随机数的方法多数都是伪随机数生成器,这种生成器虽然可以产生看起来随机的数字,但实际上是可以被重构和预测的。
与此相反,量子随机数生成器使用量子物理的基本原理,可以生成真正的随机数。
量子随机数生成的原理量子物理学中的一个重要原理是量子力学不确定性定理,在一个量子体系中,存在一些量是无法同时确定其具体值的,例如位置和动量。
由这个定理可以得到,以某种量子属性为基础的量子测量结果是随机和不可预测的。
因此,我们可以使用量子测量技术来实现随机数的生成。
量子随机数生成器基于单光子源、随机相位调制器和单光子探测器。
它通过利用光子的量子特性把光子的相位随机转换,并在探测器上进行测量,由此来生成随机数。
具体来说,量子随机数生成器可以分为两个基本模式:单光子计数模式和振幅调制模式。
在单光子计数模式下,光学器件会发射一个标准的、单光子的光子源,产生一个光子流。
在光路的某个位置,会使用一个随机相位调制器随机调整相位,产生不同的相位,这反映在光子的状态中,导致了随机的光子样品的流量。
最后,单光子探测器可以在每个样品上测量光子,输出一个二进制数:1表示测量到光子,0表示没有检测到光子。
在振幅调制模式下,光芯片会利用光的线性叠加性质,在不同的振幅上施加随机振幅,再使用单光子探测器检测信号,并通过信号的功率来确定随机数。
因此,量子随机数的生成遵循随机量子态的制备、测量和数据处理。
量子随机数的应用量子随机数可以用于许多领域,尤其在密码学中有着广泛的应用。
量子随机数的生成具有不可预测性、无可重构性和唯一性等特点,可以保护密码协议,避免信息泄漏和黑客攻击。
另外,量子随机数也可以应用于电子商务、模拟和随机数统计分布等领域。
在现代密码学中,随机数生成器必须是真正随机的,而且必须防止暴力猜测。
量子随机数生成技术的应用范围与使用要点随机数在现代信息科学与密码学中起着重要作用,广泛应用于安全通信、密码学、模拟计算、随机采样等领域。
然而,传统的伪随机数生成器受到算法和物理基础的限制,存在着可预测性和周期性等问题。
为了解决这些问题,量子随机数生成技术应运而生。
本文将探讨量子随机数生成技术的应用范围以及其使用要点。
首先,让我们了解一下量子随机数生成技术。
量子随机数生成技术利用了量子力学的随机性,基于量子的原理生成真正的随机数。
量子随机数生成器依赖于测量量子系统的一些属性,如光子的纠缠态或直接量子级别的测量。
由于量子系统的基础特性,量子随机数生成器可以生成真正的随机数序列。
与传统的伪随机数生成器相比,量子随机数生成器具有不可预测性、不相关性以及信息熵极高的优势。
在应用范围方面,量子随机数生成技术有着广泛的潜力。
首先,在安全通信方面,量子随机数生成器可以用于产生安全的密钥。
传统的随机数生成器可能受到攻击者的破解,而量子随机数生成器可以提供更高的安全性,因为它生成的密钥是真正的随机数,无法被猜测或破解。
这在保护敏感信息的传输和存储中具有重要意义。
其次,量子随机数生成技术在密码学中也具有重要应用。
密码学中的加密算法通常需要随机数作为种子来生成密钥流。
使用伪随机数可能会导致密钥流的可预测性,从而使密码系统易受攻击。
利用量子随机数生成器产生真正的随机数可以大幅提高密码系统的安全性,增加密码算法的强度。
此外,量子随机数生成技术还在模拟计算和随机采样等领域发挥着重要作用。
在模拟计算中,随机数常用于模拟复杂系统的行为,并用于生成统计样本。
传统的随机数生成器可能无法生成足够的高质量随机数,从而影响模拟计算的准确性和可靠性。
利用量子随机数生成器可以获得真正的随机样本,提高模拟计算的精度和可信度。
对于随机采样,量子随机数生成器可以用于生成符合特定分布的随机数,有助于优化算法和挖掘数据的特征。
值得注意的是,使用量子随机数生成技术需要遵循一些重要的要点。
a r X i v :q u a n t -p h /0609043v 2 1 J a n 2007Quantum random number generatorM.Stipˇc evi´c 1,∗and B.Medved Rogina 11Rudjer Boˇs kovi´c Institute,Bijeniˇc ka 54,P.O.B.180,HR-10002Zagreb,CroatiaWe report upon a novel realization of a fast nondeterministic random number genera-tor whose randomness relies on intrinsic randomness of the quantum physical processesof photonic emission in semiconductors and subsequent detection by the photoelectric effect.Timing information of detected photons is used to generate binary random digits-bits.The bit extraction method based on the restartable clock method theoret-ically eliminates both bias and autocorrelation while reaching efficiency of almost 0.5bits per random event.A prototype has been built and statistically tested.PACS numbers:05.40.-a,02.50.Ng,03.67.DdIntroductionTrue random numbers,or more precisely nondetermin-istic random number generators,seem to be of an ever increasing importance.Random numbers are essential in cryptography (both classical and quantum),Monte Carlo numerical simulations and calculations,statistical research,randomized algorithms,lottery etc.Historically,there are two approaches to random number generation:algorithmic (pseudorandom)and by hardware (nondeterministic).Pseudorandom number generators are well known in the art [1].A pseudoran-dom generator is nothing more than a mathematical formula which produces deterministic,periodic sequence of numbers which is completely determined by the initial state called seed .By definition such generators are not provably random.In contrast to that,hardware generators extract randomness form physical processes believed to behave in nondeterministic way which makes them better candidates for true random number generation.In applications where provability is essential,random-ness sources (if involved)must also be provably random.For example the famous BB84quantum key distribution protocol described in [2]would be completely insecure if only an eavesdropper could calculate (or predict)either Alice’s random numbers or Bob’s random numbers or both.From analysis of the secret key rate presented therein it is obvious that any guessability of random numbers by the eavesdropper would leak relevant infor-mation to him,thus diminishing the effective key rate.It is intriguing (and obvious)that in the case that the eavesdropper could calculate the numbers exactly,the cryptographic potential of the BB84protocol would be zero.This example shows that the local random number generators assumed in BB84are essential for its security and should not be taken for granted.2reason why zeros and ones would appear with the same probability in an idealized apparatus,that is why the bias(defined as b=p(1)−1/2where p(1)is probability of ones)would be zero.Other realizations of optical random quantum systems include:photons incident on a semi-transparent mirror[6],polarized photons incident on a rotateable polarizing beamsplitter which offers a possibility to tune the bias[7]and an apparatus using polarization entangled photons to suppress false photon detections[8].Practical realizations of quantum random number generators,of course,necessarily suffer from imperfections.Primary imperfection of such systems is that the probability of ones is not exactly equal to the probability of zeros.In the systems mentioned above this isfirstly because photons which produce zeros and ones traverse different physical paths(which might have different transmission probabilities),and secondly because photons are detected with two(or more)detectors.Detection efficiency of single a photon detector can vary significantly form one physical device to another and is typically very sensitive to temperature drift,supply voltagefluctuations,component tolerances and aging.In order to achieve a low bias one needs to cope with two problems:first how to achieve that the detectors have exactly the same efficiencies(i.e. precisely such efficiencies as to compensate for different photon paths)and second how to keep the detectors efficiencies extremely constant.To minimize the bias, quantum random number generators described so far must befine tuned for a low bias prior to use.This is not convenient because thisfine tuning is a very time consuming procedure due to the statistical nature of measurement of bias.Furthermore,due to stability problems one cannot expect that the bias once adjusted would stay constant for a long time.The source of problems with previous art is that it uses spatial information of photons randomly ariving at different places as a source of randomness.This necessarily requires two(or more)photon detectors.In our approach we use temporal information of photons emmited at random times by a light emitting diode or a laser.All photons traverse the same optical path and arrive always at the same single detector.Because now both zeros and ones are detected by the same detector, our random number generating method(described below)does not require anyfine tuning of the bias. Furthermore the method is highly immune to stability problems because any slow change in the detector’s performance influences by the same amount both zeros and ones and thus precisely cancels out.The price for improved randomness quality is paid in a somewhat more complex bit extraction method,but still easily manageable by logic electronics circuits.The random number generator presented here consists of two principal parts:a physical random pulse generator (RPG)and a method of extracting random bits from such a generator.It will be shown that the method produces perfect random numbers(bits)if fed by perfectly random events.One practical realization will be presented and statitically tested.Theory of operation:the restartable clock method For the purpose of this paper we define a random bit generator as a device which produces bits independently of each other and with equal probability of the two outcomes,i.e.p(0)=p(1)=0.5.We assume existence of a physical setup which produces Poissonian random events,typically in form of digital pulses.By definition, Poisonian events are occuring independently of each other and in such a manner that time intervals between subsequent events follow the exponential probability distribution function(pdf).Basic idea of the method for extracting random bits is to consider a pair of non overlapping random time intervals(t1,t2)which are defined with subsequent random events,as shown in Fig.2a,and generate either binary value”0”if t1<t2,or”1”if t1>t2.Next two intervals will be considered to generate the next random bit.Since the events which determine time intervals are by definition independent of each other it is not possible that t1<t2would appear with any different probability than t1>t2,consequently the probability to generate”0”is exactly equal to the probability to generate”1”.In other words,the distribution of t2i−t2i−1,i=1,2,3,...is symmetric.Furthermore, the bits are mutually independent(i.e.uncorrelated) since independent pairs of events are used to generate different bits.This”basic algorithm”readily(and obviously)yields perfect random bits if fed by perfectly random events. However,it needs to be modified in order to cope with common limitations of physical realizations,notably detectors and electronics,and still give good random numbers.First modification deals with the fact that measure-ment of time intervals usually results with an integer number which is produced,for example,by counting of a high frequency periodic signal(eg.quartz clock)or digiz-ing a time to amplitude converter(TAC)output voltage. The time intervals t1,t2are then represented by integer numbers n1,n2.With this effect of”time discretization”it is still true that p(n1<n2)=p(n1>n2)but now it can happen that n1=n2.In that case,in order to pre-serve equalness of probabilities of zeros and ones,the two intervals(t1and t2)are discarded and no bit is generated. Next modification is crucial and deals with the fact that the time discretization leads to appearance of corre-lations among bits.The serial autocorrelation coefficient3b)c)a)FIG.2:Time interval measurement methods(a)with contin-uous(b)and restartable(c)clock.The time counter advanceswith every positive going edge of the clock pulse.with lag k≥1of the sequence of bits Y1...Y N is definedaccording to[14]as:a k= N−ki=1(Y i−Y)Y)2.(1)Since different bits correspond to different random events we do not expect long-range correlations among bits.Therefore,we are mostly concerned with the lowest lag coefficient,a1,which for simplicity we henceforth denote with a.A technologically appealing way to measure(approx-imately)the time interval between subsequent random pulses is by counting periodic pulses from a continuous (i.e.non-restartable)quartz-controlled clock,as shown in Fig.2b.The time intervals t1,t2are then represented by integer numbers n1,n2.Due to the symmetry between generating zeros and ones the method ensures zero bias. However since time intervals are only measured approxi-mately it is not anymore obvious that bits obtained from such measurements will be random,as it was for the ba-sic algorithm.Indeed,simulations show that a sequence of bits will have a non-negative autocorrelation(Fig.3) which vanishes in the limits of a very fast clock or a very slow clock.This behavior can be understood as follows. In the fast clock limit the time interval measurement becomes”exact”and this brings us back to the basic algorithm which provides unbiased and uncorrelated bits. In the slow clock limit the probability of having more than one count during a random period becomes negli-gible.Therefore bit”0”becomes mainly represented by n1=0,n2=1whereas”1”becomes mainly represented by n1=1,n0=1.In other words,in the limit,one bit is generated with every clock count and if the clock count occurs during an even random interval then”0”is produced,whereas if the clock count occurs during an odd random interval then”1”is produced.DuringT/τa0.010.020.030.040.05012345FIG.3:Serial autocorrelation coeficient a for non-restartable clock method(dead time=0).T is the clock period,τis the mean time interval between random pulses.a clock period of length T,there are on average T/τrandom intervals,whereτis the mean time interval between random pulses.According to the central limit theorem,the number of intervals becomes normally distributed as T/τgoes to infinity and since the normal distribution is symmetric even and odd periods(and thus 0’s and1’s)appear with equal probability and at random.Apart from the correlation which characterizes the quality of randomness,another technologically important issue is the”bit efficiency”which we define as the num-ber of bits generated per random event.It reaches its maximum of1/2in the fast clock limit and continuously goes to zero at the slow clock limit(Fig.4).Since good quality random events from the RPG are”technologically expensive”,fast clock limit is preferred for practical re-alizations of random number generators.T/τbitefficiency0.20.250.30.350.40.450.5012345FIG.4:Bit efficiency,defined as the number of bits gener-ated per random event,for non-restartable clock method as a function of T/τwhere T is the clock period andτis the mean time interval between random pulses.Since the fast clock limit could never be reached in practice,it is interesting to understand what happens in its vicinity.If we look at a pair of subsequently gener-4 ated bits(for some T/τ>0),a process which involvesmeasurements of4subsequent random time intervals,itturns out that this process slightly prefers pair values”11”and”00”(symmetrically)over the other two possi-bilities.This has a direct impact on autocorrelation sinceEq.(1)for k=1is equivalent to:a=p11−p10+p00−p01.(2)where p11is probability of”11”etc.By simulationand symmetry arguments we have found that followingrelations hold for probabilities of pairs:p11=p00;p10=p01and p11>p10forfinite T/τ.Acording to Eq.(2)thisgives rise to a positive correlation.Understanding ofthis autocorrelation effect from combinatorics and basiclaws of probability is involved,but for our purpose itsuffices to understand that the correlation appears as aconsequence of the way in which random time intervalst i are measured.Figure2b illustrates this problem.Iftime interval t1ends up close to the beginning of a clockperiod it is more likely that n2will be smaller then inthe case when t1ends up close to the end of a clockperiod.It means that measurement of the time intervalt2depends on the length of t1,that is n1and n2aresomehow correlated.By help of extensive simulations we have derived anempirical asymptotic expansion for autocorrelation in thefast clock limit:4a(x)=(4)4πcσThe type of LED we used has an exceptionally broadspectrum,approximately Gaussian centered atλ=688nm and widthσ≈35nm.If the mean frequency5 of photon emissions is kept well below the coherencefrequency of f cohr=2π/τcohr≈2×1015Hz,photonsare practically mutually independent and consequentlytime intervals between subsequent photon emissionsare exponentially ly,the exponentialdistribution of time intervals between photon emissionsand mutual independence of photons are two equivalentcharacterizations.Alternatively,instead of a LED diode one could aswell use appropriately attenuated laser(diode).Namely,for a continuous,constant-power source of coherent light,a random distribution of photon emissionsin time yields a Poissonian photon-counting distribution[12]. Photons from the LED are directed toward photo-cathode of a photomultiplier tube.Each time a photon hits the photocathode,there is a probability that an electron is emitted via the photoelectric effect.Creation of this so called”photoelectron”is a process governed by the binomial statistics.Therefore,the statistics of time intervals between emission of subsequent photoelectrons is governed by convolution of exponential and differential binomial distributions.However,the convolution of any distribution and exponential distribution gives again the exponential distribution.This is easy to understand qualitatively:if we have a source of random events and choose randomly only some of these events,then the chosen events are again random.Even more favorably, the convolution of an approximately exponential distri-bution and any other distribution yields an improved exponential distribution,meaning that randomness of the photoelectric effect can only enhance overall randomness of produced photoelectrons.Therefore,cre-ation of a photoelectron is virtually truly random event. Creation of useable electric signal comprises:electron collection,electron multiplication,signal amplification, level detection and pulse shaping.The effect of this signal processing is that following a photon detection the detector becomes insensitive to further incoming photons during a certain period of time called the”dead time”.For good quality detectors the dead time has a well defined,fixed length(which is important for our method).But even if this is not the case,that is if for a certain detector dead time varies from event to event, it is easy to modify such detector to achieve a constant dead time.This can be done,for example,by pasing its output through a non-retriggerable one-shot pulse shaping circuit which produces pulses of a constant length and which itself has the dead time slightly above the longest dead time observed in the detector.Such pulse shaping circuits,whose dead time can be set at a desired length,are well known in the art,see for example [11].In our experiments we have used Hamamatsu pho-tomultiplier with bialkali photocathode R5611,high voltage source C3830,and the photon counting unit C3866(amplifier+discriminator+pulse shaper).Dead time of this photon counting system is about25ns, very stable and independent of brightness of the LED. The low quantum efficiency of only about0.05percent of the bialkali photocathode at the wavelength of the LED presents no problem in our application.We have intentionally used low efficiency red LED because its widest wavelength spectrum in comparison to other LEDs indicates highest randomness of emited photons. FIG.5:(RPG)photon detector setup.Mean frequency of output pulses can be set by potentiometer P1.The probability density function(pdf)of measured time intervals between subsequent pulses from the RPG operated at2MHz as measured by the fast digital os-ciloscope LeCroy WaveRunner6100A,is shown in Fig. 6a.An almost perfectfit of measured data to the expo-nential distribution extends over nearlyfive decades of the random variable.The effect of dead time is visible at the left end of the distribution as a sharp fall of the distribution at25ns.A zoom of this region is shown in Fig.6b.Small wrinkles wisible at left end are caused by the binning effect due to thefinite time resoution of the oscilloscope.Good agreement of the measured pdf with exponen-tial distribution confirms that the photon emission of the LED is indeed random and that afterpulsing in the photon detector is negligible at the mean output frequency of2MHz.If,in some case,randomness of a single LED source would be suspected,one could use several independently driven LED sources to enhance the randomness of the light source.However,having in mind very small coherence timeτcohr this is unlikely to be an issue in practice.On the other hand,the afterpulsing in photomultipliers could be a potential problem at high bit extraction rates.Afterpulsing in PMT’s creates correlations in the distribution of random intervals which dies offtipically with a time constant of the order ofτcorr≈1000ns[13].At large photon incidence frequencies this effect becomes negligible in comparison with abundant signal caused by real photons.Nevertheles,in principle,afterpulsing could cause serial correlations among random bits when bit extraction rate exceeds1/τcorr no matter what the6YEntries Mean RMS 500000522.7 498.4t/nsa)Entries Mean RMS447675157.4 84.26t/nsb)110102103104105010002000300040005000600011010210350100150200250300FIG.6:(a)Measured probability density function (pdf)of time intervals between subsequent events from our setup;(b)zoom of the dead-time region which is characterized by a sharp transition from complete insensitivity of the detector following a photon detection to fully restored sensitivity some 25ns later.extraction method.This effect should be studied in more detail preferably by simulations which greatly over emphasize the level of afterpulsing.In any case,bits produced by our prototype at 1Mbit/sec do not show any measurable correlations,as will be presented later.The non-zero dead time,as will be shown,does not create bias nor correlations among random bits in our method.The random number generator prototypeUsing the above RPG and logic circuitry embedding our bit extraction method we have built and tested a laboratory prototype of a quantum random number gen-erator which operates upon the above described method.Big advantage of this method is that it requires only one photon detector and is insensitive to slow variations in the detector’s gain and quantum efficiency,in contrast to some other methods which crucially depend on ex-treme stability of these parameters over a full lifetime of the detector.Simplified schematic diagram of the setup is shown in Fig.7.It contains a quantum random pulse generator described in the previous section (Fig.5).For the construction of the prototype we have used a controlable bi-directional (up/down)counter which operates in the following way.At the beginning of any first time interval,in a pair of subsequent random timeTo the PCFIG.7:Diagram of the quantum random number generator consistsing of random pulse generator and curcitry for imple-mentation of the restartable clock method.intervals as explained earlier,the counter state is set to 0.During each first random time interval its control input is held at high logic state so it counts forward,and during the second random interval the control input is set low,so it continues counting backward until the end of the second random time interval.The required difference n 1−n 2is thus effectively obtained without a need to actually perform any subtraction.If the counter state represents negative number we generate ”0”,if positive we generate ”1”and if zero we generate nothing.Implementing the extraction algorithm in the discrete 74HC logic family and operating the random event gen-erator at a mean frequency f 0=2MHz,we were able to extract random bits at almost 1million bits per sec-ond.With a 48MHz restartable clock we have measured bit efficiency of 0.487±0.02,which is quite close to the theoretical limit of 0.5,and in a good agreement with theoretical prediction of ly it can be shown that the bit efficiency of our method ηbit ,defined as the number of bits produced on average per 1random event asymptotically behaves like:ηbit =14x +12T τ(6)7where∆t is the difference between transition times for ”up”and”down”counting directions.However this bi-asing effect has no bearing on correlations which were indeed consistent with zero.The bias of this setup was measured to be very small, of the order of10−4.This is readily by far the smallest bias reported for the raw bits from a quantum random bit generator[7,15].However,bias quickly raised with ran-dom events freqency arriving to10−3at f0≈6MHz,the scaling with1/τ2being quite in accordance with Eq.(6). In order to lower the bias even further or make pos-sible operation at higher random events frequencies one could add a small tuneable delay to the clock input of the up/down counter and adjust it for a minimum bias. Alternative approaches include use of faster electronics which has smaller internal circuit delays and software debiasing procedures.Statistical quality of random numbers Quality of randomness of long sequences of bits pro-duced by our prototype was evaluated by three batteries of statistical tests:ENT[20],DIEHARD[18]and STS version1.5for Linux[19].ENT is a collection of”standard”basic statistical tests,including autocorrelation test.We have modified this program in order to be able to check correlation coefficients with lags higher than1.Notably,we have checked serial correlation coefficients(Eq.1)with lags from1up to32to be consistent with zero within statistical error bars which were of the order of10−4. Below is a result for a typical sequence of1E9bits. For sake of brevity only thefirst8serial correlation coefficients are shown in Table I.Entropy=1.000000bits per bit.Chi square distribution for1E9samples is2.89,and randomly would exceed this value25.00percent of the times.Arithmetic mean value of bits is0.500086+/-0.000050 Monte Carlo value for Pi is3.140953(error0.02percent). Serial correlation coef.a01=-0.000027+/-0.000100 Serial correlation coef.a02=0.000092+/-0.000100 Serial correlation coef.a03=0.000101+/-0.000100 Serial correlation coef.a04=0.000131+/-0.000100 Serial correlation coef.a05=-0.000116+/-0.000100 Serial correlation coef.a06=0.000121+/-0.000100 Serial correlation coef.a07=0.000082+/-0.000100 Serial correlation coef.a08=-0.000025+/-0.000100 TABLE I:Results of ENT tests suite for a typical sequence of1E9bits.We can see a slight tendency toward positive bias,also indicated by larger Chi square.Running this test over several sequences we have concluded that the bias of our generator is of the order of1E-4.However,correlations were always consistent with zero.DIEHARD is a renown battery of tests which is most sensitive to various problems likely to appear in pseu-dorandom generators.It is widely considered as a most stringent series of statistical tests.It consists of15tests whose outcome is a p-value.According to the acompany-ing documentation,a test is considered failed if the cor-responding p-value is less than0.00001or greater than 0.99999.Some tests have variants so all in all there are 20p-values.Results of testing of the sequence of1E9 bits shown in the Table II indicate that all the tests were passed.TABLE II:Results of DIEHARD tests suite for a typical se-quence of1E9bits.NIST has recently put forward”A statistical test suite for random and pseudorandom number generators for cryptographic applications”(STS)which aims to become first industry standard for testing of random number generators.STS tests consist of total of38individual statistical tests,such as entropy,chisquare,long runs, DNA tests,birthday spacing tests,Lempel-Ziv complex-ity,Maurer’s test etc.The written output from STS is lengthy and therefore not suitable for presenting here.It suffices to say that we have repeatedly tested sequences as long as1×109bits,which passed all of the tests.ConclusionWe have presented the concept and the development of a new type of a fast nondeterministic random number generator whose randomness relies on intrinsic ran-domness of the quantum physical process of photonic emission in semiconductors and subsequent detection by the photoelectric effect.Timing information of detected photons,or more precisely the time interval betweendetected random events,is used to generate binary random digits-bits.Presented prototype consist of a light source,one single-photon detector and fast electronics for timing analysis of the detected photons providing random output numbers(bits)at1Mbit/sec.By using only one photodetector there is no need to perform anyfine tuning of the generator,moreover method is immune to detector instability problems,which are improved char-acteristics compared to most of the systems based on the spatial photon detection used today.Another originality is that for the purpose of eliminating correlations time interval measurement principle has been modified to a restartable clock method.The collection of statistical tests applied to random numbers produced with our quantum random number generator present results which demonstrate the high quality of randomness resulting in bias less than10−4and autocorrelation consistent with zero,with efficiency of0.487±0.02bits per detected random event.With appearance of fast quantum random generators in the market??and obvious declining of speed of computer processors,the speed gap between software and hardware generators has become much smaller especially if one takes into account that hardware generators do not put such a load on the processor as software generators do.We predict that quantum random number generators willfind their applications in basic scientific research,sensitive data protection and encryption,as well as in simulations in science and technology.We are grateful to prof. B.Basrak form the Mathe-matical faculty of the University of Zagreb for enlightenig discussions.Parts of this work are subject of the patent application WO2005106645.Building of the prototype was supported by World Bank Technical Assistance Pro-gram2004for Croatia(TAL-2).[1]T.Ritter,Cryptologia.15,81(1991).[2]C.H.Bennett et.al.,J.Cryptology,53,(1992).[3]A.D.Wyner,Bell Syst.Tech.J.54,1355(1975).[4]I.Csiszar,J.Koerner,IEEE rm.Theory24,339(1978).[5]U.Maurer,IEEE rm.Theory39,733(1993).[6]A.Stefanov,N.Gisin,O.Guinnard,L.Guinnard and H.Zbinden quant-ph/9907006,1999[7]T.Jennewein et.al.,Rev.Sci.Instrum.71,1675(2000).[8]Ma Hai-Qiang et al,Chinese Phys.Lett.21,1961(2004).[9]C.E.Shannon,Bell System Technical Journal,28,656(1949).[10]S.Nakamura,et al.,Japan J.Appl.Phys.,34L1332(1995).[11]74HC221Dual non-retriggerable monostable multivibr-tor with reset-Product specification,Philips Semicon-ductor,December1990.[12]E.Gulari,B.Chu,Rev.Sci.Instrum.48,1560(1977).[13]P.B.Coates,The origins of afterpulses in photomultipli-ers,J.Phys.D:Appl.Phys.,61159(1995).[14]D.E.Knuth,The art of computer programming,Vol.2,Third edition,(Addison-Wesley,Reading,1997)[15]Web URL /products/quantis.htm[16]Web URL http://qrbg.irb.hr[17]M.Stipˇc evi´c,Rev.Sci.Instrum.75,4442(2004).[18]G.Marsaglia,Diehard Battery of Tests of Randomness,internet URL:/pub/diehard/G.Marsaglia,Statistics&Probability Letters,9,345(1990).[19]A.Rukhin et.al.,A Statistical Test Suite forRandom and Pseudorandom Number Generators forCryptographic Applications,NIST Special Publica-tion,(NIST,Gaithersburg,2001),internet URL:/rng/[20]J.Walker,Hotbits,http://www.fourmilab.ch/hotbits/how.html 1.FIGURE CAPTIONSFig. 1.Beam splitter is a frequently used compo-nent for random number generators.The two photon detectors D1and D2are used to detect two possible outcomes corresponding to one of the two possible paths that photon can take.Thus each photon entering the beam splitter generates one random binary digit-bit. Fig. 2.Time interval measurement methods(a) with continuous(b)and restartable(c)clock.The time counter advances with every positive going edge of the clock pulse.Fig. 3.Serial autocorrelation coeficient a for non-restartable clock method(dead time=0).T is the clock period,τis the mean time interval between random pulses.Fig. 4.Bit efficiency,defined as the number of bits generated per random event,for non-restartable clock method as a function of T/τwhere T is the clock period andτis the mean time interval between random pulses. Fig. 5.Schematic diagram of the random pulse gen-erator(RPG)composed of:light emitting diode(LED) and single photon detector setup.Mean frequency of output pulses can be set by potentiometer P1.Fig. 6.(a)Measured probability density function (pdf)of time intervals between subsequent events from our setup;(b)zoom of the dead-time region which is characterized by a sharp transition from complete insensitivity of the detector following a photon detection。