CN114845296A - Key generation method, device, medium and electronic equipment - Google Patents

Key generation method, device, medium and electronic equipment Download PDF

Info

Publication number
CN114845296A
CN114845296A CN202210742914.XA CN202210742914A CN114845296A CN 114845296 A CN114845296 A CN 114845296A CN 202210742914 A CN202210742914 A CN 202210742914A CN 114845296 A CN114845296 A CN 114845296A
Authority
CN
China
Prior art keywords
target
value
array
values
arrays
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210742914.XA
Other languages
Chinese (zh)
Other versions
CN114845296B (en
Inventor
彭吉生
黄强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Thinking Semiconductor Technology Co ltd
Original Assignee
Beijing Thinking Semiconductor Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Thinking Semiconductor Technology Co ltd filed Critical Beijing Thinking Semiconductor Technology Co ltd
Priority to CN202210742914.XA priority Critical patent/CN114845296B/en
Publication of CN114845296A publication Critical patent/CN114845296A/en
Application granted granted Critical
Publication of CN114845296B publication Critical patent/CN114845296B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • H04W12/041Key generation or derivation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B17/00Monitoring; Testing
    • H04B17/30Monitoring; Testing of propagation channels
    • H04B17/309Measuring or estimating channel quality parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B17/00Monitoring; Testing
    • H04B17/30Monitoring; Testing of propagation channels
    • H04B17/309Measuring or estimating channel quality parameters
    • H04B17/318Received signal strength
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/04Protocols for data compression, e.g. ROHC

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Collating Specific Patterns (AREA)

Abstract

The present disclosure relates to a key generation method, apparatus, medium, and electronic device, the method comprising: acquiring channel state information and received signal strength; performing target operation according to the plurality of arrays in the channel state information to obtain a plurality of target values; quantizing the received signal strength and each target value to obtain a first quantized value and a plurality of second quantized values; for each array, determining one element in the array as a target element value, and replacing other elements in the array with zero values to obtain a plurality of target arrays; according to the first quantized value and the second quantized values, moving the position of a target element value in each target array and moving the positions of a plurality of target arrays to obtain a target channel vector; and performing compression processing according to the target channel vector to generate key data. The key generation method disclosed by the invention can improve the randomness and confidentiality of the generated key data.

Description

Key generation method, device, medium and electronic equipment
Technical Field
The present disclosure relates to the field of wireless communication technologies, and in particular, to a key generation method, apparatus, medium, and electronic device.
Background
With the rapid development of wireless communication and the rapid increase in the number of users of wireless networks, security of wireless communication is receiving increased attention. In the related art, security of wireless communication may be guaranteed by a physical layer key generation technique. However, the physical layer security key generation technique performs key generation mainly by channel state information or received signal strength, and finally generated key data is poor in randomness and confidentiality. Therefore, how to improve the randomness and the confidentiality of the key data is an urgent technical problem to be solved.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, the present disclosure provides a key generation method, including:
acquiring channel state information and received signal strength;
performing target operation according to the plurality of arrays in the channel state information to obtain a plurality of target values;
quantizing the received signal strength and each target value to obtain a first quantized value and a plurality of second quantized values;
for each array, determining one element in the array as a target element value, and replacing other elements in the array with zero values to obtain a plurality of target arrays, wherein the target element value is a target value corresponding to the array or an element value of the one element;
according to the first quantized value and the second quantized values, moving the position of a target element value in each target array and moving the positions of a plurality of target arrays to obtain a target channel vector;
and performing compression processing according to the target channel vector to generate key data.
In some embodiments, the quantizing the received signal strength and each of the target values to obtain a first quantized value and a plurality of second quantized values respectively includes:
converting the received signal strength and each target value into a first preset system respectively to obtain a first initial system number and a plurality of second initial system numbers;
acquiring a first intermediate number at a first intermediate position in the first initial binary number and a second intermediate number at a second intermediate position in each second initial binary number;
and respectively converting the first intermediate number and each second intermediate number into a second preset binary system to obtain the first quantized value and a plurality of second quantized values.
In some embodiments, the obtaining a first intermediate number in a first intermediate position in the first initial number and a second intermediate number in a second intermediate position in each of the second initial numbers comprises:
removing a preset number of elements at a high level and a preset number of elements at a low level from the first initial scale number to obtain a first intermediate number; and
and removing the preset number of elements at the high position and the preset number of elements at the low position in each second initial binary number to obtain each second intermediate number.
In some embodiments, the moving the position of the target element value in each of the target arrays and the positions of the plurality of target arrays according to the first quantization value and the plurality of second quantization values to obtain the target channel vector comprises:
for each target array, circularly shifting the target element value in the target array according to a second quantization value corresponding to the target array to obtain an initial channel vector;
and circularly shifting the plurality of target arrays in the initial channel vector according to a first quantization value to obtain the target channel vector.
In some embodiments, the moving the position of the target element value in each of the target arrays and the positions of the plurality of target arrays according to the first quantization value and the plurality of second quantization values to obtain the target channel vector comprises:
performing the target operation on the plurality of second quantized values to obtain second target values;
circularly shifting the target element value in each target array according to the first quantization value to obtain an initial channel vector;
and circularly shifting the plurality of target arrays in the initial channel vector according to the second target value to obtain the target channel vector.
In some embodiments, the performing the target operation according to the plurality of arrays in the channel state information to obtain a plurality of target values includes:
performing modulus processing on the elements in each array to obtain the modulus value of the elements in each array;
averaging or maximum value calculating is carried out on the module values of the elements in each array to obtain a plurality of average values or a plurality of maximum values;
determining a plurality of the average values or a plurality of the maximum values as a plurality of the target values.
In some embodiments, the compressing according to the target channel vector to generate key data includes:
and multiplying the target channel vector by a compression matrix to generate the key data.
In a second aspect, the present disclosure provides a key generation apparatus, including:
an acquisition module configured to acquire channel state information and received signal strength;
the operation module is configured to perform target operation according to the plurality of arrays in the channel state information to obtain a plurality of target values;
the quantization module is configured to perform quantization processing on the received signal strength and each target value respectively to obtain a first quantization value and a plurality of second quantization values;
a replacement module configured to, for each of the arrays, determine one of the elements in the array as a target element value, and replace other elements in the array with zero values, to obtain a plurality of target arrays, where the target element value is a target value corresponding to the array or an element value of the one of the elements;
a moving module configured to move the position of the target element value in each of the target arrays and the positions of a plurality of target arrays according to the first quantized value and the plurality of second quantized values to obtain a target channel vector;
and the compression module is configured to perform compression processing according to the target channel vector to generate key data.
In a third aspect, the present disclosure provides a computer-readable medium having stored thereon a computer program which, when executed by a processing apparatus, performs the steps of the method of any one of the first aspect.
In a fourth aspect, the present disclosure provides an electronic device comprising:
a storage device having a computer program stored thereon;
processing means for executing the computer program in the storage means to carry out the steps of the method of any one of the first aspect.
According to the technical scheme, the position of the target element value in the target array and the positions of the target arrays are moved according to the first quantized value and the second quantized values, and the positions are equivalent to the positions of the moving channel. By moving the position of the channel, the randomness of the subsequently generated key data can be improved, the confidentiality of the key data is further improved, and by respectively moving the position of the target element value and the position of the target array, the position of the channel can be moved for multiple times, so that the randomness and the confidentiality of the key data are further improved.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
Fig. 1 is a flow chart illustrating a method of key generation according to an example embodiment.
Fig. 2 is a flow diagram illustrating a quantization process according to an example embodiment.
Fig. 3 is a flow chart illustrating obtaining a target channel vector according to an example embodiment.
Fig. 4 is another flow chart illustrating obtaining a target channel vector according to an example embodiment.
Fig. 5 is a block diagram illustrating a key generation apparatus according to an example embodiment.
Fig. 6 is a schematic structural diagram of an electronic device shown in accordance with an example embodiment.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Fig. 1 is a flowchart illustrating a key generation method according to an example embodiment, where the key generation method may be applied to a transmitting end and/or a receiving end, where the transmitting end and the receiving end are devices that perform communication interaction in a wireless communication system. As shown in fig. 1, the process includes the following steps.
Step 110, obtaining channel state information and received signal strength.
In some embodiments, obtaining channel state information and received signal strength may include: channel state information and received signal strength are obtained by channel sounding. For example, taking the method for generating the key performed by the sending end as an example, the sending end may receive the probe signal sent by the receiving end through channel probing, and obtain the channel state information and the received signal strength through the probe signal. Taking the example that the receiving end executes the key generation method, the receiving end may receive the probe signal sent by the sending end through channel probing, and obtain the channel state information and the received signal strength through the probe signal.
It should be noted that, according to the short-time reciprocity of the channel, the channel characteristics measured at the same time by both communication parties are the same, and therefore, the channel state information and the received signal strength obtained by the transmitting end and the receiving end are the same.
In some embodiments, the channel state information and the received signal strength may be characteristic information of a channel between a transmitting end and a receiving end in the wireless communication system. In some embodiments, Channel State Information (CSI) is data used to describe a Channel. The channel state information may be used to reflect the attenuation factor of the signal on the transmission path, e.g., to reflect signal scattering, environmental attenuation, and distance attenuation.
In some embodiments, the channel state information may be a matrix of 1 × N, e.g., channel state information H may be represented as H = [ H ] 1 , h 2 ,……, h N ]. In some embodiments, a Received Signal Strength Indicator (RSSI) is a Received Signal Strength Indicator that reflects the Signal Strength. The received signal strength may be a single value.
Step 120, performing a target operation according to the plurality of arrays in the channel state information to obtain a plurality of target values.
In some embodiments, before performing the target operation according to the plurality of arrays in the channel state information to obtain the plurality of target values, the method further includes: the channel state information is grouped to obtain a plurality of arrays, and each array comprises elements with target quantity.
For example, taking the multiple arrays as G groups as an example, the channel state information may be grouped into the following form: h = [ H11, H12, … …, H1M; H21, H22, … …, H2M; … …; hG1, hG2, … …, hGM ], where "H11, H12, … …, H1M" represents the 1 st array, "H21, H22, … …, H2M" represents the 2 nd array, … …, "hG 1, hG2, … …, hGM" represents the G th array, each array including M elements, M = N/G, N represents the number of all elements included in the channel state information, and G represents the number of arrays.
In some embodiments, the method further comprises: and when the number of the elements in any array is less than the target number, the number of the elements in the array is filled to the target number according to the elements in the array. Illustratively, still taking the foregoing example as an example, if the number of elements of the last group in the G group is M-10, and at this time, the number of elements of the array is less than M, that is, the number of elements of the array is less than the target number, 10 supplements may be extracted from the M-10 elements to the array, so as to supplement the number of elements of the array to the target number. By extracting the elements of the group from the array with the element number less than the target number for completion, the target value of the array calculated subsequently can be avoided from being inaccurate (for example, when the target value is an average value, the average value is too small), and the accuracy of subsequently generated key data can be further ensured.
In some embodiments, the target value may refer to an average or maximum of the modulus values of the elements in the array. In some embodiments, performing the target operation according to a plurality of arrays in the channel state information to obtain a plurality of target values includes: performing modulus processing on the elements in each array to obtain the modulus of the elements in each array; carrying out averaging or maximum value calculation on the module values of the elements in each array to obtain a plurality of average values or a plurality of maximum values; and determining a plurality of average values or a plurality of maximum values as a plurality of target values.
For example, taking the aforementioned channel state information including G groups as an example, the modulus values of the elements included in each array in the G groups may be averaged or maximized to obtain G average values or G maximum values, where the G average values or the G maximum values are determined G target values.
In some embodiments, the elements in each array in the channel state information may be modulo by modulo the channel state information. Illustratively, still taking the foregoing example as an example, the channel state information H may be subjected to modulo processing by Hamp = Abs (H), where Hamp is the channel state information after modulo processing, Abs (×) indicates that each element in the channel state information H is subjected to modulo processing, and H indicates the channel state information.
Step 130, quantizing the received signal strength and each target value to obtain a first quantized value and a plurality of second quantized values.
In some embodiments, a quantization process may be used to convert the received signal strength and each target value to a value of the same evaluation dimension. Specific details of the quantization process can be found in fig. 2 and its related description, which are not repeated herein.
Step 140, for each array, determining one element in the array as a target element value, and replacing other elements in the array with zero values to obtain a plurality of target arrays, where the target element value is a target value corresponding to the array or an element value of one element.
In some embodiments, determining one of the elements in the array as the target element value may include: replacing one element in the array with a target value corresponding to the array, or preserving the element value of one element in the array. Illustratively, taking the aforementioned 2 nd array "h 21, h22, … …, h 2M" as an example, assuming that the element h22 is replaced by the target value hmax corresponding to the 2 nd array and the elements other than the element h22 in the array are replaced by zero values, the 2 nd target array "0, hmax, … …, 0" may be obtained, or assuming that the element value of the element h22 is retained and the elements other than the element h22 in the array are replaced by zero values, the 2 nd target array "0, h22, … …, 0" may be obtained. The substitution modes of the elements of other arrays are analogized, and the description is omitted here.
Step 150, according to the first quantization value and the plurality of second quantization values, moving the position of the target element value in each target array and moving the positions of the plurality of target arrays to obtain the target channel vector.
In some embodiments, the positions of the target element values in each target array, and the positions of the multiple target arrays, may be shifted according to different quantization values. For example, the positions of the target element values in each target array may be shifted according to the second quantization values, and the positions of the target arrays may be shifted according to the first quantization values. For another example, the positions of the target element values in each target array may be shifted according to the first quantization value, and the positions of the plurality of target arrays may be shifted according to the plurality of second quantization values. For specific details of obtaining the target channel vector, reference may be made to fig. 3 and 4, and the related description thereof, which are not described herein again.
Since the target element value is a target value obtained from the channel state information or an element value in the channel state information, and the channel state information may reflect the channel information, and thus, the target element value may characterize the channel, the present disclosure is equivalent to moving the position of the channel by moving the position of the target element value in the target array and the positions of the plurality of target arrays according to the first quantized value and the plurality of second quantized values. By moving the position of the channel, the randomness of the subsequently generated key data can be improved, the confidentiality of the key data is further improved, and by respectively moving the position of the target element value and the position of the target array, the position of the channel can be moved for multiple times, so that the randomness and the confidentiality of the key data are further improved.
And step 160, performing compression processing according to the target channel vector to generate key data.
In some embodiments, performing a compression process based on the target channel vector to generate key data comprises: the target channel vector is multiplied by the compression matrix to generate key data. In some embodiments, the compression matrix may be a random gaussian matrix or a Discrete Fourier Transform (DFT) matrix.
The key data generated by the present disclosure can be used for the sending end to encrypt the original information stream in the communication interaction process. For example, taking the key data as the encrypted bits 101 and the original information stream as the original bits 100 as an example, the encryption of the original bits can be implemented by performing an exclusive or operation on the encrypted bits and the original bits, where the exclusive or result of 100 and 101 is 001. Correspondingly, during the decryption process, the original bit 100 can be obtained by performing an exclusive or operation on 101 and 001.
Fig. 2 is a flow diagram illustrating a quantization process according to an example embodiment. As shown in fig. 2, the flow includes the following steps.
Step 210, converting the received signal strength and each target value into a first preset scale respectively to obtain a first initial scale number and a plurality of second initial scale numbers.
Step 220, obtain a first intermediate number at a first intermediate position in the first initial binary number, and a second intermediate number at a second intermediate position in each second initial binary number.
Step 230, the first intermediate number and each second intermediate number are respectively converted into a second preset scale to obtain a first quantized value and a plurality of second quantized values.
In some embodiments, the first preset value and the second preset value may be specifically determined according to actual situations, for example, the first preset value may be a 2-value, and the second preset value may be a 10-value. It is understood that the first preset value or the second preset value may also be other values, for example, the first preset value may be an 8-value, the second preset value may be a 16-value, etc., which is not limited in any way by the present disclosure.
In some embodiments, the first intermediate position and the second intermediate position may be the same position, and both positions may be flexibly determined according to actual situations, for example, in case of the first preset system being 2, the first intermediate position or the second intermediate position may be 5 th to 7 th bits.
In some embodiments, obtaining a first intermediate number in a first intermediate position in the first initial number and a second intermediate number in a second intermediate position in each second initial number comprises: removing a preset number of elements at a high level and a preset number of elements at a low level in the first initial scale number to obtain a first intermediate number; and removing a preset number of elements at a high position and a preset number of elements at a low position in each second initial binary number to obtain each second intermediate number.
In some embodiments, removing the preset number of elements that are high may refer to removing the preset number of elements to the right starting with the first-order element. Removing the preset number of elements at a lower level may refer to removing the preset number of elements to the left from the last bit. In some embodiments, the predetermined number may be specifically determined according to actual situations, for example, the predetermined number may be 4 bits.
Illustratively, taking a certain target value of 0.5323 as an example, the target value can be determined by the following process1) multiplying the target value by 2 12 :0.5323*2 12 = 2189; 2) converting 2189 into 2-system number to obtain '10001000010'; 3) removing the element with the 4-position being at the high position to obtain '1000010'; 4) removing the element with 4 bits at the lower level to obtain '100'; 5) converting '100' to a 10-ary number yields 4. It is understood that the order of removing the preset number of high and low bits in this example may be changed, for example, the element with 4 bits in low bits may be removed first, and then the element with 4 bits in high bits may be removed.
Because the channel state information and the received signal strength are the same in the communication interaction process of the transmitting end and the receiving end, the low-order elements in the first initial binary number or the second initial binary number are easy to have errors. And under the condition that the stealing end exists in the communication interaction process, although the channel of the stealing end is different from the transmitting end and the receiving end, the high-bit element of the channel of the stealing end is probably the same as the high-bit element of the channel of the transmitting end and the receiving end, and the stealing end can easily guess the high-bit value of the channel. Therefore, the intermediate number of the respective intermediate positions of the first initial binary number and the second initial binary number is reserved, so that the error of the low-bit element can be avoided, the robustness of the key data is improved, the high-bit element can be prevented from being easily guessed by a secret stealing end, the randomness of the key data is improved, and the confidentiality of the key data is improved.
Fig. 3 is a flow chart illustrating obtaining a target channel vector according to an example embodiment. As shown in fig. 3, the flow includes the following steps.
Step 310, for each target array, performing cyclic shift on the target element value in the target array according to the second quantization value corresponding to the target array to obtain an initial channel vector.
In some embodiments, cyclically shifting the target element values in the target array according to the second quantization value corresponding to the target array may include: and moving the target element value in the target array to a first target position in the target array through cyclic shift, wherein the first target position is determined according to a second quantization value corresponding to the target array. In some embodiments, the first target position may be the same as the second quantized value.
For example, taking the aforementioned 2 nd target array "0, hmax, … …, 0" as the target array as an example, assuming that there are 4 elements in the target array, the target array is "0, hmax, 0, 0", and if the second quantization value corresponding to the target array is 3, the target element value hmax can be moved to the 3 rd position in the target array by cyclic shift, resulting in "0, 0, hmax, 0". For example, the target element value hmax may be moved to the 3 rd position of the target array by moving a bit around to the right. It will be appreciated that the initial channel vector may be derived by cyclically shifting the target element values in each target array in the same manner.
And 320, circularly shifting the plurality of target arrays in the initial channel vector according to the first quantization value to obtain a target channel vector.
In some embodiments, cyclically shifting the plurality of target arrays in the initial channel vector according to the first quantization value may include: and moving a target array corresponding to the first quantized value in the plurality of target arrays to a second target position in the initial channel vector by cyclic shift. The second target position may be specifically determined according to actual conditions, for example, the second target position may be the first position.
For example, taking the example that the plurality of target arrays includes 4 sets, if the first quantization value is 1, the 1 st target array corresponding to the first quantization value may be moved to the 1 st position in the initial channel vector by cyclic shift, resulting in a target channel vector [ H1, H2, H3, H4], where H1 is the 1 st target array, H2 is the 2 nd target array, H3 is the 3 rd target array, and H4 is the 4 th target array. By analogy, if the first quantization value is 2, the target channel vector is [ H2, H3, H4, H1 ]; if the first quantization value is 3, the target channel vector is [ H3, H4, H1, H2 ]; if the first quantization value is 4, the target channel vector is [ H4, H1, H2, H3 ].
In the embodiment of the present disclosure, the target element values in the target array are cyclically shifted by the second quantization value, that is, the intra-group cyclic shift is realized by the second quantization value, the multiple target arrays are cyclically shifted by the first quantization value, that is, the inter-group cyclic shift is realized by the first quantization value, and the intra-group cyclic shift and the inter-group cyclic shift are determined by the quantization values.
Fig. 4 is another flow chart illustrating obtaining a target channel vector according to an example embodiment. As shown in fig. 4, the flow includes the following steps.
Step 410, performing a target operation on the plurality of second quantized values to obtain a second target value.
In some embodiments, the second target value may be an average or a maximum of the plurality of second quantized values. For specific details of the target operation, reference may be made to the foregoing step 110 and the related description thereof, which are not described herein again.
Step 420, circularly shifting the target element value in each target array according to the first quantization value to obtain an initial channel vector.
In some embodiments, cyclically shifting the target element values in each target array according to the first quantization value may include: the target element values in each target array are moved by cyclic shifting to a first target position in the target array, the first target position being determined from the first quantized values. In some embodiments, the first target position may be the same as the first quantized value.
For example, taking the first quantization value as 3 as an example, the target element value in each target array can be moved to the 3 rd position in the target array by cyclic shift, so as to obtain the initial channel vector. The manner of cyclic shift is the same as the example of step 420, and reference may be specifically made to the above related description, which is not repeated herein.
And 430, circularly shifting the plurality of target arrays in the initial channel vector according to the second target value to obtain a target channel vector.
In some embodiments, cyclically shifting the plurality of target arrays in the initial channel vector according to the second target value may include: and moving a target array corresponding to the second target value in the plurality of target arrays to a second target position in the initial channel vector through cyclic shift. The second target position may be specifically determined according to actual conditions, for example, the second target position may be the first position.
For example, taking the example that the plurality of target arrays includes 4 sets, if the second target value is 1, the 1 st target array corresponding to the second target value may be moved to the 1 st position in the initial channel vector by cyclic shift, so as to obtain a target channel vector [ H1, H2, H3, H4], where H1 is the 1 st target array, H2 is the 2 nd target array, H3 is the 3 rd target array, and H4 is the 4 th target array. By analogy, if the second target value is 2, the target channel vector is [ H2, H3, H4, H1 ]; if the second target value is 3, the target channel vector is [ H3, H4, H1, H2 ]; if the second target value is 4, the target channel vector is H4, H1, H2, H3.
In the embodiment of the present disclosure, the target element values in the target array are cyclically shifted by the first quantization value, that is, the intra-group cyclic shift is realized by the first quantization value, and the plurality of target arrays are cyclically shifted by the second target value, that is, the inter-group cyclic shift is equivalently realized by the second quantization value, and the intra-group cyclic shift and the inter-group cyclic shift are determined by the quantization values.
Fig. 5 is a block diagram illustrating a key generation apparatus according to an example embodiment. As shown in fig. 5, the key generation apparatus 500 may include:
an obtaining module 510 configured to obtain channel state information and received signal strength;
an operation module 520 configured to perform a target operation according to the plurality of arrays in the channel state information to obtain a plurality of target values;
a quantization module 530 configured to perform quantization processing on the received signal strength and each of the target values respectively to obtain a first quantized value and a plurality of second quantized values;
a replacing module 540 configured to, for each of the arrays, determine one of the elements in the array as a target element value, and replace other elements in the array with zero values, so as to obtain a plurality of target arrays, where the target element value is a target value corresponding to the array or an element value of the one of the elements;
a moving module 550 configured to move the position of the target element value in each of the target arrays and the positions of a plurality of target arrays according to the first quantization value and the plurality of second quantization values to obtain a target channel vector;
and a compression module 560 configured to perform compression processing according to the target channel vector to generate key data.
In some embodiments, the quantization module 530 is further configured to:
converting the received signal strength and each target value into a first preset system respectively to obtain a first initial system number and a plurality of second initial system numbers;
acquiring a first intermediate number at a first intermediate position in the first initial binary number and a second intermediate number at a second intermediate position in each second initial binary number;
and respectively converting the first intermediate number and each second intermediate number into a second preset binary system to obtain the first quantized value and a plurality of second quantized values.
In some embodiments, the quantization module 530 is further configured to:
removing a preset number of elements at a high level and a preset number of elements at a low level from the first initial scale number to obtain a first intermediate number; and
and removing the preset number of elements at the high position and the preset number of elements at the low position in each second initial binary number to obtain each second intermediate number.
In some embodiments, the movement module 550 is further configured to:
for each target array, circularly shifting the target element value in the target array according to a second quantization value corresponding to the target array to obtain an initial channel vector;
and circularly shifting the plurality of target arrays in the initial channel vector according to a first quantization value to obtain the target channel vector.
In some embodiments, the movement module 550 is further configured to:
performing the target operation on the plurality of second quantized values to obtain second target values;
circularly shifting the target element value in each target array according to the first quantization value to obtain an initial channel vector;
and circularly shifting the plurality of target arrays in the initial channel vector according to the second target value to obtain the target channel vector.
In some embodiments, the operation module 520 is further configured to:
performing modulus processing on the elements in each array to obtain the modulus value of the elements in each array;
averaging or maximum value calculating is carried out on the module values of the elements in each array to obtain a plurality of average values or a plurality of maximum values;
determining a plurality of the average values or a plurality of the maximum values as a plurality of the target values.
In some embodiments, the compression module 560 is further configured to:
and multiplying the target channel vector by a compression matrix to generate the key data.
Referring now to FIG. 6, a block diagram of an electronic device 600 suitable for use in implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or installed from the storage means 608, or installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the sender and receiver may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring channel state information and received signal strength; performing target operation according to the plurality of arrays in the channel state information to obtain a plurality of target values; quantizing the received signal strength and each target value to obtain a first quantized value and a plurality of second quantized values; for each array, determining one element in the array as a target element value, and replacing other elements in the array with zero values to obtain a plurality of target arrays, wherein the target element value is a target value corresponding to the array or an element value of the one element; according to the first quantized value and the second quantized values, moving the position of a target element value in each target array and moving the positions of a plurality of target arrays to obtain a target channel vector; and performing compression processing according to the target channel vector to generate key data.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and including conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented by software or hardware. Wherein the name of a module in some cases does not constitute a limitation on the module itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims. With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims (10)

1. A method of key generation, comprising:
acquiring channel state information and received signal strength;
performing target operation according to the plurality of arrays in the channel state information to obtain a plurality of target values;
quantizing the received signal strength and each target value to obtain a first quantized value and a plurality of second quantized values;
for each array, determining one element in the array as a target element value, and replacing other elements in the array with zero values to obtain a plurality of target arrays, wherein the target element value is a target value corresponding to the array or an element value of the one element;
according to the first quantization value and the plurality of second quantization values, moving the position of the target element value in each target array and moving the positions of the plurality of target arrays to obtain a target channel vector;
and performing compression processing according to the target channel vector to generate key data.
2. The method of claim 1, wherein the quantizing the received signal strength and each of the target values to obtain a first quantized value and a plurality of second quantized values comprises:
converting the received signal strength and each target value into a first preset system respectively to obtain a first initial system number and a plurality of second initial system numbers;
acquiring a first intermediate number at a first intermediate position in the first initial binary number and a second intermediate number at a second intermediate position in each second initial binary number;
and respectively converting the first intermediate number and each second intermediate number into a second preset binary system to obtain the first quantized value and a plurality of second quantized values.
3. The key generation method according to claim 2, wherein the obtaining a first intermediate number at a first intermediate position in the first initial binary number and a second intermediate number at a second intermediate position in each of the second initial binary numbers comprises:
removing a preset number of elements at a high level and a preset number of elements at a low level from the first initial scale number to obtain a first intermediate number; and
and removing the preset number of elements at the high position and the preset number of elements at the low position in each second initial binary number to obtain each second intermediate number.
4. The method of claim 1, wherein the moving the position of the target element value in each of the target arrays and the positions of the plurality of target arrays to obtain the target channel vector according to the first quantized value and the plurality of second quantized values comprises:
for each target array, circularly shifting the target element value in the target array according to a second quantization value corresponding to the target array to obtain an initial channel vector;
and circularly shifting the plurality of target arrays in the initial channel vector according to a first quantization value to obtain the target channel vector.
5. The method of claim 1, wherein the moving the position of the target element value in each of the target arrays and the positions of the plurality of target arrays to obtain the target channel vector according to the first quantized value and the plurality of second quantized values comprises:
performing the target operation on the plurality of second quantized values to obtain second target values;
circularly shifting the target element value in each target array according to the first quantization value to obtain an initial channel vector;
and circularly shifting the plurality of target arrays in the initial channel vector according to the second target value to obtain the target channel vector.
6. The method of claim 1, wherein the performing the target operation according to the plurality of arrays in the channel state information to obtain a plurality of target values comprises:
performing modulus processing on the elements in each array to obtain the modulus value of the elements in each array;
averaging or maximizing the modulus values of the elements in each array to obtain a plurality of averages or maxima;
determining a plurality of the average values or a plurality of the maximum values as a plurality of the target values.
7. The method of claim 1, wherein the compressing according to the target channel vector to generate key data comprises:
and multiplying the target channel vector by a compression matrix to generate the key data.
8. A key generation apparatus, comprising:
an acquisition module configured to acquire channel state information and received signal strength;
the operation module is configured to perform target operation according to the plurality of arrays in the channel state information to obtain a plurality of target values;
the quantization module is configured to quantize the received signal strength and each target value respectively to obtain a first quantized value and a plurality of second quantized values;
a replacement module configured to, for each of the arrays, determine one of the elements in the array as a target element value, and replace other elements in the array with zero values, to obtain a plurality of target arrays, where the target element value is a target value corresponding to the array or an element value of the one of the elements;
a moving module configured to move the position of the target element value in each of the target arrays and the positions of a plurality of target arrays according to the first quantization value and the plurality of second quantization values to obtain a target channel vector;
and the compression module is configured to perform compression processing according to the target channel vector to generate key data.
9. A computer-readable medium, on which a computer program is stored, characterized in that the program, when being executed by processing means, carries out the steps of the method of any one of claims 1 to 7.
10. An electronic device, comprising:
a storage device having a computer program stored thereon;
processing means for executing the computer program in the storage means to carry out the steps of the method according to any one of claims 1 to 7.
CN202210742914.XA 2022-06-28 2022-06-28 Key generation method, device, medium and electronic equipment Active CN114845296B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210742914.XA CN114845296B (en) 2022-06-28 2022-06-28 Key generation method, device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210742914.XA CN114845296B (en) 2022-06-28 2022-06-28 Key generation method, device, medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN114845296A true CN114845296A (en) 2022-08-02
CN114845296B CN114845296B (en) 2022-09-06

Family

ID=82574629

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210742914.XA Active CN114845296B (en) 2022-06-28 2022-06-28 Key generation method, device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114845296B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102833736A (en) * 2012-08-30 2012-12-19 重庆大学 Communication key generation method and secure channel selection method for cognitive radio system
WO2015020449A1 (en) * 2013-08-09 2015-02-12 삼성전자 주식회사 Security key generation and management method of pdcp distributed structure for supporting dual connectivity
CN112788599A (en) * 2021-01-27 2021-05-11 东南大学 Physical layer key generation method based on channel state information
CN114513779A (en) * 2021-10-25 2022-05-17 中国银联股份有限公司 Key generation method and data processing method, device and system based on same

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102833736A (en) * 2012-08-30 2012-12-19 重庆大学 Communication key generation method and secure channel selection method for cognitive radio system
WO2015020449A1 (en) * 2013-08-09 2015-02-12 삼성전자 주식회사 Security key generation and management method of pdcp distributed structure for supporting dual connectivity
CN112788599A (en) * 2021-01-27 2021-05-11 东南大学 Physical layer key generation method based on channel state information
CN114513779A (en) * 2021-10-25 2022-05-17 中国银联股份有限公司 Key generation method and data processing method, device and system based on same

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
NASSER ALDAGHRI等: "Physical Layer Secret Key Generation in Static Environments", 《 IEEE TRANSACTIONS ON INFORMATION FORENSICS AND SECURITY》 *
魏浩等: "基于放大转发的双向中继信道密钥生成", 《电子与信息学报》 *

