Disclosure of Invention
In order to solve the technical problem, a quantum key distribution method, a storage device and an intelligent terminal which are higher in security and are fused with image encryption are provided.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
a quantum key distribution system fusing image encryption comprises a QKD device, a key pool, an initial module, a chaotic sequence generation module, a mapping module, an image chaotic scrambling encryption module and an image diffusion encryption module which are sequentially connected through electric signals, wherein:
the QKD device is used for generating a quantum key bit sequence and sending the quantum key bit sequence to a key pool;
the key pool is used for storing the quantum key bit sequence;
the initial module obtains 2 quantum key bit sequences k and k' with 256 bits from the key pools of both data transmission parties, and respectively uses formulas
And
generating initial value x of Logistic mapping
0,y
0;
The chaotic sequence generation module passes
At randomly acquired mu and lambda
1、λ
2And generating a chaotic sequence { x under the value of gamma
iAnd { y }
j};
The mapping module utilizes the generated chaos sequence by a formula
Shifting the chaos value from x
i∈(0,1),y
jE (0,1) floating point number, mapping to x
i∈[1,M],y
j∈[1,N];
The image chaos scrambling encryption module utilizes the obtained chaos sequence { xiAnd { y }jChaotically scrambling and encrypting the image;
the image diffusion encryption module utilizes xi,yjThe coordinate relationship of (a) performs diffusion encryption on the image.
A quantum key distribution method for fusing image encryption comprises the following steps:
the method comprises the following steps: the data transmission parties perform quantum key distribution through a quantum key distribution protocol, a quantum key bit sequence is synchronously generated, and the generated quantum key bit sequence is stored in key pools of the data transmission parties;
step two: 2 quantum key bit sequences k and k' with 256 bits are obtained from key pools of both data transmission parties, and formulas are respectively utilized
And
generating initial value x of Logistic mapping
0,y
0;
Step three: by passing
At randomly acquired mu and lambda
1、λ
2And generating a chaotic sequence { x under the value of gamma
iAnd { y }
j};
Step four: using the chaos sequence generated in the third step by a formula
Shifting the chaos value from x
i∈(0,1),y
jE (0,1) floating point number, mapping to x
i∈[1,M],y
j∈[1,N];
Step five: using the obtained chaotic sequence xi,yjCarrying out chaotic scrambling encryption on the image;
step six: using xi,yjCarrying out diffusion encryption on the image by the coordinate relation;
step seven: continuously generating quantum key, and encrypting the random parameters mu and lambda generated in the step three after each encryption1、λ2And gamma importing the quantum key to update the quantum key, sending the data image and the updated quantum key to a data receiver, and repeating the steps from the first step to the seventh step.
Preferably, the quantum key distribution protocol employs a BB84 protocol.
Preferably, the two data transmission parties in the second step acquire quantum key bit sequences through the quantum links as x of the two-dimensional Logistic mapping0And y0Is started.
Preferably, the quantum key bit sequence is k ═ k1k2k3…k256In the sequence, each kiThe value representing a 0 or 1Is selected to be the binary bit of (1).
Preferably, in the scrambling encryption of the third step, each pixel point (x) is encryptedi,yj) Mapping to pixel points (x' by chaotic sequencei,y`j) And then scrambling and encrypting the image.
Preferably, in said scrambling encryption, use is made of
And
where M, N represent the length and width of the picture, respectively, will { x
iAnd { y }
jMapping the sequence to the interval [1, M ] of the corresponding length and width of the picture in turn]And the interval [1, N]。
A storage device having a plurality of instructions stored therein, wherein the instructions are adapted to be loaded by a processor and to perform the steps of the above-described quantum key distribution method for fused image encryption.
An intelligent terminal, comprising a processor for executing each instruction and a storage device for storing a plurality of instructions, characterized in that the instructions are adapted to be loaded by the processor and to execute the steps of the quantum key distribution method for fusing image encryption.
The invention has the beneficial technical effects that:
the method effectively encrypts the quantum key distribution and the two-dimensional logistic chaotic mapping fusion image, and the data communication parties distribute the quantum key through the BB 84-based protocol, so that the security of the quantum key distribution is fully utilized, and meanwhile, the quantum key and the two-dimensional logistic chaotic sequence are combined to generate the encrypted image according to the characteristics of digital image encryption.
The method has the characteristics of high safety, low ciphertext correlation, strong key sensitivity and the like. Because quantum key distribution continuously updates the quantum key, the method can realize one-time pad based on image encryption, and the image encryption algorithm is fused, so that the method has high safety.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail with reference to the following embodiments, but the scope of the present invention is not limited to the following embodiments.
Multimedia network images have the characteristics of large data volume, high data redundancy, strong data correlation and the like, so that encryption is generally performed by adopting a special image encryption algorithm. A highly safe key distribution method is lacked during classic image encryption, and the security of multimedia image transmission in a network can be improved by fusing quantum key distribution and an image encryption algorithm.
The two-dimensional logistic chaotic mapping has the characteristics of non-periodicity and non-convergence, and high sensitivity to the initial value of the key, and the characteristics are very suitable for being combined with a quantum key distribution mechanism. Therefore, the section provides a quantum key and two-dimensional logistic mapping image encryption algorithm QTLE, the quantum key distribution and the classical two-dimensional logistic mapping image encryption algorithm are fused, the advantages of the quantum key distribution and the classical two-dimensional logistic mapping image encryption algorithm are fully combined, and the one-time pad based on quantum encryption image transmission is realized.
As shown in fig. 1, a quantum key distribution system fusing image encryption comprises a QKD device, a key pool, an initial module, a chaotic sequence generation module, a mapping module, an image chaotic scrambling encryption module and an image diffusion encryption module, which are sequentially connected by an electrical signal, wherein:
the QKD device is used for generating a quantum key bit sequence and sending the quantum key bit sequence to a key pool;
the key pool is used for storing the quantum key bit sequence;
the initial moldObtaining 2 quantum key bit sequences k and k' with 256 bits from key pools of both data transmission parties by a block, and respectively utilizing formulas
And
generating initial value x of Logistic mapping
0,y
0;
The chaotic sequence generation module passes
At randomly acquired mu and lambda
1、λ
2And generating a chaotic sequence { x under the value of gamma
iAnd { y }
j};
The mapping module utilizes the generated chaos sequence by a formula
Shifting the chaos value from x
i∈(0,1),y
jE (0,1) floating point number, mapping to x
i∈[1,M],y
j∈[1,N];
The image chaos scrambling encryption module utilizes the obtained chaos sequence { xiAnd { y }jChaotically scrambling and encrypting the image;
the image diffusion encryption module utilizes xi,yjThe coordinate relationship of (a) performs diffusion encryption on the image.
The specific implementation manner of each module function in the system is consistent with the method steps of the corresponding part in the following quantum key distribution method integrating image encryption, and the description is not repeated here.
As shown in fig. 2, a quantum key distribution method for fusing image encryption specifically includes the following steps:
the method comprises the following steps: the data transmission parties carry out quantum key distribution through a quantum key distribution protocol, quantum key bit sequences are synchronously generated, the generated quantum key bit sequences are stored in key pools of the data transmission parties, and the quantum key bit sequences stored in the key pools can be acquired through quantum links in the data transmission process;
step two: 2 quantum key bit sequences k and k' with 256 bits are obtained from key pools of both data transmission parties, and formulas are respectively utilized
And
generating initial value x of Logistic mapping
0,y
0;
The second specific implementation method comprises the following steps:
the method does not limit the image in any form, and can adopt related conversion tools to complete conversion, such as tool software of Mathemica, Matlab and the like. Through quantum key distribution protocol, when network image transmission is carried out, the receiving and transmitting parties acquire quantum key bit sequences through quantum links as x of two-dimensional Logistic mapping
0And y
0Thereby tightly combining the highly secure nature of quantum encryption with the advantages of Logistic mapping to encrypt images. Quantum key bit sequence string k ═ k
1k
2k
3...k
256Obtaining another key string k ═ k ″, in the same way, from the key pool
1k`
2k`
3…k`
256For the initial value y
0Initialization is performed, each k in the sequence
iThe value represents a binary bit of 0 or 1. Respectively using formulas
And
generating initial value x of Logistic mapping
0,y
0。
Step three: by passing
At randomly acquired mu and lambda
1、λ
2And generating a chaotic sequence { x under the value of gamma
iAnd { y }
j};
Step three is a concrete implementation method:
scrambling and diffusing the image by utilizing two-dimensional Logistic mapping, and carrying out scrambling and diffusion according to 4 random parameters mu and lambda1、λ2And gamma are different values, thereby generating different chaotic sequences. In order to ensure randomness and non-replicability of image scrambling and diffusion, the method self-defines 4 random parameters. For the parameter λ in the above formula1As random parameter and xn(1-xn) Operation of xn(1-xn) Irregular, λ1Generated by a random number generator; lambda [ alpha ]2In the same way as in λ1. The parameter μ is generated by a clocked random number generator and is not derivable because of the continuous variability of time. For xn(1-xn) Introducing and mu operation, and expanding the irregularity of the item by double random parameters, yn(1-yn) The same reason is thatn(1-xn). The parameter y is also generated by a clocked random number generator, which will be yn、xnAnd (4) disordering. Meanwhile, 4 parameters are imported into the quantum key for decryption.
Step four: the chaotic sequence { x
iAnd { y }
jUsing a formula
Shifting the chaos value from x
i∈(0,1),y
jE (0,1) floating point number, mapping to x
i∈[1,M],y
j∈[1,N];
Step five: using the obtained chaotic sequence xi,yjCarrying out chaotic scrambling encryption on the image;
the concrete implementation method of the step five comprises the following steps:
in scrambling encryption, each pixel point (x) is mapped according to the characteristic of two-dimensional logistic self-mappingi,yj) Mapping to pixel points (x' by chaotic sequencei,y`j) And then scrambling and encrypting the image.
By using
And
(M, N denote the length and width of the picture, respectively), will { x
iAnd { y }
jMapping the sequence to the interval [1, M ] of the corresponding length and width of the picture in turn]And the interval [1, N]So that the scrambled encrypted coordinates are distributed over the entire picture size range.
Step six: using x
i,y
jThe coordinate relation of (2) is that the value of each pixel point is subjected to exclusive OR processing, so that the image is subjected to diffusion encryption; using cryptographic formulae
The encryption is carried out in such a way that,
for x after mapping by chaotic sequence
i,y
jThe pixel values of the pixels. The decryption algorithm is the inverse of the encryption algorithm.
Step seven: continuously generating quantum key, and encrypting the random parameters mu and lambda generated in the step three after each encryption1、λ2And gamma importing the quantum key to update the quantum key, and sending the data image and the updated quantum key to a data receiver to realize the 'one-time pad' based on the quantum key image encryption.
Variations and modifications to the above-described embodiments may occur to those skilled in the art, which fall within the scope and spirit of the above description. Therefore, the present invention is not limited to the specific embodiments disclosed and described above, and some modifications and variations of the present invention should fall within the scope of the claims of the present invention. Furthermore, although specific terms are employed herein, they are used in a generic and descriptive sense only and not for purposes of limitation.