A kind of asynchronous encryption visible light communication method and system
Technical field
The present invention relates to visible light communication field, relate to a kind of asynchronous encryption visible light communication method and system particularly.
Background technology
Visible light communication is a kind of emerging, short distance high-speed radio optical communication technique of growing up in LED technology.The general principle of visible light communication utilizes light-emitting diode (LED) than fluorescent lamp and the fast feature of incandescent lamp switch speed exactly, communicated by the high-frequency flicker of LED light source, light is had to represent 1, unglazedly represent 0, send light signal at a high speed, then obtain information through opto-electronic conversion.Wireless light communication technology is because its data are not easily disturbed and catch, and optical communication equipment makes simple and should not damage or demagnetization, can be used for making wireless optical encryption key pair.Compared with microwave technology, wireless light communication has quite abundant frequency spectrum resource, and this is that general microwave communication and radio communication are incomparable; Visible light communication can be suitable for any communication protocol, be applicable to any environment simultaneously; In fail safe, it compares traditional magnetic material, without the need to worrying demagnetization problem, more need not worry that Content of Communication is stolen by people; The equipment erection of wireless light communication is convenient flexibly, and with low cost, is applicable to extensive popularization and application.
Internet of Things be one based on information carriers such as the Internet, conventional telecommunications nets, allow the network that all General Physics object implementatio8 that can be independently addressable interconnect.Internet of Things refers to ubiquitous end-equipment and facility, interconnected by various wireless or wired long distance or short distance communication real-time performance, controlled and even the personalized real time on-line monitoring of safety is provided, the management and service function such as location is reviewed, alarm linkage, dispatch control, program management, Long-distance Control, safety precaution, long-range repair and maintenance, online upgrading, statistical report form, decision support, leader's desktop, realize " pipe, control, battalion " integration of efficient, energy-conservation, the safety to equipment, environmental protection.Traditional Internet of Things generally realizes interconnecting by various wireless or wired communication network, adopts traditional communication technology.Traditional Internet of Things generally realizes interconnecting by various wireless or wired communication network, adopts traditional communication technology.
In prior art, visible light communication is applied in Internet of Things, is commonly called as photon Internet of Things.Photon Internet of Things utilizes LED to send strobe signal, as the medium of the radio transmission of photon Internet of Things, after closely propagating, then obtains information through opto-electronic conversion.The directive property of visible ray is high, can not penetrate barrier, has higher fail safe than using the Internet of Things of communication.But at present photon technology of Internet of things is not encrypted initial data, but directly modulates the signal on visible light signal and transmit.Or transmitting terminal and receiving terminal only adopt fixing time-independent coded signal (as pseudo-code sequence) to be encrypted, so just likely there is a potential safety hazard, take as used high-speed camera, just can copy the light signal of same stroboscopic, because receiving terminal pseudo-code sequence used of decoding is fixing, so the light signal copied also can identify and correctly decipher in receiving end, thus encryption is made to lose meaning.There is a kind of method of encryption can take precautions against above-mentioned potential safety hazard, namely transmitting terminal is encrypted the pseudo-code sequence used and can constantly be changed in time, and receiving terminal decipher pseudo-code sequence used also with transmitting terminal the same, the change that intercropping is at any time identical, but be always consistent with the pseudo-code sequence of transmitting terminal, this method can make receiving terminal and transmitting terminal keep synchronous.This method requires that the time variations in transmitting terminal and receiving terminal must be completely the same, namely its internal clocking must be completely the same, time error must be very little, the precision of current crystal oscillator element is difficult to reach requirement, therefore service time is longer, the time difference of transmitting terminal and receiving terminal is larger, finally lose synchronizing information, transmitting terminal and receiving-end state change inconsistently cause deciphering unsuccessfully, in addition, once transmitting terminal or receiving terminal one of them lose synchronizing information because of power-off, re-power and need to recover synchronizing information, just need to make one end of non-power-off again synchronous with it by reset signal, increase system complexity, make troubles for user uses.
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 structure of the present invention is simple, be easy to realize, this system adopts asynchronous encryption visible light communication method to communicate, asynchronous encryption visible light communication method safety performance is high, high-speed camera can be avoided to take visible light signal and copy visible light signal and cause password to reveal.
The present invention be realize goal of the invention adopt technical scheme be a kind of asynchronous encryption visible light communication method is provided, comprises the following steps:
S1, by encryption after base band data be sent to pseudo-code sequence indication code processing unit, in pseudo-code sequence indication code processing unit, the base band data after encryption is added pseudo-code sequence indication code, obtain the signal after processing, signal after process is sent to modulator and carries out signal madulation, obtain the signal after modulating.
S2, by modulation after signal be sent to LED, LED by modulation after signal be transmitted into visible light receiver with stroboscopic visible light signal form.
Stroboscopic visible light signal is converted into binary digital signal and is sent to demodulator and carries out demodulation by S3, visible light receiver, and the signal after demodulation is sent to pseudo-code sequence indication code processing unit by demodulator.
Signal separator after demodulation is become pseudo-code sequence indication code and encrypted ID data two parts by S4, pseudo-code sequence indication code processing unit, pseudo-code sequence indication code is sent to pseudo-code sequence query unit, encrypted ID data is sent to convolution decoder.
It is legal, legal that S5, pseudo-code sequence query unit judge whether according to the pseudo-code sequence indication code received, and inquires about corresponding pseudo-code sequence, pseudo-code sequence is sent to convolution decoder, does not conform to rule prompt cipher mistake.
Draw the ID data after deciphering after S6, encrypted ID data and the pseudo-code sequence inquired carry out logical operation in convolution decoder, mail to ID determining device.
The ID data of ID data and setting are compared by S7, ID determining device, identical then legal, and legal ID data are sent to equipment control circuit, and difference is prompt cipher mistake then.
Preferably, obtain after the pseudo-code sequence that the ID data of encryption are produced by base band data and pseudo-code generator carries out logical operation in convolution coder.
Preferably, logical operation is XOR.
Preferably, logical operation is NOR-operation.
Preferably, logical operation is same or computing.
Preferably, pseudo-code sequence indication code is that ascending order is regularly arranged.
Preferably, 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 encryption is sent to pseudo-code sequence indication code processing unit, in pseudo-code sequence indication code processing unit, the base band data after encryption is added pseudo-code sequence indication code, obtain the signal after processing, signal after process is sent to modulator and carries out signal madulation, obtain the signal after modulating.
Signal after modulation is sent to LED, and the signal after modulation is transmitted into the signal generator of visible light receiver by described LED with stroboscopic visible light signal form.
Receiving terminal: stroboscopic visible light signal is converted into binary digital signal and is sent to demodulator and carries out demodulation by visible light receiver, and the signal after demodulation is sent to pseudo-code sequence indication code processing unit by demodulator.
Signal separator after described demodulation is become pseudo-code sequence indication code and encrypted ID data two parts by pseudo-code sequence indication code processing unit, pseudo-code sequence indication code is sent to pseudo-code sequence query unit, encrypted ID data is sent to the signal processor of convolution decoder; It is legal, legal that pseudo-code sequence query unit judges whether according to the pseudo-code sequence indication code received, and inquires about corresponding pseudo-code sequence, pseudo-code sequence is sent to convolution decoder, do not conform to rule prompt cipher mistake.
Draw the ID data after deciphering after encrypted ID data and the pseudo-code sequence inquired carry out logical operation in convolution decoder, mail to ID determining device; The ID data of described ID data and setting are compared by ID determining device, identical then legal, and legal ID data are sent to equipment control circuit, and difference is prompt cipher mistake then.
Preferably, pseudo-code sequence is sequence of binary digits.
Preferably, sequence of binary digits is PN code or Turbo code or Walsh code 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 structure of the present invention is simple, comprise transmitting terminal and receiving terminal, both are communicated by asynchronous encryption visible light communication method, the visible ray information transmitted between transmitting terminal and receiving terminal is the scrambler signal after encryption, high-speed camera can be avoided to take visible light signal and copy the password that visible light signal causes revealing, the method security performance is high, technically be easy to realize, save cost.
Accompanying drawing explanation
Fig. 1, asynchronous encryption visible light communication method flow schematic diagram of the present invention;
Fig. 2, asynchronous encryption visible light communication system transmitting terminal structural representation of the present invention;
Fig. 3, asynchronous encryption visible light communication system receiving terminal structural representation of the present invention;
Fig. 4, the present invention transmits structural representation;
In figure, 101 pseudo-code generators, 102 convolution coders, 103 pseudo-code sequence indication code processing units, 104 modulators, 105LED, 201 visible light receiver, 202 demodulators, 203 pseudo-code sequence indication code processing units, 204 pseudo-code sequence query unit, 205 convolution decoders, 206ID determining device, 207 equipment control circuits.
Embodiment
Below in conjunction with drawings and Examples, the present invention is described in detail.
According to Fig. 1 asynchronous encryption visible light communication of the present invention method flow schematic diagram, a kind of asynchronous encryption visible light communication method, comprises the following steps:
The ID data of will encrypt are obtained after the pseudo-code sequence that S1, base band data and pseudo-code generator 101 produces carries out logical operation in convolution coder 102, the ID data of encryption are sent in pseudo-code sequence indication code processing unit 103, are sent to modulator 104 after adding pseudo-code sequence indication code and carry out signal madulation.
S2, by modulation after signal be sent to LED105, LED105 by modulation after signal be transmitted into visible light receiver with stroboscopic visible light signal form.
Stroboscopic visible light signal is converted into binary digital signal and is sent to demodulator 202 and carries out demodulation by S3, visible light receiver 201, and the signal after demodulation is sent to pseudo-code sequence indication code processing unit 203 by demodulator 202.
Signal separator after demodulation is become pseudo-code sequence indication code and encrypted ID data two parts by S4, pseudo-code sequence indication code processing unit 203, pseudo-code sequence indication code is sent to pseudo-code sequence query unit 204, encrypted ID data is sent to convolution decoder 205.
It is legal, legal that S5, pseudo-code sequence query unit 204 judge whether according to the pseudo-code sequence indication code received, and inquires about corresponding pseudo-code sequence, pseudo-code sequence is sent to convolution decoder 205, does not conform to rule prompt cipher mistake.
ID data after drawing deciphering after S6, encrypted ID data and the pseudo-code sequence inquired carry out XOR in convolution decoder 205, mail to ID determining device 206.
The ID data of ID data and setting are compared by S7, ID determining device 206, identical then legal, and legal ID data are sent to equipment control circuit 207, and difference is prompt cipher mistake then.
Initial data is a kind of numerical sequence signal, also referred to as base band data, form primarily of ID data in a preferred embodiment of the invention, ID data refer to the unique identifier of each user, receiving device control circuit be exactly according to deciphering after ID data determine whether that there is corresponding authority, thus determine whether control appliance.
Pseudo-code sequence is the one group of sequence of binary digits produced by pseudo-code generator, and can be the Serial No.s such as PN code, Turbo code, Walsh code, Barker code, also can be user-defined sequence of binary digits.
Pseudo-code sequence indication code is a natural number, represents the state of corresponding unit state machine, is used to indicate transmitting terminal and which group pseudo-code sequence receiving terminal adopts encrypt and decrypt.Such as: when pseudo-code sequence indication code is binary number 00000100, decimally numeral is 4, representing its location mode machine is state 4, a corresponding with it pseudo-code sequence is 1010110110011100, when pseudo-code sequence indication code is binary number 00000101, decimally numeral is 5, representing its location mode machine is state 5, corresponding is another pseudo-code sequence 1010110110011001, by that analogy, the pseudo-code sequence that different pseudo-code sequence indication codes is corresponding different, and there is relation one to one between pseudo-code sequence indication code and pseudo-code sequence.Pseudo-code sequence indication code employing ascending order is regularly arranged or descending is regularly arranged, and ascending order rule and transmitting terminal often send a signal pseudo-code sequence indication code self and add 1, and the regularly arranged i.e. transmitting terminal of descending often sends a signal pseudo-code sequence indication code self and subtracts 1.Pseudo-code sequence indication code is used to indicate transmitting terminal and receiving terminal adopts corresponding pseudo-code sequence to be encrypted and deciphering, and transmitting terminal often launches a signal, and pseudo-code sequence indication code will add 1 (or automatically subtracting 1) automatically.
In a preferred embodiment of the invention, logical operation is logic XOR, also comprise that such as 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 initial data, and be through the scrambler signal after encryption, the data that scrambler produces after referring to and carrying out certain logical operation to initial data, as carried out convolution or shifting function computing etc. to initial data and pseudo-code sequence.
The present invention also provides a kind of asynchronous encryption visible light communication system, comprises transmitting terminal and receiving terminal, and transmitting terminal is communicated by above-mentioned asynchronous encryption visible light communication method with receiving terminal.
See Fig. 2, asynchronous encryption visible light communication system transmitting terminal structural representation of the present invention, transmitting terminal of the present invention comprise for generation of pseudo-code sequence indication code pseudo-code generator 101, for encode convolution coder 102, for the treatment of the pseudo-code sequence indication code processing unit 103 of pseudo-code sequence indication code and the LED105 for launching visible light signal, transmitting terminal also comprises the modulator 104 for signal madulation.
See Fig. 3, asynchronous encryption visible light communication system receiving terminal structural representation of the present invention, receiving terminal of the present invention comprise visible light receiver 201 for receiving visible light signal, for obtain pseudo-code sequence indication code and encrypted ID data pseudo-code sequence indication code processing unit 203, for export pseudo-code sequence pseudo-code sequence query unit 204, for the convolution decoder 205 of decoding, for exporting ID determining device 206 and the equipment control circuit 207 of ID data.Receiving terminal also comprises the demodulator 202 for restituted signal.
Should be appreciated that and can adopt and be not limited to adopt the mode such as buzzer or signal lamp prompt cipher mistake.
Embodiment 1
See Fig. 4, the present invention transmits structural representation, the present invention transmits data primarily of pseudo-code sequence indication code and encrypted ID data two parts composition, if the ID data of transmitting terminal and receiving terminal setting are the binary digit 0000000000000100 of 16 bits, pseudo-code sequence indication code is the binary digit 00000010 of 8 bits, the pseudo-code sequence of its correspondence is the binary digit 1010101100100010 of 16 bits, then:
Obtain the ID data of will encrypt after the pseudo-code sequence that S1, base band data and pseudo-code generator 101 produces carries out XOR 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 |
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 exports |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
1 |
0 |
0 |
1 |
0 |
0 |
1 |
1 |
0 |
As seen from the above table, the ID data after encryption are 1010101100100110, not identical with original ID data, namely encrypt initial data.
The ID data of encryption are sent in pseudo-code sequence indication code processing unit 103, the ID data of encryption are added that pseudo-code sequence indication code 00000010 is as head, be sent to modulator 104 after adding pseudo-code sequence indication code and carry out signal madulation, the Serial No. of output is 000000101010101100100110.
S2, by modulation after signal be sent to LED105, LED105 by modulation after signal 000000101010101100100110 be transmitted into visible light receiver with stroboscopic visible light signal form.
Stroboscopic visible light signal is converted into binary digital signal and is sent to demodulator 202 and carries out demodulation by S3, visible light receiver 201, and the signal after demodulation is sent to pseudo-code sequence indication code processing unit 203 by demodulator 202.
Signal 000000101010101100100110 after demodulation is separated into pseudo-code sequence indication code 00000010 and encrypted ID data 1010101100100110 two parts by S4, pseudo-code sequence indication code processing unit 203, 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 inputs pseudo-code sequence indication code 00000010, the pseudo-code sequence indication code preserved before and current received pseudo-code sequence indication code can contrast by pseudo-code sequence query unit 204, judge that whether it is legal according to the pseudo-code sequence indication code received, pseudo-code sequence indication code is when adopting ascending order rule (transmitting terminal often sends a signal pseudo-code sequence indication code self and adds 1), if current received pseudo-code sequence indication code is greater than the pseudo-code sequence indication code of preservation, then current received signal is legal signal, the pseudo-code sequence received is sent to convolution decoder 205, otherwise, current received signal is illegal signals, prompt cipher mistake.
In addition, when adopting descending rule (transmitting terminal often sends a signal pseudo-code sequence indication code self and subtracts 1), if current received pseudo-code sequence indication code is less than the pseudo-code sequence indication code of preservation, then current received signal is legal signal, the pseudo-code sequence received is sent to convolution decoder 205, otherwise current received signal is illegal signals, forward prompt cipher mistake equally to.
S6, encrypted ID data 1010101100100110 and the pseudo-code sequence 1010101100100010 inquired carry out XOR in convolution decoder 205, and 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 exports |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
As seen from the above table, the ID data after deciphering are 0000000000000100, send it to ID determining device 206.
The ID data of the deciphering ID data received and setting are compared by S7, ID determining device 206, identical then legal, and legal ID data are sent to equipment control circuit 207, and difference is then illegal, prompt cipher mistake.So far, the signal that ID determining device 206 receives is 0000000000000100, and the ID data of receiving terminal setting are also 0000000000000100, and therefore, this signal received is legal signal, and the coded signal that transmitting terminal sends successfully is decrypted by receiving terminal.
The present invention can avoid high-speed camera take visible light signal and copy visible light signal, such as, the encrypted ID data that the present embodiment sends is taken by high-speed camera and is copied in the communication process of sending and receiving end, then the signal copied is signal 000000101010101100100110 of eating dishes without rice or wine.Because receiving terminal is when receiving legal signal, pseudo-code sequence indication code wherein being saved as 00000010, when it receives the signal be replicated again, by being separated pseudo-code sequence indication code wherein, also obtaining 00000010.But according to encryption ascending order rule, the pseudo-code sequence indication code received below should be greater than for 00000010 (when adopting descending rule, should be less than 00000010), and the signal copied is that both are equal, therefore can judge that the signal copied is illegal signals, by prompt cipher mistake.
Further, suppose through high-speed camera shooting visible light signal and copy visible light signal again by amendment forgery new signal, namely pseudo-code sequence indication code is wherein revised as 00000011, remainder is constant.When pseudo-code sequence indication code is regularly arranged by ascending order, pseudo-code sequence query unit 204 can judge that it is legal signal, inquire about the pseudo-code sequence corresponding with pseudo-code sequence indication code 00000011, this pseudo-code sequence is different from encrypted pseudo-code sequence, supposing that pseudo-code sequence query unit inquires corresponding pseudo-code sequence is 1010101100100011, with this pseudo-code sequence to ID decrypt data, 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 exports |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
1 |
As seen from the above table, the ID data of spurious signal entries deciphering are 0000000000000101, and the ID data of receiving terminal setting are 0000000000000100, and both ID are different, and judgement Received signal strength is illegal signals by ID determining device 206, prompt cipher mistake.
Embodiment 2
If the ID data of transmitting terminal and receiving terminal setting are the binary digit 0000000000000010 of 16 bits, pseudo-code sequence indication code is the binary digit 00000100 of 8 bits, the pseudo-code sequence of its correspondence is the binary digit 1010101100100010 of 16 bits, then:
Obtain the ID data of will encrypt after the pseudo-code sequence that S1, base band data and pseudo-code generator 101 produces carries out XOR 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 |
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 exports |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
1 |
0 |
0 |
1 |
0 |
0 |
0 |
0 |
0 |
As seen from the above table, the ID data after encryption are 1010101100100000, not identical with original ID data, namely encrypt initial data.
The ID data of encryption are sent in pseudo-code sequence indication code processing unit 103, the ID data of encryption are added that pseudo-code sequence indication code 00000010 is as head, be sent to modulator 104 after adding pseudo-code sequence indication code and carry out signal madulation, the Serial No. of output is 000000101010101100100000.
S2, by modulation after signal be sent to LED105, LED105 by modulation after signal 000000101010101100100000 be transmitted into visible light receiver with stroboscopic visible light signal form.
Stroboscopic visible light signal is converted into binary digital signal and is sent to demodulator 202 and carries out demodulation by S3, visible light receiver 201, and the signal after demodulation is sent to pseudo-code sequence indication code processing unit 203 by demodulator 202.
Signal 000000101010101100100000 after demodulation is separated into pseudo-code sequence indication code 00000010 and encrypted ID data 1010101100100000 two parts by S4, pseudo-code sequence indication code processing unit 203, 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 inputs pseudo-code sequence indication code 00000010, the pseudo-code sequence indication code preserved before and current received pseudo-code sequence indication code can contrast by pseudo-code sequence query unit 204, judge that whether it is legal according to the pseudo-code sequence indication code received, pseudo-code sequence indication code is when adopting ascending order rule (transmitting terminal often sends a signal pseudo-code sequence indication code self and adds 1), if current received pseudo-code sequence indication code is greater than the pseudo-code sequence indication code of preservation, then current received signal is legal signal, the pseudo-code sequence received is sent to convolution decoder 205, otherwise, current received signal is illegal signals, prompt cipher mistake.
In addition, when adopting descending rule (transmitting terminal often sends a signal pseudo-code sequence indication code self and subtracts 1), if current received pseudo-code sequence indication code is less than the pseudo-code sequence indication code of preservation, then current received signal is legal signal, the pseudo-code sequence received is sent to convolution decoder 205, otherwise current received signal is illegal signals, forward prompt cipher mistake equally to.
S6, encrypted ID data 1010101100100000 and the pseudo-code sequence 1010101100100010 inquired carry out XOR in convolution decoder 205, and 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 exports |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
As seen from the above table, the ID data after deciphering are 0000000000000010, send it to ID determining device 206.
The ID data of the deciphering ID data received and setting are compared by S7, ID determining device 206, identical then legal, and legal ID data are sent to equipment control circuit 207, and difference is then illegal, prompt cipher mistake.So far, the signal that ID determining device 206 receives is 0000000000000010, and the ID data of receiving terminal setting are also 0000000000000010, and therefore, this signal received is legal signal, and the coded signal that transmitting terminal sends successfully is decrypted by receiving terminal.
Embodiment 3
If the ID data of transmitting terminal and receiving terminal setting are the binary digit 0000000000000011 of 16 bits, pseudo-code sequence indication code is the binary digit 00000010 of 8 bits, the pseudo-code sequence of its correspondence is the binary digit 0000000000100000 of 16 bits, then:
Obtain the ID data of will encrypt after the pseudo-code sequence that S1, base band data and pseudo-code generator 101 produces carries out NOR-operation 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 |
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 exports |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
0 |
0 |
As seen from the above table, the ID data after encryption are 1111111111011100, not identical with original ID data, namely encrypt initial data.
The ID data of encryption are sent in pseudo-code sequence indication code processing unit 103, the ID data of encryption are added that pseudo-code sequence indication code 00000010 is as head, be sent to modulator 104 after adding pseudo-code sequence indication code and carry out signal madulation, the Serial No. of output is 000000101111111111011100.
S2, by modulation after signal be sent to LED105, LED105 by modulation after signal 000000101111111111011100 be transmitted into visible light receiver with stroboscopic visible light signal form.
Stroboscopic visible light signal is converted into binary digital signal and is sent to demodulator 202 and carries out demodulation by S3, visible light receiver 201, and the signal after demodulation is sent to pseudo-code sequence indication code processing unit 203 by demodulator 202.
Signal 000000101111111111011100 after demodulation is separated into pseudo-code sequence indication code 00000010 and encrypted ID data 1111111111011100 two parts by S4, pseudo-code sequence indication code processing unit 203, 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 inputs pseudo-code sequence indication code 00000010, the pseudo-code sequence indication code preserved before and current received pseudo-code sequence indication code can contrast by pseudo-code sequence query unit 204, judge that whether it is legal according to the pseudo-code sequence indication code received, pseudo-code sequence indication code is when adopting ascending order rule (transmitting terminal often sends a signal pseudo-code sequence indication code self and adds 1), if current received pseudo-code sequence indication code is greater than the pseudo-code sequence indication code of preservation, then current received signal is legal signal, the pseudo-code sequence received is sent to convolution decoder 205, otherwise, current received signal is illegal signals, prompt cipher mistake.
In addition, when adopting descending rule (transmitting terminal often sends a signal pseudo-code sequence indication code self and subtracts 1), if current received pseudo-code sequence indication code is less than the pseudo-code sequence indication code of preservation, then current received signal is legal signal, the pseudo-code sequence received is sent to convolution decoder 205, otherwise current received signal is illegal signals, forward prompt cipher mistake equally to.
S6, encrypted ID data 1111111111011100 and the pseudo-code sequence 0000000000100000 inquired carry out NOR-operation in convolution decoder 205, and 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 exports |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
1 |
As seen from the above table, the ID data after deciphering are 0000000000000011, send it to ID determining device 206.
The ID data of the deciphering ID data received and setting are compared by S7, ID determining device 206, identical then legal, and legal ID data are sent to equipment control circuit 207, and difference is then illegal, prompt cipher mistake.So far, the signal that ID determining device 206 receives is 0000000000000011, and the ID data of receiving terminal setting are also 0000000000000011, and therefore, this signal received is legal signal, and the coded signal that transmitting terminal sends successfully is decrypted by receiving terminal.
Embodiment 4
If the ID data of transmitting terminal and receiving terminal setting are the binary digit 0000000000010000 of 16 bits, pseudo-code sequence indication code is the binary digit 10000000 of 8 bits, the pseudo-code sequence of its correspondence is the binary digit 0000100000000000 of 16 bits, then:
The pseudo-code sequence that S1, base band data and pseudo-code generator 101 produces obtains the ID data of will encrypt carry out same or computing in convolution coder 102 after, 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 |
Same or computing exports |
1 |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
As seen from the above table, the ID data after encryption are 1111011111101111, not identical with original ID data, namely encrypt initial data.
The ID data of encryption are sent in pseudo-code sequence indication code processing unit 103, the ID data of encryption are added that pseudo-code sequence indication code 10000000 is as head, be sent to modulator 104 after adding pseudo-code sequence indication code and carry out signal madulation, the Serial No. of output is 100000001111011111101111.
S2, by modulation after signal be sent to LED105, LED105 by modulation after signal 100000001111011111101111 be transmitted into visible light receiver with stroboscopic visible light signal form.
Stroboscopic visible light signal is converted into binary digital signal and is sent to demodulator 202 and carries out demodulation by S3, visible light receiver 201, and the signal after demodulation is sent to pseudo-code sequence indication code processing unit 203 by demodulator 202.
Signal 100000001111011111101111 after demodulation is separated into pseudo-code sequence indication code 10000000 and encrypted ID data 1111011111101111 two parts by S4, pseudo-code sequence indication code processing unit 203, 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 inputs pseudo-code sequence indication code 10000000, the pseudo-code sequence indication code preserved before and current received pseudo-code sequence indication code can contrast by pseudo-code sequence query unit 204, judge that whether it is legal according to the pseudo-code sequence indication code received, pseudo-code sequence indication code is when adopting ascending order rule (transmitting terminal often sends a signal pseudo-code sequence indication code self and adds 1), if current received pseudo-code sequence indication code is greater than the pseudo-code sequence indication code of preservation, then current received signal is legal signal, the pseudo-code sequence received is sent to convolution decoder 205, otherwise, current received signal is illegal signals, prompt cipher mistake.
In addition, when adopting descending rule (transmitting terminal often sends a signal pseudo-code sequence indication code self and subtracts 1), if current received pseudo-code sequence indication code is less than the pseudo-code sequence indication code of preservation, then current received signal is legal signal, the pseudo-code sequence received is sent to convolution decoder 205, otherwise current received signal is illegal signals, forward prompt cipher mistake equally to.
S6, encrypted ID data 1111011111101111 and the pseudo-code sequence 0000100000000000 inquired carry out same or computing in convolution decoder 205, and 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 |
Same or computing exports |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
0 |
0 |
As seen from the above table, the ID data after deciphering are 0000000000010000, send it to ID determining device 206.
The ID data of the deciphering ID data received and setting are compared by S7, ID determining device 206, identical then legal, and legal ID data are sent to equipment control circuit 207, and difference is then illegal, prompt cipher mistake.So far, the signal that ID determining device 206 receives is 0000000000010000, and the ID data of receiving terminal setting are also 0000000000010000, and therefore, this signal received is legal signal, and the coded signal that transmitting terminal sends successfully is decrypted by receiving terminal.
In sum, asynchronous encryption visible light communication method and system provided by the invention, technology is simpler and cost-saving compared with synchronous crypto-operation method, transmitting terminal and receiving terminal is not needed to have identical clock, simultaneously, high-speed camera can be avoided to take visible light signal and copy visible light signal causes password to reveal, and substantially increases the security performance of photon Internet of Things, and the present invention can be used in photon lock, photon entrance guard system.
Above-described embodiment in the present invention has only done exemplary description, and those skilled in the art can carry out various amendment to the present invention without departing from the spirit and scope of the present invention after reading present patent application.