CN109889327A - Shared key generation method and device - Google Patents

Shared key generation method and device Download PDF

Info

Publication number
CN109889327A
CN109889327A CN201711274178.5A CN201711274178A CN109889327A CN 109889327 A CN109889327 A CN 109889327A CN 201711274178 A CN201711274178 A CN 201711274178A CN 109889327 A CN109889327 A CN 109889327A
Authority
CN
China
Prior art keywords
ciphertext
equipment
shared key
initial information
information string
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
CN201711274178.5A
Other languages
Chinese (zh)
Other versions
CN109889327B (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.)
Beijing University of Posts and Telecommunications
Original Assignee
Beijing University of Posts and Telecommunications
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 Beijing University of Posts and Telecommunications filed Critical Beijing University of Posts and Telecommunications
Priority to CN201711274178.5A priority Critical patent/CN109889327B/en
Publication of CN109889327A publication Critical patent/CN109889327A/en
Application granted granted Critical
Publication of CN109889327B publication Critical patent/CN109889327B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Detection And Prevention Of Errors In Transmission (AREA)
  • Storage Device Security (AREA)

Abstract

The present invention provides a kind of shared key generation method and device, the described method includes: receiving the first ciphertext that the first equipment is sent, first ciphertext is that the first equipment is encrypted the first random bit string using the first initial information string and error correcting code encryption algorithm, and the first initial information string is that the first equipment is determined according to the channel characteristics between the first equipment and the second equipment;The first ciphertext is decrypted using the second initial information string and error correcting code decoding algorithm, obtains candidate shared key, the second initial information string is that the second equipment is determined according to the channel characteristics between the second equipment and the first equipment;According to the first random bit string and candidate shared key, target shared key is determined.Shared key generation method provided by the invention and device avoid plenty of time and the resource of the consuming of information harmonic process, eliminate the cost of information reconciliation, improve the formation efficiency of shared key compared with prior art.

Description

