Key confidentiality enhancement method and system based on two-dimensional cellular automaton, and medium
By using two-dimensional cellular automata to process keys in the confidentiality enhancement algorithm, the problem of low algorithm performance in the prior art is solved, and more efficient key compression and pseudo-random improvement are achieved.
Patent Information
- Application Number
- CN202510167390.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-15
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2045-02-15
AI Technical Summary
The performance of confidentiality enhancement algorithms in the prior art is low, resulting in huge pressure on hardware resources and computing power, affecting operation speed, and low pseudo-random characteristics of the final key.
Using a two-dimensional cellular automata-based key security enhancement method, the negotiation key is converted into sub-matrix by setting the inverse of rows, columns and key compression rate of the cellular automata, and these sub-matrixes are processed through the cellular automata to generate block keys, which are finally combined into a shorter final key.
It improves the confidentiality enhancement speed, improves the pseudo-random characteristics of the final key, and can generate a final key of any length, effectively improving the performance of the confidentiality enhancement algorithm.
Smart Images

Figure CN120017259A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of communication technology, relates to continuous variable quantum key distribution, and particularly to a confidentiality enhancement technology, specifically a key confidentiality enhancement method, system and medium based on two-dimensional cellular automata. Background Art
[0002] Confidentiality enhancement means that the communicating parties Alice and Bob compress the negotiated key obtained through the quantum key distribution technology (QKD) process into a relatively short final key. Compared with traditional channels, it can eliminate the risk of information leakage and achieve unconditional security. After the confidentiality enhancement process, the eavesdropper Eve can hardly obtain any information about the key, and the communicating parties Alice and Bob can communicate securely through the key.
[0003] The most basic method of confidentiality enhancement is to use a universal hash function to compress the negotiated key to obtain a shorter negotiated key to reduce the information leaked to the eavesdropper Eve, and finally obtain a secure final key. As a type of hash function, the Toeplitz matrix, whose elements are composed of 0 and 1, is a common method of confidentiality enhancement. The longer the negotiated key, the smaller the impact of the finite length effect, but at the same time the number of columns of the Toeplitz matrix will increase, resulting in the storage of the Toeplitz matrix elements occupying a large amount of hardware resources, thus affecting the efficiency of confidentiality enhancement. However, in the process of quantum key distribution technology (QKD), the speed of confidentiality enhancement must be higher than the speed of key transmission and key negotiation, otherwise the real-time performance of the continuous variable quantum key distribution system cannot be guaranteed.
[0004] The general security enhancement method is to divide the matrix into sub-matrices and then multiply them with the input key, which has low pseudo-random characteristics; the matrix is multiplied by the input key and then modulo-2 addition is performed, which has slow operation speed. For the security enhancement method proposed in the above prior art, a matrix division algorithm is adopted. By dividing the matrix and then multiplying it with the input key, the matrix multiplication vector operation will cause huge pressure on hardware resources and computing power, and the hardware requirements are quite harsh, which affects the running speed of the security enhancement algorithm; the algorithm is simple, and only matrix multiplication vector and modulo-2 addition operations are performed, and the final key has low pseudo-random characteristics. Summary of the invention
[0005] In view of the above-mentioned shortcomings of the prior art, an object of the present invention is to provide a key confidentiality enhancement method, system and medium based on two-dimensional cellular automaton, so as to solve the problem of low performance of the confidentiality enhancement algorithm in the prior art.
[0006] To achieve the above-mentioned object and other related objects, the present invention provides a key confidentiality enhancement method based on two-dimensional cellular automaton, the method comprising the following steps:
[0007] The number of rows K, the number of columns C, and the inverse C of the final key compression rate of the cellular automaton are set according to the requirements of quantum key distribution, and after the setting is completed, an n-bit negotiated key is received, and the negotiated key is converted into a K×M-bit negotiated key matrix T according to the parameters of the cellular automaton, where K, M, and C are all positive integers;
[0008] Initializing and automatically updating the cellular automaton, converting the negotiated key matrix into m sub-matrices, where m=M / C;
[0009] Processing each of the submatrices in turn by the cellular automaton to obtain a block key corresponding to each of the submatrices;
[0010] The block keys are combined together to form a final target key.
[0011] In one embodiment of the present invention, the step of processing each of the sub-matrices in sequence by the cellular automaton to obtain a block key corresponding to each of the sub-matrices includes:
[0012] Divide the first submatrix T1 into K first row vectors of length C, and perform cyclic shift on each of the first row vectors;
[0013] Divide the first submatrix T1 after cyclic shift into C first column vectors of length K, and perform bitwise operation on each of the first column vectors and the cellular automaton to obtain C first operation vectors;
[0014] Performing an XOR operation on C of the first operation vectors to obtain a first intermediate value, and transposing the C of the first operation vectors to obtain a first block key;
[0015] Setting C of the first operation vectors as initial values of the cellular automaton for processing the next submatrix;
[0016] The above processing is performed on the next sub-matrix in sequence until the block key corresponding to each sub-matrix is obtained.
[0017] In one embodiment of the present invention, the cyclic shifting of each of the first row vectors includes:
[0018] Determine the number of 0s and 1s in each row of the cellular automaton;
[0019] If the number A of 0s in the first row of the cellular automaton is greater than the number B of 1s, cyclically shift the first vector of the first row to the left by B digits;
[0020] If the number A of 0s in the first row of the cellular automaton is less than or equal to the number B of 1s, circularly shift the first vector of the first row right by A positions;
[0021] The remaining first row vectors are shifted in sequence according to the above process.
[0022] In one embodiment of the present invention, performing a bitwise operation on each of the first column vectors and the cellular automaton to obtain C first operation vectors includes:
[0023] Determine the number of 0s and 1s in each column of the cellular automaton;
[0024] If the number of 0s in the first column of the cellular automaton is greater than the number of 1s, a bitwise OR operation is performed on the first vector of the first column and the first column of the cellular automaton;
[0025] If the number of 0s in the first column of the cellular automaton is less than the number of 1s, a bitwise AND operation is performed between the first column vector and the first column of the cellular automaton;
[0026] If the number of 0s in the first column of the cellular automaton is equal to the number of 1s, then invert each bit of the first column vector;
[0027] According to the above process, bit operations are performed on the remaining first column vectors in sequence to obtain C first operation vectors.
[0028] In one embodiment of the present invention, the initializing and automatically updating the cellular automaton includes:
[0029] Generate a random number by a random number generator to serve as an initial value of the cellular automaton;
[0030] According to the preset rules, the cellular automaton is automatically updated for a preset number of times until the updated result meets the requirements and then stops updating.
[0031] In one embodiment of the present invention, in the process of converting the negotiated key into a K×M-bit negotiated key matrix T, when the negotiated key matrix T has a length that does not meet the K-bit requirement, a zero sequence of the minimum length that meets the length requirement is added at the position that does not meet the length requirement.
[0032] The present invention also provides a key confidentiality enhancement system based on two-dimensional cellular automata, the system comprising:
[0033] A configuration conversion module is configured to set the number of rows K, the number of columns C, and the inverse of the key compression rate C of the cellular automaton according to requirements, and after the setting is completed, receive an n-bit negotiated key, and convert the negotiated key into a K×M-bit negotiated key matrix T according to the parameters of the cellular automaton, where K, M, and C are all positive integers;
[0034] An updating module, used for initializing and automatically updating the cellular automaton, and converting the negotiated key matrix into m sub-matrices, where m=M / C;
[0035] A processing module, used for processing each of the sub-matrices in turn through the cellular automaton to obtain a block key corresponding to each of the sub-matrices;
[0036] The combining module is used to combine the block keys together to form a final target key.
[0037] The present invention also discloses a storage medium on which a computer program is stored. When the computer program is executed by a processor, the key confidentiality enhancement method based on two-dimensional cellular automaton is realized.
[0038] As described above, the key confidentiality enhancement method, system and medium based on two-dimensional cellular automaton described in the present invention have the following beneficial effects:
[0039] The present invention uses a two-dimensional cellular automaton to replace the traditional matrix partitioning method, which can improve the speed of confidentiality enhancement and enhance the pseudo-random characteristics of the final key. By adding an iterative structure to the confidentiality enhancement algorithm, a final key of any length can be generated. By using a two-dimensional cellular automaton update rule with good chaotic properties, a pseudo-random sequence with good randomness can be generated. Then, the keys are rearranged and bit operations are performed according to the cellular automaton, and finally the function of compressing a longer key into a final key is realized, which effectively improves the performance of the confidentiality enhancement algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a flow chart of a key confidentiality enhancement method based on two-dimensional cellular automation in one embodiment of the present invention.
[0041] Figure 2 It is a schematic diagram showing the execution process of the key confidentiality enhancement method based on two-dimensional cellular automation of the present invention.
[0042] Figure 3 Shown is a structural block diagram of the key confidentiality enhancement system based on two-dimensional cellular automation of the present invention. DETAILED DESCRIPTION
[0043] The following describes the embodiments of the present invention through specific embodiments, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0044] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention. The illustrations only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0045] See also Figures 1 to 3 . The key confidentiality enhancement method, system and medium based on two-dimensional cellular automaton of the present invention use two-dimensional cellular automaton to replace the traditional matrix partitioning method, which can improve the confidentiality enhancement speed and enhance the pseudo-random characteristics of the final key. By adding an iterative structure to the confidentiality enhancement algorithm, a final key of any length can be generated. By using the update rules of the two-dimensional cellular automaton with good chaotic properties, a pseudo-random sequence with good randomness can be generated. Then, the keys are rearranged and bit operations are performed according to the cellular automaton, and finally the function of compressing a longer key into a final key is realized, which effectively improves the performance of the confidentiality enhancement algorithm.
[0046] like Figure 1 As shown, in one embodiment, the present invention provides a key confidentiality enhancement method based on a two-dimensional cellular automaton, the method comprising the following steps:
[0047] S100. The number of rows K, the number of columns C, and the inverse C of the final key compression rate of the cellular automaton are set according to the requirements of quantum key distribution, and after the setting is completed, an n-bit negotiated key is received, and the negotiated key is converted into a K×M-bit negotiated key matrix T according to the parameters of the cellular automaton, where K, M, and C are all positive integers.
[0048] By setting the number of rows K, the number of columns C and the inverse C of the key compression rate of the cellular automaton, it is convenient to convert the negotiated key into a negotiated key matrix T of K rows and M columns after receiving the n-bit negotiated key, so that the negotiated key matrix T can be subsequently converted by the cellular automaton to obtain multiple sub-matrices of K rows and C columns.
[0049] It should be noted that, in the process of converting the negotiated key into a K×M-bit negotiated key matrix T, when the negotiated key matrix T has a length that does not meet the K-bit requirement, a zero sequence of the minimum length that meets the length requirement is added at the position that does not meet the length requirement.
[0050] For example, when the last block of the negotiated key matrix T does not meet the length requirement of K bits, a zero sequence of minimum length is added to the position of the last block of the matrix to meet the length requirement. For example, if 3 bits are missing, a 3-bit zero sequence is added to meet the length requirement.
[0051] S200, converting the negotiated key matrix into m sub-matrices, initializing and automatically updating the cellular automaton, and inputting the m sub-matrices into blocks into the updated cellular automaton, wherein m=M / C.
[0052] Specifically, refer to Figure 2 According to the inverse of the key compression rate C, the negotiated key matrix is converted into m K-row and C-column K×C sub-matrices T1, T2, ..., T m .
[0053] In one embodiment, the initializing and automatically updating the cellular automaton includes:
[0054] Generate a random number by a random number generator to serve as an initial value of the cellular automaton;
[0055] According to the preset rules, the cellular automaton is automatically updated for a preset number of times until the updated result meets the requirements and then stops updating.
[0056] In this embodiment, for the initialization of the cellular automaton, in order to ensure randomness, a random number generator is used to generate a random number as the initial value of the cellular automaton, and the cellular automaton is automatically updated according to a pre-set rule until the update result meets the requirements and then the update is stopped. Exemplarily, the update is stopped after the cellular automaton is updated 100 times.
[0057] For example, in order to make the pseudo-random sequence generated by the cellular automaton have good randomness, it is necessary to adopt a suitable rule. After testing, this scheme finally selected a rule as follows:
[0058]
[0059] Among them, 13=<0,1,1,0,1>; 14=<0,1,1,1,0>;
[0060] <self,top,left,bottom,right> ;
[0061] In an \(i\times j\) regular matrix, the \((m, n)\)-th element represents the rule used by the \((m, n)\)-th cell. That is, the dependence of the \((m, n)\)-th cell on its neighbors (assuming linear) is defined by the rule matrix. As the rules in the above table, the next state at the element position of '13' is The next state at the element position of '14' is
[0062] For example, for a two-dimensional cellular automaton of \(i\times j\), its rule matrix is also \(i\times j\); assume the current element is \(a\) m,n , that is, the element in the \(m\)-th row and \(n\)-th column of the matrix (\(1 < m < i, 1 < n < j\)), where 'top' represents \(a\) m-1,n , 'bottom' represents \(a\) m+1,n , 'left' represents \(a\) m,n-1 , 'right' represents \(a\) m,n+1 ,'self' represents \(a\) m,n ; when \(m = 1\), that is \(a\) 1,n , its top is \(a\) i,n ; when \(m = i\), that is \(a\) i,n , its bottom is \(a\) 1,n ; when \(n = 1\), that is \(a\) m,1 , its left element is \(a\) m,j ; when \(n = j\), that is \(a\) m,j , its right is \(a\) m,1 .
[0063] To further illustrate the above process, for example, an element in the rule matrix is '13', the corresponding element of the cellular automaton is '1', and its top, left, and right are '101' respectively, then the next state of the current position of the cellular automaton is Under this rule, the sequence spatio-temporal diagram generated by the cellular automaton has obvious chaotic characteristics and the computational complexity is not high.
[0064] S300, process each of the sub-matrices in turn through the cellular automaton to obtain the block key corresponding to each sub-matrix.
[0065] In one embodiment, the process of processing each of the sub-matrices in turn through the cellular automaton to obtain the block key corresponding to each sub-matrix includes:
[0066] Divide the first sub-matrix \(T1\) into \(K\) first row vectors of length \(C\), and perform circular shift on each of the first row vectors;
[0067] Divide the first submatrix T1 after cyclic shift into C first column vectors of length K, and perform bitwise operation on each of the first column vectors and the cellular automaton to obtain C first operation vectors;
[0068] Performing an XOR operation on C of the first operation vectors to obtain a first intermediate value, and transposing the C of the first operation vectors to obtain a first block key;
[0069] Setting C of the first operation vectors as initial values of the cellular automaton for processing the next submatrix;
[0070] The above processing is performed on the next sub-matrix in sequence until the block key corresponding to each sub-matrix is obtained.
[0071] In this embodiment, for the m sub-matrices input into the cellular automaton, each sub-matrix is divided to obtain K row vectors of length C, and the row vectors of each sub-matrix are cyclically shifted and recombined to obtain a new sub-matrix, and then the sub-matrix obtained after the cyclic shift process is divided again to obtain C first column vectors of length K, and the C first column vectors and the cellular automaton are bitwise operated to obtain C first operation vectors. After that, the C first operation vectors can be XORed to obtain the first intermediate value, and the C first operation vectors are transposed to obtain the first block key. The first operation vector obtained from the first sub-matrix is then used as the initial value of the cellular automaton when the next sub-matrix is operated. In order to facilitate the subsequent automatic update of the cellular automaton, and process the second sub-matrix in turn, the second operation vector obtained from the second sub-matrix is used as the initial value of the cellular automaton when the third sub-matrix is operated, and so on, until the processing of each sub-matrix is completed to obtain the mth block key, and finally obtain m block keys of m sub-matrices.
[0072] In one embodiment, the cyclic shifting of each of the first row vectors includes:
[0073] Determine the number of 0s and 1s in each row of the cellular automaton;
[0074] If the number A of 0s in the first row of the cellular automaton is greater than the number B of 1s, cyclically shift the first vector of the first row to the left by B digits;
[0075] If the number A of 0s in the first row of the cellular automaton is less than or equal to the number B of 1s, circularly shift the first vector of the first row right by A positions;
[0076] The remaining first row vectors are shifted in sequence according to the above process.
[0077] Exemplarily, if the number A of '0's in the first row of the cellular automaton is greater than the number B of '1's, then the first row vector is circularly shifted to the left by the number of '1's in the first row of the cellular automaton, that is, the number B. If the number B of '1's in the first row of the cellular automaton is greater than or equal to the number A of '0's, then the first row vector is circularly shifted to the right by the number of '0's A in the first row of the cellular automaton. If the first row vector in this embodiment is 1,1,0,1, and the first row of the cellular automaton is 0,0,0,1, then the first row vector is circularly shifted to 1,0,1,1. If the first row of the cellular automaton is 1,1,0,1, then the first row vector is circularly shifted to 1,1,1,0.
[0078] In one embodiment, performing a bitwise operation on each of the first column vectors and the cellular automaton to obtain C first operation vectors includes:
[0079] Determine the number of 0s and 1s in each column of the cellular automaton;
[0080] If the number of 0s in the first column of the cellular automaton is greater than the number of 1s, a bitwise OR operation is performed on the first vector of the first column and the first column of the cellular automaton;
[0081] If the number of 0s in the first column of the cellular automaton is less than the number of 1s, a bitwise AND operation is performed between the first column vector and the first column of the cellular automaton;
[0082] If the number of 0s in the first column of the cellular automaton is equal to the number of 1s, then invert each bit of the first column vector;
[0083] According to the above process, bit operations are performed on the remaining first column vectors in sequence to obtain C first operation vectors.
[0084] Exemplarily, if the number of '0's in the first column of the cellular automaton is greater than the number of '1's, the first column vector of the corresponding first submatrix is bitwise ORed with the current column of the cellular automaton; if the number of '1's in the first column of the cellular automaton is greater than the number of '0's, the first column vector of the first submatrix is bitwise ANDed with the current column of the cellular automaton; if the number of '1's in the first column of the cellular automaton is equal to the number of '0's, each bit of the first column vector of the first submatrix is inverted.
[0085] Specifically, if the first column vector of the first submatrix T1 is 1,0,1, and the first column of the cellular automaton is 0,0,1, then the register If the first column vector of the first submatrix T1 is 1,0,1, and the first column of the cellular automaton is 0,1,1, then the register If the first column vector of the first submatrix T1 is 1,0,1,1, and the first column of the cellular automaton is 0,0,1,1, then the register
[0086] S400: Combine the block keys together to form a final target key.
[0087] After all the block keys of all sub-matrices are calculated, the final key of N blocks with a length of K is obtained, which is merged into a final security key H. Since the final key of the algorithm is obtained in blocks, this feature can be used to output the final result of the confidentiality enhancement process in real time, thereby improving the data throughput achieved on the hardware.
[0088] It should be noted that the protection scope of the key confidentiality enhancement method based on two-dimensional cellular automata described in the present invention is not limited to the execution order of the steps listed in this embodiment. All solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present invention are included in the protection scope of the present invention.
[0089] like Figure 3 As shown, in one embodiment, the present invention further provides a key confidentiality enhancement system based on a two-dimensional cellular automation, the system comprising:
[0090] A configuration conversion module 301 is used to set the number of rows K, the number of columns C and the inverse C of the final key compression rate of the cellular automaton according to the quantum key distribution requirements, and receive an n-bit negotiated key after the setting is completed, and convert the negotiated key into a K×M-bit negotiated key matrix T according to the parameters of the cellular automaton, where K, M and C are all positive integers;
[0091] An updating module 302 initializes and automatically updates the cellular automaton to convert the negotiated key matrix into m sub-matrices, where m=M / C;
[0092] A processing module 303 is used to process each of the sub-matrices in turn through the cellular automaton to obtain a block key corresponding to each of the sub-matrices;
[0093] The combining module 304 is used to combine the block keys together to form a final target key.
[0094] It should be noted that the structure and principle of the key confidentiality enhancement system based on two-dimensional cellular automata correspond one to one with the steps in the above-mentioned key confidentiality enhancement method based on two-dimensional cellular automata, so they will not be repeated here.
[0095] It should be noted that it should be understood that the division of the various modules of the above system is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example, the x module can be a separately established processing element, or it can be integrated in a certain chip of the above system for implementation. In addition, it can also be stored in the memory of the above system in the form of program code, and called and executed by a certain processing element of the above system. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
[0096] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), or one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0097] It should be noted that the key confidentiality enhancement system based on two-dimensional cellular automaton of the present invention can implement the key confidentiality enhancement method based on two-dimensional cellular automaton of the present invention, but the implementation device of the key confidentiality enhancement method based on two-dimensional cellular automaton of the present invention includes but is not limited to the structure of the key confidentiality enhancement system based on two-dimensional cellular automaton listed in this embodiment, and all structural deformations and replacements of the prior art made according to the principles of the present invention are included in the protection scope of the present invention.
[0098] The storage medium of the present invention stores a computer program, and when the computer program is executed by a processor, the above-mentioned key confidentiality enhancement method based on two-dimensional cellular automation is implemented.
[0099] The storage medium includes: Read-Only Memory (ROM), Random Access Memory (RAM), a disk, a USB flash drive, a memory card or an optical disk, and other media that can store program codes.
[0100] Any combination of one or more storage media may be used. The storage medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a RAM, a ROM, an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device, or device.
[0101] Computer-readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0102] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0103] Computer program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, Smalltalk, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0104] The present invention will be described below with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each box of the flowchart and / or block diagram and the combination of boxes in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device, thereby producing a machine so that these computer program instructions, when executed by the processor of the computer or other programmable data processing device, produce a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0105] These computer program instructions may also be stored in a computer-readable medium, which enables a computer, other programmable data processing apparatus, or other device to operate in a specific manner, so that the instructions stored in the computer-readable medium produce an article of manufacture including instructions for implementing the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0106] Computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide a process for implementing the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0107] In summary, the key confidentiality enhancement method, system and medium based on two-dimensional cellular automaton of the present invention use two-dimensional cellular automaton to replace the traditional matrix partitioning method, which can improve the confidentiality enhancement speed and improve the pseudo-random characteristics of the final key. By adding an iterative structure to the confidentiality enhancement algorithm, a final key of any length can be generated, and a pseudo-random sequence with good randomness can be generated by using the update rule of the two-dimensional cellular automaton with good chaotic properties. Then, the key is rearranged and bit operations are performed according to the cellular automaton, and finally the function of compressing a longer key into a final key is realized, which effectively improves the performance of the confidentiality enhancement algorithm; therefore, the present invention effectively overcomes various shortcomings in the prior art and has a high industrial utilization value.
[0108] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.
Claims
1. A key confidentiality enhancement method based on two-dimensional cellular automata, characterized in that: The method comprises the following steps: The number of rows K, the number of columns C, and the inverse C of the final key compression rate of the cellular automaton are set according to the requirements of quantum key distribution, and after the setting is completed, an n-bit negotiated key is received, and the negotiated key is converted into a K×M-bit negotiated key matrix T according to the parameters of the cellular automaton, where K, M, and C are all positive integers; Initializing and automatically updating the cellular automaton, converting the negotiated key matrix into m sub-matrices, where m=M / C; Processing each of the submatrices in turn by the cellular automaton to obtain a block key corresponding to each of the submatrices; The block keys are combined together to form a final target key.
2. The key confidentiality enhancement method based on two-dimensional cellular automation according to claim 1 is characterized in that: The step of processing each of the sub-matrices in sequence by the cellular automaton to obtain a block key corresponding to each of the sub-matrices includes: Divide the first submatrix T1 into K first row vectors of length C, and perform cyclic shift on each of the first row vectors; Divide the first submatrix T1 after cyclic shift into C first column vectors of length K, and perform bitwise operation on each of the first column vectors and the cellular automaton to obtain C first operation vectors; Performing an XOR operation on C of the first operation vectors to obtain a first intermediate value, and transposing the C of the first operation vectors to obtain a first block key; Setting C of the first operation vectors as initial values of the cellular automaton for processing the next submatrix; The above processing is performed on the next sub-matrix in sequence until the block key corresponding to each sub-matrix is obtained.
3. The key confidentiality enhancement method based on two-dimensional cellular automaton according to claim 2 is characterized in that: The cyclically shifting each of the first row vectors comprises: Determine the number of 0s and 1s in each row of the cellular automaton; If the number A of 0s in the first row of the cellular automaton is greater than the number B of 1s, cyclically shift the first vector of the first row to the left by B digits; If the number A of 0s in the first row of the cellular automaton is less than or equal to the number B of 1s, circularly shift the first vector of the first row right by A positions; The remaining first row vectors are shifted in sequence according to the above process.
4. The key confidentiality enhancement method based on two-dimensional cellular automation according to claim 2 is characterized in that: The step of performing a bitwise operation on each of the first column vectors and the cellular automaton to obtain C first operation vectors includes: Determine the number of 0s and 1s in each column of the cellular automaton; If the number of 0s in the first column of the cellular automaton is greater than the number of 1s, a bitwise OR operation is performed on the first vector of the first column and the first column of the cellular automaton; If the number of 0s in the first column of the cellular automaton is less than the number of 1s, a bitwise AND operation is performed between the first column vector and the first column of the cellular automaton; If the number of 0s in the first column of the cellular automaton is equal to the number of 1s, then invert each bit of the first column vector; According to the above process, bit operations are performed on the remaining first column vectors in sequence to obtain C first operation vectors.
5. The key confidentiality enhancement method based on two-dimensional cellular automation according to claim 1 is characterized in that: The step of initializing and automatically updating the cellular automation includes: Generate a random number by a random number generator to serve as an initial value of the cellular automaton; According to the preset rules, the cellular automaton is automatically updated for a preset number of times until the updated result meets the requirements and then stops updating.
6. The key confidentiality enhancement method based on two-dimensional cellular automation according to claim 1 is characterized in that: In the process of converting the negotiated key into a K×M-bit negotiated key matrix T, when the negotiated key matrix T has a length that does not meet the K-bit requirement, a zero sequence of a minimum length that meets the length requirement is added to the position that does not meet the length requirement.
7. A key confidentiality enhancement system based on two-dimensional cellular automata, characterized in that: The system comprises: A configuration conversion module is configured to set the number of rows K, the number of columns CM, and the inverse C of the final key compression rate of the cellular automaton according to the requirements of quantum key distribution, and receive an n-bit negotiated key after the setting is completed, and convert the negotiated key into a K×M-bit negotiated key matrix T according to the parameters of the cellular automaton, where K, M, and C are all positive integers; An updating module, used for initializing and automatically updating the cellular automaton, and converting the negotiated key matrix into m sub-matrices, where m=M / C; A processing module, used for processing each of the sub-matrices in turn through the cellular automaton to obtain a block key corresponding to each of the sub-matrices; The combining module is used to combine the block keys together to form a final target key.
8. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the key confidentiality enhancement method based on two-dimensional cellular automation described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Confidentiality enhancement method and system for quantum key distribution
CN113300843A