[go: up one dir, main page]

CN108377182A - A kind of the RC4 stream ciphers generating means and method of high safety - Google Patents

A kind of the RC4 stream ciphers generating means and method of high safety Download PDF

Info

Publication number
CN108377182A
CN108377182A CN201810028890.5A CN201810028890A CN108377182A CN 108377182 A CN108377182 A CN 108377182A CN 201810028890 A CN201810028890 A CN 201810028890A CN 108377182 A CN108377182 A CN 108377182A
Authority
CN
China
Prior art keywords
random number
semiconductor laser
stream cipher
algorithm
pseudo
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810028890.5A
Other languages
Chinese (zh)
Inventor
江宁
薛琛鹏
赵晓燕
赵安可
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Electronic Science and Technology of China
Original Assignee
University of Electronic Science and Technology of China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by University of Electronic Science and Technology of China filed Critical University of Electronic Science and Technology of China
Priority to CN201810028890.5A priority Critical patent/CN108377182A/en
Publication of CN108377182A publication Critical patent/CN108377182A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/065Encryption by serially and continuously modifying data stream elements, e.g. stream cipher systems, RC4, SEAL or A5/3
    • H04L9/0656Pseudorandom key sequence combined element-for-element with data sequence, e.g. one-time-pad [OTP] or Vernam's cipher
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/001Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using chaotic signals

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)

Abstract

本发明涉及一种安全性强的RC4流密码生成装置及方法,解决的是安全性低的技术问题,通过采用所述RC4流密码生成装置包括真随机数生成装置,伪随机数生成装置,以及与所述真随机数生成装置、所述伪随机数生成装置通过字典CD共同连接的流密码的生成装置;所述字典CD为同步的真随机数所构成的技术方案,较好的解决了该问题,可用于点对多点等通信系统中。

The present invention relates to an RC4 stream cipher generation device and method with strong security, which solves the technical problem of low security. By adopting the RC4 stream cipher generation device, it includes a true random number generation device, a pseudo-random number generation device, and A stream cipher generation device connected to the true random number generation device and the pseudo-random number generation device through a dictionary CD; the dictionary CD is a technical solution composed of synchronous true random numbers, which better solves this problem. It can be used in communication systems such as point-to-multipoint.

Description

一种安全性强的RC4流密码生成装置及方法A device and method for generating RC4 stream cipher with strong security

技术领域technical field

本发明涉及混沌通信领域,具体涉及一种安全性强的RC4流密码生成装置及方法。The invention relates to the field of chaotic communication, in particular to an RC4 stream cipher generation device and method with strong security.

背景技术Background technique

通信技术的快速发展使人类生活发生了巨大的变化,但是随之而来的威胁也越来越多,信息安全越来越受到人们的关注,信息安全事业已经成为21世纪的阳光产业,研究高安全性的保密通信技术具有重要的军事和经济意义。一次一密(One Time Pad,OTP)加密技术被认为是最安全的加密技术,它要求密钥是随机的、只使用一次,并且密钥长度与数据流等长。但是由于受限于随机数密钥的分配速率,OTP只被应用于高度机密的低带宽信道中。The rapid development of communication technology has brought about great changes in human life, but there are also more and more threats, and information security has attracted more and more attention. Information security has become a sunshine industry in the 21st century. Security of confidential communication technology has important military and economic significance. One Time Pad (OTP) encryption technology is considered as the most secure encryption technology, it requires that the key is random, used only once, and the length of the key is equal to the length of the data stream. However, OTP is only used in highly confidential low-bandwidth channels due to the limitation of the distribution rate of the random number key.

为了扩大该加密技术的适用范围,降低OTP技术的门槛,研究者放宽了对密钥随机性的要求,提出了流密码的加密方案。基于随机性算法的流密码技术,可以在有限长度的种子密钥的作用下,利用确定的伪随机算法产生的高速伪随机序列作为流密码,对数据流进行加密。RC4算法就是其中的佼佼者,被广泛应用于微软Microsoft Office,Secure SocketLayer(SSL),Wired Equiva-lent Privacy(WEP)等等。但是,基于确定性算法的伪随机数流密码存在着严重的安全隐患,随着人们对RC4算法研究的深入,越来越多的缺点被发现。RC4算法也在逐渐失去其应用市场。但是RC4算法具有的简单,高效等优点不可否认。In order to expand the scope of application of this encryption technology and lower the threshold of OTP technology, the researchers relaxed the requirements on the randomness of the key and proposed an encryption scheme of stream cipher. The stream cipher technology based on the randomness algorithm can use the high-speed pseudo-random sequence generated by the definite pseudo-random algorithm as the stream cipher to encrypt the data stream under the action of the limited-length seed key. RC4 algorithm is one of the best, widely used in Microsoft Office, Secure SocketLayer (SSL), Wired Equiva-lent Privacy (WEP) and so on. However, the pseudo-random number stream cipher based on the deterministic algorithm has serious security risks. With the deepening of research on the RC4 algorithm, more and more shortcomings have been discovered. The RC4 algorithm is also gradually losing its application market. However, the advantages of simplicity and high efficiency of the RC4 algorithm cannot be denied.

现有的RC4算法改进基于伪随机算法的性质并没有发生改变。因此,存在安全性低的技术问题。本发明采用伪随机数与真随机数相结合的方式,基于RC4算法和同步的物理随机数发生器,实现了灵活、高速、高安全性流密码产生。而且,通过伪随机数与真随机数模加所产生的流密码,所具有的误码率相对同步物理随机数误码率放大的有限,不会影响其适用性。另外本发明具有非常强的适应性和生存能力,能够适用于点对点和点对多点的通信系统。The existing RC4 algorithm improvement is based on the nature of the pseudo-random algorithm and has not changed. Therefore, there is a technical problem of low security. The invention adopts the method of combining pseudo-random numbers and true random numbers, and realizes flexible, high-speed, and high-security stream cipher generation based on the RC4 algorithm and a synchronous physical random number generator. Moreover, the bit error rate of the stream cipher generated by the modular addition of the pseudo-random number and the true random number is limited compared with the amplification of the bit error rate of the synchronous physical random number, which will not affect its applicability. In addition, the invention has very strong adaptability and survivability, and can be applied to point-to-point and point-to-multipoint communication systems.

发明内容Contents of the invention

本发明所要解决的技术问题是现有技术中存在的安全性低的技术问题。提供一种新的安全性强的RC4流密码生成装置,该安全性强的RC4流密码生成装置具有安全性高、灵活、高速的特点。The technical problem to be solved by the invention is the technical problem of low security existing in the prior art. A new RC4 stream cipher generating device with strong security is provided, and the RC4 stream cipher generating device with strong security has the characteristics of high security, flexibility and high speed.

为解决上述技术问题,采用的技术方案如下:In order to solve the above technical problems, the technical scheme adopted is as follows:

一种安全性强的RC4流密码生成装置,所述RC4流密码生成装置包括真随机数生成装置,伪随机数生成装置,以及与所述真随机数生成装置、所述伪随机数生成装置通过字典CD共同连接的流密码的生成装置;所述字典CD为同步的真随机数所构成。An RC4 stream cipher generating device with strong security, the RC4 stream cipher generating device includes a true random number generating device, a pseudo-random number generating device, and the true random number generating device and the pseudo-random number generating device through A device for generating stream ciphers connected to the dictionary CD; the dictionary CD is composed of synchronous true random numbers.

