Wireless key negotiation method, device, computer equipment and storage medium

文档序号:1908762 发布日期:2021-11-30 浏览:31次 中文

阅读说明:本技术 无线密钥协商方法、装置、计算机设备及存储介质 (Wireless key negotiation method, device, computer equipment and storage medium ) 是由 曾晨 陈石明 瞿丹波 曹龙辉 万人滔 王绿参 范玮 于 2021-07-13 设计创作,主要内容包括:本发明实施例公开了无线密钥协商方法、装置、计算机设备及存储介质。所述方法应用于无线密钥协商装置,所述装置包括发送端以及接收端,所述方法包括:所述发送端发送第一随机序列至所述接收端,并根据所述接收端发送的内容结合BCH码生成校验位信息;所述接收端根据第一随机序列以及校验位信息进行基于BCH码的密钥协调,以得到协调后的密钥,其中,BCH码为BCH(63,39,4)码。通过实施本发明实施例的方法可解决发送端和接收端基于无线信道特征提取的动态密钥存在不完全一致的情况而导致接收端数据误码率升高、通信失败的问题,纠错效率高。(The embodiment of the invention discloses a wireless key negotiation method, a wireless key negotiation device, computer equipment and a storage medium. The method is applied to a wireless key agreement device, the device comprises a sending end and a receiving end, and the method comprises the following steps: the sending end sends a first random sequence to the receiving end and generates check bit information by combining BCH codes according to the content sent by the receiving end; and the receiving end performs key coordination based on a BCH code according to the first random sequence and the check bit information to obtain a coordinated key, wherein the BCH code is a BCH (63,39,4) code. The method of the embodiment of the invention can solve the problems of the increase of the data error rate of the receiving end and the communication failure caused by the incomplete consistency of the dynamic keys extracted by the transmitting end and the receiving end based on the wireless channel characteristics, and has high error correction efficiency.)

1. A wireless key agreement method is applied to a wireless key agreement device, the device comprises a sending end and a receiving end, the method comprises:

the sending end sends a first random sequence to the receiving end and generates check bit information by combining BCH codes according to the content sent by the receiving end;

and the receiving end performs key coordination based on the BCH code according to the first random sequence and the check bit information to obtain a coordinated key.

Wherein, the BCH code is a BCH (63,39,4) code.

2. The method of claim 1, wherein the sending end sends a first random sequence to the receiving end, and generates check bit information according to the content sent by the receiving end in combination with a BCH code, and the method includes:

the sending end sends a first random sequence to the receiving end;

the sending end acquires a second random sequence from the receiving end;

the sending end generates a first secret key according to the second random sequence;

and the sending end generates check bit information for the first key based on the BCH code.

3. The method of claim 2, wherein the generating a first key by the sending end according to the second random sequence comprises:

the transmitting end calculates a phase value of a channel according to the second random sequence;

and the transmitting end carries out sampling and quantization according to the phase value to obtain a first secret key.

4. The method of claim 3, wherein the sending end generates check bit information for the first key based on a BCH code, and comprises:

the sending end groups the first secret key to obtain a first code string;

and the sending end carries out coding processing on the first code string by adopting a BCH-based code to obtain a code string with check bit information so as to obtain the check bit information.

5. The method of claim 4, wherein the code string with the check bit information comprises information bits and check bit information.

6. The method of claim 1, wherein the receiving end performs BCH code-based key coordination according to the first random sequence and the check bit information to obtain a coordinated key, and the method comprises:

the receiving end acquires a first random sequence from the transmitting end;

the receiving end generates a second key according to the first random sequence;

the receiving end groups the second key to obtain a second code string;

and the receiving end performs key coordination based on the BCH code according to the second code string and the check bit information to obtain a coordinated key.

7. The method of claim 6, wherein the receiving end performs BCH code-based key coordination according to the second code string and the check bit information to obtain a coordinated key, and the method comprises:

and the receiving end attaches the check bit information to the back of the second code string, and decodes the second code string attached with the check bit information by using a BCH code to obtain a coordinated key.

8. The wireless key agreement device is characterized by comprising a sending end and a receiving end, wherein the sending end is used for sending a first random sequence to the receiving end and generating check bit information by combining a BCH code according to the content sent by the receiving end;

and the receiving end is used for carrying out key coordination based on the BCH code according to the first random sequence and the check bit information so as to obtain a coordinated key.

9. A computer device, characterized in that the number of the computer devices is at least two, each of the computer devices comprises a memory, a processor and a computer program stored on the memory and executable on the processor, and the processors of at least two of the computer devices jointly implement the method according to any one of claims 1 to 7 when executing the respective computer programs.

10. A storage medium, characterized in that the storage medium stores a computer program comprising program instructions which, when executed by a processor, cause the processor to carry out the method according to any one of claims 1 to 7.

Technical Field

The present invention relates to computers, and more particularly, to a method and apparatus for wireless key agreement, a computer device, and a storage medium.

Background

With the continuous development of communication technology, the social requirements on the network are more and more diversified, and people pay more and more attention to information security. The security requirement of wireless communication ensures the reliability of the communication of legal users and the security of information transmission, and the transmission signals of the wireless communication are easier to steal and tamper due to the openness and the broadcasting characteristics of the wireless communication. Currently, physical layer security is a hot spot of wireless communication research, and in a physical layer key generation technology, a legal communication user obtains a shared key by extracting channel characteristics of a wireless channel. Due to the reciprocity of the channels, the channel characteristics of the uplink and downlink channels are basically kept consistent within the coherence time, so that legal users can obtain mutually independent keys, the effect of one-time encryption is achieved, meanwhile, the transmission of the keys is effectively avoided, and the safety of communication is ensured. However, in actual communication, there may be a certain difference between dynamic keys generated by both communication parties due to factors such as hardware defects, channel noise, and channel estimation errors, and therefore, to obtain keys that are consistent between both communication parties, it is necessary for both communication parties to perform key coordination and correct inconsistent bits in key sequences between both communication parties.

The existing key coordination scheme mainly comprises a binary error correction algorithm, a Winnow algorithm, an LDPC (Low Density Parity Check) Code and the like, and because the binary method requires that two communication parties exchange Parity values with each other through multiple communications, the coordination technology is sensitive to network delay and has Low error correction efficiency; although the Winnow algorithm combined with the hamming code reduces the number of interactions negotiated between two communication parties, the error correction efficiency is not obviously improved; the key coordination based on the LDPC code is to carry out error correction through check bit information, a terminal is required to carry out calculation for many times, meanwhile, the LDPC code is complex in structure and long in coding time, the coordination efficiency is related to the code length, and the error correction efficiency of the LDPC code with low code rate and medium and small code length is low.

Therefore, it is necessary to design a new method to solve the problems of the increase of the data error rate and the communication failure of the receiving end due to the incomplete consistency of the dynamic keys extracted by the transmitting end and the receiving end based on the wireless channel characteristics, and the error correction efficiency is high.

Disclosure of Invention

The present invention is directed to overcome the drawbacks of the prior art, and provides a method, an apparatus, a computer device and a storage medium for wireless key agreement.

In order to achieve the purpose, the invention adopts the following technical scheme: a wireless key agreement method is applied to a wireless key agreement device, the device comprises a sending end and a receiving end, and the method comprises the following steps:

the sending end sends a first random sequence to the receiving end and generates check bit information by combining BCH codes according to the content sent by the receiving end;

the receiving end coordinates a key based on a BCH code according to the first random sequence and the check bit information to obtain a coordinated key;

wherein, the BCH code is a BCH (63,39,4) code.

The further technical scheme is as follows: the sending end sends a first random sequence to the receiving end, and generates check bit information by combining a BCH code according to the content sent by the receiving end, and the check bit information comprises the following steps:

the sending end sends a first random sequence to the receiving end;

the sending end acquires a second random sequence from the receiving end;

the sending end generates a first secret key according to the second random sequence;

and the sending end generates check bit information for the first key based on the BCH code.

The further technical scheme is as follows: the sending end generates a first key according to the second random sequence, and the method comprises the following steps:

the transmitting end calculates a phase value of a channel according to the second random sequence;

and the transmitting end carries out sampling and quantization according to the phase value to obtain a first secret key.

The further technical scheme is as follows: the sending end generates check bit information for the first key based on a BCH code, and the check bit information comprises the following steps:

the sending end groups the first secret key to obtain a first code string;

and the sending end carries out coding processing on the first code string by adopting a BCH-based code to obtain a code string with check bit information so as to obtain the check bit information.

The further technical scheme is as follows: the code string with the check bit information comprises information bits and check bit information.

The further technical scheme is as follows: the receiving end coordinates a key based on a BCH code according to the first random sequence and the check bit information to obtain a coordinated key, and the method comprises the following steps:

the receiving end acquires a first random sequence from the transmitting end;

the receiving end generates a second key according to the first random sequence;

the receiving end groups the second key to obtain a second code string;

and the receiving end performs key coordination based on the BCH code according to the second code string and the check bit information to obtain a coordinated key.

The further technical scheme is as follows: the receiving end performs key coordination based on the BCH code according to the second code string and the check bit information to obtain a coordinated key, including:

and the receiving end attaches the check bit information to the back of the second code string, and decodes the second code string attached with the check bit information by using a BCH code to obtain a coordinated key.

The invention also provides a wireless key negotiation device, which comprises a sending end and a receiving end, wherein the sending end is used for sending the first random sequence to the receiving end and generating check bit information by combining the BCH code according to the content sent by the receiving end;

and the receiving end is used for carrying out key coordination based on the BCH code according to the first random sequence and the check bit information so as to obtain a coordinated key.

The invention also provides computer equipment, the number of the computer equipment is at least two, the computer equipment comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, and the processors in the at least two computer equipment jointly realize the method when executing the corresponding computer programs.

The invention also provides a storage medium storing a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the above-described method.

Compared with the prior art, the invention has the beneficial effects that: the invention generates corresponding keys through a sending end and a receiving end, a BCH decoder decodes after a first key generated by the sending end is grouped, generated check bit information is sent to the receiving end, the receiving end attaches the check bit information to a grouped second key and carries out key negotiation based on a BCH code, the sending end only needs to send the check bit information once, and the receiving end can carry out coordination error correction on the locally generated key, thereby solving the problems of increased data error rate and communication failure of the receiving end caused by the condition that dynamic keys extracted by the sending end and the receiving end based on the characteristics of a wireless channel are not completely consistent, and having high error correction efficiency.

The invention is further described below with reference to the accompanying drawings and specific embodiments.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.

Fig. 1 is a schematic view of an application scenario of a wireless key agreement method according to an embodiment of the present invention;

fig. 2 is a flowchart illustrating a wireless key agreement method according to an embodiment of the present invention;

fig. 3 is a sub-flowchart of a wireless key agreement method according to an embodiment of the present invention;

fig. 4 is a sub-flowchart of a wireless key agreement method according to an embodiment of the present invention;

fig. 5 is a sub-flowchart of a wireless key agreement method according to an embodiment of the present invention;

fig. 6 is a sub-flowchart of a wireless key agreement method according to an embodiment of the present invention;

FIG. 7 is a schematic diagram of BCH (63,39,4) key coordination provided by the embodiment of the present invention;

fig. 8 is a schematic diagram of an OFDM-PON system according to an embodiment of the present invention;

fig. 9 is a schematic block diagram of a wireless key agreement apparatus provided in an embodiment of the present invention;

fig. 10 is a schematic block diagram of a transmitting end of a wireless key agreement apparatus according to an embodiment of the present invention;