Shared key generation method and device
Technical field
The present invention relates to safety of physical layer technical field more particularly to a kind of shared key generation method and devices.
Background technique
With the technologies such as mobile sensor network, car networking, time delay tolerant network, personal area network and wearable computing with The rapid rising of application, large number of equipment needs carry out point-to-point data communication in moving process.Point-to-point data communication Need to consider the safety of communication, non-secure communication channel is easy to be utilized and attacked by opponent, causes to seriously affect.Realize safety The conventional means of communication is to carry out encryption and decryption using information of the shared key to communicating pair interaction.Shared key can be by preset The modes such as same key, Key Exchange Protocol or public key certificate realize, but these modes are difficult to meet in dynamic, resource-constrained The requirement of key is quickly established in mobile network.Shared key generation method based on radio signal characteristics does not need offered Or shared key, but generated in wireless communication procedure according to the signal characteristic variation monitored by receiving-transmitting sides, Therefore, be it is a kind of generation wireless device between shared key effective means.
Currently, the shared key generation method based on radio signal characteristics, it is typically based on the space heterogeneite of signal and right Title property, the shared key of instant messaging between Lai Jianli mobile device.Specifically, communicating pair measures the default spy of channel respectively Sign, and measured value is subjected to quantization and code conversion as a string of initial keys, it is then corrected again by information harmonic process logical Believe the difference between the initial key of both sides, so that communicating pair obtains consensus shared key, and uses shared key It is communicated.
However, above-mentioned shared key generation method is consensus in order to obtain communicating pair under mobile context Shared key, needs to take a substantial amount of time in information harmonic process and resource, the formation efficiency of shared key be not high.
Summary of the invention
The present invention provides a kind of shared key generation method and device, generates for the communicating pair in mobile radio network Shared key solves the problems, such as that shared key formation efficiency is not high in the prior art.
In a first aspect, shared key generation method provided by the invention, comprising:
The first ciphertext of the first equipment transmission is received, first ciphertext is that first equipment uses the first initial information What the first random bit string was encrypted in string and error correcting code encryption algorithm, the first initial information string is described First equipment is determined according to the channel characteristics between first equipment and the second equipment;
First ciphertext is decrypted using the second initial information string and error correcting code decoding algorithm, obtains candidate Shared key, the second initial information string are second equipment according between second equipment and first equipment What channel characteristics determined;
According to the first random bit string and the candidate shared key, target shared key is determined.
Optionally, first ciphertext be first equipment use the error correcting code encryption algorithm, to described first with Machine Bit String is encoded, and obtains coding result, and carry out exclusive or using the coding result and the first initial information string It obtains;
Correspondingly, described be decrypted place to first ciphertext using the second initial information string and error correcting code decoding algorithm Reason, obtains candidate shared key, comprising:
Exclusive or calculating is carried out using the second initial information string and first ciphertext, obtains the first exclusive or result;Using entangling Error code decoding algorithm is decoded the first exclusive or result, obtains the candidate shared key.
Optionally, described according to the first random bit string and the candidate shared key, determine target shared key, Include:
If the first random bit string is different with the candidate shared key, the second initial information string is corrected simultaneously The second ciphertext is obtained, so that the difference of second ciphertext and first ciphertext is minimum, wherein second ciphertext is to use The candidate shared key is encrypted in the revised second initial information string and the error correcting code encryption algorithm It obtains;
Second ciphertext is sent to first equipment, so that first equipment corrects institute according to second ciphertext It states the first initial information string and obtains third ciphertext;
The third ciphertext that first equipment is sent is received, and uses the second initial information string and error correcting code solution The third ciphertext is decrypted in code algorithm, obtains the target shared key.
Optionally, described according to the first random bit string and the candidate shared key, determine target shared key, If further include: the first random bit string is identical with the candidate shared key, it is determined that candidate's shared key is institute State target shared key.
Optionally, the amendment the second initial information string and the second ciphertext of acquisition, comprising:
Using the second initial information string and the error correcting code encryption algorithm, the candidate shared key is encrypted Processing, obtains the 4th ciphertext;
The difference for obtaining first ciphertext and the 4th ciphertext, obtains the first difference value;
The each bit for successively overturning the second initial information string obtains overturning result;
Using the overturning result and the error correcting code encryption algorithm, the candidate shared key is encrypted, Obtain encrypted result;
The difference for obtaining first ciphertext and the encrypted result, obtains the second difference value;
If second difference value is greater than or equal to first difference value, restores this in the overturning result and overturn Bit, first difference value is otherwise updated according to second difference value;
The each bit for executing and successively overturning the second initial information string is returned to, until the second initial information string All bits overturn, the second initial information string is updated according to the overturning result, also, by the encrypted result As second ciphertext.
Optionally, the difference for obtaining first ciphertext and the encrypted result, after obtaining the second difference value, also If including: second difference value is zero, the second initial information string is updated according to the overturning result, and will be described Encrypted result is as second ciphertext.
Optionally, the difference for obtaining first ciphertext and the 4th ciphertext, obtains the first difference value, comprising: First ciphertext and the 4th ciphertext are subjected to XOR operation, obtain the second exclusive or result;By the second exclusive or result Each bit be added, obtain first difference value.
Optionally, the first initial information string is first equipment according between first equipment and the second equipment Channel characteristics, by filtering quantization and block interleaved determine, the second initial information string be second equipment according to Channel characteristics between first equipment and second equipment are determined by filtering quantization and block interleaved.
Second aspect, shared key generating means provided by the invention, including receiving module, deciphering module and determining mould Block;
The receiving module, for receiving the first ciphertext of the first equipment transmission, first ciphertext sets for described first It is standby using the first initial information string and error correcting code encryption algorithm the first random bit string to be encrypted, described the One initial information string is that first equipment is determined according to the channel characteristics between first equipment and the second equipment;
The deciphering module, for being carried out using the second initial information string and error correcting code decoding algorithm to first ciphertext Decryption processing, obtains candidate shared key, the second initial information string be second equipment according to second equipment with What the channel characteristics between first equipment determined;
The determining module, for determining that target is total according to the first random bit string and the candidate shared key Enjoy key.
Optionally, first ciphertext be first equipment use the error correcting code encryption algorithm, to described first with Machine Bit String is encoded, and obtains coding result, and carry out exclusive or using the coding result and the first initial information string It obtains;
Correspondingly, the deciphering module, is specifically used for carrying out exclusive or using the second initial information string and first ciphertext It calculates, obtains the first exclusive or result;The first exclusive or result is decoded using error correcting code decoding algorithm, obtains the time Select shared key.
Optionally, the determining module includes amending unit, transmission unit and receiving unit;
The amending unit corrects institute if different with the candidate shared key for the first random bit string It states the second initial information string and obtains the second ciphertext, so that the difference of second ciphertext and first ciphertext is minimum, wherein Second ciphertext is to use the revised second initial information string and the error correcting code encryption algorithm, to described candidate total Enjoy what key was encrypted;
The transmission unit, for sending second ciphertext to first equipment so that first equipment according to Second ciphertext corrects the first initial information string and obtains third ciphertext;
The receiving unit, the third ciphertext sent for receiving first equipment, and using at the beginning of described second The third ciphertext is decrypted in beginning bit string and error correcting code decoding algorithm, obtains the target shared key.
Optionally, if the determining module is specifically used for the first random bit string and the candidate shared key phase Together, it is determined that candidate's shared key is the target shared key.
Optionally, the amending unit is specifically used for:
Using the second initial information string and the error correcting code encryption algorithm, the candidate shared key is encrypted Processing, obtains the 4th ciphertext;
The difference for obtaining first ciphertext and the 4th ciphertext, obtains the first difference value;
The each bit for successively overturning the second initial information string obtains overturning result;
Using the overturning result and the error correcting code encryption algorithm, the candidate shared key is encrypted, Obtain encrypted result;
The difference for obtaining first ciphertext and the encrypted result, obtains the second difference value;
If second difference value is greater than or equal to first difference value, restores this in the overturning result and overturn Bit, first difference value is otherwise updated according to second difference value;
The each bit for executing and successively overturning the second initial information string is returned to, until the second initial information string All bits overturn, the second initial information string is updated according to the overturning result, also, by the encrypted result As second ciphertext.
Optionally, the amending unit is also used to, if second difference value is zero, is updated according to the overturning result The second initial information string, and using the encrypted result as second ciphertext.
Optionally, the amending unit is specifically used for first ciphertext and the 4th ciphertext carrying out XOR operation, Obtain the second exclusive or result;Each bit of the second exclusive or result is added, first difference value is obtained.
Optionally, the first initial information string is first equipment according between first equipment and the second equipment Channel characteristics, obtained by filtering quantization and block interleaved, the second initial information string be second equipment according to Channel characteristics between first equipment and second equipment are obtained by filtering quantization and block interleaved.
Shared key generation method provided by the invention and device, the first equipment use the first initial information string and error correcting code Encryption algorithm is encrypted the first random bit string to obtain the first ciphertext, after the second equipment receives the first ciphertext, uses First ciphertext is decrypted in second initial information string and error correcting code decoding algorithm, obtains candidate shared key, root According to the first random bit string and the candidate shared key, target shared key is determined.The present invention is by introducing error correcting code Mechanism will be at the beginning of the first initial information string and second that determined according to channel characteristics using the first random bit string as shared key The carrier that beginning bit string is transmitted as shared key, unmatched bit in the first initial information string and the second initial information string Regard the interchannel noise that shared key introduces in transmission as, and corrects unmatched bit automatically using error correcting code, from And shared key is delivered successfully, compared with prior art, avoid information harmonic process consuming plenty of time and Resource eliminates the cost of information reconciliation, improves the formation efficiency of shared key.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention without any creative labor, may be used also for those of ordinary skill in the art To obtain other drawings based on these drawings.
Fig. 1 is the application scenarios schematic diagram of shared key generation method and device provided by the invention;
Fig. 2 is the interactive process schematic diagram of shared key generation method embodiment one provided by the invention;
Fig. 3 is the flow chart of shared key generation method embodiment one provided by the invention;
Fig. 4 is the interactive process schematic diagram of shared key generation method embodiment two provided by the invention;
Fig. 5 is the flow chart of shared key generation method embodiment two provided by the invention;
Fig. 6 is the flow chart for correcting a kind of optional way of the second initial information string;
Fig. 7 is the structural schematic diagram of shared key generating means embodiment one provided by the invention;
Fig. 8 is the structural schematic diagram of shared key generating means embodiment two provided by the invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
Description and claims of this specification and term " first ", " second ", " third " " in above-mentioned attached drawing The (if present)s such as four " are to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should manage The data that solution uses in this way are interchangeable under appropriate circumstances, so that the embodiment of the present invention described herein for example can be to remove Sequence other than those of illustrating or describe herein is implemented.In addition, term " includes " and " having " and theirs is any Deformation, it is intended that cover it is non-exclusive include, for example, containing the process, method of a series of steps or units, system, production Product or equipment those of are not necessarily limited to be clearly listed step or unit, but may include be not clearly listed or for this A little process, methods, the other step or units of product or equipment inherently.
In the prior art, the shared key generation method based on radio signal characteristics usually utilizes the space inequality of signal Property and symmetry, the shared key of instant messaging between Lai Jianli mobile device.Specifically, communicating pair measures channel respectively Default feature, and measured value is subjected to quantization and code conversion as a string of initial keys, then pass through information harmonic process again The difference between the initial key of communicating pair is corrected, so that communicating pair obtains consensus shared key, using shared Key is communicated.However, under mobile context, above-mentioned shared key generation method, in order to negotiate communicating pair Consistent shared key, needs to take a substantial amount of time in information harmonic process and resource, and the formation efficiency of shared key is not It is high.
Shared key generation method provided by the invention, by introduce error correcting code mechanism, using the first random bit string as Shared key transmits the first initial information string and the second initial information string that determine according to channel characteristics as shared key Carrier regards as shared key in transmission unmatched bit in the first initial information string and the second initial information string The interchannel noise of introducing, and correct unmatched bit automatically using error correcting code, so that shared key can be delivered successfully, Compared with prior art, plenty of time and the resource for avoiding the consuming of information harmonic process, eliminate the cost of information reconciliation, mention The high formation efficiency of shared key.
Technical solution of the present invention is described in detail with specifically embodiment below.These specific implementations below Example can be combined with each other, and the same or similar concept or process may be repeated no more in some embodiments.
Fig. 1 show the application scenarios schematic diagram of shared key generation method and device provided by the invention, such as Fig. 1 institute Show, includes the first equipment and the second equipment in communication network.In order to guarantee the safety of communication, the first equipment and the second equipment phase Need to carry out the negotiations process of shared key after chance, which can be by executing shared key generation method of the invention come real It is existing.After shared key is negotiated successfully, the communication between the first equipment and the second equipment is encrypted by the shared key, from And guarantee the safety of communication.
Firstly the need of explanation, the executing subject of shared key generation method provided by the invention can be first and set It is standby, it is also possible to the second equipment, for convenience, in the following examples, is carried out using the second equipment as executing subject Description.
Fig. 2 is the interactive process schematic diagram of shared key generation method embodiment one provided by the invention, and Fig. 3 is the present invention The flow chart of the shared key generation method embodiment one of offer, as depicted in figs. 1 and 2, the shared key of the present embodiment generate Method includes:
S101: receiving the first ciphertext that the first equipment is sent, and first ciphertext is first equipment using at the beginning of first What the first random bit string was encrypted in beginning bit string and error correcting code encryption algorithm, the first initial information string It is determined for first equipment according to the channel characteristics between first equipment and the second equipment.
Specifically, the first equipment carries out the first random bit string using the first initial information string and error correcting code encryption algorithm Encryption obtains the first ciphertext, and the first ciphertext is sent to the second equipment.Wherein, ciphering process can use multiple encryption algorithms, One of possible encryption method is, using the error correcting code encryption algorithm, to encode to the first random bit string, Coding result is obtained, and exclusive or is carried out using the coding result and the first initial information string, obtains the first ciphertext.
It should be noted that the first random bit string is the Bit String that the first equipment generates at random, by described first The shared key that random bit string is communicated as the first equipment and the second equipment, can make the safety of communication higher.It is described The error correcting code encryption algorithm present invention is simultaneously not especially limited, the encryption algorithm with error correction, such as Viterbi coding Algorithm.
In addition, being all made of above-mentioned encryption method, hereinafter no longer when being related to ciphering process in subsequent embodiment of the present invention It repeats.
S102: first ciphertext is decrypted using the second initial information string and error correcting code decoding algorithm, is obtained To candidate shared key, the second initial information string is second equipment according to second equipment and first equipment Between channel characteristics determine.
Specifically, needing after the second equipment receives the first ciphertext using decryption side corresponding with the first equipment encryption method The first ciphertext is decrypted in method.It should be understood that the second equipment has obtained before the second equipment receives the first ciphertext The length letter of first initial information string used in the encryption method used to the first equipment and the first equipment ciphering process Information, the mode present invention specifically obtained such as breath, error correcting code encryption algorithm and the first random bit string are not especially limited.
Decrypting process corresponding with above-mentioned first equipment ciphering process is, close using the second initial information string and described first Text carries out exclusive or calculating, obtains the first exclusive or as a result, being decoded using error correcting code decoding algorithm to the first exclusive or result, Obtain the candidate shared key.In addition, being all made of above-mentioned when being related to decrypting process in subsequent embodiment provided by the invention Decryption method, repeat no more hereinafter.
It should be noted that error correcting code decoding algorithm has error correcting capability, candidate's shared key in decrypting process For the candidate shared key obtained after error correction.
It should be understood that error correcting code decoding algorithm is and error correcting code encryption algorithm pair used in the first equipment ciphering process The decoding algorithm answered.
Optionally, the first initial information string is first equipment according between first equipment and the second equipment Channel characteristics, obtained by filtering quantization and block interleaved, the second initial information string be second equipment according to Channel characteristics between second equipment and first equipment are obtained by filtering quantization and block interleaved.
S103: according to the first random bit string and the candidate shared key, target shared key is determined.
Specifically, the second equipment has got the first random bit string determined by the first equipment, also, by One ciphertext is decrypted, and obtains candidate shared key.According to the first random bit string and the candidate shared key, determine Target shared key, comprising:
If the first random bit string is identical with the candidate shared key, it is determined that candidate's shared key is institute State target shared key.It should be understood that under desired communication environment, communicating pair determines first initial according to channel characteristics Bit string and the second initial information string are same or similar, that is to say, that the second equipment is decrypted according to the first ciphertext Candidate shared key should be with the first random bit string it is identical, even if different, by the error correction procedure of error correcting code, can make It is identical as the first random bit string to obtain candidate shared key.Therefore, under desired communication environment, it is only necessary to negotiate by a wheel, Shared key can be successfully delivered to the second equipment by the first equipment, to complete the negotiations process of shared key.
If the first random bit string is different with the candidate shared key, i.e., the candidate shared key after error correction It is different from the first random bit string, then illustrate that the difference between the second initial information string and the first initial information string is excessive, Need to reduce the difference between the second initial information string and the first initial information string in the way of adaptive correction, so that amendment The difference between initial information string afterwards is sufficiently small, can be used in negotiating about cipher key shared.The process of adaptive correction is referring to this hair The shared key generation method embodiment two of bright offer.
Shared key generation method provided by the invention, the first equipment are calculated using the first initial information string and error correcting code coding Method is encrypted the first random bit string to obtain the first ciphertext, after the second equipment receives the first ciphertext, using at the beginning of second First ciphertext is decrypted in beginning bit string and error correcting code decoding algorithm, candidate shared key is obtained, according to described First random bit string and the candidate shared key, determine target shared key.The present invention, will by introducing error correcting code mechanism First random bit string is as shared key, the first initial information string and the second initial information string that will be determined according to channel characteristics As the carrier of shared key transmission, unmatched bit in the first initial information string and the second initial information string is regarded as altogether The interchannel noise that key introduces in transmission is enjoyed, and corrects unmatched bit automatically using error correcting code, so that altogether Enjoying key can be delivered successfully, and compared with prior art, avoid plenty of time and the resource of the consuming of information harmonic process, eliminate The cost that information reconciles, improves the formation efficiency of shared key.
Fig. 4 is the interactive process schematic diagram of shared key generation method embodiment two provided by the invention, and Fig. 5 is the present invention The flow chart of the shared key generation method embodiment two of offer, as shown in Figure 4 and Figure 5, shared key provided in this embodiment Generation method on the basis of Fig. 2 and embodiment shown in Fig. 3 one, if the first random bit string and the candidate share it is close Key is different, then carries out adaptive correction to the second initial information string, to reduce the second initial information string and the first initial information string Between difference.As shown in Figure 4 and Figure 5, shared key generation method provided in this embodiment includes:
S201: receiving the first ciphertext that the first equipment is sent, and first ciphertext is first equipment using at the beginning of first What the first random bit string was encrypted in beginning bit string and error correcting code encryption algorithm, the first initial information string It is determined for first equipment according to the channel characteristics between first equipment and the second equipment.
Specifically, the realization process with S101 is identical, details are not described herein again.
S202: first ciphertext is decrypted using the second initial information string and error correcting code decoding algorithm, is obtained To candidate shared key, the second initial information string is second equipment according to second equipment and first equipment Between channel characteristics determine.
Specifically, the realization process with S102 is identical, details are not described herein again.If the first random bit string and the time It selects shared key different, then continues to execute S203.
S203: amendment the second initial information string simultaneously obtains the second ciphertext, so that second ciphertext and described first The difference of ciphertext is minimum, wherein second ciphertext is to use the revised second initial information string and the error correcting code The candidate shared key is encrypted in encryption algorithm.
Specifically, recognizing when if the second equipment judges the first random bit string and the candidate shared key difference For unmatched bit in the second initial information string and the first initial information string can not be corrected automatically using error correction code algorithms.Cause This is modified the second initial information string by the way of adaptive correction, so that according to revised described second Initial information string and the error correcting code encryption algorithm, the second ciphertext that the candidate shared key is encrypted with The difference of first ciphertext is minimum, that is to say, that so that the revised second initial information string is initial with described first Difference between bit string is minimum.
It should be noted that two of them is exemplified below there are many modes of amendment the second initial information string Optional embodiment.
Fig. 6 is the flow chart for correcting a kind of optional way of the second initial information string, as shown in Figure 6, comprising:
S2031: using the second initial information string and the error correcting code encryption algorithm, to the candidate shared key into Row encryption obtains the 4th ciphertext.
S2032: the difference of first ciphertext and the 4th ciphertext is obtained, the first difference value is obtained.
Specifically, the difference of first ciphertext and the 4th ciphertext is obtained, including but not limited to such as under type: by institute It states the first ciphertext and the 4th ciphertext carries out XOR operation, obtain the second exclusive or as a result, by the every of the second exclusive or result A bit is added, and obtains first difference value.It illustrates, it is assumed that the first ciphertext C=1010101010, the 4th ciphertext C ' =0101001110, then the first ciphertext and the 4th ciphertext are carried out the second exclusive or result that exclusive or obtains is D=1111100100, Each bit in second exclusive or result is added, the first obtained difference value is 6.It should be understood that if described first is poor Different value is zero, then illustrates that the first ciphertext is identical with the 4th ciphertext, and first difference value is bigger, illustrates the first ciphertext and the 4th close Difference between text is bigger.
It should be noted that the present invention hereinafter involved in acquisition two ciphertexts difference when, be all made of aforesaid way progress It obtains, repeats no more hereinafter.
S2033: successively overturning each bit of the second initial information string, obtains overturning result.
Specifically, in a certain order, overturning a bit in the second initial information string every time, obtaining one A overturning judges whether this overturning result is effective, if effectively, continuing to overturn next ratio as a result, execution S2034-S2037 Special position, if in vain, restoring the bit of this overturning, being then further continued for overturning next bit, until all bits Position has been overturn.
S2034: using the overturning result and the error correcting code encryption algorithm, encrypts to the candidate shared key Processing, obtains encrypted result.
S2035: the difference of first ciphertext and the encrypted result is obtained, the second difference value is obtained.
S2036: if second difference value is zero, updating the second initial information string according to the overturning result, Also, using the encrypted result as second ciphertext.
It should be noted that if second difference value is zero, then illustrate that the first ciphertext is corresponding with this overturning result Encrypted result is identical, it is no longer necessary to continue to correct, therefore, update the described second initial letter according to the overturning result Breath string, also, using the encrypted result as second ciphertext, terminate makeover process.
S2037: if second difference value is greater than or equal to first difference value, this in the overturning result is restored Otherwise the bit of secondary overturning updates first difference value according to second difference value.
Specifically, illustrating that this overturning is invalid if second difference value is more than or equal to first difference value, that is, passing through After crossing this overturning, does not make the difference overturn between result and the first initial information string become smaller, therefore, this is turned over The bit reduction turned;Otherwise, illustrate this overturning effectively, i.e., after this overturning, overturning result is initial with described first Difference between bit string becomes smaller, and therefore, first difference value is updated according to second difference value, to carry out next time Whether overturning effectively judges.
S2038: returning to execute and successively overturn each bit of the second initial information string, until described second initial All bits of bit string have been overturn, and update the second initial information string according to the overturning result, also, described will add Close result is as second ciphertext.
The optional mode of another kind for correcting the second initial information string is as follows:
As previously mentioned, the difference between two ciphertexts can be obtained by way of exclusive or, as shown in formula (1), wherein DciphersFor the difference of the first ciphertext C and the 4th ciphertext C', M is the corresponding first random bit string of the first ciphertext C, and f (M) is to adopt Coding result after being encoded with error correcting code encryption algorithm to the first random bit string M, Intrlv (PA) it is C pairs of the first ciphertext The the first initial information string answered, M' are the corresponding candidate shared key of the 4th ciphertext, and f (M') is using error correcting code encryption algorithm pair Candidate shared key M' encoded after coding result, Intrlv (PB) it is corresponding second initial information of the 4th ciphertext C' String, DcodesFor the difference after the first random bit string M and candidate shared key M' coding, Intrlv (NAB) it is first initial Bit string Intrlv (PA) and the second initial information string Intrlv (PB) between difference.
According to formula (1) it is found that difference between two ciphertexts by the first initial information string and the second initial information string it Between difference and the first random bit string and candidate shared key encoded by error correcting code encryption algorithm after difference It causes.Therefore, a series of suspicious mismatch bit set of height can be obtained according to the difference between two ciphertexts, according to this It mismatches bit set to be modified the second initial information string, so that according to the revised second initial information string With the error correcting code encryption algorithm, the second ciphertext and described first be encrypted to the candidate shared key is close The difference of text is minimum.
It is not appeared in suspicious set it is of course possible to have some difference bits, because when the first initial information Difference and the first random bit string and the encoding variability of candidate shared key between string and the second initial information string just occur In same position, mistake can be cancelled.But the probability that this exception occurs is smaller, will not influence shared key association of the invention Quotient's process, therefore error correcting code itself has certain error correcting capability.
By using any one of the mode of the second initial information string of above two amendment, after can be achieved according to amendment The second initial information string and the error correcting code encryption algorithm, second that the candidate shared key is encrypted The difference of ciphertext and first ciphertext is minimum.It should be noted that after epicycle is corrected, it is possible to so that the second ciphertext with First ciphertext is identical, that is to say, that successfully that shared key is consensus;It is of course also possible to the second ciphertext and first Ciphertext is still different, that is to say, that there is also differences with the first initial information string for the revised second initial information string It is different, then follow the steps S204.
S204: Xiang Suoshu first equipment sends second ciphertext, so that first equipment is according to second ciphertext It corrects the first initial information string and obtains third ciphertext.
Specifically, after the first equipment receives the second ciphertext, using above-mentioned identical adaptive correction method to described One initial information string is modified, so that the difference between the first initial information string and the second initial information string is reduced, so as to energy It is enough in negotiating about cipher key shared.
It should be noted that the process of above-mentioned adaptive correction is possible to excessively be taken turns, in interactive process shown in Fig. 4 with It is illustrated for two-wheeled.
S205: the third ciphertext that first equipment is sent is received, and using the second initial information string and is entangled The third ciphertext is decrypted in error code decoding algorithm, obtains the target shared key.
Specifically, after carrying out the amendments of several wheels by the first equipment and the second equipment, so that the first initial information string And the second difference between initial information string is sufficiently small, at this point, after the second equipment receives third ciphertext, using at the beginning of described second The third ciphertext is decrypted in beginning bit string and error correcting code encryption algorithm, obtains the target shared key, also It is to say, shared key is successfully delivered to the second equipment.
It, will be according to channel using the first random bit string as shared key by introducing error correcting code mechanism in the present embodiment The carrier that the first initial information string and the second initial information string that feature determines are transmitted as shared key, the first initial information Unmatched bit regards the interchannel noise that shared key introduces in transmission, and benefit as in string and the second initial information string It corrects unmatched bit automatically with error correcting code, so that shared key can be delivered successfully, compared with prior art, avoids The plenty of time and resource that information harmonic process expends, the cost of information reconciliation is eliminated, improves the generation of shared key Efficiency.The case where exceeding error correcting code error correcting capability for unmatched bit, first is reduced by the way of adaptive correction Otherness between initial information string and the second initial information string, so that the difference between revised initial information string is enough It is small, it can be used in negotiating about cipher key shared, further improve the formation efficiency of shared key.
Fig. 7 is the structural schematic diagram of shared key generating means embodiment one provided by the invention, as shown in fig. 7, this reality The shared key generating means 300 for applying example offer include receiving module 301, deciphering module 302 and determining module 303.
Wherein, receiving module 301 is used to receive the first ciphertext of the first equipment transmission, and first ciphertext is described first Equipment is encrypted the first random bit string using the first initial information string and error correcting code encryption algorithm, described First initial information string is that first equipment is determined according to the channel characteristics between first equipment and the second equipment.
Deciphering module 302 is used to solve first ciphertext using the second initial information string and error correcting code decoding algorithm Close processing, obtains candidate shared key, and the second initial information string is second equipment according to second equipment and institute State what the channel characteristics between the first equipment determined.
Determining module 303 is used to determine that target is shared according to the first random bit string and the candidate shared key Key.
Shared key generating means 300 provided in this embodiment, can be used for executing embodiment of the method shown in Fig. 2 and Fig. 3 Technical solution, it is similar that the realization principle and technical effect are similar, and details are not described herein again.
Fig. 8 is the structural schematic diagram of shared key generating means embodiment two provided by the invention, as shown in figure 8, this reality Apply example offer shared key generating means 400 on the basis of the embodiment shown in fig. 7, determining module 303 include amending unit 3031, transmission unit 3032 and receiving unit 3033.
Wherein, amending unit 3031 is for correcting the second initial information string and obtaining the second ciphertext, so that described the The difference of two ciphertexts and first ciphertext is minimum, wherein second ciphertext is using the revised described second initial letter The candidate shared key is encrypted in breath string and the error correcting code encryption algorithm.
Amending unit 3031 is specifically used for using the second initial information string and the error correcting code encryption algorithm, to described Candidate shared key is encrypted, and obtains the 4th ciphertext;The difference for obtaining first ciphertext and the 4th ciphertext, obtains To the first difference value;The each bit for successively overturning the second initial information string obtains overturning result;Using the overturning As a result with the error correcting code encryption algorithm, the candidate shared key is encrypted, encrypted result is obtained;Described in acquisition The difference of first ciphertext and the encrypted result obtains the second difference value;If second difference value is zero, turned over according to Turn result and update the second initial information string, and using the encrypted result as second ciphertext;If described second is poor Different value is greater than or equal to first difference value, then the bit of this overturning in the overturning result is restored, otherwise according to institute It states the second difference value and updates first difference value;Return to each bit for executing and successively overturning the second initial information string Position, until all bits of the second initial information string have been overturn, it is initial to update described second according to the overturning result Bit string, also, using the encrypted result as second ciphertext.
Transmission unit 3032 is used to send second ciphertext to first equipment, so that first equipment is according to institute The second ciphertext is stated to correct the first initial information string and obtain third ciphertext.
Receiving unit 3033 is used to receive the third ciphertext that first equipment is sent, and initial using described second The third ciphertext is decrypted in bit string and error correcting code decoding algorithm, obtains the target shared key.
Shared key generating means provided in this embodiment, can be used for executing the technology of fig. 4 to fig. 6 either method embodiment Scheme, it is similar that the realization principle and technical effect are similar, and details are not described herein again.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above-mentioned each method embodiment can lead to The relevant hardware of program instruction is crossed to complete.Program above-mentioned can be stored in a computer readable storage medium.The journey When being executed, execution includes the steps that above-mentioned each method embodiment to sequence;And storage medium above-mentioned include: ROM, RAM, magnetic disk or The various media that can store program code such as person's CD.
Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent Pipe present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: its according to So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into Row equivalent replacement;And these are modified or replaceed, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution The range of scheme.

Claims (10)

1. a kind of shared key generation method characterized by comprising
Receive the first ciphertext of the first equipment transmission, first ciphertext be first equipment using the first initial information string and The first random bit string is encrypted in error correcting code encryption algorithm, and the first initial information string is described first Equipment is determined according to the channel characteristics between first equipment and the second equipment;
First ciphertext is decrypted using the second initial information string and error correcting code decoding algorithm, is obtained candidate shared Key, the second initial information string are second equipment according to the channel between second equipment and first equipment What feature determined;
According to the first random bit string and the candidate shared key, target shared key is determined.
2. the method according to claim 1, wherein
First ciphertext is that first equipment uses the error correcting code encryption algorithm, is carried out to the first random bit string Coding obtains coding result, and carries out exclusive or with the first initial information string using the coding result and obtain;
Correspondingly, described be decrypted first ciphertext using the second initial information string and error correcting code decoding algorithm, Obtain candidate shared key, comprising:
Exclusive or calculating is carried out using the second initial information string and first ciphertext, obtains the first exclusive or result;Using error correcting code Decoding algorithm is decoded the first exclusive or result, obtains the candidate shared key.
3. method according to claim 1 or 2, which is characterized in that described according to the first random bit string and described Candidate shared key determines target shared key, comprising:
If the first random bit string is different with the candidate shared key, corrects the second initial information string and obtain Second ciphertext, so that the difference of second ciphertext and first ciphertext is minimum, wherein second ciphertext is using amendment The second initial information string and the error correcting code encryption algorithm afterwards are encrypted to obtain to the candidate shared key 's;
Second ciphertext is sent to first equipment, so that first equipment is according to second ciphertext amendment described the One initial information string simultaneously obtains third ciphertext;
The third ciphertext that first equipment is sent is received, and is calculated using the second initial information string and error correcting code decoding The third ciphertext is decrypted in method, obtains the target shared key.
4. according to the method described in claim 3, it is characterized by further comprising:
If the first random bit string is identical with the candidate shared key, it is determined that candidate's shared key is the mesh Mark shared key.
5. according to the method described in claim 3, it is characterized in that, the amendment the second initial information string and acquisition second Ciphertext, comprising:
Using the second initial information string and the error correcting code encryption algorithm, the candidate shared key is carried out at encryption Reason, obtains the 4th ciphertext;
The difference for obtaining first ciphertext and the 4th ciphertext, obtains the first difference value;
The each bit for successively overturning the second initial information string obtains overturning result;
Using the overturning result and the error correcting code encryption algorithm, the candidate shared key is encrypted, is obtained Encrypted result;
The difference for obtaining first ciphertext and the encrypted result, obtains the second difference value;
If second difference value is greater than or equal to first difference value, the ratio of this overturning in the overturning result is restored Otherwise special position updates first difference value according to second difference value;
The each bit for executing and successively overturning the second initial information string is returned to, until the institute of the second initial information string There is bit to overturn, the second initial information string updated according to the overturning result, also, using the encrypted result as Second ciphertext.
6. according to the method described in claim 5, it is characterized in that, first ciphertext and the encrypted result of obtaining Difference, after obtaining the second difference value, further includes: if second difference value is zero, institute is updated according to the overturning result The second initial information string is stated, also, using the encrypted result as second ciphertext.
7. according to the method described in claim 5, it is characterized in that, first ciphertext and the 4th ciphertext of obtaining Difference obtains the first difference value, comprising:
First ciphertext and the 4th ciphertext are subjected to XOR operation, obtain the second exclusive or result;
Each bit of the second exclusive or result is added, first difference value is obtained.
8. the method according to claim 1, wherein the first initial information string be first equipment according to Channel characteristics between first equipment and the second equipment are obtained by filtering quantization and block interleaved, at the beginning of described second Beginning bit string is second equipment according to the channel characteristics between second equipment and first equipment, by filtration yield What change and block interleaved obtained.
9. a kind of shared key generating means, which is characterized in that including receiving module, deciphering module and determining module;
The receiving module, for receiving the first ciphertext of the first equipment transmission, first ciphertext is that first equipment is adopted The first random bit string is encrypted with the first initial information string and error correcting code encryption algorithm, at the beginning of described first Beginning bit string is that first equipment is determined according to the channel characteristics between first equipment and the second equipment;
The deciphering module, for first ciphertext to be decrypted using the second initial information string and error correcting code decoding algorithm Processing, obtains candidate shared key, the second initial information string be second equipment according to second equipment with it is described What the channel characteristics between the first equipment determined;
The determining module, for it is close to determine that target is shared according to the first random bit string and the candidate shared key Key.
10. device according to claim 9, which is characterized in that first ciphertext is described in first equipment uses Error correcting code encryption algorithm encodes the first random bit string, obtains coding result, and using the coding result with The first initial information string carries out exclusive or and obtains;
Correspondingly, the deciphering module, is specifically used for carrying out exclusive or calculating using the second initial information string and first ciphertext, Obtain the first exclusive or result;The first exclusive or result is decoded using error correcting code decoding algorithm, is obtained described candidate total Enjoy key.
CN201711274178.5A 2017-12-06 2017-12-06 Shared key generation method and device Active CN109889327B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711274178.5A CN109889327B (en) 2017-12-06 2017-12-06 Shared key generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711274178.5A CN109889327B (en) 2017-12-06 2017-12-06 Shared key generation method and device

Publications (2)

Publication Number Publication Date
CN109889327A true CN109889327A (en) 2019-06-14
CN109889327B CN109889327B (en) 2021-04-23

Family

ID=66923470

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711274178.5A Active CN109889327B (en) 2017-12-06 2017-12-06 Shared key generation method and device

Country Status (1)

Country Link
CN (1) CN109889327B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110365474A (en) * 2019-06-19 2019-10-22 北京邮电大学 Cryptographic key negotiation method and communication equipment
CN111740954A (en) * 2020-05-18 2020-10-02 北京索德电气工业有限公司 Elevator main controller and elevator board card communication encryption method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104640110A (en) * 2015-01-15 2015-05-20 南京邮电大学 Symmetric key generating method based on channel characteristics in terminal direct communication
CN105376056A (en) * 2014-08-29 2016-03-02 中国运载火箭技术研究院 Key agreement method of symmetrical key generation and distribution based on wireless channel characteristics
CN106878012A (en) * 2016-12-07 2017-06-20 中国电子科技集团公司第三十研究所 A kind of wireless channel physical layer key agreement and inconsistent bit minimizing technology

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105376056A (en) * 2014-08-29 2016-03-02 中国运载火箭技术研究院 Key agreement method of symmetrical key generation and distribution based on wireless channel characteristics
CN104640110A (en) * 2015-01-15 2015-05-20 南京邮电大学 Symmetric key generating method based on channel characteristics in terminal direct communication
CN106878012A (en) * 2016-12-07 2017-06-20 中国电子科技集团公司第三十研究所 A kind of wireless channel physical layer key agreement and inconsistent bit minimizing technology

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110365474A (en) * 2019-06-19 2019-10-22 北京邮电大学 Cryptographic key negotiation method and communication equipment
CN110365474B (en) * 2019-06-19 2020-09-25 北京捷安通科技有限公司 Key agreement method and communication equipment
CN111740954A (en) * 2020-05-18 2020-10-02 北京索德电气工业有限公司 Elevator main controller and elevator board card communication encryption method

Also Published As

Publication number Publication date
CN109889327B (en) 2021-04-23

Similar Documents

Publication Publication Date Title
CN109672518B (en) Node data processing of quantum attack resistant blockchains
JP6899773B2 (en) Permanently secure communication with short-term secure encrypted quantum communication
KR101527979B1 (en) Information transmission security method
CN106027230B (en) A method of carrying out error code correction in the processing after quantum key distribution
CN108696867B (en) Lightweight group key distribution method based on wireless channel characteristics
CN110086616B (en) Forward one-time pad secret communication method based on wireless channel
JP2014142663A (en) Method and entity for probabilistic symmetrical encryption
CN111404672A (en) Quantum key distribution method and device
JP6975361B2 (en) Key encapsulation protocol
CN114219483B (en) Method, equipment and storage medium for sharing block chain data based on LWE-CPBE
CN104468097A (en) Security data communication achieving method based on quantum key distribution
CN106027231B (en) A method of cascade error correction being carried out to error code in the processing after quantum key distribution
CN109510706B (en) Heterogeneous wireless communication method and system based on photon super-entangled state
CN109889327A (en) Shared key generation method and device
US9002000B2 (en) Method for conversion of a first encryption into a second encryption
CN115242372A (en) Dense-state longitudinal federated logistic regression training method based on batch packaging coding
CN117155551A (en) Secret information sharing method, system, equipment and storage medium
Nilesh Simple proof of security of the multiparty prepare and measure QKD
CN112953714B (en) Identity authentication method, system, medium, and device based on continuous variable quantum key distribution
CN104702404B (en) A kind of encryption method and system based on error correcting code Yu low wheel AES
JP4928185B2 (en) Digital mobile communication system
Jin et al. Low transmission overhead for polar coding physical-layer encryption
CN113852956B (en) 5G network-based encryption type transmission method for digital information transmission
US20230299949A1 (en) Key exchange protocol
Kunev Extended RSA-M algorithm as a way of increase computational complexity of cryptosystems

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant