Summary of the invention
The technical problems to be solved by the invention: the present invention provides a kind of quantum encryption communication side for mobile deviceMethod is realized mobile device encryption information and is passed in a network by combining closely for quantum key and mobile device encryption informationDefeated absolute safety.
To achieve the goals above, the invention proposes a kind of quantum encryption communication methods for mobile device, specialSign is: includes the following steps, and following steps sequentially carry out,
It is communicated to connect Step 1: mobile device A and mobile device B is established;
Step 2: the mobile device A is to mobile device B quantum coded communication connection request;
Step 3: the mobile device B responds the quantum encryption communication connection request, and sent together to mobile device AMeaning establishes the information of quantum encryption communication connection;
Step 4: the mobile device A is to first quantum gateway the first quantum key of application, while server is from the second amountSubnet closes application and matched second quantum key of the first quantum key;The mobile device B is to third quantum gateway applicationThree quantum keys, while server is from the second quantum gateway application and matched 4th quantum key of third quantum key;
Step 5: the mobile device A is encrypted clear data to be transmitted by the first quantum key, obtain closeLiterary data, and ciphertext data are sent to server;
Step 6: the server receives the ciphertext data that mobile device A is sent, and solved by the second quantum keyIt is close to obtain clear data,
Decryption is obtained clear data by the 4th quantum key and is encrypted to obtain ciphertext data by server, and is sent toMobile device B;
Step 7: the mobile device B receives the ciphertext data that server is sent to it, and by third quantum key intoRow decryption obtains clear data, completes the quantum encryption communication connection between mobile device A and mobile device B.
Further, mobile device A to first quantum gateway application the first quantum key length is in the step 41024 bytes.
Further, mobile device B to third quantum gateway application third quantum key length is in the step 41024 bytes.
Further, mobile device A described in step 5 is carried out by the first quantum key and clear data to be transmittedBit-by-bit XOR operation obtains ciphertext data.
Further, server described in step 6 is close by the slave mobile device A ciphertext data received and the second quantumKey carries out bit-by-bit XOR operation, obtains clear data.
Further, the second quantum key is decrypted to obtain clear data and the 4th amount for server described in step 6Sub-key carries out bit-by-bit XOR operation, obtains ciphertext data.
Further, the mobile device A is by the first quantum key of 1024 bytes, the number for being 128 by every part of byte numberAmount is segmented, and the quantum key of 128 bytes is converted to two dimensional code.
Further, the mobile device B is by the third quantum key of 1024 bytes, the number for being 128 by every part of byte numberAmount is segmented, and the quantum key of 128 bytes is converted to two dimensional code.
Through the above design, the present invention can be brought the following benefits: the invention proposes one kind for movingThe quantum encryption communication method of equipment is realized movement and is set by combining closely for quantum key and mobile device encryption informationThe absolute safety that standby encryption information is transmitted in a network, this method realize quantum encryption communication, and mobile device starts local terminalQuantum key is converted to two dimensional code by client, the quantum key that client read volume subnet closes, client, and mobile device utilizesTwo-dimentional coded program is read, two dimensional code is converted into quantum key, then encrypts using quantum key and decrypts the communication information, i.e., in factThe quantum encryption communication between mobile device is showed.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer with reference to specific embodiments and referenceAttached drawing, the present invention is described in further detail.
A kind of quantum encryption communication method for mobile device, includes the following steps, and following steps sequentially carry out,
It is communicated to connect Step 1: mobile device A and mobile device B is established;
Step 2: the mobile device A is to mobile device B quantum coded communication connection request;
Step 3: the mobile device B responds the quantum encryption communication connection request, and sent together to mobile device AMeaning establishes the information of quantum encryption communication connection;
Step 4: the mobile device A is to first quantum gateway the first quantum key of application, while server is from the second amountSubnet closes application and matched second quantum key of the first quantum key;The mobile device B is to third quantum gateway applicationThree quantum keys, while server is from the second quantum gateway application and matched 4th quantum key of third quantum key;
Step 5: the mobile device A is encrypted clear data to be transmitted by the first quantum key, obtain closeLiterary data, and ciphertext data are sent to server;
Step 6: the server receives the ciphertext data that mobile device A is sent, and solved by the second quantum keyIt is close to obtain clear data,
Decryption is obtained clear data by the 4th quantum key and is encrypted to obtain ciphertext data by server, and is sent toMobile device B;
Step 7: the mobile device B receives the ciphertext data that server is sent to it, and by third quantum key intoRow decryption obtains clear data, completes the quantum encryption communication connection between mobile device A and mobile device B.
Shown in referring to Fig.1, a kind of quantum encryption communication method for mobile device includes: quantum key generates network,Server, client, mobile device.Wherein:
Quantum key generates network: dotted line coupling part is that quantum key generates network in Fig. 1, and quantum key generates networkIn each node include quantum gateway, information is interacted by light quantum interchanger between node.Quantum gateway utilizes optical fiberQuantum channel generates the quantum key that is perfectly safe in real time, and then quantum key is stored in quantum gateway.
Server: server includes client identity authentication procedure, mobile equipment identity authentication procedure, server read volumeSub-key program and routing program.Whether the identity information that client identity authentication procedure is used to verify client is correct, ifIdentity information is correct, then client-side program successfully starts up.Mobile equipment identity authentication procedure is used to verify the body of mobile deviceWhether part information is correct, if identity information is correct, mobile device program is successfully started up.Server reads quantum key journeySequence is used to obtain the quantum key to match with each client from quantum gateway.Server routing program is used for a movementThe encryption information of equipment is decrypted, and is then re-encrypted and is transmitted to another mobile device.
Client: quantum key program and conversion quantum key journey are read including hand shake procedure, client between clientSequence.Mobile device starts the client of local terminal, and client utilizes hand shake procedure, it is determined whether quantum key program is read in starting.If not starting, then client does not read quantum key;Otherwise, client is using quantum key program is read, from quantum gatewayQuantum key is read, restarts conversion quantum key program for quantum key and is converted to two dimensional code, so as to mobile device scanning.
Mobile device: mobile device includes the signal procedure and the two-dimentional coded program of reading between mobile device.The communication journeyUnencrypted communication between mobile device had both may be implemented in sequence, and quantum encryption communication also may be implemented.If being non-between mobile deviceCoded communication does not need the client of starting local terminal then.If quantum encryption communication, mobile device needs to start the client of local terminalQuantum key is converted to two dimensional code by end, the quantum key that client read volume subnet closes, client, and mobile device utilizes readingTwo dimensional code is converted to quantum key by two-dimentional coded program, is then encrypted and is decrypted the communication information using quantum key, that is, realizeQuantum encryption communication between mobile device.
A kind of work flow diagram of the quantum encryption communication method for mobile device, as shown in Fig. 2, the application methodDetailed process steps are as follows:
1) starting quantum key generates network, and quantum key is stored in each quantum gateway.
2) after both sides' mobile device and client identity authenticate successfully, if carrying out quantum encryption communication between mobile device,Client both sides are then needed to obtain quantum key from quantum gateway.
3) quantum key of acquisition is converted to two dimensional code by client.
4) mobile device scans client two dimensional code, and two dimensional code is converted to quantum key, and it is logical to carry out quantum key encryptionLetter.
Client application key flow chart in a kind of quantum encryption communication method for mobile device, as shown in figure 3, instituteThe specific protocol steps for stating application method are as follows:
1) the mobile device A described in Fig. 1, mobile device B start signal procedure.
2) mobile device A and mobile device B carries out non-encrypted information communication;If mobile device A and mobile device B is carried outQuantum encryption communication, then mobile device A starts local terminal customer end A, mobile device B starts local terminal customer end B.
3) customer end A is initiated to request from quantum gateway application quantum key to customer end B.
4) customer end B receives the application quantum key request of customer end A sending, whether will apply for that quantum key result is anti-It feeds customer end A.
5) customer end A receives the feedback result of customer end B, if quantum key is not applied for, then quantum encryption communicationDo not start;Otherwise customer end A is to the first quantum key of 1024 byte of the first quantum gateway application, while server is from the second amountSubnet closes application and matched second quantum key of the first quantum key.
6) customer end B is to the third quantum key of 1024 byte of third quantum gateway application, while server is from the second amountSubnet closes application and matched 4th quantum key of third quantum gateway.
Quantum key switchs to two-dimensional code principle figure in a kind of quantum encryption communication method for mobile device, such as Fig. 4 instituteShow, the specific protocol steps of the application method are as follows:
1) quantum key of 1024 bytes is divided into 8 parts, every part of 128 bytes by client.
2) 128 byte quantum keys are converted to two dimensional code by client.
A kind of mobile device of the quantum encryption communication method for mobile device scans the two-dimensional code schematic diagram, such as Fig. 5 instituteShow, a kind of mobile device communication flow chart of the quantum encryption communication method for mobile device, as shown in fig. 6, the useThe specific protocol steps of method are as follows:
1) two dimensional code that mobile device A sweep customer end A generates reads the first quantum key for including in two dimensional code.
2) two dimensional code that mobile device B-scan customer end B generates reads the second quantum key for including in two dimensional code.
3) clear data and the first quantum key carry out bit-by-bit XOR operation in mobile device A, generate ciphertext, thenCiphertext data are transferred to server by mobile device A.
4) server receives the ciphertext data of mobile device A transmission, first with the first quantum key matched theTwo quantum keys and ciphertext data carry out bit-by-bit XOR operation, generate clear data;Then server recycling and thirdMatched 4th quantum key of quantum gateway carries out bit-by-bit XOR operation with the clear data just decrypted, and generates ciphertext numberAccording to;Ciphertext data are transferred to mobile device B by last server.
5) mobile device B receives the ciphertext data of server transmission, then utilizes third quantum key and ciphertext dataBit-by-bit XOR operation is carried out, clear data is generated, in this way the communication of completion primary encryption.