本发明的工作原理:本发明采用伪随机数与真随机数相结合的方式,基于RC4算法和同步的物理随机数发生器,实现了灵活、高速、高安全性流密码产生。而且,通过伪随机数与真随机数模加所产生的流密码,所具有的误码率相对同步物理随机数误码率放大的有限,不会影响其适用性。Working principle of the present invention: the present invention adopts the method of combining pseudo-random numbers and true random numbers, based on the RC4 algorithm and a synchronous physical random number generator, to realize flexible, high-speed, high-security stream cipher generation. Moreover, the bit error rate of the stream cipher generated by the modular addition of the pseudo-random number and the true random number is limited compared with the amplification of the bit error rate of the synchronous physical random number, which will not affect its applicability.

上述方案中,为优化,进一步地,所述真随机数同步装置包括同步物理随机源,O/E转换模块,A/D转换模块以及延时异或模块。In the above solution, for optimization, further, the true random number synchronization device includes a synchronous physical random source, an O/E conversion module, an A/D conversion module, and a delayed XOR module.

进一步地,所述同步物理随机源包括第三半导体激光器DSL,与第三半导体激光器连接的第一半导体激光器SL1和第二半导体激光器SL2;所述第三半导体激光器DSL设置有外反馈腔QT3,用于给第一半导体激光器SL1和第二半导体激光器SL2提供相同的驱动信号;所述第一半导体激光器SL1与第二半导体激光器SL2均设置有外反馈腔QT1,外反馈腔QT1与外反馈腔QT3的外腔长度及反馈强度不同。不同的外反馈腔能够增加注入锁定同步的困难程度,最终使得第一半导体激光器SL1与第二半导体激光器SL2同步而与第三半导体激光器DSL不同步。在此条件下,第一半导体激光器SL1与第二半导体激光器SL2输出的混沌激光信号的信息不会因第三半导体激光器DSL输出信号的截获而泄露,因而能够在第一半导体激光器SL1与第二半导体激光器SL2之间实现私密同步。Further, the synchronous physical random source includes a third semiconductor laser DSL, a first semiconductor laser SL1 and a second semiconductor laser SL2 connected to the third semiconductor laser; the third semiconductor laser DSL is provided with an external feedback cavity QT3, used To provide the same driving signal to the first semiconductor laser SL1 and the second semiconductor laser SL2; the first semiconductor laser SL1 and the second semiconductor laser SL2 are both provided with an external feedback cavity QT1, and the external feedback cavity QT1 and the external feedback cavity QT3 The length of the external cavity and the strength of the feedback are different. Different external feedback cavities can increase the difficulty of injection-locked synchronization, eventually making the first semiconductor laser SL1 synchronized with the second semiconductor laser SL2 but not synchronized with the third semiconductor laser DSL. Under this condition, the information of the chaotic laser signal output by the first semiconductor laser SL1 and the second semiconductor laser SL2 will not be leaked due to the interception of the output signal of the third semiconductor laser DSL, so it can be transmitted between the first semiconductor laser SL1 and the second semiconductor laser. Private synchronization between lasers SL2.

进一步地,所述伪随机数生成装置包括密钥分发模块,与密钥分发模块连接的RC4程序单元;所述密钥分发模块用于给RC4程序单元提供密钥;所述RC4程序单元用于将密钥分发模块提供的密钥作为种子执行RC4算法获得随机数序列。Further, the pseudo-random number generating device includes a key distribution module, an RC4 program unit connected to the key distribution module; the key distribution module is used to provide keys to the RC4 program unit; the RC4 program unit is used for Use the key provided by the key distribution module as a seed to execute the RC4 algorithm to obtain a random number sequence.

进一步地,所述RC4算法包括密钥初始化算法和伪随机数生成算法。Further, the RC4 algorithm includes a key initialization algorithm and a pseudo-random number generation algorithm.

本发明还提供一种安全性强的RC4流密码生成方法,所述RC4流密码生成方法基于前述的RC4流密码生成装置,方法包括:The present invention also provides a highly secure RC4 stream cipher generation method, the RC4 stream cipher generation method is based on the aforementioned RC4 stream cipher generation device, the method comprising:

步骤1,伪随机数生成装置通过执行RC4算法生成随机数序列;Step 1, the pseudo-random number generating device generates a random number sequence by executing the RC4 algorithm;

步骤2,真随机数生成装置生成同步的真随机数;Step 2, the true random number generating device generates synchronous true random numbers;

步骤3,将RC4算法所产生的伪随机数与真随机数相结合,包括使用RC4算法的指针jt,指向的字典CD中的元素与伪随机数Zt相模加,RC4流密码为:Step 3, combine the pseudo-random number generated by the RC4 algorithm with the true random number, including the pointer jt using the RC4 algorithm, the element in the dictionary CD pointed to is modulo-added with the pseudo-random number Zt, and the RC4 stream cipher is:

Codet=mod(Zt+CDt[jt],2n)。Codet=mod(Zt+CDt[jt],2 n ).

上述方案中为优化,进一步地,所述生成同步的真随机数包括:For optimization in the above scheme, further, the generation of synchronous true random numbers includes:

步骤A:第三半导体激光器DSL在外腔反馈作用下产生初始混沌激光信号;Step A: the third semiconductor laser DSL generates an initial chaotic laser signal under the action of external cavity feedback;

步骤B:初始混沌激光信号作为驱动信号,分裂成相同的混沌信号SG1与混沌信号SG2,混沌信号SG1注入到第一半导体激光器SL1,混沌信号SG2注入到第二半导体激光器SL2;Step B: The initial chaotic laser signal is used as a driving signal, split into the same chaotic signal SG1 and chaotic signal SG2, the chaotic signal SG1 is injected into the first semiconductor laser SL1, and the chaotic signal SG2 is injected into the second semiconductor laser SL2;

步骤C:第一半导体激光器SL1和第二半导体激光器SL2所产生的同步的混沌激光信号通过光电转换模块中的光电探测器完成O/E转换得到电信号SE;Step C: the synchronous chaotic laser signals generated by the first semiconductor laser SL1 and the second semiconductor laser SL2 are converted through the photodetector in the photoelectric conversion module to obtain an electrical signal SE;

步骤D:电信号SE通过A/D模块,经过采样、量化、判决之后得到二进制序列C2D;Step D: The electrical signal SE passes through the A/D module to obtain a binary sequence C2D after sampling, quantization, and judgment;

步骤E:二进制序列C2D依次经过延时异或后的随机数序列为同步的真随机数。Step E: The random number sequence after the binary sequence C2D is sequentially subjected to delayed XOR is a synchronous true random number.

进一步地,所述字典CD根据真随机数以及其产生速率做定期的更新。产生的物理随机数被用来形成动态字典CD(N×n bits),字典CD随着不断产生的真随机数做动态的更新。其更新方式可以是连续替换或者阶段性替换。连续替换:物理随机数发生器每产生nbits的随机数,就立即替换字典CD中的一个元素,下一次产生的n比特随机数用来替换字典CD中的下一个元素,周而复始,不停的进行字典CD更新。阶段替换:随机数发生器每产生N×n bits,就一次性地更换字典CD所有元素。Further, the dictionary CD is regularly updated according to the true random number and its generation rate. The generated physical random numbers are used to form a dynamic dictionary CD (N×n bits), and the dictionary CD is dynamically updated with the continuously generated true random numbers. The update method can be continuous replacement or periodic replacement. Continuous replacement: Every time the physical random number generator generates nbits of random numbers, it immediately replaces an element in the dictionary CD, and the n-bit random number generated next time is used to replace the next element in the dictionary CD. Dictionary CD updated. Phase replacement: every time the random number generator generates N×n bits, all elements of the dictionary CD are replaced at once.

伪随机数的产生:由密钥分发模块和RC4算法组成,密钥分发模块为通信双方提供密钥,密钥作为RC4算法的种子,进而通过RC4算法产生随机数序列,在方案中拟通过已传输的数据作为系统密钥,现有其他的密钥分配方法也适用本流密码产生方案。另外RC4的指针j用来指向字典CD(code dictionary,字典CD)中的某个元素。Pseudo-random number generation: It consists of a key distribution module and an RC4 algorithm. The key distribution module provides a key for both communication parties. The key is used as the seed of the RC4 algorithm, and then a random number sequence is generated through the RC4 algorithm. The transmitted data is used as the system key, and other existing key distribution methods are also applicable to this stream cipher generation scheme. In addition, the pointer j of RC4 is used to point to an element in the dictionary CD (code dictionary, dictionary CD).

RC4算法:首先我们定义所使用符号所代表的意义,n表示该算法中使用的一个字节的长度(该算法可以根据用户需要来定义一个字节的长度),N表示长度为n的一个字节能够显示的值的总量,即N=2n,S表示该算法的内部状态,每一个S中有N个n比特的值。t表示一个参数,t=1,2…。St表示在参数t时的内部状态,it和jt表示参数t时对应的两个指针,他们指向内部状态S中的两个值。St[it]和St[jt]表示St中分别被指针it和jt指向的值。K表示一个密钥,l是密钥K包含的字节数。Zt表示每一个t对应的伪随机数生成器的输出值。该算法包含两个部分,密钥初始化算法(Key Scheduling Algorithm,KSA)和伪随机数生成算法(Pseudo-Random Generation Algorithm,PRGA)。RC4 algorithm: First, we define the meaning of the symbol used, n represents the length of a byte used in the algorithm (the algorithm can define the length of a byte according to user needs), N represents a word with a length of n The total number of values that can be displayed in a section, that is, N=2 n , S represents the internal state of the algorithm, and each S has N n-bit values. t represents a parameter, t=1, 2.... St represents the internal state at parameter t, and it and jt represent two pointers corresponding to parameter t, and they point to two values in internal state S. St[it] and St[jt] represent the values pointed to by pointers it and jt respectively in St. K represents a key, and l is the number of bytes contained in the key K. Zt represents the output value of the pseudo-random number generator corresponding to each t. The algorithm consists of two parts, Key Scheduling Algorithm (KSA) and Pseudo-Random Generation Algorithm (PRGA).

KSA包含N个步操作,该过程将内部状态S初始化,具体过程如表1:KSA includes N steps of operation, and the process initializes the internal state S. The specific process is shown in Table 1:

表1Table 1

For i=0,…,N-1For i=0,...,N-1 S[i]=i;S[i]=i; j=0j = 0 For i=0,…,N-1For i=0,...,N-1 j=(j+S[i]+K[i mod l])mod 256;j=(j+S[i]+K[i mod l]) mod 256; Swap(S[i],S[j])Swap(S[i],S[j])

PRGA首先将两个指针it和jt初始化为0,作为两个随机变化的指针,然后交换状态St-1中it和jt指向的值,该过程的输出值为St[it]+St[jt]位置的值,具体过程如表2:PRGA first initializes the two pointers it and jt to 0 as two randomly changing pointers, and then exchanges the values pointed to by it and jt in state St-1, and the output value of this process is St[it]+St[jt] The value of the position, the specific process is shown in Table 2:

表2Table 2

i=j=0i=j=0 i=i+1;i=i+1; j=j+S[i]+K[i]mod 256;j=j+S[i]+K[i] mod 256; Swap(S[i],S[j])Swap(S[i],S[j]) t=S[i]+S[j]t=S[i]+S[j] Output Z=S[t]Output Z=S[t]

真随机数同步装置:由同步物理随机源,O/E转换模块,A/D转换模块以及延时异或模块等组成。本发明采用混沌激光作为物理随机源。首先第三半导体激光器(DrivingSemiconductor Laser,第三半导体激光器DSL)在外腔反馈作用下产生初始混沌激光信号。为了防止第三半导体激光器DSL与第一半导体激光器SL1,第二半导体激光器SL2具有相对高的同步系数,从而使得第一半导体激光器SL1和第二半导体激光器SL2所产生的混沌激光器信号的信息泄露,在第一半导体激光器SL1和第二半导体激光器SL2中引入相同外反馈腔,但是该反馈腔的外腔长度及反馈强度和第三半导体激光器DSL不同。True random number synchronization device: It is composed of a synchronous physical random source, an O/E conversion module, an A/D conversion module, and a delayed XOR module. The present invention uses chaotic laser as a physical random source. First, the third semiconductor laser (Driving Semiconductor Laser, DSL) generates an initial chaotic laser signal under the action of external cavity feedback. In order to prevent the third semiconductor laser DSL and the first semiconductor laser SL1, the second semiconductor laser SL2 has a relatively high synchronization coefficient, thereby making the information leakage of the chaotic laser signal generated by the first semiconductor laser SL1 and the second semiconductor laser SL2, in The same external feedback cavity is introduced into the first semiconductor laser SL1 and the second semiconductor laser SL2, but the external cavity length and feedback intensity of the feedback cavity are different from those of the third semiconductor laser DSL.

第一半导体激光器SL1和第二半导体激光器SL2所产生的同步的混沌激光信号通过光电转换模块中的光电探测器完成O/E转换。所产生的电信号进入A/D模块,经过采样、量化、判决之后得到一组二进制序列。该序列经过延时异或之后即为随机数序列。The synchronous chaotic laser signals generated by the first semiconductor laser SL1 and the second semiconductor laser SL2 complete the O/E conversion through the photodetector in the photoelectric conversion module. The generated electrical signal enters the A/D module, and a set of binary sequences are obtained after sampling, quantization, and judgment. The sequence is a sequence of random numbers after a time-delayed XOR.

字典CD:字典CD是由同步的真随机数所构成的。字典CD具有和S相同的长度,字典CD根据真随机数以及其产生速率做定期的更新,即物理随机数每产生N×n比特的二进制数,就完全替换字典CD原有的状态。由于字典CD中的元素都是来源于真正的随机数,所以更新前后不存在固定的变化关系。此外不同于状态S的是,字典CD可能存在相同的元素。字典CD的存在是为了能够使得真随机数在长生速率比较低的情况下匹配到高速率的伪随机数,从而产生高速的流密码。Dictionary CD: The dictionary CD is composed of synchronous true random numbers. The dictionary CD has the same length as S, and the dictionary CD is regularly updated according to the true random number and its generation rate, that is, every time a physical random number generates an N×n-bit binary number, the original state of the dictionary CD is completely replaced. Since the elements in the dictionary CD are all derived from real random numbers, there is no fixed change relationship before and after the update. In addition, different from the state S, the dictionary CD may have the same elements. The existence of the dictionary CD is to enable true random numbers to match high-rate pseudo-random numbers when the growth rate is relatively low, thereby generating high-speed stream ciphers.

流密码的生成模块:流密码Code的生成模块主要是将RC4算法所产生的伪随机数与真随机数相结合。为了进一步提高流密码的随机性与安全性,我们采用了RC4算法的指针jt,指向的字典CD中的元素与伪随机数Zt相加,流密码为:Codet=mod(Zt+CDt[jt],2n)。Stream cipher generation module: The stream cipher code generation module mainly combines the pseudo-random numbers generated by the RC4 algorithm with true random numbers. In order to further improve the randomness and security of the stream cipher, we have adopted the pointer jt of the RC4 algorithm, and the element in the dictionary CD pointed to is added with the pseudo-random number Zt, and the stream cipher is: Codet=mod(Zt+CDt[jt] ,2 n ).

本发明的有益效果:(1)流密码由伪随机数与真随机数共同产生,即使相同的密钥在不同的时刻所产生的流密码也是完全不相同的,极大的提高了流密码的安全性;(2)本发明不涉及复杂的算法变动,流密码的产生速率仍然由RC4算法的产生速率所决定,改进后的流密码分配方案对RC4算法的影响非常小;(3)本发明不涉及真随机数的复杂运算(例如迭代运算),真随机数的误码不会在流密码中急剧放大。(4)本发明采用已发送的数据作为流密码分配方案的密钥,节约了成本。(5)流密码结合了真随机数,这能够有效的抵制现有的攻击方法,例如错误引入攻击、状态猜测攻击。Beneficial effects of the present invention: (1) stream ciphers are jointly produced by pseudo-random numbers and true random numbers, even if the stream ciphers produced by the same key at different times are completely different, greatly improving the performance of stream ciphers Security; (2) the present invention does not involve complex algorithm changes, and the generation rate of stream cipher is still determined by the generation rate of RC4 algorithm, and the impact of the improved stream cipher distribution scheme on RC4 algorithm is very small; (3) the present invention Complicated operations that do not involve true random numbers (such as iterative operations), the bit errors of true random numbers will not be greatly amplified in stream ciphers. (4) The present invention uses the sent data as the key of the stream cipher distribution scheme, which saves the cost. (5) Stream ciphers combine true random numbers, which can effectively resist existing attack methods, such as error introduction attacks and state guessing attacks.

附图说明Description of drawings

下面结合附图和实施例对本发明进一步说明。The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

图1,本发明的一种具体实施方案结构示意图。Fig. 1 is a schematic structural diagram of a specific embodiment of the present invention.

图2,RC4原理示意图。Figure 2, schematic diagram of RC4 principle.

图3,同步混沌激光信号示意图。Fig. 3. Schematic diagram of synchronous chaotic laser signal.

图4,第三半导体激光器DSL与第一半导体激光器SL1之间的相关函数示意图。Fig. 4 is a schematic diagram of the correlation function between the third semiconductor laser DSL and the first semiconductor laser SL1.

图5,第一半导体激光器SL1与第二半导体激光器SL2之间的相关函数示意图。Fig. 5 is a schematic diagram of the correlation function between the first semiconductor laser SL1 and the second semiconductor laser SL2.

图6,RC4伪随机序列与流密码的相关函数示意图。Fig. 6 is a schematic diagram of the correlation function between the RC4 pseudo-random sequence and the stream cipher.

图7,字典CD输出序列CDt[jt]与流密码的相关函数示意图。Fig. 7 is a schematic diagram of the correlation function between the output sequence CDt[jt] of the dictionary CD and the stream cipher.

图8,真随机数误码对流密码的误码率的影响示意图。Fig. 8 is a schematic diagram of the impact of a true random number error on the bit error rate of a stream cipher.

具体实施方式Detailed ways

为了使本发明的目的、技术方案及优点更加清楚明白,以下结合实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本发明,并不用于限定本发明。In order to make the object, technical solution and advantages of the present invention more clear, the present invention will be further described in detail below in conjunction with the examples. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

实施例1Example 1

本实施例提供一种安全性强的RC4流密码生成装置,如图1,所述RC4流密码生成装置包括真随机数生成装置,伪随机数生成装置,以及与所述真随机数生成装置、所述伪随机数生成装置通过字典CD共同连接的流密码的生成装置;所述字典CD为同步的真随机数所构成。The present embodiment provides a highly secure RC4 stream cipher generating device, as shown in Figure 1, the RC4 stream cipher generating device includes a true random number generating device, a pseudo-random number generating device, and the true random number generating device, The device for generating pseudo-random numbers is connected to a device for generating stream ciphers through a dictionary CD; the dictionary CD is composed of synchronous true random numbers.

其中,所述真随机数同步装置包括同步物理随机源,O/E转换模块,A/D转换模块以及延时异或模块。Wherein, the true random number synchronizing device includes a synchronous physical random source, an O/E conversion module, an A/D conversion module and a delayed XOR module.

详细地,如图1,所述同步物理随机源包括第三半导体激光器DSL,与第三半导体激光器连接的第一半导体激光器SL1和第二半导体激光器SL2;所述第三半导体激光器DSL设置有外反馈腔QT3,用于给第一半导体激光器SL1和第二半导体激光器SL2提供相同的驱动信号;所述第一半导体激光器SL1与第二半导体激光器SL2均设置有相同的外反馈腔QT1和QT2,外反馈腔QT1(QT2)与外反馈腔QT3的外腔长度及反馈强度不同。In detail, as shown in Figure 1, the synchronous physical random source includes a third semiconductor laser DSL, a first semiconductor laser SL1 and a second semiconductor laser SL2 connected with the third semiconductor laser; the third semiconductor laser DSL is provided with an external feedback The cavity QT3 is used to provide the same driving signal to the first semiconductor laser SL1 and the second semiconductor laser SL2; the first semiconductor laser SL1 and the second semiconductor laser SL2 are all provided with the same external feedback cavity QT1 and QT2, and the external feedback The cavity QT1 (QT2) and the external feedback cavity QT3 have different external cavity lengths and feedback strengths.

详细地,如图1,所述伪随机数生成装置包括密钥分发模块,与密钥分发模块连接的RC4程序单元;所述密钥分发模块用于给RC4程序单元提供密钥;所述RC4程序单元用于将密钥分发模块提供的密钥作为种子执行RC4算法获得随机数序列。In detail, as shown in Figure 1, the pseudo-random number generating device includes a key distribution module, an RC4 program unit connected to the key distribution module; the key distribution module is used to provide keys to the RC4 program unit; the RC4 The program unit is used to use the key provided by the key distribution module as a seed to execute the RC4 algorithm to obtain a random number sequence.

其中,所述RC4算法包括密钥初始化算法KSA和伪随机数生成算法PRGA。Wherein, the RC4 algorithm includes a key initialization algorithm KSA and a pseudo-random number generation algorithm PRGA.