fig. 11 is a schematic block diagram of a first key generation unit of a wireless key agreement device according to an embodiment of the present invention;

fig. 12 is a schematic block diagram of a check bit information generating unit of a wireless key agreement device according to an embodiment of the present invention;

fig. 13 is a schematic block diagram of a receiving end of a wireless key agreement apparatus according to an embodiment of the present invention;

FIG. 14 is a schematic block diagram of a computer device provided by an embodiment of the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.

It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

Referring to fig. 1 and fig. 2, fig. 1 is a schematic view illustrating an application scenario of a wireless key agreement method according to an embodiment of the present invention. Fig. 2 is a schematic flowchart of a wireless key agreement method according to an embodiment of the present invention. The wireless key negotiation method is applied to two servers, wherein one server is a sending end, and the other server is a receiving end. A BCH (63,39,4) decoder is arranged in the receiving end, a BCH (63,39,4) encoder is arranged in the transmitting end, and the BCH (63,39,4) decoder is used for correcting the inconsistent key bits of the receiving end, so that the receiving end and the transmitting end are consistent finally.

Fig. 2 is a flowchart illustrating a wireless key agreement method according to an embodiment of the present invention. The method is applied to a wireless key agreement device 300, which includes a transmitting end and a receiving end, as shown in fig. 2, and includes the following steps S110 to S120.

S110, the sending end sends a first random sequence to the receiving end, and generates check bit information by combining BCH codes according to the content sent by the receiving end.

Wherein, the BCH code is a BCH (63,39,4) code.

In this embodiment, the first random sequence refers to sequence information that is sent from a sending end to a receiving end during a channel data transmission process.

The check bit information refers to the information obtained after the first key is encoded by a BCH (63,39,4) encoder.

In an embodiment, referring to fig. 2, the step S110 may include steps S111 to S114.

S111, the sending end sends a first random sequence to the receiving end.

In this embodiment, the transmitting end a transmits a first random sequence X to the receiving end BaSo that the receiving end can conveniently obtain the first random sequence XaAnd performing corresponding signal state estimation and acquisition of an initial key.

S112, the sending end obtains a second random sequence from the receiving end.

In this embodiment, the second random sequence refers to sequence information that is sent from the receiving end to the sending end during the data transmission process of the channel.

And S113, the sending end generates a first key according to the second random sequence.

In an embodiment, referring to fig. 4, the step S113 may include steps S1131 to S1132.

S1131, the transmitting end calculates a phase value of a channel according to the second random sequence;

s1132, the sending end carries out sampling and quantization according to the phase value to obtain a first secret key.

In this embodiment, the receiving end B also sends the second random sequence X to the sending end abAfter receiving the signal, the transmitting end a calculates a phase value of the channel, samples and quantizes the phase value, and generates an initial key KaI.e. the first key.

S114, the sending end generates check bit information for the first key based on the BCH code.

In an embodiment, referring to fig. 5, the step S114 may include steps S1141 to S1142.

S1141, the sending end groups the first secret key to obtain a first code string.

In this embodiment, the first code string is information obtained by dividing a group having a specific bit length with respect to the first key.

The sending end A pairs the first secret key KaGrouping is carried out, the code strings with the length of k bits are segmented into l groups, and if the last group does not meet the length of k bits, 0 is used for supplementing so as to facilitate processing.

And S1142, the sending end performs coding processing on the first code string by adopting a BCH-based code to obtain a code string with check bit information so as to obtain the check bit information.

In the present embodiment, the code string with the check bit information includes information bits and check bit information.

Referring to fig. 7, the sender a sends the divided first code strings to BCH (63,39,4) encoder respectively, and outputs l groups of code strings with length of n bits, and the output result includes two parts: one part is k bits of information bits and the other part is (n-k) bits of check bit information.

First key KaIs a key comprising information bits with k bits, and check bit information with (n-k) bits can be obtained after BCH (63,39,4) encoder.