Also Published As

Publication number Publication date
CN114845296B (en) 2022-09-06

Similar Documents

Publication Publication Date Title
CN111931474B (en) Information table generation method, device, electronic equipment and computer readable medium
CN114861790B (en) Method, system and device for optimizing federal learning compression communication
CN114389975A (en) Network bandwidth estimation method, device, system, electronic equipment and storage medium
CN114845296B (en) Key generation method, device, medium and electronic equipment
CN112329044A (en) Information acquisition method and device, electronic equipment and computer readable medium
CN113794479B (en) Method for generating polarization adjustment convolutional code and related equipment
CN111610938A (en) Distributed data code storage method, electronic device and computer readable storage medium
CN112946576B (en) Sound source positioning method and device and electronic equipment
CN110705536A (en) Chinese character recognition error correction method and device, computer readable medium and electronic equipment
CN116072108A (en) Model generation method, voice recognition method, device, medium and equipment
CN115103191A (en) Image processing method, device, equipment and storage medium
CN114780124A (en) Differential upgrading method, device, medium and electronic equipment
CN110209851B (en) Model training method and device, electronic equipment and storage medium
CN113032345A (en) File processing method, device, terminal and non-transitory storage medium
CN116979973B (en) Information decoding method and device, electronic equipment and readable storage medium
CN115833847B (en) Polar code decoding method, polar code decoding device, communication equipment and storage medium
CN116760992B (en) Video encoding, authentication, encryption and transmission methods, devices, equipment and media
CN113971876A (en) Terminal communication method, terminal device, terminal and storage medium
US20150103958A1 (en) Methods, systems, and media for determining whether a signal of interest is present
CN111949627B (en) Method, device, electronic equipment and medium for tabulating log files
CN111314320B (en) Communication method, terminal, server and system based on HTTP
WO2024067777A1 (en) Encoding method, decoding method, encoding apparatus, decoding apparatus, electronic device, and storage medium
CN112468470B (en) Data transmission method and device and electronic equipment
CN116894538B (en) Node carbon emission information generation method and device, electronic equipment and medium
CN116645211B (en) Recommended user information generation method, apparatus, device and computer readable medium

Legal Events

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