本实施例还提供一种安全性强的RC4流密码生成方法,所述RC4流密码生成方法基于前述的RC4流密码生成装置,方法包括:The present embodiment also provides a highly secure RC4 stream cipher generation method, the RC4 stream cipher generation method is based on the aforementioned RC4 stream cipher generation device, the method comprising:

步骤1,伪随机数生成装置通过执行RC4算法生成随机数序列;Step 1, the pseudo-random number generating device generates a random number sequence by executing the RC4 algorithm;

步骤2,真随机数生成装置生成同步的真随机数;Step 2, the true random number generating device generates synchronous true random numbers;

步骤3,将RC4算法所产生的伪随机数与真随机数相结合,包括使用RC4算法的指针jt,指向的字典CD中的元素与伪随机数Zt相加,RC4流密码为:Step 3, combine the pseudo-random number generated by the RC4 algorithm with the true random number, including the pointer jt using the RC4 algorithm, and add the elements in the dictionary CD pointed to to the pseudo-random number Zt. The RC4 stream cipher is:

Codet=mod(Zt+CDt[jt],256)。Codet=mod(Zt+CDt[jt],256).

RC4算法的工作详细工作方式如图2所示,其中N=256,首先对状态S赋初值0,1,2,…255。然后根据密钥的长度,将密钥的值循环赋给T。完成赋值之后,算法马上根据T中的值进行状态S的重新排列组合。此过程即为KSA。完成状态S的重新排列组合之后,算法立即进行PRGA,同时不断的循环执行随机数的产生过程,生成伪随机序列。The detailed working mode of the RC4 algorithm is shown in Fig. 2, where N=256, and the initial value 0, 1, 2, . . . 255 is assigned to the state S first. Then according to the length of the key, the value of the key is cyclically assigned to T. After completing the assignment, the algorithm immediately rearranges and combines the state S according to the value in T. This process is known as KSA. After the rearrangement and combination of the state S is completed, the algorithm immediately performs PRGA, and at the same time continuously executes the random number generation process in a loop to generate a pseudo-random sequence.

其中,所述生成同步的真随机数过程包括:Wherein, the process of generating a synchronous true random number includes:

步骤A:第三半导体激光器DSL在外腔反馈作用下产生初始混沌激光信号;Step A: the third semiconductor laser DSL generates an initial chaotic laser signal under the action of external cavity feedback;

步骤B:初始混沌激光信号作为驱动信号,分裂成相同的混沌信号SG1与混沌信号SG2,混沌信号SG1注入到第一半导体激光器SL1,混沌信号SG2注入到第二半导体激光器SL2;Step B: The initial chaotic laser signal is used as a driving signal, split into the same chaotic signal SG1 and chaotic signal SG2, the chaotic signal SG1 is injected into the first semiconductor laser SL1, and the chaotic signal SG2 is injected into the second semiconductor laser SL2;

步骤C:第一半导体激光器SL1和第二半导体激光器SL2所产生的同步的混沌激光信号通过光电转换模块中的光电探测器完成O/E转换得到电信号SE;Step C: the synchronous chaotic laser signals generated by the first semiconductor laser SL1 and the second semiconductor laser SL2 are converted through the photodetector in the photoelectric conversion module to obtain an electrical signal SE;

步骤D:电信号SE通过A/D模块,经过采样、量化、判决之后得到二进制序列C2D;Step D: The electrical signal SE passes through the A/D module to obtain a binary sequence C2D after sampling, quantization, and judgment;

步骤E:二进制序列C2D依次经过延时异或后的随机数序列为同步的真随机数。Step E: The random number sequence after the binary sequence C2D is sequentially subjected to delayed XOR is a synchronous true random number.

优选地,所述字典CD根据真随机数以及其产生速率做定期的更新。Preferably, the dictionary CD is regularly updated according to the true random number and its generation rate.

以n=8bit为例对发明予以进一步说明。第三半导体激光器DSL工作在以1550nm为中心附近,与第一半导体激光器SL1与第二半导体激光器SL2之间的频率偏差为5.8GHz。具体系统参数为第三半导体激光器DSL与SLs的工作电流均为26.46mA。第三半导体激光器DSL的反馈时间和强度分别为3ns和15ns-1,第三半导体激光器DSL注入到SLs的强度和延时分别为45ns-1和0ns。该条件下,第一半导体激光器SL1与第二半导体激光器SL2自身的反馈时间和强度分别为2ns和10ns-1。为了验证可行性,对第一半导体激光器SL1与第二半导体激光器SL2之间的同步性能进行了研究。The invention is further described by taking n=8bit as an example. The third semiconductor laser DSL works around 1550 nm, and the frequency deviation between the first semiconductor laser SL1 and the second semiconductor laser SL2 is 5.8 GHz. The specific system parameters are that the operating currents of the third semiconductor lasers DSL and SLs are both 26.46mA. The feedback time and intensity of the third semiconductor laser DSL are 3ns and 15ns -1 respectively, and the intensity and delay of the third semiconductor laser DSL injected into SLs are 45ns -1 and 0ns respectively. Under this condition, the feedback time and intensity of the first semiconductor laser SL1 and the second semiconductor laser SL2 are 2 ns and 10 ns −1 respectively. In order to verify the feasibility, the synchronization performance between the first semiconductor laser SL1 and the second semiconductor laser SL2 is studied.

图3为第一半导体激光器SL1和第二半导体激光器SL2的短时输出强度,在以上的工作条件下第一半导体激光器SL1和第二半导体激光器SL2所产生的混沌激光信号同步良好。Figure 3 shows the short-term output intensities of the first semiconductor laser SL1 and the second semiconductor laser SL2. Under the above working conditions, the chaotic laser signals generated by the first semiconductor laser SL1 and the second semiconductor laser SL2 are well synchronized.

为了定量的研究其同步质量,对二者互相关函数进行了评估,其结果如图4所示,二者的相关系数在迟滞时间为0ns时接近1,因而我们可以进一步的判定第一半导体激光器SL1与第二半导体激光器SL2具有非常高的同步质量。In order to quantitatively study its synchronization quality, the cross-correlation function of the two is evaluated, and the result is shown in Figure 4. The correlation coefficient of the two is close to 1 when the lag time is 0ns, so we can further determine the first semiconductor laser SL1 has a very high synchronization quality with the second semiconductor laser SL2.

此外还对第三半导体激光器DSL与第一半导体激光器SL1之间的相关函数进行了估算,由图5所示,其在迟滞时间为0ns时具有最高的相关系数,图中可得相关系数接近0.6。In addition, the correlation function between the third semiconductor laser DSL and the first semiconductor laser SL1 is estimated, as shown in Figure 5, it has the highest correlation coefficient when the lag time is 0 ns, and the correlation coefficient is close to 0.6 .

如果进一步的降低第三半导体激光器DSL到第一半导体激光器SL1/2的注入强度,该相关系数可以进一步减小。If the injection intensity of the third semiconductor laser DSL to the first semiconductor laser SL1/2 is further reduced, the correlation coefficient can be further reduced.

在理想的条件下(忽略上述因素的影响),当第三半导体激光器DSL与第一半导体激光器SL1之间的相关函相关系数为0.6时,从注入信号即第三半导体激光器DSL的输出信号上获得物理随机数的误码率约为0.24。考虑到实际截获过程中所出现的同步误差、采样时钟抖动、时钟失配等情况,从第三半导体激光器DSL输出的混沌激光信号中截获同步物理随机数的误码率要比0.24高的多。所以第三破解方不能够从注入信号中截获有用的信息。Under ideal conditions (neglecting the influence of the above factors), when the correlation coefficient between the third semiconductor laser DSL and the first semiconductor laser SL1 is 0.6, it is obtained from the injection signal, that is, the output signal of the third semiconductor laser DSL The bit error rate of physical random numbers is about 0.24. Considering the synchronization error, sampling clock jitter, and clock mismatch in the actual interception process, the bit error rate of synchronous physical random numbers intercepted from the chaotic laser signal output by the third semiconductor laser DSL is much higher than 0.24. Therefore, the third cracking party cannot intercept useful information from the injected signal.

图6为伪随机序列Z和最终的流密码序列之间的相关函数。本实施例中采用的是阶段更新字典CD的方法,如图所示最终的流密码序列和伪随机序列之间的相关系数非常小(小于0.004),即最终的流密码序列与RC4所产生的伪随机序列不相关,这意味着第三破解方尝试通过差错引入攻击或者Kundsen状态猜测攻击的方案也基本失去了效用。Fig. 6 is a correlation function between the pseudo-random sequence Z and the final stream cipher sequence. What adopted in the present embodiment is the method for updating the dictionary CD in stages, as shown in the figure, the correlation coefficient between the final stream cipher sequence and the pseudo-random sequence is very small (less than 0.004), that is, the final stream cipher sequence and RC4 produce The pseudo-random sequence is irrelevant, which means that the scheme of the third cracking party trying to introduce the attack through the error or the Kundsen state guessing attack basically loses its effectiveness.

对于差错攻击方案:假设攻击者控制了密码设备,可正确的使用密码设备进行加密,还可以向密码设备中引入错误,由此来影响加密过程,使密码设备输出错误的加密结果。根据现有技术表明,要攻破RC4算法,恢复RC4的整个初始状态结果,需要216个密钥字和216次错误引入攻击。For the error attack scheme: Assume that the attacker controls the cryptographic device, can correctly use the cryptographic device for encryption, and can also introduce errors into the cryptographic device, thereby affecting the encryption process and causing the cryptographic device to output wrong encryption results. According to the existing technology, to break the RC4 algorithm and restore the entire initial state result of RC4, 2 16 key words and 2 16 error introduction attacks are needed.

然而实施例中字典CD的更新频率为1.22MHz(由随机数的产生速率决定)。一旦在字典CD更新周期内,差错引入攻击没有破译RC4的整个初始状态,那么第三破解方必须从头开始破译。另一方面即使第三破解方获知了初始密钥,并重新运转加密设备,但是由于字典CD的不断更新,也不能产生之前所使用的流密码。However, the update frequency of the dictionary CD in the embodiment is 1.22 MHz (determined by the rate of generating random numbers). Once the error introduction attack fails to decipher the entire initial state of RC4 within the dictionary CD update cycle, the third cracking party must decipher from the beginning. On the other hand, even if the third cracking party knows the initial key and re-runs the encryption device, the stream cipher used before cannot be produced due to the continuous update of the dictionary CD.

图7为流密码和字典CDt[jt]序列的相关函数。如图所示,二者之间的相关系数仍然小于0.004,即最终的流密码序列与字典CDt[jt]序列不相关。也就是即使第三破解方控制了同步随机数产生设备,并用之产生了正确的随机数,但是在不确定RC4所产生的伪随机序列以及指针jt序列的前提下,也不能生成正确的流密码。Fig. 7 is the correlation function of stream cipher and dictionary CDt[jt] sequence. As shown in the figure, the correlation coefficient between the two is still less than 0.004, that is, the final stream cipher sequence is not correlated with the dictionary CDt[jt] sequence. That is, even if the third cracking party controls the synchronous random number generator and uses it to generate correct random numbers, it cannot generate the correct stream cipher without determining the pseudo-random sequence and pointer jt sequence generated by RC4 .

图8为流密码的误码率与同步物理随机数的误码率之间的关系。根据现有的基于同步物理熵源同步随机数的产生系统,由于时钟抖动等采样误差以及物理熵源的同步误差,在没有数据传递的条件下,同步物理随机数具有较高的误码率。随机数的误码必然导致流密码的误码,因此流密码的误码率与同步物理随机数的误码率之间的关系十分重要。如图8所示,流密码的误码率与同步物理随机数的误码率近似线性关系,并且流密码的误码率y比物理随机数的误码率x略大。通过线性拟合得到的数据,可以得y=1.73674x+1.28965×10-6FIG. 8 shows the relationship between the bit error rate of the stream cipher and the bit error rate of the synchronous physical random number. According to the existing synchronous random number generation system based on a synchronous physical entropy source, due to sampling errors such as clock jitter and synchronization errors of the physical entropy source, the synchronous physical random number has a high bit error rate under the condition of no data transmission. The bit error of the random number will inevitably lead to the bit error of the stream cipher, so the relationship between the bit error rate of the stream cipher and the bit error rate of the synchronous physical random number is very important. As shown in Figure 8, the bit error rate of the stream cipher has an approximately linear relationship with the bit error rate of the synchronous physical random number, and the bit error rate y of the stream cipher is slightly larger than the bit error rate x of the physical random number. The data obtained by linear fitting can be obtained as y=1.73674x+1.28965×10 -6 .

由此,我们可以推断,当第三半导体激光器DSL与第一半导体激光器SL1之间的相关函相关系数为0.6时,在理想的条件下,第三破解方从注入光信号中提取物理随机数并采用相同的方式方法所产生的流密码的误码率为~0.42。From this, we can deduce that when the correlation coefficient of the correlation function between the third semiconductor laser DSL and the first semiconductor laser SL1 is 0.6, under ideal conditions, the third cracking party extracts a physical random number from the injected optical signal and The bit error rate of the stream cipher produced by the same method is ~0.42.

为了验证流密码的随机性,我们采用了NIST 800-22对其进行了测试。表3展示了2.5Gb/s物理随机数以及100Gb/s流密码的NIST 800-22测试结果。如表所示,两个序列都能够通过15个NIST测试。To verify the randomness of stream ciphers, we tested them against NIST 800-22. Table 3 shows the NIST 800-22 test results for 2.5Gb/s physical random numbers and 100Gb/s stream ciphers. As shown in the table, both sequences were able to pass 15 NIST tests.

表3table 3