The transmitting end A transmits the check bit information to the receiving end B through a common channel.

BCH (63,39,4) codes are a class of linear cyclic block codes that can correct multiple erroneous bits at a time. Among the parameters of the BCH (63,39,4), the integer 63 represents the code length of the BCH (63,39,4), the integer 39 represents the information bits of the BCH (63,39,4), and the BCH (63,39,4) code with the code length of 63 bits can correct 4-bit errors once. The BCH (63,39,4) encoder is a unit that performs an encoding process of a key using a BCH (63,39,4) code.

The key coordination scheme of the BCH (63,39,4) code solves the problem that the keys generated by two communication parties have difference due to factors such as hardware defect, channel noise, channel estimation error and the like.

And S120, the receiving end coordinates a key based on a BCH (63,39,4) code according to the first random sequence and the check bit information to obtain a coordinated key.

In an embodiment, referring to fig. 6, the step S120 may include steps S121 to S124.

S121, the receiving end acquires a first random sequence from the sending end;

and S122, the receiving end generates a second key according to the first random sequence.

In this embodiment, the second key is a shared key used for wireless transmission, the first key and the second key are both shared keys obtained by extracting channel characteristics of a wireless channel by a sending end and a receiving end, the first random sequence and the second random sequence include the channel characteristics of the wireless channel, and extracting the channel characteristics of a wireless signal from the first random sequence and the second random sequence is prior art and will not be described herein again.

After receiving the first random sequence, the receiving end B estimates the state information of the channel to obtain the phase value of the channel response, and generates an initial key value K by sampling and quantizingbI.e. the second key.

And S123, the receiving end groups the second key to obtain a second code string.

In this embodiment, the second code string is information obtained by dividing a group having a specific bit length with respect to the second key.

Specifically, the receiving end B respectively matches the second secret keys KbGrouping is performed, the code strings are divided into l groups with the length of 39 bits, and if the length of the last group does not meet the length of 39 bits, 0 is used for supplementing so as to facilitate the processing.

And S124, the receiving end coordinates the key based on the BCH code according to the second code string and the check bit information to obtain a coordinated key.

In this embodiment, the negotiated key refers to a key consistent with the first key.

Specifically, the receiving end appends the check bit information to the second code string, and decodes the second code string appended with the check bit information by using a BCH (63,39,4) code to obtain a coordinated key.

Second key KbIs a key comprising 39 bits of information, which is associated with a first key KaAfter loading the check bit information into the information bits, the BCH (63,39,4) decoder performs negotiation decoding processing on the check bit information, thereby forming a negotiated key.

Referring to fig. 7, the receiving end B attaches l groups of received check bit information to each group of information of the second code string, that is, attaches corresponding check bit information to the back of each second code string, to finally obtain l groups of 63-bit code strings, and obtains a coordinated key from the attached second code string, that is, the obtained l groups of 63-bit code strings, through the output of the BCH (63,39,4) decoderNamely, it is

BCH (63,39,4) codes are a class of linear cyclic block codes that can correct multiple erroneous bits at a time. Among the parameters of the BCH (63,39,4), the integer 63 represents the code length of the BCH (63,39,4), the integer 39 represents the information bits of the BCH (63,39,4), and the BCH (63,39,4) code with the code length of 63 bits can correct 4-bit errors once. The key coordination scheme of the BCH (63,39,4) code solves the problem that the keys generated by two communication parties have difference due to factors such as hardware defect, channel noise, channel estimation error and the like.

For example, referring to fig. 8, the method is applied to an OFDM (Orthogonal Frequency Division Multiplexing) duplex communication system, which uses 16QAM (Quadrature Amplitude Modulation) Modulation, each OFDM signal includes 64 subcarriers, 56 of which are effective data subcarriers, and the rest of which are null values used as guard intervals. After conjugate operation, 26 data subcarriers with good channel characteristics are selected, 8 bits are selected as quantization bits, and finally 78-bit key sequences are generated, wherein the key coordination process specifically comprises the following steps:

key strings K generated for transmitting end a and receiving end B in order to make the channel estimation quantized key values conform to the form of standard BCH (63,39,4) codea,KbAccording toGrouping is carried out, wherein S represents the number of the selected data subcarriers, and Q represents the quantization bit number. In this experiment, the sending end a and the receiving end B divide the respective keys intoA code string of groups of 39 bits;

the two legal users of the sending end and the receiving end extract the channel characteristics, due to the strong coherence of the channels of the two communication parties, the key values obtained by estimating and quantizing the channels of the two communication parties only have little bit inconsistency, and the maximum error correction capability of the BCH (63,39,4) is 4 bits, so the BCH (63,39,4) can be selected for data error correction.

The key quantized by the transmitting end A is 78 bits, and is grouped according to each group of 39-bit information and then sent to a BCH (63,39,4) encoder for encoding, the check bit information of each part is calculated, and the check bit information is sent to the receiving end B through a public channel.

The receiving end B groups the key string generated by itself according to each group of 39 bits, attaches the received check bit information to the 39 bit information bits, namely, adds each group of check bit information to each data grouped by the receiving end, and then encodes the data through a BCH (63,39,4) decoder, and finally outputs the key sequence after error correction. After key coordination, both communication parties obtain a consistent key.

Compared with the existing key agreement technology, the key agreement based on the BCH (63,39,4) has stronger flexible operability, the proper BCH (63,39,4) code can be selected for error correction according to the length of the key string generated by the system, the sending end can carry out coordination error correction on the locally generated key by only sending the check bit information once, the interaction times of both communication parties in the information transmission process and the probability of information leakage are reduced, and the safety of the system is improved. The method is simple in implementation mode, low in calculation complexity and convenient to practical application.

According to the wireless key agreement method, the corresponding keys are generated through the sending end and the receiving end, the first keys generated by the sending end are grouped, the BCH decoder decodes the first keys, the generated check bit information is sent to the receiving end, the receiving end attaches the check bit information to the grouped second keys and carries out key agreement based on the BCH code, the sending end only needs to send the check bit information once, the receiving end can carry out coordination error correction on the locally generated keys, the problems that the data error rate of the receiving end is increased and communication fails due to the fact that dynamic keys extracted by the sending end and the receiving end based on wireless channel characteristics are not completely consistent are solved, and error correction efficiency is high.

Fig. 9 is a schematic block diagram of a wireless key agreement device 300 according to an embodiment of the present invention. As shown in fig. 9, the present invention also provides a wireless key agreement device 300 corresponding to the above wireless key agreement method. The wireless key agreement device 300 comprises means for performing the above-described wireless key agreement method, which may be in two servers. Specifically, referring to fig. 9, the wireless key agreement apparatus 300 includes a transmitting end 301 and a receiving end 302.

The transmitting end 301 is configured to transmit a first random sequence to the receiving end 302, and generate check bit information according to the content transmitted by the receiving end 302 in combination with the BCH code;

the receiving end 302 is configured to perform key coordination based on the BCH code according to the first random sequence and the check bit information, so as to obtain a coordinated key.

In an embodiment, as shown in fig. 10, the transmitting end 301 includes a first transmitting unit 3011, a first obtaining unit 3012, a first key generating unit 3013, and a check bit information generating unit 3014.

A first sending unit 3011, configured to send a first random sequence to the receiving end 302; a first obtaining unit 3012, configured to obtain a second random sequence from the receiving end 302; a first key generation unit 3013, configured to generate a first key according to the second random sequence; a check bit information generating unit 3014, configured to generate check bit information based on a BCH code for the first key.

In an embodiment, as shown in fig. 11, the first key generation unit 3013 includes a first calculation subunit 30131 and a first quantization subunit 30132.

