Summary of the invention
Technical problem to be solved by this invention is; A kind of asynchronous encryption visible light communication method and system are provided; Asynchronous encryption visible light communication system of the present invention is simple in structure, be easy to realize; This system adopts asynchronous encryption visible light communication method to communicate, and asynchronous encryption visible light communication method security performance is high, can avoid high-speed camera to take visible light signal and duplicate visible light signal and cause password to reveal.
The present invention provides a kind of asynchronous encryption visible light communication method for the technical scheme that realizes the goal of the invention employing is, may further comprise the steps:
S1, the base band data after will encrypting send to pseudo-code sequence indication code processing unit; Base band data after in pseudo-code sequence indication code processing unit, will encrypting adds the pseudo-code sequence indication code; Signal after obtaining handling; Signal after handling is sent to modulator carry out signal modulation, the signal after obtaining modulating.
S2, the signal after will modulating send to LED, and the signal after LED will modulate is transmitted into the visible light receiver with stroboscopic visible light signal form.
S3, visible light receiver are converted into binary digital signal with the stroboscopic visible light signal and send to demodulator and carry out demodulation, and the signal of demodulator after with demodulation sends to pseudo-code sequence indication code processing unit.
S4, the pseudo-code sequence indication code processing unit Signal Separation after with demodulation becomes pseudo-code sequence indication code and encrypted ID data two parts, and the pseudo-code sequence indication code is sent to the pseudo-code sequence query unit, and encrypted ID data is sent to convolution decoder.
It is legal that the pseudo-code sequence indication code that S5, pseudo-code sequence query unit basis receive judges whether, the corresponding pseudo-code sequence of legal then inquiry sends to convolution decoder with pseudo-code sequence, does not conform to rule prompt cipher mistake.
S6, encrypted ID data and the pseudo-code sequence that inquires carry out drawing after the logical operation ID data after the deciphering in convolution decoder, mail to the ID determining device.
S7, ID determining device are compared the ID data of ID data and setting, and be identical then legal, and legal ID data are sent to equipment control circuit, and difference is the prompt cipher mistake then.
Preferably, the ID data of encryption are carried out obtaining after the logical operation in convolution coder by the pseudo-code sequence that base band data and pseudo-code generator produce.
Preferably, logical operation is an XOR.
Preferably, logical operation is NOR-operation.
Preferably, logical operation is same exclusive disjunction.
Preferably, the pseudo-code sequence indication code is that ascending order is regularly arranged.
Preferably, the pseudo-code sequence indication code is that descending is regularly arranged.
The present invention also provides a kind of asynchronous encryption visible light communication system, comprising:
Transmitting terminal: the base band data after will encrypting sends to pseudo-code sequence indication code processing unit; Base band data after in pseudo-code sequence indication code processing unit, will encrypting adds the pseudo-code sequence indication code; Signal after obtaining handling; Signal after handling is sent to modulator carry out signal modulation, the signal after obtaining modulating.
Signal after the modulation is sent to LED, and the signal after said LED will modulate is transmitted into the signal generator of visible light receiver with stroboscopic visible light signal form.
Receiving terminal: the visible light receiver is converted into binary digital signal with the stroboscopic visible light signal and sends to demodulator and carry out demodulation, and the signal of demodulator after with demodulation sends to pseudo-code sequence indication code processing unit.
The Signal Separation of pseudo-code sequence indication code processing unit after with said demodulation becomes pseudo-code sequence indication code and encrypted ID data two parts; The pseudo-code sequence indication code is sent to the pseudo-code sequence query unit, encrypted ID data is sent to the signal processor of convolution decoder; It is legal that the pseudo-code sequence query unit judges whether according to the pseudo-code sequence indication code that receives, the corresponding pseudo-code sequence of legal then inquiry, pseudo-code sequence sent to convolution decoder, do not conform to rule prompt cipher mistake.
Encrypted ID data and the pseudo-code sequence that inquires carry out drawing after the logical operation ID data after the deciphering in convolution decoder, mail to the ID determining device; The ID determining device is compared the ID data of said ID data and setting, and is identical then legal, and legal ID data are sent to equipment control circuit, and difference is the prompt cipher mistake then.
Preferably, pseudo-code sequence is a sequence of binary digits.
Preferably, sequence of binary digits is PN sign indicating number or Turbo code or Walsh sign indicating number or Barker code.
The invention has the beneficial effects as follows: a kind of asynchronous encryption visible light communication method and system are provided; Asynchronous encryption visible light communication system of the present invention is simple in structure; Comprise transmitting terminal and receiving terminal; Both communicate through asynchronous encryption visible light communication method; The visible light information of transmitting between transmitting terminal and the receiving terminal is the scrambler signal after the encryption, can avoid high-speed camera shooting visible light signal and duplicate the password leakage that visible light signal causes, high, technical realization, the saving cost of being easy to of this method security performance.
Embodiment
Below in conjunction with accompanying drawing and embodiment the present invention is elaborated.
Can know that according to Fig. 1 asynchronous encryption visible light communication of the present invention method flow sketch map a kind of asynchronous encryption visible light communication method may further comprise the steps:
The pseudo-code sequence that S1, base band data and pseudo-code generator 101 produce carries out obtaining the ID data of encrypting after the logical operation in convolution coder 102; The ID data of encrypting are sent in the pseudo-code sequence indication code processing unit 103, send to modulator 104 behind the adding pseudo-code sequence indication code and carry out the signal modulation.
S2, the signal after will modulating send to LED105, and the signal after LED105 will modulate is transmitted into the visible light receiver with stroboscopic visible light signal form.
S3, visible light receiver 201 are converted into binary digital signal with the stroboscopic visible light signal and send to demodulator 202 and carry out demodulation, and demodulator 202 sends to pseudo-code sequence indication code processing unit 203 with the signal after the demodulation.
S4, pseudo-code sequence indication code processing unit 203 become pseudo-code sequence indication code and encrypted ID data two parts with the Signal Separation after the demodulation, and the pseudo-code sequence indication code is sent to pseudo-code sequence query unit 204, and encrypted ID data is sent to convolution decoder 205.
It is legal that the pseudo-code sequence indication code that S5, pseudo-code sequence query unit 204 bases receive judges whether, the corresponding pseudo-code sequence of legal then inquiry sends to convolution decoder 205 with pseudo-code sequence, does not conform to rule prompt cipher mistake.
ID data after S6, encrypted ID data and the pseudo-code sequence that inquires carry out drawing deciphering behind the XOR in convolution decoder 205 mail to ID determining device 206.
S7, ID determining device 206 are compared the ID data of ID data and setting, and be identical then legal, and legal ID data are sent to equipment control circuit 207, and difference is the prompt cipher mistake then.
Initial data is a kind of numerical sequence signal; Be also referred to as base band data; In the preferred embodiment of the present invention, mainly form by the ID data; The ID data are meant each user's unique identifier, and the receiving device control circuit is exactly to determine whether to have corresponding authority according to the ID data after the deciphering, thereby determines whether control appliance.
Pseudo-code sequence is the one group of sequence of binary digits that is produced by pseudo-code generator, can be Serial No.s such as PN sign indicating number, Turbo code, Walsh sign indicating number, Barker code, also can be user-defined sequence of binary digits.
The pseudo-code sequence indication code is a natural number, and the state of expression corresponding unit state machine is used to indicate the employing of transmitting terminal and receiving terminal where to organize pseudo-code sequence and carries out encryption and decryption.For example: when the pseudo-code sequence indication code was binary number 00000100, decimally numeral was 4, and representing its location mode machine is state 4; A corresponding with it pseudo-code sequence is 1010110110011100; When the pseudo-code sequence indication code was binary number 00000101, decimally numeral was 5, and representing its location mode machine is state 5; Pairing is another pseudo-code sequence 1010110110011001; By that analogy, the pseudo-code sequence that different pseudo-code sequence indication codes is corresponding different, and have relation one to one between pseudo-code sequence indication code and the pseudo-code sequence.Pseudo-code sequence indication code employing ascending order is regularly arranged or descending is regularly arranged, and the ascending order rule is that signal pseudo-code sequence indication code self of the every transmission of transmitting terminal adds 1, and descending is regularly arranged to be that signal pseudo-code sequence indication code self of the every transmission of transmitting terminal subtracts 1.The pseudo-code sequence indication code is used to indicate transmitting terminal and receiving terminal to adopt corresponding pseudo-code sequence to carry out encrypt and decrypt, signal of the every emission of transmitting terminal, and the pseudo-code sequence indication code will add 1 (or subtracting 1 automatically) automatically.
In a preferred embodiment of the invention, logical operation is the logic XOR, comprise also that for example logic OR is non-, logic with or etc. compute mode.
Be to be understood that; The visible light signal of the transmitting terminal of asynchronous encryption visible light communication method of the present invention and receiving terminal transmission is not an initial data; But through the scrambler signal after encrypting; Scrambler is meant initial data is carried out the data that produced after certain logical operation, as initial data and pseudo-code sequence are carried out convolution or shifting function computing etc.
The present invention also provides a kind of asynchronous encryption visible light communication system, comprises transmitting terminal and receiving terminal, and transmitting terminal and receiving terminal communicate through above-mentioned asynchronous encryption visible light communication method.
Referring to Fig. 2; Asynchronous encryption visible light communication system transmitting terminal structural representation of the present invention; Transmitting terminal of the present invention comprises pseudo-code generator 101, the convolution coder 102 that is used to encode that is used to produce the pseudo-code sequence indication code, the LED105 that is used to handle the pseudo-code sequence indication code processing unit 103 of pseudo-code sequence indication code and is used for the visible emitting signal, and transmitting terminal also comprises the modulator 104 that is used for the signal modulation.
Referring to Fig. 3; Asynchronous encryption visible light communication system receiving terminal structural representation of the present invention, receiving terminal of the present invention comprise the visible light receiver 201 that is used to receive visible light signal, the pseudo-code sequence indication code processing unit 203 that is used to obtain pseudo-code sequence indication code and encrypted ID data, the pseudo-code sequence query unit 204 that is used to export pseudo-code sequence, the convolution decoder 205 that is used to decipher, are used to export the ID determining device 206 and the equipment control circuit 207 of ID data.Receiving terminal also comprises the demodulator 202 that is used for restituted signal.
Should be appreciated that and to adopt and be not limited to adopt mode prompt cipher mistakes such as buzzer or signal lamp.
Embodiment 1
Referring to Fig. 4; The present invention's structural representation that transmits; The present invention's data owner that transmits will be made up of pseudo-code sequence indication code and encrypted ID data two parts, establishes the binary digit 0000000000000100 that ID data that transmitting terminal and receiving terminal set are one 16 bit, and the pseudo-code sequence indication code is the binary digit 00000010 of one 8 bit; The binary digit 1010101100100010 that its corresponding pseudo-code sequence is one 16 bit, then:
The pseudo-code sequence that S1, base band data and pseudo-code generator 101 produce carries out obtaining the ID data of encrypting behind the XOR in convolution coder 102, and operation result is as shown in the table,
Base band data |
?0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
Pseudo-code sequence |
?1 |
0 |
1 |
0 |
1 |
0 |
1 |
1 |
0 |
0 |
1 |
0 |
0 |
0 |
1 |
0 |
XOR output |
?1 |
0 |
1 |
0 |
1 |
0 |
1 |
1 |
0 |
0 |
1 |
0 |
0 |
1 |
1 |
0 |
Can know that by last table the ID data after the encryption are 1010101100100110, inequality with original ID data, promptly initial data is encrypted.
The ID data of encrypting are sent in the pseudo-code sequence indication code processing unit 103; The ID data of encrypting are added that pseudo-code sequence indication code 00000010 is as head; Send to modulator 104 behind the adding pseudo-code sequence indication code and carry out the signal modulation, the Serial No. of output is 000000101010101100100110.
S2, the signal after will modulating send to LED105, and the signal 000000101010101100100110 after LED105 will modulate is transmitted into the visible light receiver with stroboscopic visible light signal form.
S3, visible light receiver 201 are converted into binary digital signal with the stroboscopic visible light signal and send to demodulator 202 and carry out demodulation, and demodulator 202 sends to pseudo-code sequence indication code processing unit 203 with the signal after the demodulation.
S4, pseudo-code sequence indication code processing unit 203 separate into pseudo-code sequence indication code 00000010 and encrypted ID data 1010101100100110 two parts with the signal after the demodulation 000000101010101100100110; Pseudo-code sequence indication code 00000010 is sent to pseudo-code sequence query unit 204, encrypted ID data 1010101100100110 is sent to convolution decoder 205.
S5, pseudo-code sequence query unit 204 input pseudo-code sequence indication codes 00000010; Pseudo-code sequence indication code and current received pseudo-code sequence indication code that pseudo-code sequence query unit 204 can be preserved before compare; Judge according to the pseudo-code sequence indication code that receives whether it is legal; The pseudo-code sequence indication code when adopting ascending order rule (signal pseudo-code sequence indication code self of the every transmission of transmitting terminal adds 1), if current received pseudo-code sequence indication code greater than the pseudo-code sequence indication code of preserving, the then current signal that receives is legal signal; The pseudo-code sequence that receives is sent to convolution decoder 205; Otherwise the current signal that receives is illegal signal, the prompt cipher mistake.
In addition; When adopting descending rule (signal pseudo-code sequence indication code self of the every transmission of transmitting terminal subtracts 1), if current received pseudo-code sequence indication code less than the pseudo-code sequence indication code of preserving, the then current signal that receives is legal signal; The pseudo-code sequence that receives is sent to convolution decoder 205; Otherwise the current signal that receives is illegal signal, forwards the prompt cipher mistake equally to.
S6, encrypted ID data 1010101100100110 and the pseudo-code sequence 1010101100100010 that inquires carry out XOR in convolution decoder 205, operation result is as shown in the table:
Encrypted ID data |
?1 |
0 |
1 |
0 |
1 |
0 |
1 |
1 |
0 |
0 |
1 |
0 |
0 |
1 |
1 |
0 |
Pseudo-code sequence |
?1 |
0 |
1 |
0 |
1 |
0 |
1 |
1 |
0 |
0 |
1 |
0 |
0 |
0 |
1 |
0 |
XOR output |
?0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
Can know that by last table the ID data after the deciphering are 0000000000000100, send it to ID determining device 206.
S7, deciphering ID data that ID determining device 206 will receive and the ID data of setting are compared, and are identical then legal, and legal ID data are sent to equipment control circuit 207, and difference is then illegal, the prompt cipher mistake.So far, the signal that ID determining device 206 receives is 0000000000000100, and the ID data that receiving terminal is set also are 0000000000000100, and therefore, the signal of this reception is legal signal, and receiving terminal is successfully deciphered the coded signal that transmitting terminal sends.
The present invention can avoid high-speed camera to take visible light signal and duplicate visible light signal; For example; The encrypted ID data that present embodiment sends is taken and is duplicated by high-speed camera in the communication process of sending and receiving end, and the signal that then duplicates is the signal 000000101010101100100110 of eating dishes without rice or wine.Because receiving terminal when receiving legal signal, saves as 00000010 with pseudo-code sequence indication code wherein, when it receives the signal that is replicated again, through separating pseudo-code sequence indication code wherein, also obtains 00000010.But according to encrypting the ascending order rule; The pseudo-code sequence indication code that receives of back should be greater than 00000010 (when adopting the descending rule, should less than 00000010), and the signal that duplicates equates for both; Therefore can judge that the signal that duplicates is an illegal signals, with the prompt cipher mistake.
Further, suppose to take visible light signal and duplicate visible light signal again through revising new signal of forgery through high-speed camera, just pseudo-code sequence indication code wherein is revised as 00000011, remainder is constant.The pseudo-code sequence indication code is by ascending order when regularly arranged; Pseudo-code sequence query unit 204 can judge that it is legal signal; Inquiry and pseudo-code sequence indication code 00000011 corresponding pseudo-code sequence, this pseudo-code sequence is different with encrypted pseudo-code sequence, supposes that it is 1010101100100011 that the pseudo-code sequence query unit inquires corresponding pseudo-code sequence; With this pseudo-code sequence the ID data are deciphered, calculating process is as shown in the table:
Encrypted ID data |
?1 |
0 |
1 |
0 |
1 |
0 |
1 |
1 |
0 |
0 |
1 |
0 |
0 |
1 |
1 |
0 |
Pseudo-code sequence |
?1 |
0 |
1 |
0 |
1 |
0 |
1 |
1 |
0 |
0 |
1 |
0 |
0 |
0 |
1 |
1 |
XOR output |
?0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
1 |
Can be known that by last table the ID data of spurious signal entries deciphering are 0000000000000101, and the ID data that receiving terminal is set are 0000000000000100, both ID are different, and ID determining device 206 will judge that receiving signal is illegal signals, the prompt cipher mistake.
Embodiment 2
If the ID data that transmitting terminal and receiving terminal are set are the binary digit 0000000000000010 of one 16 bit; The pseudo-code sequence indication code is the binary digit 00000100 of one 8 bit; The binary digit 1010101100100010 that its corresponding pseudo-code sequence is one 16 bit, then:
The pseudo-code sequence that S1, base band data and pseudo-code generator 101 produce carries out obtaining the ID data of encrypting behind the XOR in convolution coder 102, and operation result is as shown in the table,
Base band data |
?0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
Pseudo-code sequence |
?1 |
0 |
1 |
0 |
1 |
0 |
1 |
1 |
0 |
0 |
1 |
0 |
0 |
0 |
1 |
0 |
XOR output |
?1 |
0 |
1 |
0 |
1 |
0 |
1 |
1 |
0 |
0 |
1 |
0 |
0 |
0 |
0 |
0 |
Can know that by last table the ID data after the encryption are 1010101100100000, inequality with original ID data, promptly initial data is encrypted.
The ID data of encrypting are sent in the pseudo-code sequence indication code processing unit 103; The ID data of encrypting are added that pseudo-code sequence indication code 00000010 is as head; Send to modulator 104 behind the adding pseudo-code sequence indication code and carry out the signal modulation, the Serial No. of output is 000000101010101100100000.
S2, the signal after will modulating send to LED105, and the signal 000000101010101100100000 after LED105 will modulate is transmitted into the visible light receiver with stroboscopic visible light signal form.
S3, visible light receiver 201 are converted into binary digital signal with the stroboscopic visible light signal and send to demodulator 202 and carry out demodulation, and demodulator 202 sends to pseudo-code sequence indication code processing unit 203 with the signal after the demodulation.
S4, pseudo-code sequence indication code processing unit 203 separate into pseudo-code sequence indication code 00000010 and encrypted ID data 1010101100100000 two parts with the signal after the demodulation 000000101010101100100000; Pseudo-code sequence indication code 00000010 is sent to pseudo-code sequence query unit 204, encrypted ID data 1010101100100000 is sent to convolution decoder 205.
S5, pseudo-code sequence query unit 204 input pseudo-code sequence indication codes 00000010; Pseudo-code sequence indication code and current received pseudo-code sequence indication code that pseudo-code sequence query unit 204 can be preserved before compare; Judge according to the pseudo-code sequence indication code that receives whether it is legal; The pseudo-code sequence indication code when adopting ascending order rule (signal pseudo-code sequence indication code self of the every transmission of transmitting terminal adds 1), if current received pseudo-code sequence indication code greater than the pseudo-code sequence indication code of preserving, the then current signal that receives is legal signal; The pseudo-code sequence that receives is sent to convolution decoder 205; Otherwise the current signal that receives is illegal signal, the prompt cipher mistake.
In addition; When adopting descending rule (signal pseudo-code sequence indication code self of the every transmission of transmitting terminal subtracts 1), if current received pseudo-code sequence indication code less than the pseudo-code sequence indication code of preserving, the then current signal that receives is legal signal; The pseudo-code sequence that receives is sent to convolution decoder 205; Otherwise the current signal that receives is illegal signal, forwards the prompt cipher mistake equally to.
S6, encrypted ID data 1010101100100000 and the pseudo-code sequence 1010101100100010 that inquires carry out XOR in convolution decoder 205, operation result is as shown in the table:
Encrypted ID data |
?1 |
0 |
1 |
0 |
1 |
0 |
1 |
1 |
0 |
0 |
1 |
0 |
0 |
0 |
0 |
0 |
Pseudo-code sequence |
?1 |
0 |
1 |
0 |
1 |
0 |
1 |
1 |
0 |
0 |
1 |
0 |
0 |
0 |
1 |
0 |
XOR output |
?0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
Can know that by last table the ID data after the deciphering are 0000000000000010, send it to ID determining device 206.
S7, deciphering ID data that ID determining device 206 will receive and the ID data of setting are compared, and are identical then legal, and legal ID data are sent to equipment control circuit 207, and difference is then illegal, the prompt cipher mistake.So far, the signal that ID determining device 206 receives is 0000000000000010, and the ID data that receiving terminal is set also are 0000000000000010, and therefore, the signal of this reception is legal signal, and receiving terminal is successfully deciphered the coded signal that transmitting terminal sends.
Embodiment 3
If the ID data that transmitting terminal and receiving terminal are set are the binary digit 0000000000000011 of one 16 bit; The pseudo-code sequence indication code is the binary digit 00000010 of one 8 bit; The binary digit 0000000000100000 that its corresponding pseudo-code sequence is one 16 bit, then:
The pseudo-code sequence that S1, base band data and pseudo-code generator 101 produce carries out obtaining the ID data of encrypting after the NOR-operation in convolution coder 102, and operation result is as shown in the table,
Base band data |
?0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
1 |
Pseudo-code sequence |
?0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
0 |
0 |
0 |
NOR-operation output |
?1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
0 |
0 |
Can know that by last table the ID data after the encryption are 1111111111011100, inequality with original ID data, promptly initial data is encrypted.
The ID data of encrypting are sent in the pseudo-code sequence indication code processing unit 103; The ID data of encrypting are added that pseudo-code sequence indication code 00000010 is as head; Send to modulator 104 behind the adding pseudo-code sequence indication code and carry out the signal modulation, the Serial No. of output is 000000101111111111011100.
S2, the signal after will modulating send to LED105, and the signal 000000101111111111011100 after LED105 will modulate is transmitted into the visible light receiver with stroboscopic visible light signal form.
S3, visible light receiver 201 are converted into binary digital signal with the stroboscopic visible light signal and send to demodulator 202 and carry out demodulation, and demodulator 202 sends to pseudo-code sequence indication code processing unit 203 with the signal after the demodulation.
S4, pseudo-code sequence indication code processing unit 203 separate into pseudo-code sequence indication code 00000010 and encrypted ID data 1111111111011100 two parts with the signal after the demodulation 000000101111111111011100; Pseudo-code sequence indication code 00000010 is sent to pseudo-code sequence query unit 204, encrypted ID data 1111111111011100 is sent to convolution decoder 205.
S5, pseudo-code sequence query unit 204 input pseudo-code sequence indication codes 00000010; Pseudo-code sequence indication code and current received pseudo-code sequence indication code that pseudo-code sequence query unit 204 can be preserved before compare; Judge according to the pseudo-code sequence indication code that receives whether it is legal; The pseudo-code sequence indication code when adopting ascending order rule (signal pseudo-code sequence indication code self of the every transmission of transmitting terminal adds 1), if current received pseudo-code sequence indication code greater than the pseudo-code sequence indication code of preserving, the then current signal that receives is legal signal; The pseudo-code sequence that receives is sent to convolution decoder 205; Otherwise the current signal that receives is illegal signal, the prompt cipher mistake.
In addition; When adopting descending rule (signal pseudo-code sequence indication code self of the every transmission of transmitting terminal subtracts 1), if current received pseudo-code sequence indication code less than the pseudo-code sequence indication code of preserving, the then current signal that receives is legal signal; The pseudo-code sequence that receives is sent to convolution decoder 205; Otherwise the current signal that receives is illegal signal, forwards the prompt cipher mistake equally to.
S6, encrypted ID data 1111111111011100 and the pseudo-code sequence 0000000000100000 that inquires carry out NOR-operation in convolution decoder 205, operation result is as shown in the table:
Encrypted ID data |
?1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
0 |
0 |
Pseudo-code sequence |
?0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
0 |
0 |
0 |
NOR-operation output |
?0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
1 |
Can know that by last table the ID data after the deciphering are 0000000000000011, send it to ID determining device 206.
S7, deciphering ID data that ID determining device 206 will receive and the ID data of setting are compared, and are identical then legal, and legal ID data are sent to equipment control circuit 207, and difference is then illegal, the prompt cipher mistake.So far, the signal that ID determining device 206 receives is 0000000000000011, and the ID data that receiving terminal is set also are 0000000000000011, and therefore, the signal of this reception is legal signal, and receiving terminal is successfully deciphered the coded signal that transmitting terminal sends.
Embodiment 4
If the ID data that transmitting terminal and receiving terminal are set are the binary digit 0000000000010000 of one 16 bit; The pseudo-code sequence indication code is the binary digit 10000000 of one 8 bit; The binary digit 0000100000000000 that its corresponding pseudo-code sequence is one 16 bit, then:
Obtain the ID data of encrypting after the pseudo-code sequence that S1, base band data and pseudo-code generator 101 produce carries out with exclusive disjunction in convolution coder 102, operation result is as shown in the table,
Base band data |
?0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
0 |
0 |
Pseudo-code sequence |
?0 |
0 |
0 |
0 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
Export with exclusive disjunction |
?1 |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
Can know that by last table the ID data after the encryption are 1111011111101111, inequality with original ID data, promptly initial data is encrypted.
The ID data of encrypting are sent in the pseudo-code sequence indication code processing unit 103; The ID data of encrypting are added that pseudo-code sequence indication code 10000000 is as head; Send to modulator 104 behind the adding pseudo-code sequence indication code and carry out the signal modulation, the Serial No. of output is 100000001111011111101111.
S2, the signal after will modulating send to LED105, and the signal 100000001111011111101111 after LED105 will modulate is transmitted into the visible light receiver with stroboscopic visible light signal form.
S3, visible light receiver 201 are converted into binary digital signal with the stroboscopic visible light signal and send to demodulator 202 and carry out demodulation, and demodulator 202 sends to pseudo-code sequence indication code processing unit 203 with the signal after the demodulation.
S4, pseudo-code sequence indication code processing unit 203 separate into pseudo-code sequence indication code 10000000 and encrypted ID data 1111011111101111 two parts with the signal after the demodulation 100000001111011111101111; Pseudo-code sequence indication code 10000000 is sent to pseudo-code sequence query unit 204, encrypted ID data 1111011111101111 is sent to convolution decoder 205.
S5, pseudo-code sequence query unit 204 input pseudo-code sequence indication codes 10000000; Pseudo-code sequence indication code and current received pseudo-code sequence indication code that pseudo-code sequence query unit 204 can be preserved before compare; Judge according to the pseudo-code sequence indication code that receives whether it is legal; The pseudo-code sequence indication code when adopting ascending order rule (signal pseudo-code sequence indication code self of the every transmission of transmitting terminal adds 1), if current received pseudo-code sequence indication code greater than the pseudo-code sequence indication code of preserving, the then current signal that receives is legal signal; The pseudo-code sequence that receives is sent to convolution decoder 205; Otherwise the current signal that receives is illegal signal, the prompt cipher mistake.
In addition; When adopting descending rule (signal pseudo-code sequence indication code self of the every transmission of transmitting terminal subtracts 1), if current received pseudo-code sequence indication code less than the pseudo-code sequence indication code of preserving, the then current signal that receives is legal signal; The pseudo-code sequence that receives is sent to convolution decoder 205; Otherwise the current signal that receives is illegal signal, forwards the prompt cipher mistake equally to.
S6, encrypted ID data 1111011111101111 and the pseudo-code sequence 0000100000000000 that inquires carry out same exclusive disjunction in convolution decoder 205, operation result is as shown in the table:
Encrypted ID data |
?1 |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
Pseudo-code sequence |
?0 |
0 |
0 |
0 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
Export with exclusive disjunction |
?0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
0 |
0 |
Can know that by last table the ID data after the deciphering are 0000000000010000, send it to ID determining device 206.
S7, deciphering ID data that ID determining device 206 will receive and the ID data of setting are compared, and are identical then legal, and legal ID data are sent to equipment control circuit 207, and difference is then illegal, the prompt cipher mistake.So far, the signal that ID determining device 206 receives is 0000000000010000, and the ID data that receiving terminal is set also are 0000000000010000, and therefore, the signal of this reception is legal signal, and receiving terminal is successfully deciphered the coded signal that transmitting terminal sends.
In sum; Asynchronous encryption visible light communication method and system provided by the invention, the technology of comparing with the synchronous crypto-operation method is simpler and practice thrift cost, does not need transmitting terminal and receiving terminal to have identical clock; Simultaneously; Can avoid high-speed camera to take visible light signal and duplicate visible light signal and cause password to reveal, improve the security performance of photon Internet of Things greatly, the present invention can be used in photon lock, the photon gate control system.
The foregoing description among the present invention has only been done exemplary description, and those skilled in the art can carry out various modifications to the present invention under the situation that does not break away from the spirit and scope of the present invention after reading present patent application.