综上所述,本实施例具备如下特征:(1)密钥的安全性主要依赖于物理随机数的安全性和种子密钥的安全性;(2)同步物理随机数是利用同步混沌激光作为物理随机源,结合后续模块生成的,为物理真随机数;(3)通过改变接收端激光器的外腔结构,使得物理随机源与驱动光源不同步,防止了物理随机熵源因注入信号的泄露而泄露;(4)采用已发送的数据获知已经成熟的低速密钥分配技术为RC4算法的种子密钥,算法复杂度低;(5)将RC4算法所产生的伪随机序列和指针j的值所指定的字典CD元素之间进行模加作为流密码,该过程不涉及物理随机数的迭代运算,因而不会引起误码率的急剧放大;(6)将物理随机数与RC4所产生的伪随机数相结合,可以消除RC4因不同种子密钥所造成的伪随机数的分布偏差,有效地抵制状态猜测攻击(一种常用的RC4攻击方法);(7)本实施例具有高度的适用性,适用于点到点、点到多点的通信系统,因而几乎在全部的通信系统中都可以发挥作用;(8)流密码的速率仍然由RC4的产生速率决定,因而具有非常高的灵活性和高速性。In summary, this embodiment has the following features: (1) the security of the key mainly depends on the security of the physical random number and the security of the seed key; The physical random source, combined with subsequent module generation, is a physical true random number; (3) By changing the external cavity structure of the laser at the receiving end, the physical random source and the driving light source are not synchronized, preventing the leakage of the physical random entropy source due to the injection signal (4) Use the sent data to learn that the mature low-speed key distribution technology is the seed key of the RC4 algorithm, and the algorithm complexity is low; (5) Use the pseudo-random sequence generated by the RC4 algorithm and the value of the pointer j The specified dictionary CD elements are modulo-added as a stream cipher. This process does not involve the iterative operation of physical random numbers, so it will not cause a sharp increase in the bit error rate; (6) combine the physical random numbers with the pseudo code generated by RC4 The combination of random numbers can eliminate the distribution deviation of RC4 pseudo-random numbers caused by different seed keys, and effectively resist state guessing attacks (a commonly used RC4 attack method); (7) this embodiment has a high degree of applicability , suitable for point-to-point and point-to-multipoint communication systems, so it can play a role in almost all communication systems; (8) The rate of the stream cipher is still determined by the generation rate of RC4, so it has very high flexibility and high speed.

尽管上面对本发明说明性的具体实施方式进行了描述,以便于本技术领域的技术人员能够理解本发明,但是本发明不仅限于具体实施方式的范围,对本技术领域的普通技术人员而言,只要各种变化只要在所附的权利要求限定和确定的本发明精神和范围内,一切利用本发明构思的发明创造均在保护之列。Although the illustrative specific embodiments of the present invention have been described above, so that those skilled in the art can understand the present invention, the present invention is not limited to the scope of the specific embodiments. For those of ordinary skill in the art, as long as each As long as the changes are within the spirit and scope of the present invention defined and determined by the appended claims, all inventions and creations using the concept of the present invention are included in the protection list.

Claims (8)

1.一种安全性强的RC4流密码生成装置,其特征在于:所述RC4流密码生成装置包括真随机数生成装置,伪随机数生成装置,以及与所述真随机数生成装置、所述伪随机数生成装置通过字典CD共同连接的流密码的生成装置;所述字典CD为同步的真随机数所构成。1. a strong RC4 stream cipher generating device for security, characterized in that: said RC4 stream cipher generating device comprises a true random number generating device, a pseudo-random number generating device, and with said true random number generating device, said The pseudo-random number generation device is connected to the stream cipher generation device through the dictionary CD; the dictionary CD is composed of synchronous true random numbers. 2.根据权利要求1所述的安全性强的RC4流密码生成装置,其特征在于:所述真随机数同步装置包括同步物理随机源,O/E转换模块,A/D转换模块以及延时异或模块。2. the strong RC4 stream cipher generation device of security according to claim 1, is characterized in that: described true random number synchronization device comprises synchronous physical random source, O/E conversion module, A/D conversion module and time delay XOR module. 3.根据权利要求1所述的安全性强的RC4流密码生成装置,其特征在于:所述同步物理随机源包括第三半导体激光器DSL,与第三半导体激光器连接的第一半导体激光器SL1和第二半导体激光器SL2;所述第三半导体激光器DSL设置有外反馈腔QT3,用于给第一半导体激光器SL1和第二半导体激光器SL2提供相同的驱动信号;所述第一半导体激光器SL1与第二半导体激光器SL2均设置有外反馈腔QT1,外反馈腔QT1与外反馈腔QT3的外腔长度及反馈强度不同。3. the strong RC4 stream cipher generation device of security according to claim 1, is characterized in that: described synchronous physical random source comprises the 3rd semiconductor laser DSL, the first semiconductor laser SL1 that is connected with the 3rd semiconductor laser and the 3rd semiconductor laser Two semiconductor lasers SL2; the third semiconductor laser DSL is provided with an external feedback cavity QT3 for providing the same drive signal to the first semiconductor laser SL1 and the second semiconductor laser SL2; the first semiconductor laser SL1 and the second semiconductor laser SL1 The laser SL2 is all provided with an external feedback cavity QT1, and the external cavity length and feedback strength of the external feedback cavity QT1 and the external feedback cavity QT3 are different. 4.根据权利要求1所述的安全性强的RC4流密码生成装置,其特征在于:所述伪随机数生成装置包括密钥分发模块,与密钥分发模块连接的RC4程序单元;4. the strong RC4 stream cipher generation device of security according to claim 1, is characterized in that: described pseudo-random number generation device comprises key distribution module, the RC4 program unit that is connected with key distribution module; 所述密钥分发模块用于给RC4程序单元提供密钥;The key distribution module is used to provide keys to the RC4 program unit; 所述RC4程序单元用于将密钥分发模块提供的密钥作为种子执行RC4算法获得随机数序列。The RC4 program unit is used to use the key provided by the key distribution module as a seed to execute the RC4 algorithm to obtain a random number sequence. 5.根据权利要求1所述的安全性强的RC4流密码生成装置,其特征在于:所述RC4算法包括密钥初始化算法和伪随机数生成算法。5. The RC4 stream cipher generation device with strong security according to claim 1, characterized in that: the RC4 algorithm comprises a key initialization algorithm and a pseudo-random number generation algorithm. 6.一种安全性强的RC4流密码生成方法,其特征在于:所述RC4流密码生成方法基于权利要求1-5所述的RC4流密码生成装置,方法包括:6. A strong RC4 stream cipher generation method for security, characterized in that: the RC4 stream cipher generation method is based on the RC4 stream cipher generation device described in claim 1-5, and the method comprises: 步骤1,伪随机数生成装置通过执行RC4算法生成随机数序列;Step 1, the pseudo-random number generating device generates a random number sequence by executing the RC4 algorithm; 步骤2,真随机数生成装置生成同步的真随机数;Step 2, the true random number generating device generates synchronous true random numbers; 步骤3,将RC4算法所产生的伪随机数与真随机数相结合,包括使用RC4算法的指针jt,指向的字典CD中的元素与伪随机数Zt相模加,RC4流密码为:Step 3, combine the pseudo-random number generated by the RC4 algorithm with the true random number, including the pointer jt using the RC4 algorithm, the element in the dictionary CD pointed to is modulo-added with the pseudo-random number Zt, and the RC4 stream cipher is: Codet=mod(Zt+CDt[jt],2n)。Codet=mod(Zt+CDt[jt],2 n ). 7.根据权利要求6所述的安全性强的RC4流密码生成方法,其特征在于:所述生成同步的真随机数包括:7. the strong RC4 stream cipher generation method of security according to claim 6 is characterized in that: the true random number of described generation synchronization comprises: 步骤A:第三半导体激光器DSL在外腔反馈作用下产生初始混沌激光信号;Step A: the third semiconductor laser DSL generates an initial chaotic laser signal under the action of external cavity feedback; 步骤B:初始混沌激光信号作为驱动信号,分裂成相同的混沌信号SG1与混沌信号SG2,混沌信号SG1注入到第一半导体激光器SL1,混沌信号SG2注入到第二半导体激光器SL2;Step B: The initial chaotic laser signal is used as a driving signal, split into the same chaotic signal SG1 and chaotic signal SG2, the chaotic signal SG1 is injected into the first semiconductor laser SL1, and the chaotic signal SG2 is injected into the second semiconductor laser SL2; 步骤C:第一半导体激光器SL1和第二半导体激光器SL2所产生的同步的混沌激光信号通过光电转换模块中的光电探测器完成O/E转换得到电信号SE;Step C: the synchronous chaotic laser signals generated by the first semiconductor laser SL1 and the second semiconductor laser SL2 are converted through the photodetector in the photoelectric conversion module to obtain an electrical signal SE; 步骤D:电信号SE通过A/D模块,经过采样、量化、判决之后得到二进制序列C2D;Step D: The electrical signal SE passes through the A/D module to obtain a binary sequence C2D after sampling, quantization, and judgment; 步骤E:二进制序列C2D依次经过延时异或后的随机数序列为同步的真随机数。Step E: The random number sequence after the binary sequence C2D is sequentially subjected to delayed XOR is a synchronous true random number. 8.根据权利要求6所述的安全性强的RC4流密码生成方法,其特征在于:所述字典CD根据真随机数以及其产生速率做定期的更新。8. The RC4 stream cipher generating method with strong security according to claim 6, characterized in that: said dictionary CD is regularly updated according to true random numbers and their generation rate.
CN201810028890.5A 2018-01-12 2018-01-12 A kind of the RC4 stream ciphers generating means and method of high safety Pending CN108377182A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810028890.5A CN108377182A (en) 2018-01-12 2018-01-12 A kind of the RC4 stream ciphers generating means and method of high safety

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810028890.5A CN108377182A (en) 2018-01-12 2018-01-12 A kind of the RC4 stream ciphers generating means and method of high safety

Publications (1)

Publication Number Publication Date
CN108377182A true CN108377182A (en) 2018-08-07

Family

ID=63016542

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810028890.5A Pending CN108377182A (en) 2018-01-12 2018-01-12 A kind of the RC4 stream ciphers generating means and method of high safety

Country Status (1)

Country Link
CN (1) CN108377182A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108830207A (en) * 2018-06-06 2018-11-16 成都邑教云信息技术有限公司 A kind of Internet education warning system
CN113139200A (en) * 2021-05-11 2021-07-20 中国电子科技集团公司第三十研究所 Method, system, computer program and storage medium for quickly cracking password
CN113271202A (en) * 2020-02-14 2021-08-17 中移(苏州)软件技术有限公司 Data encryption method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2415508A1 (en) * 2002-01-04 2003-07-04 Avaya Technology Corp. Efficient packet encryption method
CN1937008A (en) * 2005-09-22 2007-03-28 富士通株式会社 Encryption method, cryptogram decoding method, encryptor, cryptogram decoder, transmission/reception system, and communication system
CN1959770A (en) * 2005-10-31 2007-05-09 富士通株式会社 Encryption method, decode method for cryptograph, encrypting machine, cryptograph decoder and communication system
CN106411499A (en) * 2016-06-06 2017-02-15 清华大学 RC4 hardware circuit mark protection method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2415508A1 (en) * 2002-01-04 2003-07-04 Avaya Technology Corp. Efficient packet encryption method
CN1937008A (en) * 2005-09-22 2007-03-28 富士通株式会社 Encryption method, cryptogram decoding method, encryptor, cryptogram decoder, transmission/reception system, and communication system
CN1959770A (en) * 2005-10-31 2007-05-09 富士通株式会社 Encryption method, decode method for cryptograph, encrypting machine, cryptograph decoder and communication system
CN106411499A (en) * 2016-06-06 2017-02-15 清华大学 RC4 hardware circuit mark protection method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CHENPENG XUE: "Key distribution based on synchronization in", 《OPTICAL SOCIETY OF AMERICA》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108830207A (en) * 2018-06-06 2018-11-16 成都邑教云信息技术有限公司 A kind of Internet education warning system
CN113271202A (en) * 2020-02-14 2021-08-17 中移(苏州)软件技术有限公司 Data encryption method and device
CN113271202B (en) * 2020-02-14 2022-05-31 中移(苏州)软件技术有限公司 Data encryption method and device
CN113139200A (en) * 2021-05-11 2021-07-20 中国电子科技集团公司第三十研究所 Method, system, computer program and storage medium for quickly cracking password
CN113139200B (en) * 2021-05-11 2023-01-31 中国电子科技集团公司第三十研究所 Method, system, computer program and storage medium for quickly cracking password

Similar Documents

Publication Publication Date Title
Wei et al. A generic construction of quantum-oblivious-key-transfer-based private query with ideal database security and zero failure
US7840003B2 (en) High-speed GCM-AES block cipher apparatus and method
CN109039601B (en) A post-processing-based chaotic security key distribution method and system
Liu et al. An image encryption scheme based on hyper chaotic system and DNA with fixed secret keys
CN105933108B (en) A kind of pair of SM4 algorithm realizes the method cracked
CN108377182A (en) A kind of the RC4 stream ciphers generating means and method of high safety
CN103019648A (en) True random number generator with digital post-processing circuit
Pérez-Resa et al. Chaotic encryption applied to optical Ethernet in industrial control systems
Pérez-Resa et al. Physical layer encryption for industrial ethernet in gigabit optical links
Pérez-Resa et al. Chaotic encryption for 10-Gb Ethernet optical links
CN103117850B (en) A kind of method for building up of the cryptographic system based on random sequence database
Dutta et al. Lightweight polymorphic encryption for the data associated with constrained internet of things devices
CN114416022B (en) A practical true random number generation device and method based on labeled paired coherent state light source
Jiang et al. Efficient and universal quantum key distribution based on chaos and middleware
CN108681441A (en) A kind of random number generator based on BR-PUF
Pérez-Resa et al. Using a chaotic cipher to encrypt Ethernet traffic
CN101262334A (en) Bluetooth data transmission encryption method
Wu et al. Impossible differential cryptanalysis on ESF algorithm with simplified MILP model
Pérez-Resa et al. Self-synchronized encryption for physical layer in 10gbps optical links
Brosas et al. Analysis of the randomness performance of the proposed stream cipher based cryptographic algorithm
Pérez-Resa et al. Chaos-based stream cipher for gigabit ethernet
CN110750234B (en) Ultrahigh-speed real-time physical random number generation method
CN114384969B (en) High-speed true random number generation system
Perez-Resa et al. Self-synchronized encryption for physical layer in gigabit ethernet optical links
CN119364348B (en) Self-adaptive micro-energy driven passive sensing node security encryption system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20180807

RJ01 Rejection of invention patent application after publication