CN103684757A - Polarized light based secret key distribution system - Google Patents

Polarized light based secret key distribution system Download PDF

Info

Publication number
CN103684757A
CN103684757A CN201310724578.7A CN201310724578A CN103684757A CN 103684757 A CN103684757 A CN 103684757A CN 201310724578 A CN201310724578 A CN 201310724578A CN 103684757 A CN103684757 A CN 103684757A
Authority
CN
China
Prior art keywords
module
light intensity
key
data
significance bit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201310724578.7A
Other languages
Chinese (zh)
Other versions
CN103684757B (en
Inventor
王萍
王硕
郭迎
王博
金玲攀
赵志胜
施荣华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Star Earth Communication Engineering Research Institute
Original Assignee
Central South University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Central South University filed Critical Central South University
Priority to CN201310724578.7A priority Critical patent/CN103684757B/en
Publication of CN103684757A publication Critical patent/CN103684757A/en
Application granted granted Critical
Publication of CN103684757B publication Critical patent/CN103684757B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a polarized light based secret key distribution system. The polarized light based secret key distribution system comprises a light intensity sensing module, a motor control module serial port communication module, a random number generation module, a significance bit analysis module, an AES (Advanced Encryption Standard) encryption module, an MD5 secret key expansion module and a communication module. A polarized light encryption way which simulates quantum encryption is adopted, so that the polarized light based secret key distribution system reduces experiment difficulty, can realize relatively precise secret key transmission, inherits advantages of the quantum encryption, and can be applied to labs and military security communication.

Description

A kind of key distribution system based on polarised light
Technical field
The invention belongs to encryption technology field, relate to a kind of key distribution system based on polarised light.
Background technology
Encryption is one of important means ensuring information safety.Current the most frequently used encryption technology is to change raw information with complicated mathematical algorithm.Although this method fail safe is higher, there is the possibility being decrypted, not definitely reliable.And quantum cryptography is a kind of distinct encryption method, mainly utilize quantum state to be used as the key of information encryption and deciphering.Anyly think measuring and calculating and the people who decodes key, all can obtain insignificant information because changing quantum state, and information legitimate receiver also can know that key was was once intercepted and captured from the change of quantum state.In theory, with the communication that quantum cryptography is encrypted, can not be ravesdropping, safe coefficient is high.
As far back as 1989, in the raw laboratory of China of IBM, Michael Bennett (Charles Bennett) and colleague's Lee Smolin (JohnA.Smolin) and Bu Lasa (Gilles Brassard) started a kind of beginning of cipher mode.In this experiment, they allow photon in the close box of light for " agate auntie's Sha coffin ", walk 30 centimeters a pet name.The direction of photon vibration (polarization), represents 0 and 1 in a succession of quantum bit.Quantum bit forms key, can be to information encryption or deciphering.Present of great reputation quantum cryptography mode that Here it is.
Single quantum can not wipe theorem completely: quantum coherence does not allow carrier one quantum state of information at random to implement to resemble to be stored in 0 on classical information carrier, 1 classical information is carried out copying and is wiped arbitrarily, quantum state is only to shift, but can not wipe (burying in oblivion).
The product of quantum cryptography has also had development, from 2003, the magical Quantum Science and Technology (MagiQ) of the id Quantique of Geneva, Switzerland and New York city,U.S, all delivered can conveying capacity sub-key commodity, transmitting range surpasses 30 centimeters in Michael Bennett experiment.In addition also have the product of NEC, it has transmitted 150 kilometers far away, sets a record, and will at the beginning of 2005, go on the market.In addition, IBM, Fujitsu and Toshiba etc. are also stepping up research and development.Along with quantum key distribution protocol is theoretical and experimentally obtain immense success, be analogous to classical information safe practice, Quantum Information Security Technology has also obtained develop rapidly.Up to the present, people are obtaining a series of achievement in research aspect quantum cryptography theory and experimental study, mainly comprise: quantum cryptography information is managed the basis of falling, quantum bit is promised to undertake, quantum key management, quantum secret sharing, quantum authentication and secure multiparty quantum computation.
All quantum safety approachs carry out based on Heisenberg uncertainty principle, so be difficult to obtain the information of quantum, unless you disturb him, when two people communicate, earwig will leave marks on quantum, and this is key a bit.This system sends light beam at every turn and in 1 second, launches up to a million light quantum, and the information of carrying can be resumed.When certain node, by hacker, eavesdropped, this node disconnects automatically, and hacker's node also disconnects automatically simultaneously, and communication data transmits the node from other, to guarantee the normal operation of communication.Light quantum transmits the route of key light quantum transmission constantly not to be determined, and the time of advent is very accurate.
The information that quantum communications are transmitted by it is classics or quantum and be divided into two classes, and the former is mainly used in the transmission of quantum key, and latter can be used for the transmission of Quantum Teleportation state and quantum entanglement.The system basic element of character comprises quantum state generator, quantum channel and quantum measurement mechanism etc.Its operation principle is called the quantum entanglement of " mysterious remote activity " exactly by Einstein.After to be that photon is divided open, at a distance of very remote, also interconnect.Using between two users of quantum enciphered method, can produce separately a privately owned random number character string, except sender and addressee, anyone cannot grasp the state of quantum, also cannot copy quantum.Once if attempt in communication to steal the behavior of decoding these passwords, all can change quantum state and leave a trace.And the photon of unusual fluctuation can demonstrate invader's trace as alarm bell.Brilliant hacker, spy are also stymied by this enciphered method again.
Summary of the invention
In order to overcome the deficiencies in the prior art, the invention provides a kind of key distribution system based on polarised light, the cipher mode of the employing polarised light of the quantum cryptography of this system simulation has reduced experiment difficulty, can reach comparatively accurate cipher key delivery, and inherited the advantage of quantum cryptography, can be applied to laboratory, military security communication.Its technical scheme is as follows:
A key distribution system based on polarised light, comprises that light intensity experiences module, motor control module serial communication modular, random number generation module, significance bit analysis module, AES encrypting module, MD5 cipher key expansion module and communication module:
It is BH1759FVI module that described light intensity is experienced module, in its circuit: PD(Photo diode with approximately human eye response) for approaching the photodiode of people's ophthalmic reaction; AMP is that integrated computation amplifies Interface(logic+IC interface) be luminous intensity calculating and I2C bus interface, comprise lower column register: data register, light intensity data are deposited, Measuring Time register, time measurement data are deposited, and initial value is respectively " 0000_0000_0000_0000 " and " 0100_0101 "; OSC is internal oscillator, clock frequency representative value: 320kHz, described clock is internal logic clock, this module has higher resolution, can cross detection intensity variation (1-65535lx) in a big way, and this BH1759FVI module sensors is connected with single-chip microcomputer, by serial ports, obtain the light intensity that light intensity receptor detects, continuous H resolution model 2 times, Measuring Time is 120ms, light intensity resolution 0.5lx;
Described motor control module serial communication modular adopts FL42STH38-0806A type stepping motor, rated voltage 6v, 1.8 ° of step angles, stepping motor rotor is permanent magnet, when electric current flows through stator winding, stator winding produces a Vector Magnetic Field, this magnetic field can rotate an angle by rotor driven, make the pair of magnetic field direction of rotor consistent with the magnetic direction of stator, an angle of Vector Magnetic Field rotation when stator, rotor is also along with this magnetic field turns an angle, electric pulse of every input, motor rotates an angle and takes a step forward, the angular displacement of its output is directly proportional to the umber of pulse of input, rotating speed is directly proportional to pulse frequency, change the order of winding energising, motor will reverse, therefore can pass through Single-chip Controlling pulse number (with pilot angle displacement), thereby reach the object of accurate location, simultaneously can be by control impuls frequency (to control speed and the acceleration of electric machine rotation), thereby reach the object of speed governing, described stepping motor is connected with polarizer, by single-chip microcomputer, produces pulse control step electric machine rotation, can control comparatively accurately polarizer and turn to corresponding base,
Described serial interface module is a kind of to be converted to continuous serial data stream and to send accepting parallel data character from CPU, the serial data stream of acceptance can be converted to the device that parallel data character is supplied with CPU simultaneously; The present invention is based on RS232 serial ports and carry out data communication, serial communication modular operates serial ports accordingly by Employ Windows API Function; As open serial ports, send data, accept data, serial ports initialization setting, close the operations such as serial ports,
Random number generation module produces a randomizer by java.util.Random class in java, and then produces 10 strings that need;
Described significance bit analysis module is by polarised light, to obtain the core operation of key, and key distribution system finally obtains corresponding secret key by significance bit analysis;
Described AES encrypting module is to operate on the byte matrix of 4 * 4, this matrix is called again " state (state) ", its initial value is exactly a clear packets (in matrix, an element size is exactly a Byte in clear packets), Rijndael enciphered method is because supporting larger grouping, its matrix line number optionally increases, during encryption, each takes turns AES encryption cycle, all comprises that byte substitution, row displacement, row are mixed, key adds 4 steps except last is taken turns;
64 seeds that MD5 cipher key expansion module produces by polarised light carry out cipher key spreading by the MD5 algorithm in hash algorithm and expand final 128 keys encrypting as AES;
Described communication module comprises authentication, authentication, the communication of single-chip microcomputer-PC and 4 parts of communicating by letter.
Further preferably, described significance bit analysis module idiographic flow is: first analyze the different conditions of two polarizers, if polaroid A is identical with the selected base of polarizer B, the light intensity of now experiencing by light intensity receptor B is 1/2I 0+ 1/2I or 1/2I, thus can judge the corresponding bit digital that A sends; If polaroid A is different from the selected base of polarizer B, the light intensity of now experiencing by light intensity receptor B is at above-mentioned 1/2I 0between 2 kinds of situations of+1/2I or 1/2I;
Significance bit analysis module passes through light intensity receptor data analysis, retain the identical part of base, cast out the part that base is not identical, and to define the position that base is identical be significance bit, using the corresponding numeral in significance bit as key, complete the work that significance bit is analyzed afterwards.
Further preferably, described MD5 cipher key spreading detailed process is as follows:
(1) cover
First information is filled, 1 and several 0 of filling below in information make its byte length equal 448 to the result of 512 complementations;
(2) complement certificate
With the original length B of the numeral data of 64, two 32 figure places for B? represent, at this moment, it is the multiple of 512 that data are just filled up into length;
(3) initialization MD5 parameter
MD5 is carried out to initialization, in MD5, with four 32 numeric parameters that are known as link variable, be respectively: A=0x01234567, B=0x89abcdef, C=0xfedcba98, D=0x76543210;
(4) four-wheel loop computation
Start to enter the four-wheel loop computation of algorithm, the number of times of circulation is the number of 512 information block in information, four link variables copy in other four variablees above: A is to a, B is to b, C is to c, D is to d, major cycle has four-wheel, the first round is carried out 16 operations, operate a at every turn, b, in c and d wherein three do a nonlinear function computing, then acquired results is added to the 4th variable, again by indefinite number of acquired results displacement to the right, and add a, b, one of in c or d, finally by this result, replace a, b, one of in c or d, below four nonlinear functions using in each operation, often take turns one:
f(x,y,z)=(x&y)|((~x)&z)
g(x,y,z)=(xz)|(y&(~z))
h(x,y,z)=x^y^z
i(x,y,z)=y^(x|(~z))
Wherein: " & " is and computing, and " | " is exclusive disjunction, and "~" is inverse, and " ^ " is XOR, they are all bit arithmetic symbols.
Compared with prior art, beneficial effect of the present invention: (1) is used polarised light as the medium of cipher key delivery, novel unique; (2) be applied to indoor communication scene, facilitate nature, the fail safe of guarantee information; (3) can not add extra interference source, utilize polarised light to be encrypted the communication system of the non-optical communication field of current main flow is not almost disturbed; (4) be different from the electromagnetic wave of other wave band, safety and Health, energy-conserving and environment-protective.
Accompanying drawing explanation
Fig. 1 is BH1750FVI circuit diagram;
Fig. 2 is spectral response;
Fig. 3 is light source dependence;
Fig. 4 is I2C transfer of data sequential chart;
Fig. 5 is L298N pin schematic diagram;
Fig. 6 is serial ports asynchronous communication character frame;
Fig. 7 is byte substitution schematic diagram;
Fig. 8 is row displacement schematic diagram;
Fig. 9 is that row mix schematic diagram;
Figure 10 is that key adds schematic diagram;
Figure 11 is apparatus of the present invention figure.
Embodiment
Below in conjunction with the drawings and specific embodiments, further illustrate technical scheme of the present invention.
The present invention can produce 64 2 system random number seeds.Its principle is:
Polaroid A and B all set 2 groups of bases (4 directions), be respectively straight line base (vertical, level) and diagonal angle base (upper left is to bottom right, and upper right is to lower-left), each polarizer only switches on this four direction, and every group of base both direction respectively correspondence is defined as 0 and 1.
Suppose that Alice and Bob both sides will communicate.First Alice utilizes a randomizer to generate one and is greater than 10 strings that need 2 times of key lengths, and then polaroid A is selected arbitrarily a direction of one group of base every the time of △ T, produces the polarised light that represents corresponding bit digital.The polarizer B accordingly a direction in one group of base of random selection of the time of △ T passes through the polarised light after A.Now, Bob, by analyzing the measured light intensity of light intensity receptor B, produces key.Concrete analysis situation is as follows:
1. polaroid A is identical with the selected base of polarizer B.The light intensity of now experiencing by light intensity receptor B is 1/2I0+1/2I or 1/2I, thereby can judge the corresponding bit digital that A sends.
2. polaroid A is different from the selected base of polarizer B, and the light intensity of now experiencing by light intensity receptor B is between 2 kinds of situations 1..
At this moment Bob by the analysis to light intensity receptor B data, retains the identical part of base, casts out the part that base is not identical, and to define the position that base is identical be significance bit, using the numeral in significance bit as key.Bob knows the numeral that in all significance bits, A sends.Meanwhile, Bob sends to Alice in order by his each base of selecting, and Alice just also can know the correct base of Bob, and both sides now just can obtain same key.64 random numbers that the present invention produces by polarised light, as seed, by seed expansion, produce the random number of 128 by hash algorithm (having applied SHA1 algorithm in native system), the key that this random number is encrypted as follow-up AES.MD5 is MessagedigestAlgorithm5(Message Digest 5) abbreviation, through MD2, MD3 and MD4, develop.It can be transformed into the byte serial of a random length the large integer of one fixed length.
One, hardware components
Hardware components is divided into light intensity and experiences module and motor control module.
Light intensity is experienced module
The present invention has applied BH1759FVI module, and circuit diagram as shown in Figure 1.PD(Photo diode with approximately human eye response wherein) for approaching the photodiode of people's ophthalmic reaction; AMP is that integrated computation amplifies Interface(logic+IC interface) for luminous intensity, calculate and I2C bus interface, comprise lower column register: data register can be PD voltage by PD current conversion; ADC is analog-to-digital conversion, can obtain 16 bit digital data; Logic+ICInterface(logic+IC interface) for luminous intensity is calculated and I2C bus interface, comprise lower column register: data register → light intensity data is deposited, Measuring Time register → time measurement data are deposited, and initial value is respectively " 0000_0000_0000_0000 " and " 0100_0101 "; OSC is internal oscillator (clock frequency representative value: 320kHz).This clock is internal logic clock.This module has higher resolution, can cross detection intensity variation (1-65535lx) in a big way.This transducer is connected with single-chip microcomputer, by serial ports, obtains the light intensity that light intensity receptor detects.Continuous H resolution model 2 times, Measuring Time is 120ms, light intensity resolution 0.5lx.
Fig. 2 is its spectral response, by this spectrum, should be able to find out that it all has response at 400-700nm wavelength mutually, can feed back preferably the light intensity of visible ray.
Fig. 3 is its light source dependency characteristic, can see, this transducer is all higher to the resolving power of most of light source, wherein the highest with the resolving power of incandescence, Krypton light and halogen light.In the present invention, selected the most widely used incandescent light.
Its core code is as follows:
Figure BDA0000445815260000071
In transfer of data, applied I2C bus protocol, this is a kind of twin wire universal serial bus, for connecting microcontroller and ancillary equipment thereof.It is a kind of bus standard that microelectronics Control on Communication field extensively adopts.It is a kind of special shape of synchronous communication, has interface line few, and control mode is simple, and device package form is little, and traffic rate is compared with advantages of higher.Fig. 4 is the transfer of data sequential chart in I2C agreement.
Motor control module
The present invention adopts FL42STH38-0806A type stepping motor (rated voltage 6v, 1.8 ° of step angles).Stepping motor rotor is permanent magnet, and when electric current flows through stator winding, stator winding produces a Vector Magnetic Field.This magnetic field can rotate an angle by rotor driven, makes the pair of magnetic field direction of rotor consistent with the magnetic direction of stator.An angle of Vector Magnetic Field rotation when stator.Rotor is also along with this magnetic field turns an angle.Electric pulse of every input, motor rotates an angle and takes a step forward.The angular displacement of its output is directly proportional to the umber of pulse of input, rotating speed is directly proportional to pulse frequency.The order that changes winding energising, motor will reverse.Therefore can pass through Single-chip Controlling pulse number (with pilot angle displacement), thereby reach the object of accurate location; Simultaneously can be by control impuls frequency (to control speed and the acceleration of electric machine rotation), thus reach the object of speed governing.
In the present invention, stepping motor is connected with polarizer, by single-chip microcomputer, produces pulse control step electric machine rotation, can control comparatively accurately polarizer and turn to corresponding base.
Kernel program is as follows:
The definition of //L298 input control end
unsigned?char?code
F_Rotation[8]={ 0x3a, 0x28,0x39,0x11,0x35,0x24,0x36,0x12}; // forward form half step mode
If // stepping motor is 360 degree that take a round so of 1.8 degree, step mode needs 200 step half step modes to need 400 steps oneself to design according to stepping motor parameter entirely
Figure BDA0000445815260000091
The control of stepping motor has been applied and take the step motor control plate that L298N chip (pin figure is as Fig. 5) is core, and inside comprises 4 channel logic drive circuits.Be the special purpose driver of a kind of two-phase and four phase motors, the high-voltage large current that includes two the H bridges bridge driver of enjoying a double blessing, receives standard TTL logic level signal, can drive 46V, the motor below 2A.Its pin arrangements as shown in Figure 5, can draw separately and be connected current sampling resistor device with 15 pin by 1 pin, forms current sensing signal.
L298 can drive 2 motors, connects respectively 2 motor between OUTl, OUT2 and OUT3, OUT4.5,7,10,12 pin connect input control level, control the rotating of motor, ENA, and ENB connects control Enable Pin, controls the stall of motor.
WiFi communication
WiFi(Wireless Fidelity) claim again 802.11b standard, have that transmission speed is higher, coverage is long a little.Meanwhile, it also with existing various 802.11DSSS hardware compatibilities.
In the present invention, communicating pair communicates by WiFi, carries out the related works such as significance bit transmission, file transfer.
Two, software section
Software section is divided into serial communication modular, random number generation module, significance bit analysis module, AES encrypting module, MD5 cipher key expansion module and communication module.
Serial communication modular
Serial line interface is a kind ofly can be converted to continuous serial data stream and send accepting parallel data character from CPU, the serial data stream of acceptance can be converted to the device that parallel data character is supplied with CPU simultaneously.The present invention is based on RS232 serial ports and carry out data communication.
Serial communication of the present invention operates serial ports accordingly by Employ Windows API Function, as opens serial ports, sends data, accepts data, serial ports initialization setting, closes the operations such as serial ports.
Win32API (comprising: Windows9x as Microsoft32 bit platform, WindowsNT3.1/4.0/5.0, WindowsCE) application programming interface, it is the foundation stone of constructing all 32-bit Windows platforms, and all application programs of moving on windows platform can be called these functions.Use Windows CommAPI under Windows environment, to carry out serial port programming, need not directly operate hardware, and call by language such as VC, VB and Delphi, greatly facilitate the processing to data.In the Windows system of 32, serial communication is as file process, the operations such as opening, close, read, write that operation of serial-port is generally.
In the present invention, intercommunication has adopted asynchronous communication model, and asynchronous communication is when sending character, and the time slot between the character sending can be arbitrarily.Transmitting terminal can start to send character at any time, only need add start bit and position of rest in the beginning of each character and the place of end, to receiving terminal can correctly be got off each receive character.Internal processor is after having completed corresponding operation, by the mechanism of a readjustment, so that the character that notice transmitting terminal sends has obtained reply.Asynchronous communication efficiency of transmission in limited channel is high, and shortcoming is that equipment is complicated, channel utilization lower (because the expense proportion of start bit and position of rest is larger).
Asynchronous communication can be also to using frame as sending unit (as Fig. 6).Receiving terminal must be carried out the preparation of received frame at any time.The stem of frame must be provided with frame and delimit.Frame is delimited and is also comprised the end position of determining frame.This has two kinds of methods.A kind of is that afterbody at frame is provided with the end that certain special bit combination is carried out marker frames; The another kind of field of frame length that is provided with in frame stem.Under this pattern, do not require receiving-transmitting sides clock strict conformance, easily realize, just need to add checking position, efficiency of transmission is not high.
Random number generation module
In java, we produce a randomizer by java.util.Random class, and then produce 10 strings that we need.
Significance bit analysis module
Significance bit analysis is by polarised light, to obtain the core operation of key.System can finally obtain corresponding secret key by significance bit analysis.Be described in detail as follows.
First analyze the different conditions of two polarizers.If polaroid A is identical with the selected base of polarizer B, the light intensity of now experiencing by light intensity receptor B is 1/2I0+1/2I or 1/2I, thereby can judge the corresponding bit digital that A sends; If polaroid A is different from the selected base of polarizer B, the light intensity of now experiencing by light intensity receptor B is between 2 kinds of situations 1..
Significance bit routine analyzer by light intensity receptor data analysis, retains the identical part of base, casts out the part that base is not identical, and to define the position that base is identical be significance bit.Program, using the corresponding numeral in significance bit as key, completes the work that significance bit is analyzed afterwards.
AES encrypts
AES ciphering process is to operate on the byte matrix of 4 * 4, and this matrix is called again " state (state) ", and its initial value is exactly a clear packets (in matrix, an element size is exactly a Byte in clear packets).Ri jndael enciphered method is because supporting larger grouping, and the visual situation of its matrix line number increases.During encryption, each is taken turns AES encryption cycle (except last is taken turns) and all comprises 4 steps:
(1) byte substitution (Sub Bytes)
By a nonlinear replacement function, by the mode of tabling look-up, each byte is replaced to corresponding byte.Each byte in matrix is changed by the S-box of 8.S-box is relevant with the inverse element on GF (28), has good nonlinear characteristic.For fear of the attack of simple algebraic property, S-box combines multiplicative inverse and a reversible affine transformation matrix construction forms.During this external construction S-box, deliberately avoid fixing point and anti-fixing point, with the result of S-box replacement byte, can be equivalent to wrong row's result.
(2) row displacement (Shift Rows)
Each line in matrix is carried out to circulating displacement.In this step, in matrix, each byte of every a line orientation left that circulates is moved.Displacement is along with line number increases progressively and increase progressively.Shift Rows is the step for each line operation of matrix.In this step, each provisional capital is certain side-play amount of cyclic shift left.In AES (128 of packet sizes), the first row remains unchanged, and each byte in the second row is loopy moving one lattice left.In like manner, the third line and fourth line left the side-play amount of cyclic shift be just 2 and 3 respectively.128 identical with the pattern of the cyclic shift that is grouped in this step of 192.After space displacement, in matrix, each perpendicular row, is all that the element in each different lines in input matrix forms.In the version of Ri jndael algorithm, side-play amount and AES have a little difference: for the grouping of 256 of length, the first row still remains unchanged, and the side-play amount of the second row, the third line, fourth line is respectively 1 byte, 3 bytes, 4 bytes.In addition, Shift Rows operating procedure at Ri jndael with identical in AES.
(3) row mix (Mix Columns)
Operation for each craspedodrome in abundant hybrid matrix.In this step, four bytes of every a line are interosculated by linear transformation.Four coefficients that element is used as respectively of every a line, merge and are a multinomial in GF (28), then this multinomial and a fixing multinomial are multiplied each other under mould.This step also can be considered the matrix multiplication under Ri jndael finite field.Row mixed function receives the input of 4 bytes, exports 4 bytes, and the byte of each input can impact four bytes of output.Because mixing two steps, this journey displacement and row provide diffusivity for this cryptographic system.
(4) key adds (Add Round Key)
Each byte in matrix is done XOR computing with round key (round key); Each sub-key is produced by key generation scheme.In each encryption cycle, all can produce one group of round key (producing by Ri jndael key generation scheme) by master key, each round key size is the same with original matrix, and makes XOR (⊕) addition with each corresponding byte in original matrix.
MD5 cipher key spreading
64 seeds that produce by polarised light carry out cipher key spreading by the MD5 algorithm in hash algorithm and expand final 128 keys encrypting as AES.
Detailed process is as follows:
(1) cover
First information is filled, 1 and several 0 of filling below in information make its byte length equal 448 to the result of 512 complementations.
(2) complement certificate
With the original length B of the numeral data of 64, two 32 figure places for B? represent.At this moment, just to be filled up into length be the multiple of 512 to data.
(3) initialization MD5 parameter
MD5 is carried out to initialization, in MD5 with four 32 numeric parameters that are known as link variable, they are respectively: A=0x01234567, B=0x89abcdef, C=0xfedcba98, D=0x76543210.
(4) four-wheel loop computation
Start to enter the four-wheel loop computation of algorithm.The number of times of circulation is the number of 512 information block in information.Four link variables copy in other four variablees above: A is to a, and B is to b, and C is to c, and D is to d.Major cycle has four-wheel, and the first round is carried out 16 operations.Each operation in a, b, c and d wherein three do a nonlinear function computing, then acquired results is added to the 4th variable, then by indefinite number of acquired results displacement to the right, and one of adds in a, b, c or d.Finally by this result, one of replace in a, b, c or d.Below four nonlinear functions using in each operation (every take turns one).
f(x,y,z)=(x&y)|((~x)&z)
g(x,y,z)=(xz)|(y&(~z))
h(x,y,z)=x^y^z
i(x,y,z)=y^(x|(~z))
(wherein: " & " is and computing, and " | " is exclusive disjunction, and "~" is inverse, and " ^ " is XOR, they are all bit arithmetic symbols.)
The explanation of these four functions: if the corresponding position of x, y and z is independent and uniformly, each of result should be also independent and uniformly so.F is the function of a bitwise operation.That is, if x, y so, otherwise z.Function h is odd even operator by turn.Suppose that mj represents j the subgroup (from 0 to 15) of message, ti is the constant in I step, and <<<s represents ring shift left s position, and four kinds are operating as:
Ff (a, b, c, d, mj, s, ti) represents a=b+ ((a+ (f (b, c, d)+mj+ti) <<<s)
Gg (a, b, c, d, mj, s, ti) represents a=b+ ((a+ (g (b, c, d)+mj+ti) <<<s)
Hh (a, b, c, d, mj, s, ti) represents a=b+ ((a+ (h (b, c, d)+mj+ti) <<<s)
Ii (a, b, c, d, mj, s, ti) represents a=b+ ((a+ (i (b, c, d)+mj+ti) <<<s)
This four-wheel (64 step) is:
The first round
FF(a,b,c,d,M0,7,0xd76aa478)
FF(d,a,b,c,M1,12,0xe8c7b756)
FF(c,d,a,b,M2,17,0x242070db)
FF(b,c,d,a,M3,22,0xc1bdceee)
FF(a,b,c,d,M4,7,0xf57c0faf)
FF(d,a,b,c,M5,12,0x4787c62a)
FF(c,d,a,b,M6,17,0xa8304613)
FF(b,c,d,a,M7,22,0xfd469501)
FF(a,b,c,d,M8,7,0x698098d8)
FF(d,a,b,c,M9,12,0x8b44f7af)
FF(c,d,a,b,M10,17,0xffff5bb1)
FF(b,c,d,a,M11,22,0x895cd7be)
FF(a,b,c,d,M12,7,0x6b901122)
FF(d,a,b,c,M13,12,0xfd987193)
FF(c,d,a,b,M14,17,0xa679438e)
FF(b,c,d,a,M15,22,0x49b40821)
Second takes turns
GG(a,b,c,d,M1,5,0xf61e2562)
GG(d,a,b,c,M6,9,0xc040b340)
GG(c,d,a,b,M11,14,0x265e5a51)
GG(b,c,d,a,M0,20,0xe9b6c7aa)
GG(a,b,c,d,M5,5,0xd62f105d)
GG(d,a,b,c,M10,9,0x02441453)
GG(c,d,a,b,M15,14,0xd8a1e681)
GG(b,c,d,a,M4,20,0xe7d3fbc8)
GG(a,b,c,d,M9,5,0x21e1cde6)
GG(d,a,b,c,M14,9,0xc33707d6)
GG(c,d,a,b,M3,14,0xf4d50d87)
GG(b,c,d,a,M8,20,0x455a14ed)
GG(a,b,c,d,M13,5,0xa9e3e905)
GG(d,a,b,c,M2,9,0xfcefa3f8)
GG(c,d,a,b,M7,14,0x676f02d9)
GG(b,c,d,a,M12,20,0x8d2a4c8a)
Third round
HH(a,b,c,d,M5,4,0xfffa3942)
HH(d,a,b,c,M8,11,0x8771f681)
HH(c,d,a,b,M11,16,0x6d9d6122)
HH(b,c,d,a,M14,23,0xfde5380c)
HH(a,b,c,d,M1,4,0xa4beea44)
HH(d,a,b,c,M4,11,0x4bdecfa9)
HH(c,d,a,b,M7,16,0xf6bb4b60)
HH(b,c,d,a,M10,23,0xbebfbc70)
HH(a,b,c,d,M13,4,0x289b7ec6)
HH(d,a,b,c,M0,11,0xeaa127fa)
HH(c,d,a,b,M3,16,0xd4ef3085)
HH(b,c,d,a,M6,23,0x04881d05)
HH(a,b,c,d,M9,4,0xd9d4d039)
HH(d,a,b,c,M12,11,0xe6db99e5)
HH(c,d,a,b,M15,16,0x1fa27cf8)
HH(b,c,d,a,M2,23,0xc4ac5665)
Fourth round
II(a,b,c,d,M0,6,0xf4292244)
II(d,a,b,c,M7,10,0x432aff97)
II(c,d,a,b,M14,15,0xab9423a7)
II(b,c,d,a,M5,21,0xfc93a039)
II(a,b,c,d,M12,6,0x655b59c3)
II(d,a,b,c,M3,10,0x8f0ccc92)
II(c,d,a,b,M10,15,0xffeff47d)
II(b,c,d,a,M1,21,0x85845dd1)
II(a,b,c,d,M8,6,0x6fa87e4f)
II(d,a,b,c,M15,10,0xfe2ce6e0)
II(c,d,a,b,M6,15,0xa3014314)
II(b,c,d,a,M13,21,0x4e0811a1)
II(a,b,c,d,M4,6,0xf7537e82)
II(d,a,b,c,M11,10,0xbd3af235)
II(c,d,a,b,M2,15,0x2ad7d2bb)
II(b,c,d,a,M9,21,0xeb86d391)
Constant ti is illustrated in i step, and ti is the integer part of 42949672963abs (sin (i)), 4,294,967,296 32 powers that equal 2, and the unit of i is radian.After all these complete, A, B, C, D are added respectively to a, b, c, d.Then by next grouped data, continue executing arithmetic, last output is the cascade of A, B, C and D.
Communication software
Communication module is one to be similar to the intercommunication program of qq, and both sides can communicate and file transfer by this program.Software integral body is write by Java language, has used NetBeans to carry out the design at interface, based on AWT kit with take that it completes the design work at relevant interface as basic Swing kit.
This communication software program comprises authentication, authentication, the communication of single-chip microcomputer-PC and several parts of communicating by letter.
Authentication: first need to carry out authentication when using this program.Program and a database association, in database, storing all users' identity such as account number cipher, IP address (each user's IP address is fixing in this local area network (LAN)) so program can reading database in user identity, only have in account number cipher and database and match and can login successfully.After logining successfully, this user continuous heartbeat packet that sends in this local area network (LAN) (all use is per family in this local area network (LAN)) represents that it is online.If do not receive, heartbeat packet represents that this user rolls off the production line.
Authentication: show other online users after authentication, can select wherein user arbitrarily to ask communication, now this subscriber computer will send a request message on Requested Party IP address.If communication is rejected, to requesting party, send unaccepted information, communication can not be carried out; If communication request is allowed to, to requesting party, returns to request and allow signal.
Single-chip microcomputer-PC communication: program sends an initial signal to single-chip microcomputer after communication is allowed to.Single-chip microcomputer is started working, and produces random number and the selected base of polarizer, and the base of its selection is passed to relative users.After this single-chip microcomputer starts control step electric machine rotation to drive polarizer rotation, obtains key seed.
Communication: just can enter communication interface after both sides all obtain seed.Communication interface has comprised communications records (can several nearest intercommunication information of instant playback), has sent frame, has sent button, historical record button.Both sides can communicate in this page, and the content of communication is by passing through AES encipheror, and key is by the key obtaining after MD5 cipher key spreading.Automatically there is the plaintext of the plaintext of transmission, ciphertext, acceptance, ciphertext respectively in a txt text in program, user can watch at any time.
Three, system contrive equipment
System and device framework is as shown in Fig. 3 .14.System is by carrying out analytical calculation to a branch of light intensity by the light after the polarizer of two rotations, produce the key of communicating by letter between Alice machine and Bob machine, by this key, the content of intercommunication is encrypted to rear transmission, thereby has ensured the fail safe of intercommunication.
Figure 11 is contrive equipment framework, and Chip Microcomputer A is connected with Alice computer, polaroid A, and single-chip microcomputer B is connected with Bob computer, polarizer B, and while Alice can carry out Wifi with Bob and communicate by letter.One constant light source is arranged at device top, and can send light intensity constant is the light of I0.Light by rotatable polaroid A and polarizer B after, its intensity can be measured by light intensity receptor B.The light intensity of simultaneously establishing outer light source (such as other lamp and sunlight) is I, can be measured by light intensity receptor A.
The above, be only best mode for carrying out the invention, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses, and the simple change of the technical scheme that can obtain apparently or equivalence are replaced and all fallen within the scope of protection of the present invention.

Claims (3)

1. the key distribution system based on polarised light, is characterized in that, comprises that light intensity experiences module, motor control module serial communication modular, random number generation module, significance bit analysis module, AES encrypting module, MD5 cipher key expansion module and communication module:
It is BH1759FVI module that described light intensity is experienced module, in its circuit: PD is the photodiode that approaches people's ophthalmic reaction; AMP is that integrated computation amplification Interface is that luminous intensity is calculated and I2C bus interface, comprise lower column register: data register, light intensity data are deposited, Measuring Time register, time measurement data are deposited, and initial value is respectively " 0000_0000_0000_0000 " and " 0100_0101 "; OSC is internal oscillator, clock frequency representative value: 320kHz, described clock is internal logic clock, described BH1759FVI module is connected with single-chip microcomputer, by serial ports, obtain the light intensity that light intensity receptor detects, continuous H resolution model 2 times, Measuring Time is 120ms, light intensity resolution 0.5lx;
Described motor control module serial communication modular adopts FL42STH38-0806A type stepping motor, rated voltage 6v, 1.8 ° of step angles, stepping motor rotor is permanent magnet, described stepping motor is connected with polarizer, produces pulse control step motor turn by single-chip microcomputer;
Described serial interface module is a kind of to be converted to continuous serial data stream and to send accepting parallel data character from CPU, the serial data stream of acceptance can be converted to the device that parallel data character is supplied with CPU simultaneously; Serial communication modular operates serial ports accordingly by Employ Windows API Function;
Random number generation module produces a randomizer by java.util.Random class in java, and then produces 10 strings that need;
Described significance bit analysis module is by polarised light, to obtain the core operation of key, and key distribution system finally obtains corresponding secret key by significance bit analysis;
Described AES encrypting module is to operate on the byte matrix of 4 * 4, its initial value is exactly a clear packets, Rijndael enciphered method is because supporting larger grouping, its matrix line number optionally increases, during encryption, each takes turns AES encryption cycle, all comprises that byte substitution, row displacement, row are mixed, key adds 4 steps except last is taken turns;
64 seeds that MD5 cipher key expansion module produces by polarised light carry out cipher key spreading by the MD5 algorithm in hash algorithm and expand final 128 keys encrypting as AES;
Described communication module comprises authentication, authentication, the communication of single-chip microcomputer-PC and 4 parts of communicating by letter.
2. the key distribution system based on polarised light according to claim 1, it is characterized in that, described significance bit analysis module idiographic flow is: the different conditions of first analyzing two polarizers, if polaroid A is identical with the selected base of polarizer B, the light intensity of now experiencing by light intensity receptor B is 1/2I 0+ 1/2I or 1/2I, thus can judge the corresponding bit digital that A sends; If polaroid A is different from the selected base of polarizer B, the light intensity of now experiencing by light intensity receptor B is between 2 kinds of situations of described 1/2I0+1/2I or 1/2I;
Significance bit analysis module passes through light intensity receptor data analysis, retain the identical part of base, cast out the part that base is not identical, and to define the position that base is identical be significance bit, using the corresponding numeral in significance bit as key, complete the work that significance bit is analyzed afterwards.
3. the key distribution system based on polarised light according to claim 1, is characterized in that, described MD5 cipher key spreading detailed process is as follows:
(1) cover
First information is filled, 1 and several 0 of filling below in information make its byte length equal 448 to the result of 512 complementations;
(2) complement certificate
With the original length B of the numeral data of 64, two 32 figure places for B? represent, at this moment, it is the multiple of 512 that data are just filled up into length;
(3) initialization MD5 parameter
MD5 is carried out to initialization, in MD5, with four 32 numeric parameters that are known as link variable, be respectively: A=0x01234567, B=0x89abcdef, C=0xfedcba98, D=0x76543210;
(4) four-wheel loop computation
Start to enter the four-wheel loop computation of algorithm, the number of times of circulation is the number of 512 information block in information, four link variables copy in other four variablees above: A is to a, B is to b, C is to c, D is to d, major cycle has four-wheel, the first round is carried out 16 operations, operate a at every turn, b, in c and d wherein three do a nonlinear function computing, then acquired results is added to the 4th variable, again by indefinite number of acquired results displacement to the right, and add a, b, one of in c or d, finally by this result, replace a, b, one of in c or d, below four nonlinear functions using in each operation, often take turns one:
f(x,y,z)=(x&y)|((~x)&z)
g(x,y,z)=(xz)|(y&(~z))
h(x,y,z)=x^y^z
i(x,y,z)=y^(x|(~z))
Wherein: " & " is and computing, and " | " is exclusive disjunction, and "~" is inverse, and " ^ " is XOR.
CN201310724578.7A 2013-12-25 2013-12-25 Polarized light based secret key distribution system Expired - Fee Related CN103684757B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310724578.7A CN103684757B (en) 2013-12-25 2013-12-25 Polarized light based secret key distribution system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310724578.7A CN103684757B (en) 2013-12-25 2013-12-25 Polarized light based secret key distribution system

Publications (2)

Publication Number Publication Date
CN103684757A true CN103684757A (en) 2014-03-26
CN103684757B CN103684757B (en) 2017-01-11

Family

ID=50321156

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310724578.7A Expired - Fee Related CN103684757B (en) 2013-12-25 2013-12-25 Polarized light based secret key distribution system

Country Status (1)

Country Link
CN (1) CN103684757B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113537982A (en) * 2021-06-15 2021-10-22 郑州科技学院 Safety verification method, device and equipment of financial equipment and storage medium
CN114024623A (en) * 2021-11-03 2022-02-08 中南大学 Wavelength attack method, active defense method and continuous variable quantum communication system using same

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201910874U (en) * 2010-11-02 2011-07-27 成都必翰信息技术有限责任公司 Multi-service video optical transmission equipment with signal encrypting technology
CN102223181A (en) * 2011-06-16 2011-10-19 安徽问天量子科技股份有限公司 Control method of electrical variable optical attenuator and optical attenuation system
US20110280405A1 (en) * 2010-05-17 2011-11-17 Raytheon Bbn Technologies Corp. Systems and methods for stabilization of interferometers for quantum key distribution
CN202915918U (en) * 2012-11-15 2013-05-01 西安中科麦特电子技术设备有限公司 Multiple- polarization-degree image collection control system
CN103404074A (en) * 2011-02-02 2013-11-20 诺基亚公司 Quantum key distribution

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110280405A1 (en) * 2010-05-17 2011-11-17 Raytheon Bbn Technologies Corp. Systems and methods for stabilization of interferometers for quantum key distribution
CN201910874U (en) * 2010-11-02 2011-07-27 成都必翰信息技术有限责任公司 Multi-service video optical transmission equipment with signal encrypting technology
CN103404074A (en) * 2011-02-02 2013-11-20 诺基亚公司 Quantum key distribution
CN102223181A (en) * 2011-06-16 2011-10-19 安徽问天量子科技股份有限公司 Control method of electrical variable optical attenuator and optical attenuation system
CN202915918U (en) * 2012-11-15 2013-05-01 西安中科麦特电子技术设备有限公司 Multiple- polarization-degree image collection control system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
张裔智、赵毅、汤小斌: "MD5算法研究", 《计算机科学》 *
王丽: "量子密钥分发系统的软件研究与实现", 《中国优秀硕士学位论文全文数据库》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113537982A (en) * 2021-06-15 2021-10-22 郑州科技学院 Safety verification method, device and equipment of financial equipment and storage medium
CN114024623A (en) * 2021-11-03 2022-02-08 中南大学 Wavelength attack method, active defense method and continuous variable quantum communication system using same

Also Published As

Publication number Publication date
CN103684757B (en) 2017-01-11

Similar Documents

Publication Publication Date Title
JP7033120B2 (en) Methods and systems for quantum key distribution based on trusted computing
US20220158832A1 (en) Systems and Methods for Deployment, Management and Use of Dynamic Cipher Key Systems
US20170126654A1 (en) Method and system for dynamic password authentication based on quantum states
WO2019166001A1 (en) Token generation and verification method and smart terminal
CN110247765A (en) A kind of quantum secure data link communications system
CN101834840A (en) Efficient key derivation for end-to-end network security with traffic visibility
CN109787761A (en) A kind of equipment certification and key distribution system and method based on physics unclonable function
KR20180119201A (en) Electronic device for authentication system
CN102013975B (en) Secret key management method and system
US11582045B2 (en) Combined digital signature algorithms for security against quantum computers
KR20040033159A (en) Method for cryptographing wireless data and apparatus thereof
CN110289952A (en) A kind of quantal data chain secrecy terminal and secret communication network
CN108429615A (en) A kind of Stunnel communication means and Stunnel communication systems based on quantum key
JP2022537733A (en) Authenticated key agreement
US20030149876A1 (en) Method and system for performing perfectly secure key exchange and authenticated messaging
Yan et al. PCBChain: Lightweight reconfigurable blockchain primitives for secure IoT applications
CN113141247B (en) Homomorphic encryption method, homomorphic encryption device, homomorphic encryption system and readable storage medium
CN110391905A (en) A kind of internet behavior auditing system and method based on quantum key encryption technology
WO2017074953A1 (en) Method and system for dynamic password authentication based on quantum states
CN103684757A (en) Polarized light based secret key distribution system
CN101374085A (en) Method and apparatus for checking round trip time based on challenge response
CN109714362B (en) Lightweight industrial wireless network security data fusion method
JP6055919B2 (en) Key cloud system and decryption method
CN116599719A (en) User login authentication method, device, equipment and storage medium
CN109698743A (en) A kind of block cipher encrypted cipher text data reconstruction method based on message filling loophole

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information

Inventor after: Guo Ying

Inventor after: Luo Peng

Inventor after: Ma Hongling

Inventor after: Wang Shuo

Inventor after: Wang Ping

Inventor after: Wang Yijun

Inventor after: Li Wei

Inventor before: Wang Ping

Inventor before: Wang Shuo

Inventor before: Guo Ying

Inventor before: Wang Bo

Inventor before: Jin Lingpan

Inventor before: Zhao Zhisheng

Inventor before: Shi Ronghua

COR Change of bibliographic data
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20181113

Address after: 201800 No. 1288 Yecheng Road, Jiading Industrial Development Zone, Jiading District, Shanghai

Patentee after: Shanghai star earth Communication Engineering Research Institute

Address before: 410083 932 south foot Road, Yuelu District, Changsha, Hunan

Patentee before: Central South University

TR01 Transfer of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170111

Termination date: 20211225

CF01 Termination of patent right due to non-payment of annual fee