A first calculating subunit 30131, configured to calculate a phase value of a channel according to the second random sequence; a first quantization subunit 30132, configured to perform sampling and quantization according to the phase value to obtain a first key.

In one embodiment, as shown in fig. 12, the parity information generating unit 3014 includes a first grouping subunit 30141 and an encoding subunit 30142.

A first grouping subunit 30141, configured to group the first key to obtain a first code string; an encoding subunit 30142, configured to perform encoding processing on the first code string by using a BCH code, so as to obtain a code string with parity information, so as to obtain the parity information.

In an embodiment, referring to fig. 13, the receiving end 302 includes a second obtaining unit 3021, a second key generating unit 3022, a second packet unit 3023, and a key coordinating unit 3024.

A second obtaining unit 3021, configured to obtain a first random sequence from the transmitting end 301; a second key generation unit 3022 configured to generate a second key according to the first random sequence; a second grouping unit 3023, configured to group the second key to obtain a second code string; a key coordination unit 3024, configured to perform key coordination based on the BCH code according to the second code string and the check bit information, so as to obtain a coordinated key.

In an embodiment, the key coordination unit 3024 is configured to attach the parity information to the second code string, and decode the second code string with the appended parity information by using a BCH code, so as to obtain a coordinated key.

It should be noted that, as can be clearly understood by those skilled in the art, the detailed implementation process of the wireless key agreement device 300 and each unit may refer to the corresponding description in the foregoing method embodiment, and for convenience and brevity of description, no further description is provided herein.

The wireless key agreement device 300 may be implemented in the form of a computer program that can be run on a computer apparatus as shown in fig. 14.

Referring to fig. 14, fig. 14 is a schematic block diagram of a computer device according to an embodiment of the present application. The number of the computer devices 500 is at least two, and the computer devices 500 are servers. The server may be an independent server or a server cluster composed of a plurality of servers.

One of the computer devices 500 is a sending end and the other computer device 500 is a receiving end.

Referring to fig. 14, the computer device 500 includes a processor 502, memory, and a network interface 505 connected by a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.

The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer programs 5032 include program instructions that, when executed, cause the processor 502 to perform a 14-method.

The processor 502 is used to provide computing and control capabilities to support the operation of the overall computer device 500.

The internal memory 504 provides an environment for the execution of the computer program 5032 in the non-volatile storage medium 503, and when the computer program 5032 is executed by the processor 502, the processor 502 may be caused to perform a wireless key agreement method.

The network interface 505 is used for network communication with other devices. Those skilled in the art will appreciate that the configuration shown in fig. 14 is a block diagram of only a portion of the configuration associated with the present application and does not constitute a limitation of the computer device 500 to which the present application is applied, and that a particular computer device 500 may include more or less components than those shown, or combine certain components, or have a different arrangement of components.

Wherein the two processors 502 are adapted to run a computer program 5032 stored in the memory to implement the following steps:

the sending end sends a first random sequence to the receiving end and generates check bit information by combining BCH codes according to the content sent by the receiving end; and the receiving end performs key coordination based on the BCH code according to the first random sequence and the check bit information to obtain a coordinated key.

Wherein, the BCH code is a BCH (63,39,4) code.

In an embodiment, when implementing the steps of sending a first random sequence from the sending end to the receiving end and generating check bit information according to the content sent by the receiving end and a BCH code, one of the processors 502 specifically implements the following steps:

the sending end sends a first random sequence to the receiving end; the sending end acquires a second random sequence from the receiving end; the sending end generates a first secret key according to the second random sequence; and the sending end generates check bit information for the first key based on the BCH code.

In an embodiment, when implementing the step of generating the first key by the sending end according to the second random sequence, one of the processors 502 specifically implements the following steps:

the transmitting end calculates a phase value of a channel according to the second random sequence; and the transmitting end carries out sampling and quantization according to the phase value to obtain a first secret key.

In an embodiment, when implementing the step of generating check bit information for the first key by the sending end based on a BCH code, one of the processors 502 specifically implements the following steps:

the sending end groups the first secret key to obtain a first code string; and the sending end carries out coding processing on the first code string by adopting a BCH-based code to obtain a code string with check bit information so as to obtain the check bit information.

The code string with the check bit information comprises information bits and check bit information.

In an embodiment, when implementing the step of performing key coordination based on the BCH code by the receiving end according to the first random sequence and the check bit information to obtain a coordinated key, the other processor 502 specifically implements the following steps:

the receiving end acquires a first random sequence from the transmitting end; the receiving end generates a second key according to the first random sequence; the receiving end groups the second key to obtain a second code string; and the receiving end performs key coordination based on the BCH code according to the second code string and the check bit information to obtain a coordinated key.

In an embodiment, when implementing the step of performing key coordination based on BCH code by the receiving end according to the second code string and the check bit information to obtain a coordinated key, the other processor 502 specifically implements the following steps:

and the receiving end attaches the check bit information to the back of the second code string, and decodes the second code string attached with the check bit information by using a BCH code to obtain a coordinated key.

It should be understood that in the embodiment of the present Application, the Processor 502 may be a Central Processing Unit (CPU), and the Processor 502 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.

It will be understood by those skilled in the art that all or part of the flow of the method implementing the above embodiments may be implemented by a computer program instructing associated hardware. The computer program includes program instructions, and the computer program may be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above.

Accordingly, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program, when executed by a processor, causes the processor to perform the steps of:

the sending end sends a first random sequence to the receiving end and generates check bit information by combining BCH codes according to the content sent by the receiving end; and the receiving end performs key coordination based on the BCH code according to the first random sequence and the check bit information to obtain a coordinated key.

Wherein, the BCH code is a BCH (63,39,4) code.

In an embodiment, when one of the processors executes the computer program to implement the steps of the transmitting end sending a first random sequence to the receiving end and generating check bit information according to the content sent by the receiving end in combination with a BCH code, the following steps are specifically implemented:

the sending end sends a first random sequence to the receiving end; the sending end acquires a second random sequence from the receiving end; the sending end generates a first secret key according to the second random sequence; and the sending end generates check bit information for the first key based on the BCH code.

In an embodiment, when one of the processors executes the computer program to implement the step of generating the first key by the sending end according to the second random sequence, the following steps are specifically implemented:

the transmitting end calculates a phase value of a channel according to the second random sequence; and the transmitting end carries out sampling and quantization according to the phase value to obtain a first secret key.

In an embodiment, when one of the processors executes the computer program to implement the step of the sending end generating the check bit information for the first key based on a BCH code, the following steps are specifically implemented:

the sending end groups the first secret key to obtain a first code string; and the sending end carries out coding processing on the first code string by adopting a BCH-based code to obtain a code string with check bit information so as to obtain the check bit information.

The code string with the check bit information comprises information bits and check bit information.

In an embodiment, when the other processor executes the computer program to implement the step of the receiving end performing key coordination based on a BCH code according to the first random sequence and the check bit information to obtain a coordinated key, the following steps are specifically implemented:

the receiving end acquires a first random sequence from the transmitting end; the receiving end generates a second key according to the first random sequence; the receiving end groups the second key to obtain a second code string; and the receiving end performs key coordination based on the BCH code according to the second code string and the check bit information to obtain a coordinated key.

In an embodiment, when the other processor executes the computer program to implement the step that the receiving end performs key coordination based on a BCH code according to the second code string and the check bit information to obtain a coordinated key, the following steps are specifically implemented:

and the receiving end attaches the check bit information to the back of the second code string, and decodes the second code string attached with the check bit information by using a BCH code to obtain a coordinated key.

The storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, which can store various computer readable storage media.

Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.

In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, various elements or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented.

The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the invention can be merged, divided and deleted according to actual needs. In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.

The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a terminal, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention.

While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

22页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种用于无线安全通信的物理层密钥生成方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!