Wireless key negotiation method, device, computer equipment and storage medium
Through the key coordination technology of BCH(63,39,4) code, the dynamic key inconsistency caused by wireless channel feature extraction is solved, the error correction efficiency is improved, and the reliability and security of communication are ensured.
Patent Information
- Application Number
- CN202110800055.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-13
- Publication Date
- 2024-11-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When existing wireless key negotiation technology faces dynamic key inconsistency caused by hardware defects, channel noise and channel estimation errors, the error correction efficiency is low, resulting in increased data bit error rate and communication failure.
The key coordination is performed using BCH(63,39,4) code, and the check bit information is generated by the sending end and sent to the receiving end. The receiving end uses the BCH code to decode it to correct the key differences and achieve key consistency.
It improves error correction efficiency, reduces data bit error rate and the probability of communication failure, and ensures communication reliability and security.
Smart Images

Figure CN113727339B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to computers, and more specifically to a wireless key negotiation method, device, computer equipment and storage medium. Background Art
[0002] With the continuous development of communication technology, society's requirements for the network are becoming more and more diversified, and people are paying more and more attention to information security. The security of wireless communication requires ensuring the reliability of legitimate users' communications and the security of information transmission. Due to the openness and broadcast characteristics of wireless channels, their transmission signals are more susceptible to theft and tampering. At present, physical layer security is a hot topic in wireless communication research. In the physical layer key generation technology, legitimate communication users obtain shared keys by extracting the channel characteristics of the wireless channel. Due to the reciprocity of the channel, the channel characteristics of the uplink and downlink channels are basically consistent within the coherence time, so legitimate users can obtain independent keys to achieve the effect of "one-time encryption". At the same time, the transmission of keys is effectively avoided to ensure the security of communication. However, in actual communication, due to factors such as hardware defects, channel noise and channel estimation errors, the dynamic keys generated by the communicating parties may have certain differences. Therefore, in order to obtain a consistent key between the two parties, the communicating parties need to coordinate the keys and correct the inconsistent bits in the key sequences of both parties.
[0003] Existing key coordination schemes mainly include binary error correction algorithm, Winnow algorithm, LDPC code (Low Density Parity Check Code), etc. Since the binary method requires the communicating parties to communicate multiple times to exchange parity values, this coordination technology is more sensitive to network delay and has low error correction efficiency; although the Winnow algorithm combined with Hamming code reduces the number of negotiation interactions between the communicating parties, the error correction efficiency has not been significantly improved; key coordination based on LDPC code corrects errors through check bit information, and requires multiple calculations by the terminal. At the same time, LDPC code has a complex structure and a long encoding time. Its coordination efficiency is related to the code length. The error correction efficiency of LDPC code with low code rate and small and medium code length codewords is low.
[0004] Therefore, it is necessary to design a new method to solve the problem of increased data bit error rate and communication failure at the receiving end due to the inconsistency of the dynamic keys extracted based on wireless channel characteristics between the sending and receiving ends, with high error correction efficiency. Summary of the invention
[0005] The purpose of the present invention is to overcome the defects of the prior art and provide a wireless key negotiation method, device, computer equipment and storage medium.
[0006] To achieve the above object, the present invention adopts the following technical solution: a wireless key negotiation method, the method is applied to a wireless key negotiation device, the device includes a transmitting end and a receiving end, the method includes:
[0007] The transmitting 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;
[0008] 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;
[0009] Among them, the BCH code is the BCH (63, 39, 4) code.
[0010] A further technical solution is: the transmitting 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, including:
[0011] The transmitting end sends a first random sequence to the receiving end;
[0012] The transmitting end obtains a second random sequence from the receiving end;
[0013] The sending end generates a first key according to the second random sequence;
[0014] The transmitting end generates check bit information for the first key based on the BCH code.
[0015] A further technical solution is: the sending end generates a first key according to the second random sequence, including:
[0016] The transmitting end calculates a phase value of a channel according to the second random sequence;
[0017] The transmitting end performs sampling and quantization according to the phase value to obtain a first key.
[0018] A further technical solution is that the transmitting end generates check bit information for the first key based on the BCH code, including:
[0019] The transmitting end groups the first key to obtain a first code string;
[0020] The transmitting end performs encoding processing on the first code string based on the BCH code to obtain a code string with check bit information to obtain the check bit information.
[0021] A further technical solution is: the code string with check bit information includes information bits and check bit information.
[0022] A further technical solution is: 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, including:
[0023] The receiving end obtains a first random sequence from the sending end;
[0024] The receiving end generates a second key according to the first random sequence;
[0025] The receiving end groups the second key to obtain a second code string;
[0026] 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.
[0027] A further technical solution is that 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:
[0028] The receiving end attaches the check bit information to the end of the second code string, and uses a BCH code to decode the second code string to which the check bit information is attached, so as to obtain a coordinated key.
[0029] The present invention also provides a wireless key negotiation device, comprising a transmitting end and a receiving end, wherein the transmitting end is used to send a first random sequence to the receiving end, and generate check bit information according to the content sent by the receiving end in combination with a BCH code;
[0030] The receiving end is used to perform key coordination based on the BCH code according to the first random sequence and the check bit information to obtain a coordinated key.
[0031] The present invention also provides a computer device, wherein there are at least two computer devices, each of which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processors in at least two of the computer devices jointly implement the above method when executing the corresponding computer program.
[0032] The present invention also provides a storage medium, wherein the storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the above method.
[0033] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention generates corresponding keys through a sending end and a receiving end, and after the first key generated by the sending end is grouped, it is decoded by a BCH decoder, and the generated check bit information is sent to the receiving end, and the receiving end attaches the check bit information to the second key after the grouping, and performs key negotiation based on the BCH code. The sending end only needs to send the check bit information once, and the receiving end can coordinate and correct the locally generated key, thereby solving the problem that the dynamic keys extracted based on the wireless channel characteristics of the sending end and the receiving end are not completely consistent, which leads to an increase in the data error rate of the receiving end and communication failure, and the error correction efficiency is high.
[0034] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0036] Figure 1 A schematic diagram of an application scenario of the wireless key negotiation method provided by an embodiment of the present invention;
[0037] Figure 2 A schematic diagram of a flow chart of a wireless key negotiation method provided by an embodiment of the present invention;
[0038] Figure 3 A schematic diagram of a sub-process of a wireless key negotiation method provided by an embodiment of the present invention;
[0039] Figure 4 A schematic diagram of a sub-process of a wireless key negotiation method provided by an embodiment of the present invention;
[0040] Figure 5 A schematic diagram of a sub-process of a wireless key negotiation method provided by an embodiment of the present invention;
[0041] Figure 6 A schematic diagram of a sub-process of a wireless key negotiation method provided by an embodiment of the present invention;
[0042] Figure 7 A schematic diagram of BCH (63, 39, 4) key coordination provided by an embodiment of the present invention;
[0043] Figure 8 A schematic diagram of an OFDM-PON system provided by an embodiment of the present invention;
[0044] Fig. 9A schematic block diagram of a wireless key agreement device provided by an embodiment of the present invention;
[0045] Fig.10 A schematic block diagram of a transmitting end of a wireless key agreement device provided by an embodiment of the present invention;
[0046] Fig.11 A schematic block diagram of a first key generation unit of a wireless key agreement device provided by an embodiment of the present invention;
[0047] Fig.12 A schematic block diagram of a check bit information generating unit of a wireless key agreement device provided in an embodiment of the present invention;
[0048] Fig.13 A schematic block diagram of a receiving end of a wireless key agreement device provided by an embodiment of the present invention;
[0049] Fig.14 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0051] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0052] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0053] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0054] See also Figure 1 and Figure 2 , Figure 1A schematic diagram of an application scenario of the wireless key negotiation method provided in an embodiment of the present invention. Figure 2 A schematic flow chart of a wireless key negotiation method provided by an embodiment of the present invention. The wireless key negotiation method is applied to two servers, one of which is a sending end and the other is a receiving end. A BCH (63, 39, 4) decoder is provided in the receiving end, and a BCH (63, 39, 4) encoder is provided in the sending end. The BCH (63, 39, 4) decoder is used to correct the inconsistent key bits of the receiving end, and finally the receiving end and the sending end reach a consensus on the key.
[0055] Figure 2 1 is a flow chart of a wireless key negotiation method provided by an embodiment of the present invention. The method is applied to a wireless key negotiation device 300, which includes a transmitting end and a receiving end. Figure 2 As shown, the method includes the following steps S110 to S120.
[0056] S110, the transmitting 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.
[0057] Among them, the BCH code is the BCH (63, 39, 4) code.
[0058] In this embodiment, the first random sequence refers to sequence information sent from the transmitting end to the receiving end during the channel transmission data process.
[0059] The check bit information refers to the information obtained after the first key is encoded by the BCH (63, 39, 4) encoder.
[0060] In one embodiment, see Figure 2 , the above-mentioned step S110 may include steps S111 to S114.
[0061] S111. The sending end sends a first random sequence to the receiving end.
[0062] In this embodiment, the transmitting end A sends a first random sequence X to the receiving end B. a , so that the receiving end can use the first random sequence X a Perform corresponding signal state estimation and initial key acquisition.
[0063] S112: The sending end obtains a second random sequence from the receiving end.
[0064] In this embodiment, the second random sequence refers to sequence information sent from the receiving end to the sending end during the channel transmission data process.
[0065] S113. The sending end generates a first key according to the second random sequence.
[0066] In one embodiment, see Figure 4 , the above-mentioned step S113 may include steps S1131 to S1132.
[0067] S1131. The transmitting end calculates a phase value of a channel according to the second random sequence;
[0068] S1132. The transmitting end performs sampling and quantization according to the phase value to obtain a first key.
[0069] In this embodiment, the receiving end B also sends a second random sequence X to the sending end A. b After receiving the signal, the transmitter A calculates the phase value of the channel, samples and quantizes the phase value, and generates the initial key K a , which is the first key.
[0070] S114. The sending end generates check bit information for the first key based on a BCH code.
[0071] In one embodiment, see Figure 5 , the above-mentioned step S114 may include steps S1141 to S1142.
[0072] S1141. The sending end groups the first keys to obtain a first code string.
[0073] In this embodiment, the first code string refers to information obtained by dividing the first key into groups of specific bit lengths.
[0074] The sender A has a first key K a The data is grouped into l groups of k-bit code strings. If the last group does not meet k bits, it is supplemented with 0 for easy processing.
[0075] S1142: The transmitting end performs encoding processing on the first code string based on the BCH code to obtain a code string with check bit information to obtain the check bit information.
[0076] In this embodiment, the code string with check bit information includes information bits and check bit information.
[0077] See also Figure 7 , the transmitter A sends the divided first code string to the BCH (63,39,4) encoder respectively, and outputs l groups of code strings with a length of n bits. The output result contains two parts: one part is k bits of information bits, and the other part is (nk) bits of check bit information.
[0078] The first key Ka It is a key that includes k bits of information bits. After passing through the BCH (63,39,4) encoder, (nk) bits of check bit information can be obtained.
[0079] The sender A sends the check bit information to the receiver B through the public channel.
[0080] BCH (63,39,4) code is a type of linear cyclic block code that can correct multiple error bits at a time. Among the parameters of BCH (63,39,4), the integer 63 represents the code length of BCH (63,39,4), the integer 39 represents the information bit of BCH (63,39,4), and the BCH (63,39,4) code with a code length of 63 bits can correct 4 bit errors at a time. The BCH (63,39,4) encoder refers to a unit that uses the BCH (63,39,4) code to encode the key.
[0081] The key coordination scheme of BCH (63, 39, 4) code solves the problem of differences in keys generated by the communicating parties due to hardware defects, channel noise and channel estimation errors.
[0082] S120: The receiving end performs key coordination based on the BCH (63, 39, 4) code according to the first random sequence and the check bit information to obtain a coordinated key.
[0083] In one embodiment, see Figure 6 , the above-mentioned step S120 may include steps S121 to S124.
[0084] S121, the receiving end obtains a first random sequence from the sending end;
[0085] S122. The receiving end generates a second key according to the first random sequence.
[0086] In this embodiment, the second key refers to a shared key used for wireless transmission. The first key and the second key are shared keys obtained by extracting the channel characteristics of the wireless channel at the transmitting end and the receiving end, and the first random sequence and the second random sequence contain the channel characteristics of the wireless channel. Extracting the channel characteristics of the wireless signal from the first random sequence and the second random sequence is a prior art and will not be repeated here.
[0087] After receiving the first random sequence, the receiving end B estimates the state information of the channel, obtains the phase value of the channel response, samples and quantizes it to generate the initial key value K b , which is the second key.
[0088] S123: The receiving end groups the second key to obtain a second code string.
[0089] In this embodiment, the second code string refers to information obtained by dividing the second key into groups of specific bit lengths.
[0090] Specifically, the receiving end B respectively generates the second key K b The data are grouped into l groups of 39-bit code strings. If the length of the last group does not meet 39 bits, it is padded with 0 for easy processing.
[0091] S124: 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.
[0092] In this embodiment, the negotiated key refers to a key that is consistent with the first key.
[0093] Specifically, the receiving end attaches the check bit information to the end of the second code string, and uses a BCH (63, 39, 4) code to decode the second code string to which the check bit information is attached, so as to obtain a coordinated key.
[0094] The second key K b is a key including 39 bits of information bits, which are combined with the first key K a The information bits are consistent, and after the check bit information is loaded into the information bit, the BCH (63, 39, 4) decoder performs negotiation decoding on the check bit information to form the negotiated key.
[0095] See also Figure 7 , the receiving end B will receive l groups of check bit information and attach them to each group of information of the second code string, that is, attach the corresponding check bit information to each second code string, and finally obtain l groups of 63-bit code strings. The attached second code string, that is, the obtained l groups of 63-bit code strings, is output by the BCH (63,39,4) decoder to obtain the coordinated key Right now
[0096] BCH (63,39,4) code is a type of linear cyclic block code that can correct multiple error bits at a time. Among the parameters of BCH (63,39,4), the integer 63 represents the code length of BCH (63,39,4), and the integer 39 represents the information bit of BCH (63,39,4). The BCH (63,39,4) code with a code length of 63 bits can correct 4 bit errors at a time. The key coordination scheme of BCH (63,39,4) code solves the problem of differences in the keys generated by the communicating parties due to hardware defects, channel noise, and channel estimation errors.
[0097] For example, see Figure 8, the method is applied to the OFDM (Orthogonal Frequency Division Multiplexing) duplex communication system. The system adopts 16QAM (Quadrature Amplitude Modulation) modulation. Each OFDM signal contains 64 subcarriers, of which 56 are valid data subcarriers and the rest are null values used as protection intervals. After conjugation operation, 26 data subcarriers with good channel characteristics are selected, and the number of quantization bits is selected as 8 bits, and finally a 78-bit key sequence is generated. The key coordination process is as follows:
[0098] In order to make the key value after channel estimation and quantization conform to the standard BCH (63, 39, 4) code format, the key string K generated by the transmitter A and the receiver B is a , K b according to In this experiment, the sender A and the receiver B divide their keys into A 39-bit code string;
[0099] The two legitimate users, the transmitter and the receiver, extract the channel characteristics. Due to the strong coherence of the channels between the two communicating parties, only a very small number of bits of the key value after the two parties estimate and quantize the channel are inconsistent. The maximum error correction capability of BCH (63, 39, 4) is 4 bits, so BCH (63, 39, 4) can be selected for data error correction.
[0100] The quantized key of the transmitter A is 78 bits, which are grouped into 39-bit information groups and sent to the BCH (63, 39, 4) encoder for encoding. The check bit information of each part is calculated and sent to the receiver B through the public channel.
[0101] After receiving end B groups the generated key string into 39-bit groups, it attaches the received check bit information to the 39-bit information bit, that is, each group of check bit information is added to each data after the receiving end grouping, and encodes it through the BCH (63, 39, 4) decoder, and finally outputs the key sequence after error correction. After key coordination, the communicating parties obtain the same key.
[0102] Compared with the existing key negotiation technology, the key negotiation based on BCH (63, 39, 4) has stronger flexibility and operability. It can select the appropriate BCH (63, 39, 4) code for error correction according to the length of the key string generated by the system. The sender only needs to send the check bit information once and the receiver can coordinate the error correction of the locally generated key, which reduces the number of interactions between the two parties in the information transmission process and the probability of information leakage, and improves the security of the system. The implementation method is simple, the computational complexity is low, and it is easy to apply in practice.
[0103] The above-mentioned wireless key negotiation method generates corresponding keys through the sending end and the receiving end. After the first key generated by the sending end is grouped, it is decoded by the BCH decoder, and the generated check bit information is sent to the receiving end. The receiving end attaches the check bit information to the second key after the grouping, and performs key negotiation based on the BCH code. The sending end only needs to send the check bit information once and the receiving end can coordinate and correct the locally generated key, so as to solve the problem that the dynamic keys extracted by the sending end and the receiving end based on the wireless channel characteristics are not completely consistent, which leads to an increase in the data error rate of the receiving end and communication failure, and the error correction efficiency is high.
[0104] Fig. 9 FIG. 3 is a schematic block diagram of a wireless key negotiation device 300 provided in an embodiment of the present invention. Fig. 9 As shown, corresponding to the above wireless key negotiation method, the present invention also provides a wireless key negotiation device 300. The wireless key negotiation device 300 includes a unit for executing the above wireless key negotiation method, and the device can be in two servers. Specifically, please refer to Fig. 9 The wireless key negotiation device 300 includes a transmitting end 301 and a receiving end 302 .
[0105] The transmitting end 301 is used to send a first random sequence to the receiving end 302, and generate check bit information according to the content sent by the receiving end 302 in combination with the BCH code;
[0106] The receiving end 302 is used to perform key coordination based on the BCH code according to the first random sequence and the check bit information to obtain a coordinated key.
[0107] In one embodiment, if Fig.10 As shown, the sending end 301 includes a first sending unit 3011 , a first obtaining unit 3012 , a first key generating unit 3013 and a check bit information generating unit 3014 .
[0108] The first sending unit 3011 is used to send a first random sequence to the receiving end 302; the first obtaining unit 3012 is used to obtain a second random sequence from the receiving end 302; the first key generating unit 3013 is used to generate a first key according to the second random sequence; the check bit information generating unit 3014 is used to generate check bit information for the first key based on the BCH code.
[0109] In one embodiment, if Fig.11 As shown, the first key generating unit 3013 includes a first calculating subunit 30131 and a first quantizing subunit 30132 .
[0110] The first calculation subunit 30131 is used to calculate the phase value of the channel according to the second random sequence; the first quantization subunit 30132 is used to sample and quantize according to the phase value to obtain a first key.
[0111] In one embodiment, if Fig.12 As shown, the check bit information generating unit 3014 includes a first grouping subunit 30141 and an encoding subunit 30142 .
[0112] The first grouping subunit 30141 is used to group the first key to obtain a first code string; the encoding subunit 30142 is used to encode the first code string based on the BCH code to obtain a code string with check bit information to obtain the check bit information.
[0113] In one embodiment, see Fig.13 The receiving end 302 includes a second acquisition unit 3021, a second key generation unit 3022, a second grouping unit 3023 and a key coordination unit 3024.
[0114] The second acquisition unit 3021 is used to obtain the first random sequence from the sending end 301; the second key generation unit 3022 is used to generate a second key according to the first random sequence; the second grouping unit 3023 is used to group the second key to obtain a second code string; the key coordination unit 3024 is used to perform key coordination based on the BCH code according to the second code string and the check bit information to obtain a coordinated key.
[0115] In one embodiment, the key coordination unit 3024 is used to attach the check bit information to the end of the second code string, and use the BCH code to decode the second code string to which the check bit information is attached, so as to obtain the coordinated key.
[0116] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the wireless key negotiation device 300 and each unit can refer to the corresponding description in the aforementioned method embodiment, and for the convenience and brevity of description, it will not be repeated here.
[0117] The wireless key agreement device 300 can be implemented in the form of a computer program. Fig.14 Runs on the computer device shown.
[0118] See also Fig.14 , Fig.14 1 is a schematic block diagram of a computer device provided in an embodiment of the present application. The number of the computer devices 500 is at least two, and the computer devices 500 are servers, wherein the server can be an independent server or a server cluster composed of multiple servers.
[0119] One of the computer devices 500 is a sending end, and the other computer device 500 is a receiving end.
[0120] See also Fig.14 The computer device 500 includes a processor 502 , a memory and a network interface 505 connected via a system bus 501 , wherein the memory may include a non-volatile storage medium 503 and an internal memory 504 .
[0121] The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions, and when the program instructions are executed, the processor 502 may execute a method 14.
[0122] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .
[0123] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a wireless key negotiation method.
[0124] The network interface 505 is used to communicate with other devices over the network. Fig.14 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0125] The two processors 502 are used to run a computer program 5032 stored in the memory to implement the following steps:
[0126] The transmitting 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 the BCH code; 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.
[0127] Among them, the BCH code is the BCH (63, 39, 4) code.
[0128] In one embodiment, one of the processors 502 specifically implements the following steps when implementing the step of the sending end sending the first random sequence to the receiving end and generating check bit information according to the content sent by the receiving end in combination with the BCH code:
[0129] The transmitting end sends a first random sequence to the receiving end; the transmitting end obtains a second random sequence from the receiving end; the transmitting end generates a first key according to the second random sequence; the transmitting end generates check bit information for the first key based on a BCH code.
[0130] In one embodiment, one of the processors 502, when implementing the step of generating the first key according to the second random sequence by the sending end, specifically implements the following steps:
[0131] The transmitting end calculates a phase value of a channel according to the second random sequence; the transmitting end performs sampling and quantization according to the phase value to obtain a first key.
[0132] In one embodiment, one of the processors 502, when implementing the step of generating check bit information based on the BCH code for the first key by the transmitting end, specifically implements the following steps:
[0133] The transmitting end groups the first key to obtain a first code string; the transmitting end encodes the first code string using a BCH code to obtain a code string with check bit information to obtain the check bit information.
[0134] The code string with check bit information includes information bits and check bit information.
[0135] In one embodiment, another processor 502 implements the following steps when implementing the step of the receiving end performing key coordination based on the BCH code according to the first random sequence and the check bit information to obtain the coordinated key:
[0136] The receiving end obtains a first random sequence from the sending 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; 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.
[0137] In one embodiment, another processor 502 implements the following steps when implementing the step of the receiving end performing key coordination based on the BCH code according to the second code string and the check bit information to obtain the coordinated key:
[0138] The receiving end attaches the check bit information to the end of the second code string, and uses a BCH code to decode the second code string to which the check bit information is attached, so as to obtain a coordinated key.
[0139] 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 (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0140] It can be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can 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 process steps of the embodiment of the above method.
[0141] Therefore, 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 when the computer program is executed by a processor, the processor executes the following steps:
[0142] The transmitting 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 the BCH code; 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.
[0143] Among them, the BCH code is the BCH (63, 39, 4) code.
[0144] In one embodiment, when one of the processors executes the computer program to implement the step of the sending end sending the first random sequence to the receiving end and generating check bit information according to the content sent by the receiving end in combination with the BCH code, the following steps are specifically implemented:
[0145] The transmitting end sends a first random sequence to the receiving end; the transmitting end obtains a second random sequence from the receiving end; the transmitting end generates a first key according to the second random sequence; the transmitting end generates check bit information for the first key based on a BCH code.
[0146] In one embodiment, when one of the processors executes the computer program to implement the step of the sending end generating the first key according to the second random sequence, the processors specifically implement the following steps:
[0147] The transmitting end calculates a phase value of a channel according to the second random sequence; the transmitting end performs sampling and quantization according to the phase value to obtain a first key.
[0148] In one embodiment, when one of the processors executes the computer program to implement the step of generating check bit information based on the BCH code for the first key by the transmitting end, the processors specifically implement the following steps:
[0149] The transmitting end groups the first key to obtain a first code string; the transmitting end encodes the first code string using a BCH code to obtain a code string with check bit information to obtain the check bit information.
[0150] The code string with check bit information includes information bits and check bit information.
[0151] In one embodiment, when another processor executes the computer program to implement the step of the receiving end performing key coordination based on the BCH code according to the first random sequence and the check bit information to obtain the coordinated key, the following steps are specifically implemented:
[0152] The receiving end obtains a first random sequence from the sending 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; 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.
[0153] In one embodiment, when another processor executes the computer program to implement the step of the receiving end performing key coordination based on the BCH code according to the second code string and the check bit information to obtain the coordinated key, the following steps are specifically implemented:
[0154] The receiving end attaches the check bit information to the end of the second code string, and uses a BCH code to decode the second code string to which the check bit information is attached, so as to obtain a coordinated key.
[0155] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.
[0156] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0157] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0158] The steps in the method of the embodiment of the present invention can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present invention can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0159] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.
[0160] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. Wireless key negotiation method, It is characterized in that The method is applied to a wireless key negotiation device, the device comprising a transmitting end and a receiving end, and the method comprises: The transmitting 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; 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; Among them, the BCH code is BCH (63, 39, 4) code; The transmitting 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, including: The sending end sends a first random sequence to the receiving end; The transmitting end obtains a second random sequence from the receiving end; The sending end generates a first key according to the second random sequence; The transmitting end generates check bit information for the first key based on the BCH code; The sending end generates a first key according to the second random sequence, including: The transmitting end calculates a phase value of a channel according to the second random sequence; The transmitting end performs sampling and quantization according to the phase value to obtain a first key; The transmitting end generates check bit information for the first key based on the BCH code, including: The transmitting end groups the first key to obtain a first code string; The transmitting end performs encoding processing on the first code string based on BCH code to obtain a code string with check bit information to obtain the check bit information; The transmitter sends the divided first code string to the BCH (63, 39, 4) encoder respectively, and outputs l groups of code strings with a length of n bits. The output result contains two parts: one part is k bits of information bits, and the other part is (nk) bits of check bit information; The first key K a It is a key containing k bits of information. After passing through the BCH (63, 39, 4) encoder, (nk) bits of check bit information can be obtained. The sending end sends the check bit information to the receiving end through a public channel; 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, including: The receiving end obtains a first random sequence from the sending 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; 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 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: The receiving end attaches the check bit information to the end of the second code string, and uses a BCH code to decode the second code string to which the check bit information is attached, so as to obtain a coordinated key; The code string with check bit information includes information bits and check bit information.
2. Wireless key negotiation device, It is characterized in that It includes a transmitting end and a receiving end, wherein the transmitting end is used to send a first random sequence to the receiving end, and generate check bit information according to the content sent by the receiving end in combination with a BCH code; The receiving end is used to perform key coordination based on the BCH code according to the first random sequence and the check bit information to obtain a coordinated key; The transmitting end includes a first transmitting unit, a first acquiring unit, a first key generating unit and a check bit information generating unit; a first sending unit, configured to send a first random sequence to the receiving end; a first acquiring unit, configured to acquire a second random sequence from the receiving end; a first key generating unit, configured to generate a first key according to the second random sequence; and a check bit information generating unit, configured to generate check bit information for the first key based on a BCH code; The first key generation unit includes a first calculation subunit and a first quantization subunit; a first calculation subunit, configured to calculate a phase value of a channel according to the second random sequence; a first quantization subunit, configured to perform sampling and quantization according to the phase value to obtain a first key; The check bit information generating unit comprises a first grouping subunit and an encoding subunit; the first grouping subunit is used to group the first key to obtain a first code string; the encoding subunit is used to encode the first code string based on the BCH code to obtain a code string with check bit information to obtain the check bit information; the transmitting end sends the divided first code string to the BCH (63, 39, 4) encoder respectively, and outputs l groups of code strings with a length of n bits, and the output result includes two parts: one part is k bits of information bits, and the other part is (nk) bits of check bit information; the first key K a It is a key that includes k bits of information bits. After passing through the BCH (63,39,4) encoder, (nk) bits of check bit information can be obtained. The sender sends the check bit information to the receiver through a public channel. 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, including: The receiving end obtains a first random sequence from the sending 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; 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 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: The receiving end attaches the check bit information to the end of the second code string, and uses a BCH code to decode the second code string to which the check bit information is attached, so as to obtain a coordinated key; The code string with check bit information includes information bits and check bit information.
3. A computer device, It is characterized in that The number of the computer devices is at least two, and the computer devices each include a memory, a processor, and a computer program stored in the memory and executable on the processor. The processors in at least two of the computer devices jointly implement the method as claimed in claim 1 when executing the corresponding computer program.
4. A storage medium, It is characterized in that The storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor, the processor executes the method of claim 1.
