WO2021196047A1 - 密钥处理方法和装置 - Google Patents

密钥处理方法和装置 Download PDF

Info

Publication number
WO2021196047A1
WO2021196047A1 PCT/CN2020/082628 CN2020082628W WO2021196047A1 WO 2021196047 A1 WO2021196047 A1 WO 2021196047A1 CN 2020082628 W CN2020082628 W CN 2020082628W WO 2021196047 A1 WO2021196047 A1 WO 2021196047A1
Authority
WO
WIPO (PCT)
Prior art keywords
key
communication system
target type
parameter
key parameter
Prior art date
Application number
PCT/CN2020/082628
Other languages
English (en)
French (fr)
Inventor
王勇
陈璟
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2020/082628 priority Critical patent/WO2021196047A1/zh
Priority to CN202080005167.0A priority patent/CN112771815B/zh
Publication of WO2021196047A1 publication Critical patent/WO2021196047A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/06Network architectures or network communication protocols for network security for supporting key management in a packet data network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords

Definitions

  • This application relates to the field of communication technology, and in particular to a key processing method and device.
  • encryption protection and integrity protection are generally used to ensure communication security.
  • the data to be transmitted is usually encrypted and transmitted.
  • the receiver decrypts the ciphertext and restores the plaintext.
  • the integrity of the data is protected.
  • the receiver verifies the integrity of the message after receiving the data. Successful integrity verification indicates that the message has not been modified during the transmission.
  • both parties in the communication must have encryption and decryption keys and/or integrity protection keys, etc., respectively.
  • a device may be compatible with multiple communication systems, for example, a mobile phone has a Bluetooth system, a WiFi system, and other communication systems. Each communication system needs to have the above encryption and decryption keys and/or integrity protection keys during the communication process.
  • the present application provides a key processing method and device to solve the problem that each communication system needs to negotiate and derive its own key, which results in a large number of key negotiation and derivation processes, low efficiency, and waste of signaling.
  • an embodiment of the present application provides a key processing method, which can be executed by an analysis device.
  • the method includes the following steps: First, a first key parameter K is obtained, where the first key parameter K is the first key parameter K.
  • the first communication system can be determined according to the actual situation, and the embodiment of the present application does not impose special restrictions on this.
  • the first key parameter K can be a key used for encryption and decryption and/or an integrity protection key used by the first communication system. Key etc.
  • the second key parameter K d of the second communication system is determined according to the first key parameter K and the identifier of the second communication system, wherein the first communication system is different from the second communication system.
  • the foregoing second communication system may be determined according to actual conditions, which is not particularly limited in the embodiment of the present application.
  • the aforementioned identifier of the second communication system may be information used to identify the identity of the second communication system, such as the name or number of the second communication system.
  • the above-mentioned second key parameter K d may be a key of the second communication system, or a key used to generate the second communication system, and the key of the second communication system may be a key used for encryption and decryption by the second communication system. And/or integrity protection keys, etc.
  • the first key parameter K of the first communication system is obtained, and the second key parameter K d of the second communication system is determined according to the first key parameter K and the identifier of the second communication system, thereby
  • the key parameters of other communication systems are determined according to the key parameters of a certain communication system, and other communication systems can generate keys and/or keys for encryption and decryption based on the above key parameters. Keys for integrity protection, etc., omit the process of key negotiation and deduction, which greatly saves signaling and improves efficiency.
  • the aforementioned analysis device can be applied to the aforementioned first communication system, and can also be applied to the aforementioned second communication system. Similarly, the aforementioned analysis device can also be applied independently of the aforementioned first communication system and the aforementioned second communication system, etc., The specific setting can be determined according to the actual situation, which is not particularly limited in the embodiment of the present application.
  • the above analysis device is applied to the above first communication system, and after the above determination of the second key parameter K d of the above second communication system, the method further includes:
  • the second key parameter K d is sent to the second communication system, and the second key parameter K d is used for the second communication system to determine the target type key.
  • the analysis device determines the second key parameter K d of the second communication system, it sends the second key parameter K d to the second communication system, and the second communication system may save the second key parameter K d.
  • the key parameter K d is used as the intermediate key of the system, and then the key used for encryption and/or integrity protection is determined, or the second key parameter K d is directly used for the encryption and/or integrity protection of the system , Thus omitting the process of deducing the key agreement of the system.
  • the above-mentioned second key parameter K d corresponds to a target type key.
  • the foregoing determining the second key parameter K d of the second communication system according to the first key parameter K and the identifier of the second communication system includes:
  • the second key parameter K d of the second communication system is determined.
  • the above-mentioned second key parameter K d corresponds to the target type key, where corresponding means that the above-mentioned second key parameter K d is used to generate the target type key, or the above-mentioned second key parameter K d is the target type key.
  • the target type key may be a key used for encryption and decryption and/or a key for integrity protection in the second communication system.
  • the analysis device determines the second key parameter K d of the second communication system, not only the first key parameter K and the identification of the second communication system are considered, but also the type identification of the target type key is considered, thereby accurately generating The second key parameter K d that meets the key requirement of the second communication system, where the type identification of the target type key may be the type name or number of the target type key and other information used to identify the type of the target type key.
  • the above-mentioned target type key is the above-mentioned second key parameter K d .
  • the target type key is the second key parameter K d .
  • a possible design the above method also includes:
  • the target type key is the second key parameter K d .
  • the target type key is the second key parameter K d .
  • the above-mentioned second key parameter K d corresponds to a target type key.
  • the length of the second key parameter K d is greater than the length of the target type key
  • the target type key is M bits from the preset position in the second key parameter K d , where M is the length of the target type key, the preset position is predefined or configured, M Is an integer greater than 0.
  • the aforementioned preset position may include at least one of the most significant bit and the least significant bit. If the length of the second key parameter K d is greater than the length of the target type key, the target type key is M bits from the preset position in the second key parameter K d, for example, the target type The key is M bits starting from the most significant bit in the second key parameter K d , or the target type key is M bits starting from the least significant bit in the second key parameter K d .
  • a possible design the above method also includes:
  • the target type key is M bits from the preset position in the second key parameter K d, where, M is the length of the above-mentioned target type key, the above-mentioned preset position is predefined or configured, and M is an integer greater than 0.
  • the second key parameter K d needs to be intercepted to determine the target
  • the type key is M bits starting from the preset position in the second key parameter K d . For example, it is determined that the target type key is M bits starting from the most significant bit in the second key parameter K d. Or, it is determined that the target type key is M bits starting from the least significant bit in the second key parameter K d.
  • the above-mentioned second key parameter corresponds to the target type key.
  • the foregoing determining the second key parameter K d of the second communication system according to the first key parameter K and the identifier of the second communication system includes:
  • the above-mentioned first key derivation function is determined according to the length of the above-mentioned target type key.
  • the above-mentioned first key derivation function corresponds to the length of the above-mentioned target type key.
  • the length of different keys may correspond to different or the same key derivation functions, and different key types may also correspond to different or the same key derivation functions, depending on the system configuration.
  • the above-mentioned first key derivation function may be set to be determined according to the length of the above-mentioned target type key.
  • the second key parameter K d of the second communication system When determining the second key parameter K d of the second communication system described above, first consider the length of the target type key, thereby determining the first key derivation function, and further, through the first key derivation function, the first key derivation function and the first key derivation function. a parameter identification key K and the second communication system, the second key parameter determining K D of the second communication system, rapid and accurate key is generated that meets the requirements of the second communication system, a second key parameter K d.
  • the key derivation function can be used to derive the input keys of various algorithms.
  • the first key parameter K and the identification of the second communication system can be used as input parameters to generate the second key of the second communication system.
  • the KDF may also include other input parameters, which are not particularly limited in the embodiment of the present application.
  • the above-mentioned second key parameter K d corresponds to a target type key.
  • the foregoing first key parameter K includes multiple first key parameters K 1 -K N , where N is an integer greater than 1;
  • the foregoing determining the second key parameter K d of the second communication system according to the first key parameter K and the identifier of the second communication system including:
  • the target type key is a combination of the multiple second key parameters K d1 -K dN , or the target type key is M in the combination of the multiple second key parameters K d1 -K dN Bits, where M is the length of the above-mentioned target type key, and M is an integer greater than 0.
  • the second communication system can be determined according to the multiple first key parameters K 1 -K N and the identifier of the second communication system Multiple second key parameters K d1 -K dN , so that the above-mentioned target type key is a combination of the above-mentioned multiple second key parameters K d1 -K dN , for example, if the length of the above-mentioned target type key is exactly Equal to the combined length of the multiple second key parameters K d1 -K dN , the target type key is a combination of the multiple second key parameters K d1 -K dN .
  • the above-mentioned multiple second key parameters K d1 -K dN can be combined according to a preset order, and the above-mentioned preset order can be set according to actual conditions, which is not particularly limited in the embodiment of the present application.
  • the above-mentioned target type key K d1
  • the target type key be M bits in the combination of the plurality of second key parameters K d1 -K dN , for example, if the length of the target type key is smaller than the plurality of second key parameters If the combination length of K d1 -K dN is the above-mentioned target type key , M bits in the combination of the above-mentioned multiple second key parameters K d1 -K dN , and M is the length of the above-mentioned target type key.
  • the above-mentioned target type key is M bits starting from a preset position in the combination of the above-mentioned multiple second key parameters K d1 -K dN , wherein the above-mentioned preset position is predefined or configured .
  • the aforementioned preset position may include at least one of the most significant bit and the least significant bit.
  • the foregoing target type key MSB (K d1
  • MSB represents the most significant bit.
  • the above-mentioned multiple first key parameters K 1 -K N are obtained according to multiple freshness parameters.
  • the value of N is determined according to the length of the target type key, or in other words, the value of N corresponds to the length of the target type key, which can also be understood as the value of N and the target type secret. There is a correspondence between the keys.
  • a possible design is that the above-mentioned multiple freshness parameters are randomly generated, or the above-mentioned multiple freshness parameters are multiple equally spaced values, or are timestamp-related values, etc.
  • the foregoing multiple freshness parameters may be determined according to actual conditions, which are not particularly limited in the embodiment of the present application.
  • a possible design the above method also includes:
  • the length of the second key parameter K d is less than the length of the target type key, then according to the plurality of first key parameters K 1 -K N and the identifier of the second communication system, determine the length of the second communication system Multiple second key parameters K d1 -K dN ;
  • the target type key is a combination of the multiple second key parameters K d1 -K dN , or determine that the target type key is M in the combination of the multiple second key parameters K d1 -K dN Bits, where M is the length of the above-mentioned target type key, N is an integer greater than 1, and M is an integer greater than 0.
  • the foregoing determination of the second key parameter K d of the second communication system according to the foregoing first key parameter K and the identifier of the second communication system includes:
  • the second key parameter K d is determined through the second key derivation function, the first key parameter K, and the identifier of the second communication system.
  • the above-mentioned second key derivation function corresponds to the above-mentioned second communication system.
  • the second key derivation function can be set to correspond to the second communication system, and the second key derivation function corresponding to the second communication system can be set according to the first key parameter K and the identification of the second communication system, The above-mentioned second key parameter K d is determined, thereby omitting the process of key negotiation and deduction of the second communication system.
  • the first key derivation function or the second key derivation function includes, for example, Hash-based Message Authentication code (HMAC)-Secure Hash Algorithm (SHA) 256, HMAC-SHA3 and HMAC-SM3, etc.
  • HMAC Hash-based Message Authentication code
  • SHA Secure Hash Algorithm
  • HMAC-SHA3 HMAC-SHA3
  • HMAC-SM3 Hash-based Authentication code
  • the algorithms and standards used in the key derivation function in the implementation of this application include but are not limited to those listed above.
  • the algorithms and standards used in the key derivation function in the implementation of this application may also include other algorithms, Standards, etc.
  • the embodiments of the present application provide another key processing method, which can be executed by an analysis device, and the method includes: acquiring a second key parameter K d of a second communication system, wherein the second key The parameter K d is determined based on the first key parameter K and the identification of the second communication system, and the first key parameter K is the key parameter of the first communication system.
  • the above-mentioned first communication system is different from the above-mentioned second communication system.
  • the first communication system and the second communication system can be determined according to actual conditions, which are not particularly limited in the embodiment of the present application.
  • the first key parameter K may be a key used for encryption and decryption and/or a key for integrity protection in the first communication system.
  • the identifier of the second communication system may be information used to identify the identity of the second communication system, such as the name or number of the second communication system.
  • the above-mentioned second key parameter K d may be a key of the second communication system, or a key used to generate the second communication system, and the key of the second communication system may be a key used for encryption and decryption by the second communication system. And/or integrity protection keys, etc.
  • the embodiment of the present application obtains the second key parameter K d of the second communication system, where the second key parameter K d is determined based on the first key parameter K and the identification of the above-mentioned second communication system, so that:
  • the key parameters of a certain communication system are used to determine the key parameters of the own communication system, and then, based on the above key parameters, keys for encryption and decryption and/or integrity protection are generated
  • the process of key negotiation and deduction is omitted, which greatly saves signaling and improves efficiency.
  • the above-mentioned second key parameter K d corresponds to a target type key.
  • corresponding means that the above-mentioned second key parameter K d is used to generate a target type key, or the above-mentioned second key parameter K d is a target type key.
  • the target type key may be a key used for encryption and decryption and/or a key for integrity protection in the second communication system.
  • the above-mentioned target type key is the above-mentioned second key parameter K d .
  • the target type key is the second key parameter K d .
  • a possible design is that the length of the second key parameter K d is greater than the length of the target type key.
  • the target type key is M bits from the preset position in the second key parameter K d , M is the length of the target type key, the preset position is predefined or configured, and M is greater than An integer of 0.
  • the aforementioned preset position may include at least one of the most significant bit and the least significant bit. If the length of the second key parameter K d is greater than the length of the target type key, the target type key is M bits from the preset position in the second key parameter K d, for example, the target type The key is M bits starting from the most significant bit in the second key parameter K d , or the target type key is M bits starting from the least significant bit in the second key parameter K d .
  • the above-mentioned first key parameter K includes multiple first key parameters K 1 -K N , where N is an integer greater than 1.
  • the multiple second key parameters K d1 -K dN of the second communication system are determined based on the multiple first key parameters K 1 -K N and the identification of the second communication system.
  • the target type key is a combination of the multiple second key parameters K d1 -K dN , or the target type key is M in the combination of the multiple second key parameters K d1 -K dN Bits, M is the length of the above-mentioned target type key, and M is an integer greater than 0.
  • the multiple second key parameters K d1 -K dN of the second communication system may be based on multiple first key parameters K 1 -K N and the identity of the second communication system are determined, so that the target type key is a combination of the multiple second key parameters K d1 -K dN , for example, if the length of the target type key is It is exactly equal to the combined length of the multiple second key parameters K d1 -K dN , and the target type key is a combination of the multiple second key parameters K d1 -K dN .
  • the above-mentioned multiple second key parameters K d1 -K dN can be combined according to a preset order, and the above-mentioned preset order can be set according to actual conditions, which is not particularly limited in the embodiment of the present application.
  • the above-mentioned target type key K d1
  • the target type key be M bits in the combination of the plurality of second key parameters K d1 -K dN , for example, if the length of the target type key is smaller than the plurality of second key parameters If the combination length of K d1 -K dN is the above-mentioned target type key , M bits in the combination of the above-mentioned multiple second key parameters K d1 -K dN , and M is the length of the above-mentioned target type key.
  • the multiple first key parameters K 1 -K N are obtained according to multiple freshness parameters
  • the value of N is determined according to the length of the target type key. In other words, the value of N corresponds to the length of the target type key. It can also be understood that the value of N and the target type key exist Correspondence.
  • an embodiment of the present application provides a key processing device, where the key processing device may be the aforementioned analysis device itself, or a chip or integrated circuit that implements the function of the analysis device.
  • the device includes:
  • An obtaining module configured to obtain a first key parameter K, where the first key parameter K is a key parameter of the first communication system;
  • the determining module is configured to determine the second key parameter K d of the second communication system according to the above-mentioned first key parameter K and the identifier of the second communication system;
  • the above-mentioned first communication system is different from the above-mentioned second communication system.
  • the above-mentioned device further includes a sending module for sending the above-mentioned second key parameter K d to the above-mentioned second communication system after the above-mentioned determining module determines the second key parameter K d of the above-mentioned second communication system,
  • the above-mentioned second key parameter K d is used for the above-mentioned second communication system to determine the target type key.
  • the above-mentioned second key parameter K d corresponds to a target type key.
  • the above determination module is specifically used for:
  • the second key parameter K d of the second communication system is determined.
  • the above-mentioned target type key is the above-mentioned second key parameter K d .
  • the target type key is the second key parameter K d .
  • the above determination module is also used for:
  • the target type key is the second key parameter K d .
  • the above-mentioned second key parameter K d corresponds to the target type key
  • the length of the second key parameter K d is greater than the length of the target type key
  • the target type key is M bits from the preset position in the second key parameter K d , where M is the length of the target type key, the preset position is predefined or configured, M Is an integer greater than 0.
  • the above determination module is also used for:
  • the target type key is M bits from the preset position in the second key parameter K d, where, M is the length of the above-mentioned target type key, the above-mentioned preset position is predefined or configured, and M is an integer greater than 0.
  • the above-mentioned second key parameter corresponds to the target type key
  • the above determination module is specifically used for:
  • the first key derivation function is determined according to the length of the target type key.
  • the first key derivation function corresponds to the length of the target type key, which can also be understood as the first key
  • the above-mentioned second key parameter K d corresponds to the target type key
  • the foregoing first key parameter K includes multiple first key parameters K 1 -K N , where N is an integer greater than 1;
  • the above determination module is specifically used for:
  • the target type key is a combination of the multiple second key parameters K d1 -K dN , or the target type key is M in the combination of the multiple second key parameters K d1 -K dN Bits, where M is the length of the above-mentioned target type key, and M is an integer greater than 0.
  • the above-mentioned target type key is M bits starting from a preset position in the combination of the above-mentioned multiple second key parameters K d1 -K dN , wherein the above-mentioned preset position is predefined or configured .
  • the multiple first key parameters K 1 -K N are obtained according to multiple freshness parameters
  • the value of N is determined according to the length of the target type key. In other words, the value of N corresponds to the length of the target type key. It can also be understood that the value of N and the target type key exist Correspondence.
  • a possible design is that the above-mentioned multiple freshness parameters are randomly generated, or the above-mentioned multiple freshness parameters are multiple equally spaced values, or are timestamp-related values, etc.
  • the above determination module is specifically used for:
  • the second key parameter K d is determined through the second key derivation function, the first key parameter K, and the identifier of the second communication system.
  • the above-mentioned second key derivation function corresponds to the above-mentioned second communication system.
  • the first key derivation function or the second key derivation function includes, for example, HMAC-SHA256, HMAC-SHA3, HMAC-SM3, and so on.
  • the key derivation function used in this application can also use other key derivation functions, which are not particularly limited in the embodiments of this application.
  • the present application provides a key processing device, which includes at least one processor and at least one memory.
  • the at least one memory stores computer instructions; the at least one processor executes the computer instructions stored in the memory, so that the computing device executes the foregoing first aspect or the methods provided by various possible designs of the first aspect, so that the key processing apparatus is deployed.
  • the above-mentioned second aspect or various possible designs of the second aspect provide the key processing device.
  • the present application provides a computer-readable storage medium having computer instructions stored in the computer-readable storage medium, and the computer instructions instruct a computing device to execute the above-mentioned first aspect or the methods provided by various possible designs of the first aspect , Or the computer instruction instructs the computing device to deploy the aforementioned second aspect or various possible designs of the second aspect to provide the key processing device.
  • this application provides a computer program product, the computer program product including computer instructions.
  • the computer instructions are stored in a computer-readable storage medium.
  • the processor of the computing device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computing device executes the above-mentioned first aspect or the methods provided by various possible designs of the first aspect, so that the calculation
  • the device deployment of the above-mentioned second aspect or various possible designs of the second aspect provides the key processing apparatus.
  • an embodiment of the present application provides a chip including at least one processor and a communication interface. Further optionally, the chip further includes at least one memory for storing computer instructions. Wherein, the communication interface is used to provide information input and/or output for the at least one processor.
  • the at least one processor is configured to execute instructions to implement the foregoing first aspect and any possible implementation manner of the first aspect.
  • the at least one processor includes at least one of a digital signal processor (digital signal processor, DSP), a central processing unit (CPU), or a graphics processor (general process unit, GPU).
  • FIG. 1 is a schematic diagram of an application scenario provided by an embodiment of the application
  • FIG. 2 is a schematic flowchart of a key processing method provided by an embodiment of the application.
  • FIG. 3 is a schematic flowchart of another key processing method provided by an embodiment of this application.
  • FIG. 4 is a schematic flowchart of yet another key processing method provided by an embodiment of this application.
  • FIG. 5 is a schematic flowchart of yet another key processing method provided by an embodiment of this application.
  • FIG. 6 is a schematic flowchart of another key processing method provided by an embodiment of this application.
  • FIG. 7 is a schematic flowchart of another key processing method provided by an embodiment of this application.
  • FIG. 8 is a schematic flowchart of another key processing method provided by an embodiment of this application.
  • FIG. 9 is a schematic structural diagram of a key processing device provided by this application.
  • 10A is a schematic diagram of the basic hardware architecture of a key processing device provided by this application.
  • FIG. 10B is a schematic diagram of the basic hardware architecture of another key processing device provided by this application.
  • first and second are only used for descriptive purposes, and cannot be understood as implying or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, the features defined with “first” and “second” may explicitly or implicitly include one or more of these features. In the description of the embodiments of the present application, unless otherwise specified, “multiple” The meaning is two or more.
  • the key processing involved in the embodiment of the present application refers to determining the key parameter of the second communication system by using the key parameter of the first communication system.
  • the first communication system is different from the second communication system, so that each communication system needs to negotiate and derive its own key, which results in a large number of key negotiation and derivation processes, low efficiency, and waste of signaling.
  • the key processing method and device provided in the embodiment of the application can be applied to a communication system.
  • a device has multiple communication systems, and the key processing method and device provided in the embodiment of the application can be applied to one or the other of the device.
  • the above-mentioned device may be a device including multiple communication systems, such as a mobile phone, a vehicle, an unmanned aerial vehicle, or a robot, which is not particularly limited in the embodiment of the present application.
  • FIG. 1 merely describes a possible application scenario of the key processing method provided in the embodiment of the present application by way of example, and the application scenario of the key processing method provided in the embodiment of the present application is not limited to the application scenario shown in FIG. 1.
  • Figure 1 is a schematic diagram of the key processing architecture of the device communication system.
  • the above-mentioned device communication system key processing architecture includes an analysis device 101, a mobile communication module 102, a wireless communication module 103, an antenna 1, an antenna 2, and a network or other device 104 that communicates with the device. .
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the key processing architecture of the device communication system.
  • the above-mentioned device communication system key processing architecture may include more or less components than those shown in the figure, or combine certain components, or split certain components, or different component arrangements.
  • the specific can be determined according to the actual application scenario, and there is no restriction here.
  • the components shown in Figure 1 can be implemented in hardware, software, or a combination of software and hardware.
  • the mobile communication module 102 may include a wireless communication system such as 2G/3G/4G/5G.
  • the wireless communication module 103 may include wireless local area networks (WLAN) such as Wi-Fi, Bluetooth (bluetooth, BT), global navigation satellite system (GNSS), frequency modulation (FM), Near-field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication systems, as well as possible short-range communication technologies in the future.
  • WLAN wireless local area networks
  • Wi-Fi such as Wi-Fi, Bluetooth (bluetooth, BT), global navigation satellite system (GNSS), frequency modulation (FM), Near-field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication systems, as well as possible short-range communication technologies in the future.
  • the antenna 1 is coupled with the mobile communication module 102
  • the antenna 2 is coupled with the wireless communication module 103, and can communicate with the network and other devices through wireless communication technology.
  • wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), and broadband code division. Multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE) technology, etc.
  • GSM global system for mobile communications
  • GPRS general packet radio service
  • CDMA code division multiple access
  • WCDMA wideband code division multiple access
  • TD-SCDMA time-division code division multiple access
  • LTE long term evolution
  • the analysis device 101 can be applied to the 2G/3G/4G/5G and other wireless communication systems of the above-mentioned mobile communication module 102, and can also be applied to the above-mentioned WLAN of the wireless communication module 103 such as Wi-Fi, BT, GNSS, FM, In wireless communication systems such as NFC and IR, similarly, the analysis device 101 can also be applied independently of the above-mentioned mobile communication module and wireless communication module, etc.
  • the specific setting can be determined according to the actual situation, and the embodiment of the application does not specifically limit this . Exemplarily, taking the analysis device 101 applied to the above-mentioned mobile communication module and/or wireless communication module as an example, in FIG.
  • the analysis device 101 is connected to the above-mentioned mobile communication module 102 and the above-mentioned wireless communication module 103,
  • the representation analysis device 101 can be applied to one or more communication systems of the above-mentioned mobile communication module 102 and the above-mentioned wireless communication module 103.
  • the analyzing device 101 is used for determining the key parameter of another communication system by using the key parameter of a certain communication system. For example, using the key parameters of BT to determine the key parameters of Wi-Fi, so that each communication system of the device needs to negotiate and derive its own key, resulting in many key negotiation processes, low efficiency, and waste of signaling problem.
  • the execution subject of this method may be the analysis device 101 in FIG. 1.
  • the workflow of the analysis device 101 mainly includes an acquisition phase and a determination phase.
  • the analysis device 101 acquires the key parameters of the first communication system.
  • the analysis device 101 determines the second key parameter of the second communication system according to the key parameter of the first communication system and the identification of the second communication system, and further, in the case of complete independence between the respective communication systems, Determine the key parameters of other communication systems based on the key parameters of a certain communication system, so that other communication systems can generate keys for encryption and decryption and/or integrity protection keys, etc. based on the above key parameters, omitting key agreement
  • the deduction process greatly saves signaling and improves efficiency.
  • FIG. 2 is a schematic flowchart of a key processing method provided in an embodiment of this application.
  • the execution subject of this embodiment may be the analysis device 101 in FIG. 1, and the specific execution subject may be determined according to actual application scenarios. As shown in Figure 2, the method may include the following steps.
  • S201 Acquire a first key parameter K, where the first key parameter K is a key parameter of the first communication system.
  • the above-mentioned first key parameter K may be a key used for encryption and decryption and/or a key for integrity protection in the first communication system.
  • the above-mentioned first communication system may be determined according to actual conditions, and the embodiment of the present application does not specifically limit this.
  • the first communication system may be a BT system or other possible short-range communication technologies.
  • S202 Determine the second key parameter K d of the second communication system according to the above-mentioned first key parameter K and the identifier of the second communication system.
  • the above-mentioned first communication system is different from the above-mentioned second communication system.
  • the above-mentioned second communication system can also be determined according to actual conditions.
  • the embodiment of the present application does not impose any special restrictions on this.
  • each communication system in a mobile phone is also taken as an example.
  • the first communication system is a BT system
  • the second communication system can be WiFi. system.
  • the aforementioned identifier of the second communication system may be information used to identify the identity of the second communication system, such as the name or number of the second communication system.
  • the above-mentioned second key parameter K d may be a key of the second communication system, or a key used to generate the second communication system, and the key of the second communication system may be a key used for encryption and decryption by the second communication system. And/or integrity protection keys, etc.
  • the above-mentioned analysis device is applied in the above-mentioned first communication system, and after the above-mentioned determining the second key parameter K d of the above-mentioned second communication system, the method further includes:
  • the second key parameter K d is sent to the second communication system, and the second key parameter K d is used for the second communication system to determine the target type key.
  • the analysis device determines the second key parameter K d of the second communication system, it sends the second key parameter K d to the second communication system, and the second communication system may save the second key parameter K d.
  • the key parameter K d is used as the intermediate key of the system, and then the key used for encryption and/or integrity protection is determined, or the second key parameter K d is directly used for the encryption and/or integrity protection of the system , Thus omitting the process of deducing the key agreement of the system.
  • the key parameters of other communication systems are determined according to the key parameters of a certain communication system, so that other communication systems can generate keys for encryption and decryption based on the above key parameters. / Or integrity-protected keys, etc., omit the process of key negotiation and deduction, save signaling and improve efficiency.
  • FIG. 3 is a schematic flowchart of another key processing method proposed in an embodiment of this application.
  • the execution subject of this embodiment may be the analysis device 101 in the embodiment shown in FIG. 1. As shown in Figure 3, the method includes:
  • S301 Acquire a first key parameter K, where the first key parameter K is a key parameter of the first communication system.
  • step S301 is implemented in the same manner as the foregoing step S201, and will not be repeated here.
  • the second key parameter K d corresponds to the target type key, and the second key of the second communication system is determined according to the first key parameter K, the identifier of the second communication system, and the type identifier of the target type key. Key parameter K d .
  • the above-mentioned first communication system is different from the above-mentioned second communication system.
  • the above-mentioned second key parameter K d corresponds to the target type key, where corresponding means that the above-mentioned second key parameter K d is used to generate the target type key, or the above-mentioned second key parameter K d is the target type key.
  • the target type key may be a key used for encryption and decryption and/or a key for integrity protection in the second communication system.
  • the analysis device determines the second key parameter K d of the second communication system, not only the first key parameter K and the identification of the second communication system are considered, but also the type identification of the target type key is considered, thereby accurately generating The second key parameter K d that meets the key requirement of the second communication system, where the type identification of the target type key may be the type name or number of the target type key and other information used to identify the type of the target type key.
  • the method before the foregoing determining the second key parameter K d of the foregoing second communication system, the method further includes:
  • the target type key corresponding to the key parameters of Wi-Fi, such as pairwise transient key (PTK), The group transient key (Group Transient Key, GTK), and then determine the Wi-Fi key parameters according to the key parameters of the BT, the identifier of the Wi-Fi system, and the type identifier of the target type key.
  • PTK pairwise transient key
  • GTK Group Transient Key
  • the second key parameter K d by considering the first key parameter K and the identification of the second communication system, and the type identification of the target type key corresponding to the second key parameter, it is possible to accurately generate a key that meets the requirements of the second communication system.
  • the second key parameter K d and by obtaining the first key parameter K of the first communication system, the second key parameter K d of the second communication system can be determined, which can be completely independent of each communication system , Determine the key parameters of other communication systems based on the key parameters of a certain communication system, so that other communication systems can generate keys for encryption and decryption and/or integrity protection keys based on the above key parameters, and omit the key
  • the process of negotiation and deduction greatly saves signaling and improves efficiency.
  • FIG. 4 is a schematic flowchart of another key processing method proposed in an embodiment of this application.
  • the execution subject of this embodiment may be the analysis device 101 in the embodiment shown in FIG. 1. As shown in Figure 4, the method includes:
  • S401 Acquire a first key parameter K, where the first key parameter K is a key parameter of the first communication system.
  • step S401 is implemented in the same manner as the foregoing step S201, and will not be repeated here.
  • the second key parameter K d corresponds to the target type key, and the second key parameter K d of the second communication system is determined according to the first key parameter K and the identifier of the second communication system.
  • the above-mentioned first communication system is different from the above-mentioned second communication system.
  • the above-mentioned target type key is the above-mentioned second key parameter K d .
  • the target type key is the second key parameter K d .
  • the method further includes:
  • the target type key is the second key parameter K d .
  • the target type key is determined to be the second key parameter K d , and further, the second communication system can directly transfer the second key
  • the parameter K d is used for encryption and/or integrity protection of the system, thereby omitting the process of key negotiation and deduction of the system.
  • the second key parameter K d of the second communication system is determined by obtaining the first key parameter K of the first communication system. If the length of the second key parameter K d is equal to the second key parameter K The length of the target type key corresponding to d , the target type key is the above-mentioned second key parameter K d , thus, in the case of complete independence between each communication system, other communication systems are determined according to the key parameters of a certain communication system The key parameters of, so that other communication systems can generate keys for encryption and decryption and/or integrity protection based on the above key parameters, omitting the process of key negotiation and deduction, greatly saving signaling and improving efficient.
  • the above object of the second type key K d key parameter from a predetermined start position M bits.
  • FIG. 5 is a schematic flowchart of another key processing method proposed in an embodiment of this application.
  • the execution subject of this embodiment may be the analysis device 101 in the embodiment shown in FIG. 1.
  • the method includes:
  • S501 Acquire a first key parameter K, where the first key parameter K is a key parameter of the first communication system.
  • step S501 is implemented in the same manner as the foregoing step S201, and will not be repeated here.
  • the second key parameter K d corresponds to the target type key, and the second key parameter K d of the second communication system is determined according to the first key parameter K and the identifier of the second communication system.
  • the above-mentioned first communication system is different from the above-mentioned second communication system.
  • the length of the second key parameter K d is greater than the length of the target type key, and the target type key is M bits from the preset position in the second key parameter K d, where M is the above
  • M is an integer greater than 0.
  • the aforementioned preset position may include at least one of the most significant bit and the least significant bit. If the length of the second key parameter K d is greater than the length of the target type key, the target type key is M bits from the preset position in the second key parameter K d, for example, the target type The key is M bits starting from the most significant bit in the second key parameter K d , or the target type key is M bits starting from the least significant bit in the second key parameter K d .
  • the above-mentioned preset position can be set according to actual conditions in addition to the above-mentioned conditions, which is not particularly limited in the embodiment of the present application.
  • the method further includes:
  • the target type key is M bits from the preset position in the second key parameter K d, where, M is the length of the above-mentioned target type key, the above-mentioned preset position is predefined or configured, and M is an integer greater than 0.
  • the second key parameter K d needs to be intercepted to determine the target
  • the type key is M bits starting from the preset position in the second key parameter K d . For example, it is determined that the target type key is M bits starting from the most significant bit in the second key parameter K d. Or, it is determined that the target type key is M bits starting from the least significant bit in the second key parameter K d.
  • the second key parameter K d of the second communication system is determined by obtaining the first key parameter K of the first communication system. If the length of the second key parameter K d is greater than the second key parameter K
  • the length of the target type key corresponding to d , the target type key is M bits from the preset position in the second key parameter K d , where M is the length of the target type key, so that
  • the key parameters of other communication systems are determined according to the key parameters of a certain communication system, so that other communication systems can generate keys for encryption and decryption and/or integrity based on the above key parameters.
  • the process of key negotiation and deduction is omitted, which greatly saves signaling and improves efficiency.
  • FIG. 6 is a schematic flowchart of another key processing method proposed in an embodiment of this application.
  • the execution subject of this embodiment may be the analysis device 101 in the embodiment shown in FIG. 1.
  • the method includes:
  • S601 Acquire a first key parameter K, where the first key parameter K is a key parameter of the first communication system.
  • step S601 is implemented in the same manner as the foregoing step S201, and will not be repeated here.
  • the second key parameter K d corresponds to the target type key, and determines the length of the foregoing target type key.
  • S603 Determine the second key parameter K d of the second communication system according to the first key derivation function, the first key parameter K, and the identifier of the second communication system.
  • the above-mentioned first key derivation function is determined according to the length of the above-mentioned target type key.
  • the above-mentioned first key derivation function corresponds to the length of the above-mentioned target type key.
  • the length of different keys may correspond to different or the same key derivation functions, and different key types may also correspond to different or the same key derivation functions, depending on the system configuration.
  • the above-mentioned first key derivation function may be set to be determined according to the length of the above-mentioned target type key.
  • the second key parameter K d of the second communication system When determining the second key parameter K d of the second communication system described above, first consider the length of the target type key, thereby determining the first key derivation function, and further, through the first key derivation function, the first key derivation function and the first key derivation function. a parameter identification key K and the second communication system, the second key parameter determining K D of the second communication system, rapid and accurate key is generated that meets the requirements of the second communication system, a second key parameter K d.
  • the key derivation function can be used to derive the input keys of various algorithms.
  • the first key parameter K and the identification of the second communication system can be used as input parameters to generate the second key of the second communication system.
  • KDF may also include other input parameters.
  • the above-mentioned second key parameter K d corresponds to the target type key.
  • the input parameters of KDF also include the type identification of the target type key.
  • the input parameters of KDF also It may include the identifier of the first communication system, which is not particularly limited in the embodiment of the present application.
  • the foregoing determining the foregoing second key parameter K d of the second communication system may further include:
  • the second key parameter K d is determined by the first key derivation function, the first key parameter K, the identification of the second communication system, and the type identification of the target type key.
  • the type identification of the target type key is an optional parameter.
  • the foregoing determining the foregoing second key parameter K d may further include:
  • the second key parameter K d , K is determined by the first key derivation function, the first key parameter K, the identification of the first communication system, the identification of the second communication system, and the type identification of the target type key.
  • d KDF (K, the identification of the first communication system, the identification of the second communication system, the type identification of the target type key), where the identification of the first communication system and the type identification of the target type key are optional parameters.
  • the aforementioned first key derivation function may include, for example, HMAC-SHA256, HMAC-SHA3, and HMAC-SM3.
  • the key derivation function used in this application can also use other key derivation functions, which are not particularly limited in the embodiments of this application.
  • the algorithm and standard used in the key derivation function in the implementation of this application may also include other algorithms, standards, etc., which are not particularly limited in the embodiments of this application.
  • the above-mentioned key derivation function may include different algorithms, such as the above-mentioned HMAC-SHA256, HMAC-SHA3, and HMAC-SM3. Therefore, the input parameters of KDF may also include algorithm identifiers, which are used to identify different algorithms. Correspondingly, the above determination of the above-mentioned second key parameter K d may also include:
  • the second key parameter K is determined by the first key derivation function, the first key parameter K, the identification of the first communication system, the identification of the second communication system, the type identification of the target type key, and the algorithm identification.
  • d , K d KDF (K, the identification of the first communication system, the identification of the second communication system, the type identification of the target type key, the algorithm identification), where the identification of the first communication system, the type of the target type key.
  • KDF K, the identification of the first communication system, the identification of the second communication system, the type identification of the target type key, the algorithm identification
  • the identification and algorithm identification are optional parameters.
  • the first key derivation function is determined by considering the length of the above-mentioned target type key, and further, through the first key derivation function, the above-mentioned first key parameter K, and the identification of the second communication system, Generate the second key parameter K d that meets the key requirements of the second communication system, and by obtaining the first key parameter K of the first communication system to determine the second key parameter K d of the second communication system, it can be
  • the key parameters of other communication systems are determined according to the key parameters of a certain communication system, so that other communication systems can generate keys for encryption and decryption and/or integrity based on the above key parameters.
  • the process of key negotiation and deduction is omitted, which greatly saves signaling and improves efficiency.
  • FIG. 7 is a schematic flowchart of another key processing method proposed in an embodiment of this application.
  • the execution subject of this embodiment may be the analysis device 101 in the embodiment shown in FIG. 1. As shown in Figure 7, the method includes:
  • S701 Acquire a first key parameter K, where the first key parameter K is a key parameter of the first communication system.
  • step S701 is implemented in the same manner as the foregoing step S201, and will not be repeated here.
  • the second key parameter K d corresponds to the target type key, and the above-mentioned first key parameter K includes multiple first key parameters K 1 -K N , according to the above-mentioned multiple first key parameters K 1 -K N
  • the identification of the second communication system determine the plurality of second key parameters K d1 -K dN of the second communication system, where N is an integer greater than 1.
  • the target type key is a combination of the multiple second key parameters K d1 -K dN , or the target type key is M in the combination of the multiple second key parameters K d1 -K dN Bits, where M is the length of the above-mentioned target type key, and M is an integer greater than 0.
  • the second communication system can be determined according to the multiple first key parameters K 1 -K N and the identifier of the second communication system Multiple second key parameters K d1 -K dN , so that the above-mentioned target type key is a combination of the above-mentioned multiple second key parameters K d1 -K dN , for example, if the length of the above-mentioned target type key is exactly Equal to the combined length of the multiple second key parameters K d1 -K dN , the target type key is a combination of the multiple second key parameters K d1 -K dN .
  • the above-mentioned multiple second key parameters K d1 -K dN can be combined according to a preset order, and the above-mentioned preset order can be set according to actual conditions, which is not particularly limited in the embodiment of the present application.
  • the above-mentioned target type key K d1
  • the target type key be M bits in the combination of the plurality of second key parameters K d1 -K dN , for example, if the length of the target type key is smaller than the plurality of second key parameters If the combination length of K d1 -K dN is the above-mentioned target type key , M bits in the combination of the above-mentioned multiple second key parameters K d1 -K dN , and M is the length of the above-mentioned target type key.
  • the target type key is M bits starting from a preset position in the combination of the plurality of second key parameters K d1 -K dN, where the preset position is predefined Or configured.
  • the aforementioned preset position may include at least one of the most significant bit and the least significant bit.
  • the foregoing target type key MSB (K d1
  • MSB represents the most significant bit.
  • the foregoing multiple first key parameters K 1 -K N are obtained according to multiple freshness parameters (fresh).
  • the value of N is determined according to the length of the target type key, or in other words, the value of N corresponds to the length of the target type key, which can also be understood as the value of N and the target type secret. There is a correspondence between the keys.
  • the above-mentioned multiple freshness parameters are randomly generated, or the above-mentioned multiple freshness parameters are multiple equally spaced values, or are timestamp-related values, or the like.
  • the foregoing multiple freshness parameters may be determined according to actual conditions, which are not particularly limited in the embodiment of the present application.
  • the above method further includes:
  • the length of the second key parameter K d is less than the length of the target type key, then according to the plurality of first key parameters K 1 -K N and the identifier of the second communication system, determine the length of the second communication system A plurality of second key parameters K d1 -K dN , where N is an integer greater than 1;
  • the target type key is a combination of the multiple second key parameters K d1 -K dN , or determine that the target type key is M in the combination of the multiple second key parameters K d1 -K dN Bits, where M is the length of the above-mentioned target type key.
  • the second key parameter K d of the second communication system is determined by obtaining the first key parameter K of the first communication system. If the length of the second key parameter K d is less than the second key parameter K The length of the target type key corresponding to d is determined based on the plurality of first key parameters K 1 -K N included in the first key parameter K and the identifier of the second communication system to determine the plurality of first key parameters of the second communication system.
  • Two key parameters K d1 -K dN is a combination of the above multiple second key parameters K d1 -K dN , or the above target type key is the above multiple second key parameters K d1 -M bits in the combination of K dN , where M is the length of the above-mentioned target type key, so that in the case of complete independence between each communication system, other communication systems are determined according to the key parameters of a certain communication system
  • the key parameters of so that other communication systems can generate keys for encryption and decryption and/or integrity protection based on the above key parameters, omitting the process of key negotiation and deduction, greatly saving signaling and improving efficient.
  • FIG. 8 is a schematic flowchart of another key processing method proposed in an embodiment of this application.
  • the execution subject of this embodiment may be the analysis device 101 in the embodiment shown in FIG. 1. As shown in Figure 8, the method includes:
  • S801 Acquire a first key parameter K, where the first key parameter K is a key parameter of the first communication system.
  • step S801 is implemented in the same manner as the foregoing step S201, and will not be repeated here.
  • S802 Determine the second key parameter K d according to the second key derivation function, the first key parameter K, and the identifier of the second communication system.
  • the above-mentioned second key derivation function corresponds to the above-mentioned second communication system.
  • the second key derivation function can be set to correspond to the second communication system, and the second key derivation function corresponding to the second communication system can be set according to the first key parameter K and the identification of the second communication system, The above-mentioned second key parameter K d is determined, thereby omitting the process of key negotiation and deduction of the second communication system.
  • the key derivation function can be used to derive the input keys of various algorithms.
  • the first key parameter K and the identification of the second communication system can be used as input parameters to generate the second key of the second communication system.
  • KDF may also include other input parameters.
  • the first key parameter K includes multiple first key parameters K 1 -K N to determine multiple second key parameters K of the second communication system. Take d1 -K dN as an example.
  • the input parameters of the KDF also include the type identification of the target type key, and the multiple second key parameters K d1 -K dN for determining the above-mentioned second communication system may include:
  • the multiple second key parameters K d1 -K of the second communication system are determined through KDF, the above-mentioned multiple first key parameters K 1 -K N , the identification of the second communication system, and the type identification of the above-mentioned target type key dN .
  • the multiple first key parameters K 1 -K N , the identification of the second communication system, and the type identification of the aforementioned target type key may be used as input parameters to generate multiple second secrets of the second communication system.
  • Key parameters K d1 -K dN , second key parameter KDF (first key parameter, identification of the second communication system, type identification of the target type key).
  • the type identification of the target type key is an optional parameter.
  • KDF may also include other input parameters, such as the identification of the first communication system.
  • the multiple first key parameters K 1 -K N are obtained based on multiple freshness parameters, and the input parameters of KDF are also May include freshness parameters.
  • the foregoing determining the plurality of second key parameters K d1 -K dN of the second communication system may also include: through the KDF, the plurality of first The key parameters K 1 -K N , the identification of the first communication system, the identification of the second communication system, and the type identification of the above-mentioned target type key, determine a plurality of second key parameters K d1 -K dN of the second communication system ,
  • the second key parameter KDF (the first key parameter, the identification of the first communication system, the identification of the second communication system, the type identification of the target type key), where the identification of the first communication system and the target type are secret
  • the type of the key is identified as an optional parameter.
  • the foregoing determination of the multiple second key parameters K d1 -K dN of the second communication system may also include: through KDF, the foregoing multiple first key parameters K 1 -K N.
  • the parameters, the identification of the first communication system, and the type identification of the target type key are optional parameters.
  • the above-mentioned second key derivation function may include, for example, HMAC-SHA256, HMAC-SHA3, and HMAC-SM3.
  • the key derivation function used in this application can also use other key derivation functions, which are not particularly limited in the embodiments of this application.
  • the algorithm and standard used in the key derivation function in the implementation of this application may also include other algorithms, standards, etc., which are not particularly limited in the embodiments of this application.
  • the above-mentioned key derivation function may include different algorithms, such as the above-mentioned HMAC-SHA256, HMAC-SHA3, and HMAC-SM3. Therefore, the input parameters of KDF may also include algorithm identifiers, which are used to identify different algorithms.
  • the foregoing determination of the multiple second key parameters K d1 -K dN of the second communication system may also include:
  • KDF KDF (first key parameter, freshness parameter, identification of the first communication system, identification of the second communication system, target type Key type identification, algorithm identification), where the freshness parameter, the identification of the first communication system, the type identification of the target type key, and the algorithm identification are optional parameters.
  • the second key parameter K d that meets the key requirements of the second communication system is accurately generated according to the above-mentioned first key parameter K and the identification of the second communication system through the second key derivation function, and, By acquiring the first key parameter K of the first communication system, and determining the second key parameter K d of the second communication system, it can be determined according to the key parameter of a certain communication system under the condition that each communication system is completely independent
  • the key parameters of other communication systems enable other communication systems to generate encryption and decryption keys and/or integrity protection keys based on the above key parameters, omitting the process of key negotiation and deduction, and greatly saving signaling , Improved efficiency.
  • FIG. 9 is a schematic structural diagram of a key processing device provided by this application.
  • the device includes: an obtaining module 901, a determining module 902, and a sending module 903.
  • the key processing device here may be the analysis device itself, or a chip or integrated circuit that realizes the function of the analysis device. It should be noted here that the division of the acquisition module and the determination module is only a logical function division, and the two may be integrated or independent physically.
  • the obtaining module 901 is configured to obtain a first key parameter K, which is a key parameter of the first communication system.
  • the determining module 902 is configured to determine the second key parameter K d of the second communication system according to the above-mentioned first key parameter K and the identifier of the second communication system.
  • the above-mentioned first communication system is different from the above-mentioned second communication system.
  • the sending module 903 is configured to send the second key parameter K d to the second communication system after the determining module 902 determines the second key parameter K d of the second communication system, and the second key parameter K d is The two key parameter K d is used for the above-mentioned second communication system to determine the target type key.
  • the above-mentioned second key parameter K d corresponds to a target type key.
  • the above determining module 902 is specifically used for:
  • the second key parameter K d of the second communication system is determined.
  • the above-mentioned target type key is the above-mentioned second key parameter K d .
  • the target type key is the second key parameter K d .
  • the above determination module 902 is also used for:
  • the target type key is the second key parameter K d .
  • the above-mentioned second key parameter K d corresponds to the target type key
  • the length of the second key parameter K d is greater than the length of the target type key
  • the target type key is M bits from the preset position in the second key parameter K d , where M is the length of the target type key, the preset position is predefined or configured, M Is an integer greater than 0.
  • the above determination module 902 is also used for:
  • the target type key is M bits from the preset position in the second key parameter K d, where, M is the length of the above-mentioned target type key, and the above-mentioned preset position is predefined or configured.
  • the above-mentioned second key parameter corresponds to the target type key
  • the above determining module 902 is specifically used for:
  • the above-mentioned first key derivation function is determined according to the length of the above-mentioned target type key.
  • the above-mentioned first key derivation function corresponds to the length of the above-mentioned target type key.
  • the above-mentioned second key parameter K d corresponds to the target type key
  • the foregoing first key parameter K includes multiple first key parameters K 1 -K N , where N is an integer greater than 1;
  • the above determining module 902 is specifically used for:
  • the target type key is a combination of the multiple second key parameters K d1 -K dN , or the target type key is M in the combination of the multiple second key parameters K d1 -K dN Bits, where M is the length of the above-mentioned target type key, and M is an integer greater than 0.
  • the above-mentioned target type key is M bits starting from a preset position in the combination of the above-mentioned multiple second key parameters K d1 -K dN , wherein the above-mentioned preset position is predefined or configured .
  • the multiple first key parameters K 1 -K N are obtained according to multiple freshness parameters
  • the value of N is determined according to the length of the target type key. In other words, the value of N corresponds to the length of the target type key. It can also be understood that the value of N and the target type key exist Correspondence.
  • a possible design is that the above-mentioned multiple freshness parameters are randomly generated, or the above-mentioned multiple freshness parameters are multiple equally spaced values, or are timestamp-related values, etc.
  • the above determining module 902 is specifically used for:
  • the second key parameter K d is determined through the second key derivation function, the first key parameter K, and the identifier of the second communication system.
  • the above-mentioned second key derivation function corresponds to the above-mentioned second communication system.
  • the first key derivation function or the second key derivation function includes at least one of HMAC-SHA256, HMAC-SHA3, and HMAC-SM3.
  • the device in this embodiment can correspondingly be used to implement the technical solutions in the embodiments shown in the above method, and its implementation principles, implementation details, and technical effects are similar, and will not be repeated here.
  • FIGS. 10A and 10B schematically provide a possible basic hardware architecture of the key processing apparatus described in this application.
  • the key processing apparatus 1000 includes at least one processor 1001 and a communication interface 1003. Further optionally, it may also include a memory 1002 and a bus 1004.
  • the key processing device 1000 may be a computer or a server, which is not particularly limited in this application.
  • the number of processors 1001 may be one or more, and FIGS. 10A and 10B only illustrate one of the processors 1001.
  • the processor 1001 may be a central processing unit (CPU), a graphics processing unit (GPU), or a digital signal processor (DSP). If the key processing apparatus 1000 has multiple processors 1001, the types of the multiple processors 1001 may be different or may be the same. Optionally, the multiple processors 1001 of the key processing apparatus 1000 may also be integrated into a multi-core processor.
  • the memory 1002 stores computer instructions and data; the memory 1002 can store computer instructions and data required to implement the above-mentioned key processing method provided by this application.
  • the memory 1002 stores instructions for implementing the steps of the above-mentioned key processing method.
  • the memory 1002 may be any one or any combination of the following storage media: non-volatile memory (for example, read only memory (ROM), solid state drive (SSD), hard disk (HDD), optical disk)), volatile memory.
  • the communication interface 1003 may provide information input/output for the at least one processor. It may also include any one or any combination of the following devices: a network interface (for example, an Ethernet interface), a wireless network card, and other devices with a network access function.
  • the communication interface 1003 may also be used for data communication between the key processing apparatus 1000 and other computing devices or terminals.
  • the bus 1004 is represented by a thick line in FIGS. 10A and 10B.
  • the bus 1004 can connect the processor 1001 with the memory 1002 and the communication interface 1003. In this way, through the bus 1004, the processor 1001 can access the memory 1002, and can also use the communication interface 1003 to interact with other computing devices or terminals.
  • the key processing device 1000 executes the computer instructions in the memory 1002, so that the key processing device 1000 implements the above key processing method provided in this application, or causes the key processing device 1000 to deploy the above key processing device.
  • the memory 1002 may include an acquiring module 901 and a determining module 902.
  • the inclusion here only refers to the functions of the acquiring module and the determining module that can be implemented respectively when the instructions stored in the memory are executed, and are not limited to the physical structure.
  • the obtaining module 901 is configured to obtain a first key parameter K, which is a key parameter of the first communication system.
  • the determining module 902 is configured to determine the second key parameter K d of the second communication system according to the above-mentioned first key parameter K and the identifier of the second communication system.
  • the above-mentioned first communication system is different from the above-mentioned second communication system.
  • the memory 1002 further includes a sending module 903 for sending to the second communication system after the determining module 902 determines the second key parameter K d of the second communication system
  • the above-mentioned second key parameter K d and the above-mentioned second key parameter K d are used for the above-mentioned second communication system to determine the target type key.
  • the above-mentioned second key parameter K d corresponds to a target type key.
  • the above determining module 902 is specifically used for:
  • the second key parameter K d of the second communication system is determined.
  • the above-mentioned target type key is the above-mentioned second key parameter K d .
  • the target type key is the second key parameter K d .
  • the above determination module 902 is also used for:
  • the target type key is the second key parameter K d .
  • the above-mentioned second key parameter K d corresponds to the target type key
  • the length of the second key parameter K d is greater than the length of the target type key
  • the target type key is M bits from the preset position in the second key parameter K d , where M is the length of the target type key, the preset position is predefined or configured, M Is an integer greater than 0.
  • the above determination module 902 is also used for:
  • the target type key is M bits from the preset position in the second key parameter K d, where, M is the length of the above-mentioned target type key, and the above-mentioned preset position is predefined or configured.
  • the above-mentioned second key parameter corresponds to the target type key
  • the above determining module 902 is specifically used for:
  • the above-mentioned first key derivation function is determined according to the length of the above-mentioned target type key.
  • the above-mentioned first key derivation function corresponds to the length of the above-mentioned target type key.
  • the above-mentioned second key parameter K d corresponds to the target type key
  • the foregoing first key parameter K includes multiple first key parameters K 1 -K N , where N is an integer greater than 1;
  • the above determining module 902 is specifically used for:
  • the target type key is a combination of the multiple second key parameters K d1 -K dN , or the target type key is M in the combination of the multiple second key parameters K d1 -K dN Bits, where M is the length of the above-mentioned target type key, and M is an integer greater than 0.
  • the above-mentioned target type key is M bits starting from a preset position in the combination of the above-mentioned multiple second key parameters K d1 -K dN , wherein the above-mentioned preset position is predefined or configured .
  • the multiple first key parameters K 1 -K N are obtained according to multiple freshness parameters
  • the value of N is determined according to the length of the target type key. In other words, the value of N corresponds to the length of the target type key. It can also be understood that the value of N and the target type key exist Correspondence.
  • a possible design is that the above-mentioned multiple freshness parameters are randomly generated, or the above-mentioned multiple freshness parameters are multiple equally spaced values, or are timestamp-related values, etc.
  • the above determining module 902 is specifically used for:
  • the second key parameter K d is determined through the second key derivation function, the first key parameter K, and the identifier of the second communication system.
  • the above-mentioned second key derivation function corresponds to the above-mentioned second communication system.
  • the first key derivation function or the second key derivation function includes at least one of HMAC-SHA256, HMAC-SHA3, and HMAC-SM3.
  • the above-mentioned key processing device can be implemented by software as shown in FIGS. 10A and 10B, and can also be implemented as a hardware module or as a circuit unit through hardware.
  • This application provides a computer-readable storage medium, and the computer program product includes computer instructions that instruct a computing device to execute the above key processing method provided by this application.
  • the present application provides a chip including at least one processor and a communication interface, and the communication interface provides information input and/or output for the at least one processor. Further, the chip may also include at least one memory, and the memory is used to store computer instructions. The at least one processor is used to call and run the computer instructions to execute the above key processing method provided by this application.
  • the terminal may be a means of transportation or a smart device, such as a vehicle, an unmanned aerial vehicle, an unmanned transportation vehicle, or a robot, etc., which includes the above-mentioned key processing device.
  • the disclosed device and method may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit may be implemented in the form of hardware, or may be implemented in the form of hardware plus software functional units.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请提供一种密钥处理方法和装置,可以应用于短距离通信系统,进一步可以用于自动驾驶、智能驾驶、机器人、无人运输等场景。该方法通过获取第一通信系统的第一密钥参数K,进而,根据第一密钥参数K以及第二通信系统的标识,确定第二通信系统的第二密钥参数K d,从而,在各个通信系统之间完全独立的情况下,根据某通信系统的密钥参数确定其它通信系统的密钥参数,使得其它通信系统可以基于上述密钥参数生成用于加解密的密钥和/或完整性保护的密钥等,省略密钥协商推演的流程,大大节省了信令,提高了效率。而且上述方法在K d的长度等于、大于或小于K d对应的目标类型密钥的长度的情况下,分别确定不同的目标类型密钥,适合实际应用。

Description

密钥处理方法和装置 技术领域
本申请涉及通信技术领域,尤其涉及一种密钥处理方法和装置。
背景技术
随着通信技术的发展,通信的安全性越来越受到重视。目前,一般通过加密保护和完整性保护来保证通信安全性。例如在数据传输过程中,通常都会对待传输的数据加密后传输,接收方收到数据后解密密文,还原明文。还有在数据传输过程中,对数据进行完整性保护,接收方收到数据后验证消息的完整性,完整性验证成功说明消息在传输过程中没有被修改。在安全的数据通信中,通信的双方必须分别具有加解密的密钥和/或完整性保护的密钥等。
相关技术中,一个设备可能兼容多个通信系统,比如手机有蓝牙系统,WiFi系统等通信系统。各个通信系统在通信过程中都需要具有上述加解密的密钥和/或完整性保护的密钥等。
由于上述设备的各通信系统之间是完全独立的,某通信系统不能利用其它通信系统已经协商好的安全密钥,这样,各个通信系统都需要协商自己的密钥,导致密钥协商推演流程多,效率低,且浪费信令。
发明内容
本申请提供一种密钥处理方法和装置,以解决各个通信系统都需要协商推演自己的密钥,导致密钥协商推演流程多,效率低,且浪费信令的问题。
第一方面,本申请实施例提供一种密钥处理方法,该方法可以由分析装置执行,该方法包括如下步骤:首先,获取第一密钥参数K,其中,第一密钥参数K为第一通信系统的密钥参数。这里,第一通信系统可以根据实际情况确定,本申请实施例对此不做特别限制,第一密钥参数K可以为第一通信系统用于加解密的密钥和/或完整性保护的密钥等。其次,根据上述第一密钥参数K以及第二通信系统的标识,确定第二通信系统的第二密钥参数K d,其中,上述第一通信系统与上述第二通信系统不同。同理,上述第二通信系统可以根据实际情况确定,本申请实施例对此不做特别限制。上述第二通信系统的标识可以为第二通信系统的名称或者编号等用于标识第二通信系统身份的信息。上述第二密钥参数K d可以为第二通信系统的密钥,或者用于生成第二通信系统的密钥,第二通信系统的密钥可以为第二通信系统用于加解密的密钥和/或完整性保护的密钥等。
本申请实施例通过获取第一通信系统的第一密钥参数K,进而,根据第一密钥参数K以及第二通信系统的标识,确定第二通信系统的第二密钥参数K d,从而,在各个通信系统之间完全独立的情况下,根据某通信系统的密钥参数确定其它通信系统的密钥参数,其它通信系统可以基于上述密钥参数生成用于加解密的密钥和/或完整性保护的密钥等,省略密钥协商推演的流程,大大节省了信令,提高了效率。
另外,上述分析装置可以应用于上述第一通信系统中,也可以应用于上述第二通信系统中,同样,上述分析装置也可以独立于上述第一通信系统和上述第二通信系统进行应用等,具体如何设置可以根据实际情况确定,本申请实施例对此不做特别限制。
一种可能设计,上述分析装置应用于上述第一通信系统中,在上述确定上述第二通信系统的 第二密钥参数K d之后,还包括:
向上述第二通信系统发送上述第二密钥参数K d,上述第二密钥参数K d用于上述第二通信系统确定目标类型密钥。
示例性的,在上述分析装置确定上述第二通信系统的第二密钥参数K d之后,向上述第二通信系统发送上述第二密钥参数K d,第二通信系统可以保存该第二密钥参数K d,作为该系统的中间密钥,然后确定用于加密和/或完整性保护的密钥,或者直接把第二密钥参数K d用于该系统的加密和/或完整性保护,从而省略了该系统密钥协商推演的过程。
一种可能设计,上述第二密钥参数K d对应目标类型密钥。
上述根据上述第一密钥参数K以及第二通信系统的标识,确定上述第二通信系统的第二密钥参数K d,包括:
根据上述第一密钥参数K、上述第二通信系统的标识以及上述目标类型密钥的类型标识,确定上述第二通信系统的上述第二密钥参数K d
这里,上述第二密钥参数K d对应目标类型密钥,其中,对应指的是上述第二密钥参数K d用于生成目标类型密钥,或者,上述第二密钥参数K d为目标类型密钥。目标类型密钥可以为第二通信系统用于加解密的密钥和/或完整性保护的密钥等。
在上述分析装置确定上述第二通信系统的第二密钥参数K d时,不仅考虑第一密钥参数K和第二通信系统的标识,还考虑目标类型密钥的类型标识,从而,准确生成满足第二通信系统密钥要求的第二密钥参数K d,其中,目标类型密钥的类型标识可以为目标类型密钥的类型名称或者编号等用于标识目标类型密钥的类型的信息。
一种可能设计,上述目标类型密钥为上述第二密钥参数K d
其中,如果上述第二密钥参数K d的长度等于上述目标类型密钥的长度,上述目标类型密钥为上述第二密钥参数K d
一种可能设计,上述方法还包括:
确定上述目标类型密钥的长度;
若上述第二密钥参数K d的长度等于上述目标类型密钥的长度,则确定上述目标类型密钥为上述第二密钥参数K d
这里,如果上述第二密钥参数K d的长度等于上述目标类型密钥的长度,则确定上述目标类型密钥为上述第二密钥参数K d
一种可能设计,上述第二密钥参数K d对应目标类型密钥。
上述第二密钥参数K d的长度大于上述目标类型密钥的长度;
上述目标类型密钥为上述第二密钥参数K d中从预设位置开始的M个比特位,其中,M为上述目标类型密钥的长度,上述预设位置是预先定义或者配置的,M为大于0的整数。
示例性的,上述预设位置可以包括最高有效位和最低有效位中至少一个。如果上述第二密钥参数K d的长度大于上述目标类型密钥的长度,上述目标类型密钥为上述第二密钥参数K d中从预设位置开始的M个比特位,例如上述目标类型密钥为上述第二密钥参数K d中从最高有效位开始的M个比特位,或者,上述目标类型密钥为上述第二密钥参数K d中从最低有效位开始的M个比特位。
一种可能设计,上述方法还包括:
确定上述目标类型密钥的长度;
若上述第二密钥参数K d的长度大于上述目标类型密钥的长度,则确定上述目标类型密钥为上述第二密钥参数K d中从预设位置开始的M个比特位,其中,M为上述目标类型密钥的长度,上述预设位置是预先定义或者配置的,M为大于0的整数。
这里,在确定上述目标类型密钥的长度后,如果上述第二密钥参数K d的长度大于上述目标类型密钥的长度,则需要对上述第二密钥参数K d进行截取,确定上述目标类型密钥为上述第二密钥参数K d中从预设位置开始的M个比特位,例如确定上述目标类型密钥为上述第二密钥参数K d中从最高有效位开始的M个比特位,或者,确定上述目标类型密钥为上述第二密钥参数K d中从最低有效位开始的M个比特位。
一种可能设计,上述第二密钥参数对应目标类型密钥。
上述根据上述第一密钥参数K以及第二通信系统的标识,确定上述第二通信系统的第二密钥参数K d,包括:
确定上述目标类型密钥的长度;
通过第一密钥派生函数、上述第一密钥参数K以及第二通信系统的标识,确定上述第二通信系统的第二密钥参数K d
其中,上述第一密钥派生函数是根据上述目标类型密钥的长度确定的,或者说,上述第一密钥派生函数对应于上述目标类型密钥的长度,也可以理解为上述第一密钥派生函数与上述目标类型密钥的长度之间存在对应关系。
这里,不同密钥的长度可能对应不同或者相同的密钥派生函数,不同密钥类型也可能对应不同或相同的密钥派生函数,取决系统配置。示例性的,可以设置上述第一密钥派生函数是根据上述目标类型密钥的长度确定的。
在上述确定上述第二通信系统的第二密钥参数K d时,首先考虑上述目标类型密钥的长度,从而,确定第一密钥派生函数,进而,通过第一密钥派生函数、上述第一密钥参数K以及第二通信系统的标识,确定上述第二通信系统的第二密钥参数K d,快速、准确的生成满足第二通信系统密钥要求的第二密钥参数K d
其中,密钥派生函数(KDF)可用于派生各种算法的输入密钥,如可以将第一密钥参数K以及第二通信系统的标识作为输入参数,生成第二通信系统的第二密钥参数K d,示例性的,如:K d=KDF(K,第二通信系统的标识)。另外,KDF还可能包括其它的输入参数,本申请实施例对此不作特别限制。
一种可能设计,上述第二密钥参数K d对应目标类型密钥。
上述第一密钥参数K包含多个第一密钥参数K 1-K N,其中,N为大于1的整数;
上述根据上述第一密钥参数K以及第二通信系统的标识,确定上述第二通信系统的第二密钥参数K d;包括:
根据上述多个第一密钥参数K 1-K N以及第二通信系统的标识,确定上述第二通信系统的多个第二密钥参数K d1-K dN
其中,上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合,或者,上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合中的M个比特位,其中,M为上述目标类型密钥的长度,M为大于0的整数。
这里,如果上述第二密钥参数K d的长度小于上述目标类型密钥的长度,可以根据多个第一密钥参数K 1-K N以及第二通信系统的标识,确定上述第二通信系统的多个第二密钥参数K d1-K dN,从 而,使得上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合,例如,如果上述目标类型密钥的长度正好等于上述多个第二密钥参数K d1-K dN的组合长度,则上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合。其中,可以按照预设顺序将上述多个第二密钥参数K d1-K dN进行组合,上述预设顺序可以根据实际情况设置,本申请实施例对此不做特别限制。示例性的,上述目标类型密钥=K d1||K d2……||K dN
或者,使得上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合中的M个比特位,例如,如果上述目标类型密钥的长度小于上述多个第二密钥参数K d1-K dN的组合长度,则上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合中的M个比特位,M为上述目标类型密钥的长度。
一种可能设计,上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合中从预设位置开始的M个比特位,其中,上述预设位置是预先定义或者配置的。示例性的,上述预设位置可以包括最高有效位和最低有效位中至少一个。
示例性的,以上述预设位置为最高有效位为例,上述目标类型密钥=MSB(K d1||K d2……||K dN,M个比特位)。其中,MSB表示最高有效位。
一种可能设计,上述多个第一密钥参数K 1-K N是根据多个新鲜性参数获取的。
其中,上述N的取值是根据上述目标类型密钥的长度确定的,或者说,上述N的取值对应上述目标类型密钥的长度,也可以理解为上述N的取值与上述目标类型密钥存在对应关系。
这里,对于不同个数的密钥,可能对应不同或者相同的密钥长度,对于不同密钥类型,也可能对应不同或相同的密钥长度,取决系统配置,这里,可以设置上述N的取值是根据上述目标类型密钥的长度确定的。
一种可能设计,上述多个新鲜性参数是随机生成的,或者,上述多个新鲜性参数为多个等间隔的数值,又或者是时间戳相关的数值等。
这里,除上述情况外,可以根据实际情况确定上述多个新鲜性参数,本申请实施例对此不做特别限制。
一种可能设计,上述方法还包括:
确定上述目标类型密钥的长度;
若上述第二密钥参数K d的长度小于上述目标类型密钥的长度,则根据上述多个第一密钥参数K 1-K N以及第二通信系统的标识,确定上述第二通信系统的多个第二密钥参数K d1-K dN
确定上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合,或者,确定上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合中的M个比特位,其中,M为上述目标类型密钥的长度,N为大于1的整数,M为大于0的整数。
一种可能设计,上述根据上述第一密钥参数K以及第二通信系统的标识,确定上述第二通信系统的第二密钥参数K d,包括:
通过第二密钥派生函数、上述第一密钥参数K以及第二通信系统的标识,确定上述第二密钥参数K d
一种可能设计,上述第二密钥派生函数对应上述第二通信系统。
这里,不同通信系统可能对应不同或者相同的密钥派生函数,取决系统配置。示例性的,可以设置上述第二密钥派生函数对应上述第二通信系统,通过第二通信系统对应的第二密钥派生函数,根据上述第一密钥参数K以及第二通信系统的标识,确定上述第二密钥参数K d,从而省略了 第二通信系统密钥协商推演的过程。
一种可能设计,上述第一密钥派生函数或上述第二密钥派生函数包括,例如哈希消息认证码(Hash-based Message Authentication code,HMAC)-安全散列算法(Secure Hash Algorithm,SHA)256、HMAC-SHA3和HMAC-SM3等。本申请采用的密钥派生函数除上述外,还可以采用其它密钥派生函数,本申请实施例对此不做特别限制。
这里,需要说明的是,本申请实施中密钥派生函数所采用的算法、标准包括但不限于上述列举的,本申请实施中密钥派生函数所采用的算法、标准还可以包括其他的算法、标准等。
第二方面,本申请实施例提供另一种密钥处理方法,该方法可以由分析装置执行,该方法包括:获取第二通信系统的第二密钥参数K d,其中,该第二密钥参数K d是基于第一密钥参数K以及上述第二通信系统的标识确定的,上述第一密钥参数K为第一通信系统的密钥参数。这里,上述第一通信系统与上述第二通信系统不同,第一通信系统和第二通信系统可以根据实际情况确定,本申请实施例对此不做特别限制。第一密钥参数K可以为第一通信系统用于加解密的密钥和/或完整性保护的密钥等。第二通信系统的标识可以为第二通信系统的名称或者编号等用于标识第二通信系统身份的信息。上述第二密钥参数K d可以为第二通信系统的密钥,或者用于生成第二通信系统的密钥,第二通信系统的密钥可以为第二通信系统用于加解密的密钥和/或完整性保护的密钥等。
本申请实施例通过获取第二通信系统的第二密钥参数K d,其中,该第二密钥参数K d是基于第一密钥参数K以及上述第二通信系统的标识确定的,从而,在各个通信系统之间完全独立的情况下,通过某通信系统的密钥参数确定自身通信系统的密钥参数,进而,基于上述密钥参数生成用于加解密的密钥和/或完整性保护的密钥等,省略密钥协商推演的流程,大大节省了信令,提高了效率。
一种可能设计,上述第二密钥参数K d对应目标类型密钥。其中,对应指的是上述第二密钥参数K d用于生成目标类型密钥,或者,上述第二密钥参数K d为目标类型密钥。目标类型密钥可以为第二通信系统用于加解密的密钥和/或完整性保护的密钥等。
一种可能设计,上述目标类型密钥为上述第二密钥参数K d
这里,如果上述第二密钥参数K d的长度等于上述目标类型密钥的长度,上述目标类型密钥为上述第二密钥参数K d
一种可能设计,上述第二密钥参数K d的长度大于上述目标类型密钥的长度。
上述目标类型密钥为上述第二密钥参数K d中从预设位置开始的M个比特位,M为上述目标类型密钥的长度,上述预设位置是预先定义或者配置的,M为大于0的整数。
示例性的,上述预设位置可以包括最高有效位和最低有效位中至少一个。如果上述第二密钥参数K d的长度大于上述目标类型密钥的长度,上述目标类型密钥为上述第二密钥参数K d中从预设位置开始的M个比特位,例如上述目标类型密钥为上述第二密钥参数K d中从最高有效位开始的M个比特位,或者,上述目标类型密钥为上述第二密钥参数K d中从最低有效位开始的M个比特位。
一种可能设计,上述第一密钥参数K包含多个第一密钥参数K 1-K N,其中,N为大于1的整数。
上述第二通信系统的多个第二密钥参数K d1-K dN是基于上述多个第一密钥参数K 1-K N以及第二通信系统的标识确定的。
其中,上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合,或者,上述目标类型密 钥为上述多个第二密钥参数K d1-K dN的组合中的M个比特位,M为上述目标类型密钥的长度,M为大于0的整数。
这里,如果上述第二密钥参数K d的长度小于上述目标类型密钥的长度,上述第二通信系统的多个第二密钥参数K d1-K dN可以是根据多个第一密钥参数K 1-K N以及第二通信系统的标识确定的,从而,使得上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合,例如,如果上述目标类型密钥的长度正好等于上述多个第二密钥参数K d1-K dN的组合长度,则上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合。其中,可以按照预设顺序将上述多个第二密钥参数K d1-K dN进行组合,上述预设顺序可以根据实际情况设置,本申请实施例对此不做特别限制。示例性的,上述目标类型密钥=K d1||K d2……||K dN
或者,使得上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合中的M个比特位,例如,如果上述目标类型密钥的长度小于上述多个第二密钥参数K d1-K dN的组合长度,则上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合中的M个比特位,M为上述目标类型密钥的长度。
一种可能设计,上述多个第一密钥参数K 1-K N是根据多个新鲜性参数获取的;
上述N的取值是根据上述目标类型密钥的长度确定的,或者说,上述N的取值对应上述目标类型密钥的长度,也可以理解为上述N的取值与上述目标类型密钥存在对应关系。
第三方面,本申请实施例提供一种密钥处理装置,这里的密钥处理装置可以是上述分析装置本身,或者是实现分析装置的功能的芯片或者集成电路。该装置包括:
获取模块,用于获取第一密钥参数K,该第一密钥参数K为第一通信系统的密钥参数;
确定模块,用于根据上述第一密钥参数K以及第二通信系统的标识,确定第二通信系统的第二密钥参数K d
其中,上述第一通信系统与上述第二通信系统不同。
一种可能设计,上述装置还包括发送模块,用于在上述确定模块确定上述第二通信系统的第二密钥参数K d之后,向上述第二通信系统发送上述第二密钥参数K d,上述第二密钥参数K d用于上述第二通信系统确定目标类型密钥。
一种可能设计,上述第二密钥参数K d对应目标类型密钥。
上述确定模块,具体用于:
根据上述第一密钥参数K、上述第二通信系统的标识以及上述目标类型密钥的类型标识,确定上述第二通信系统的第二密钥参数K d
一种可能设计,上述目标类型密钥为上述第二密钥参数K d
其中,如果上述第二密钥参数K d的长度等于上述目标类型密钥的长度,上述目标类型密钥为上述第二密钥参数K d
一种可能设计,上述确定模块还用于:
确定上述目标类型密钥的长度;
若上述第二密钥参数K d的长度等于上述目标类型密钥的长度,则确定上述目标类型密钥为上述第二密钥参数K d
一种可能设计,上述第二密钥参数K d对应目标类型密钥;
上述第二密钥参数K d的长度大于上述目标类型密钥的长度;
上述目标类型密钥为上述第二密钥参数K d中从预设位置开始的M个比特位,其中,M为上 述目标类型密钥的长度,上述预设位置是预先定义或者配置的,M为大于0的整数。
一种可能设计,上述确定模块还用于:
确定上述目标类型密钥的长度;
若上述第二密钥参数K d的长度大于上述目标类型密钥的长度,则确定上述目标类型密钥为上述第二密钥参数K d中从预设位置开始的M个比特位,其中,M为上述目标类型密钥的长度,上述预设位置是预先定义或者配置的,M为大于0的整数。
一种可能设计,上述第二密钥参数对应目标类型密钥;
上述确定模块,具体用于:
确定上述目标类型密钥的长度;
通过第一密钥派生函数、上述第一密钥参数K以及第二通信系统的标识,确定上述第二通信系统的第二密钥参数K d
其中,上述第一密钥派生函数是根据上述目标类型密钥的长度确定的,或者说,上述第一密钥派生函数对应于上述目标类型密钥的长度,也可以理解为上述第一密钥派生函数与上述目标类型密钥的长度之间存在对应关系。
一种可能设计,上述第二密钥参数K d对应目标类型密钥;
上述第一密钥参数K包含多个第一密钥参数K 1-K N,其中,N为大于1的整数;
上述确定模块,具体用于:
根据上述多个第一密钥参数K 1-K N以及第二通信系统的标识,确定上述第二通信系统的多个第二密钥参数K d1-K dN
其中,上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合,或者,上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合中的M个比特位,其中,M为上述目标类型密钥的长度,M为大于0的整数。
一种可能设计,上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合中从预设位置开始的M个比特位,其中,上述预设位置是预先定义或者配置的。
一种可能设计,上述多个第一密钥参数K 1-K N是根据多个新鲜性参数获取的;
上述N的取值是根据上述目标类型密钥的长度确定的,或者说,上述N的取值对应上述目标类型密钥的长度,也可以理解为上述N的取值与上述目标类型密钥存在对应关系。
一种可能设计,上述多个新鲜性参数是随机生成的,或者,上述多个新鲜性参数为多个等间隔的数值,又或者是时间戳相关的数值等。
一种可能设计,上述确定模块,具体用于:
通过第二密钥派生函数、上述第一密钥参数K以及第二通信系统的标识,确定上述第二密钥参数K d
一种可能设计,上述第二密钥派生函数对应上述第二通信系统。
一种可能设计,上述第一密钥派生函数或上述第二密钥派生函数包括例如,HMAC-SHA256、HMAC-SHA3、HMAC-SM3等。本申请采用的密钥派生函数除上述外,还可以采用其它密钥派生函数,本申请实施例对此不做特别限制。
第四方面,本申请提供一种密钥处理装置,该密钥处理装置包括至少一个处理器和至少一个存储器。该至少一个存储器存储计算机指令;该至少一个处理器执行该存储器存储的计算机指令,使得该计算设备执行上述第一方面或者第一方面的各种可能设计提供的方法,使得该密钥处理装 置部署上述第二方面或者第二方面的各种可能设计提供该密钥处理装置。
第五方面,本申请提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机指令,该计算机指令指示计算设备执行上述第一方面或者第一方面的各种可能设计提供的方法,或者该计算机指令指示该计算设备部署上述第二方面或者第二方面的各种可能设计提供该密钥处理装置。
第六方面,本申请提供一种计算机程序产品,该计算机程序产品包括计算机指令。可选地,该计算机指令存储在计算机可读存储介质中。计算设备的处理器可以从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算设备执行上述第一方面或者第一方面的各种可能设计提供的方法,使得该计算设备部署上述第二方面或者第二方面的各种可能设计提供该密钥处理装置。
第七方面,本申请实施例提供了一种芯片,包括至少一个处理器和通信接口。进一步可选的,所述芯片还包含至少一个存储器,用于存储计算机指令。其中,所述通信接口用于为所述至少一个处理器提供信息输入和/或输出。所述至少一个处理器用于执行指令以实现执行上述第一方面及其第一方面任意可能的实现方式中的方法。可选的,所述至少一个处理器包含数字信号处理器(digital signal processor,DSP)、中央处理器(Central Processing Unit,CPU)或者图形处理器(general process unit,GPU)中的至少一个。
附图说明
图1为本申请实施例提供的一种应用场景的示意图;
图2为本申请实施例提供的一种密钥处理方法的流程示意图;
图3为本申请实施例提供的另一种密钥处理方法的流程示意图;
图4为本申请实施例提供的再一种密钥处理方法的流程示意图;
图5为本申请实施例提供的又一种密钥处理方法的流程示意图;
图6为本申请实施例提供的又一种密钥处理方法的流程示意图;
图7为本申请实施例提供的又一种密钥处理方法的流程示意图;
图8为本申请实施例提供的又一种密钥处理方法的流程示意图;
图9为本申请提供的一种密钥处理装置的结构示意图;
图10A为本申请提供的一种密钥处理装置的基本硬件架构示意图;
图10B为本申请提供的另一种密钥处理装置的基本硬件架构示意图。
具体实施方式
下面结合各个附图对本发明实施例技术方案的主要实现原理、具体实施方式及其对应能够达到的有益效果进行详细的阐述。以下,术语“第一”、“第二”仅用于描述目的,而不能理解为暗示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征,在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
本申请实施例所涉及的密钥处理是指利用第一通信系统的密钥参数确定第二通信系统的密钥参数。其中,第一通信系统与第二通信系统不同,从而,解决各个通信系统都需要协商推演自己的密钥,导致密钥协商推演流程多,效率低,且浪费信令的问题。
本申请实施例提供的密钥处理方法及装置可应用在通信系统中,示例性的,一个设备有多个通信系统,本申请实施例提供的密钥处理方法及装置可应用在该设备一个或多个通信系统中,其中,上述设备可以为手机、车辆、无人机或者机器人等包含多个通信系统的设备,本申请实施例对此不做特别限制。
可选地,本申请实施例提供的密钥处理方法及装置可以应用于如图1所示的应用场景中。图1只是以示例的方式描述了本申请实施例提供的密钥处理方法的一种可能的应用场景,本申请实施例提供的密钥处理方法的应用场景不限于图1所示的应用场景。
图1为设备通信系统密钥处理架构示意图。在图1中,以设备为手机为例,上述设备通信系统密钥处理架构包括分析装置101、移动通信模块102、无线通信模块103、天线1、天线2以及与设备通信的网络或其他设备104。
可以理解的是,本申请实施例示意的结构并不构成对设备通信系统密钥处理架构的具体限定。在本申请另一些可行的实施方式中,上述设备通信系统密钥处理架构可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置,具体可根据实际应用场景确定,在此不做限制。图1所示的部件可以以硬件,软件,或软件与硬件的组合实现。
在一些可行的实施方式中,移动通信模块102可以包括2G/3G/4G/5G等无线通信的系统。无线通信模块103可以包括无线局域网(wireless local area networks,WLAN)如Wi-Fi,蓝牙(blue tooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信、以及未来可能的短距通信技术的系统。
在一些可行的实施方式中,天线1和移动通信模块102耦合,天线2和无线通信模块103耦合,可以通过无线通信技术与网络以及其他设备通信。其中,无线通信技术可以包括全球移动通讯系统(globalsystem for mobile communications,GSM),通用分组无线服务(general packet radioservice,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-divisioncode division multiple access,TD-SCDMA),长期演进(long term evolution,LTE)技术等。
其中,分析装置101可以应用于上述移动通信模块102的2G/3G/4G/5G等无线通信的系统中,也可以应用于上述无线通信模块103的WLAN如Wi-Fi,BT,GNSS,FM,NFC,IR等无线通信的系统中,同样,分析装置101也可以独立于上述移动通信模块、无线通信模块进行应用等,具体如何设置可以根据实际情况确定,本申请实施例对此不做特别限制。示例性的,以分析装置101应用于上述移动通信模块和/或无线通信模块中为例,在图1中为了方便描述,将分析装置101与上述移动通信模块102和上述无线通信模块103连接,表示分析装置101可以应用在上述移动通信模块102和上述无线通信模块103的一个或多个通信系统中。
分析装置101用于利用某一通信系统的密钥参数确定其它通信系统的密钥参数。例如,利用BT的密钥参数确定Wi-Fi的密钥参数,从而,解决设备的各个通信系统都需要协商推演自己的密钥,导致密钥协商推演流程多,效率低,且浪费信令的问题。
应理解,本申请实施例描述的网络架构以及业务场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着网络架构的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
下面结合附图详细介绍本申请实施例提供的密钥处理方法。该方法的执行主体可以为图1中的分析装置101。分析装置101的工作流程主要包括获取阶段和确定阶段。在获取阶段,分析装置101获取第一通信系统的密钥参数。在确定阶段,分析装置101根据第一通信系统的密钥参数以及第二通信系统的标识,确定第二通信系统的第二密钥参数,进而,在各个通信系统之间完全独立的情况下,根据某通信系统的密钥参数确定其它通信系统的密钥参数,使得其它通信系统可以基于上述密钥参数生成用于加解密的密钥和/或完整性保护的密钥等,省略密钥协商推演的流程,大大节省了信令,提高了效率。
下面以几个实施例为例对本申请的技术方案进行描述,对于相同或相似的概念或过程可能在某些实施例不再赘述。
图2为本申请实施例提供了一种密钥处理方法的流程示意图,本实施例的执行主体可以为图1中的分析装置101,具体执行主体可以根据实际应用场景确定。如图2所示,该方法可以包括如下步骤。
S201:获取第一密钥参数K,其中,第一密钥参数K为第一通信系统的密钥参数。
这里,上述第一密钥参数K可以为第一通信系统用于加解密的密钥和/或完整性保护的密钥等。上述第一通信系统可以根据实际情况确定,本申请实施例对此不做特别限制,例如以手机中各个通信系统为例,第一通信系统可以为BT系统或其它可能的短距通信技术。
S202:根据上述第一密钥参数K以及第二通信系统的标识,确定第二通信系统的第二密钥参数K d
其中,上述第一通信系统与上述第二通信系统不同。
上述第二通信系统也可以根据实际情况确定,本申请实施例对此不做特别限制,例如还以手机中各个通信系统为例,如果第一通信系统为BT系统,第二通信系统可以为WiFi系统。
上述第二通信系统的标识可以为第二通信系统的名称或者编号等用于标识第二通信系统身份的信息。
上述第二密钥参数K d可以为第二通信系统的密钥,或者用于生成第二通信系统的密钥,第二通信系统的密钥可以为第二通信系统用于加解密的密钥和/或完整性保护的密钥等。
在一些可行的实施方式中,上述分析装置应用于在上述第一通信系统中,在上述确定上述第二通信系统的第二密钥参数K d之后,还包括:
向上述第二通信系统发送上述第二密钥参数K d,上述第二密钥参数K d用于上述第二通信系统确定目标类型密钥。
示例性的,在上述分析装置确定上述第二通信系统的第二密钥参数K d之后,向上述第二通信系统发送上述第二密钥参数K d,第二通信系统可以保存该第二密钥参数K d,作为该系统的中间密钥,然后确定用于加密和/或完整性保护的密钥,或者直接把第二密钥参数K d用于该系统的加密和/或完整性保护,从而省略了该系统密钥协商推演的过程。
本申请实施例,通过获取第一通信系统的第一密钥参数K,进而,根据第一密钥参数K以及第二通信系统的标识,确定第二通信系统的第二密钥参数K d,从而,在各个通信系统之间完全独立的情况下,根据某通信系统的密钥参数确定其它通信系统的密钥参数,使得其它通信系统可以基于上述密钥参数生成用于加解密的密钥和/或完整性保护的密钥等,省略密钥协商推演的流程,节省了信令,提高了效率。
另外,本申请实施例在确定第二通信系统的第二密钥参数K d时,不仅考虑第一密钥参数K 和第二通信系统的标识,还考虑密钥的类型。图3为本申请实施例提出的另一种密钥处理方法的流程示意图,本实施例的执行主体可以为图1所示实施例中的分析装置101。如图3所示,该方法包括:
S301:获取第一密钥参数K,其中,第一密钥参数K为第一通信系统的密钥参数。
其中,步骤S301与上述步骤S201的实现方式相同,此处不再赘述。
S302:第二密钥参数K d对应目标类型密钥,根据上述第一密钥参数K、第二通信系统的标识以及上述目标类型密钥的类型标识,确定第二通信系统的上述第二密钥参数K d
其中,上述第一通信系统与上述第二通信系统不同。
这里,上述第二密钥参数K d对应目标类型密钥,其中,对应指的是上述第二密钥参数K d用于生成目标类型密钥,或者,上述第二密钥参数K d为目标类型密钥。目标类型密钥可以为第二通信系统用于加解密的密钥和/或完整性保护的密钥等。
在上述分析装置确定上述第二通信系统的第二密钥参数K d时,不仅考虑第一密钥参数K和第二通信系统的标识,还考虑目标类型密钥的类型标识,从而,准确生成满足第二通信系统密钥要求的第二密钥参数K d,其中,目标类型密钥的类型标识可以为目标类型密钥的类型名称或者编号等用于标识目标类型密钥的类型的信息。
在一些可行的实施方式中,在上述确定上述第二通信系统的第二密钥参数K d之前,还包括:
确定第二密钥参数K d对应的目标类型密钥,进而,根据上述第一密钥参数K、第二通信系统的标识以及上述目标类型密钥的类型标识,确定第二通信系统的上述第二密钥参数K d
示例性的,在利用BT的密钥参数确定Wi-Fi的密钥参数之前,确定Wi-Fi的密钥参数对应的目标类型密钥,例如成对临时密钥(Pairwise Transient Key,PTK)、组临时密钥(Group Transient Key,GTK),然后根据上述BT的密钥参数、Wi-Fi系统的标识以及上述目标类型密钥的类型标识,确定Wi-Fi的密钥参数。
本申请实施例,通过考虑第一密钥参数K和第二通信系统的标识,以及第二密钥参数对应的目标类型密钥的类型标识,从而,准确生成满足第二通信系统密钥要求的第二密钥参数K d,而且,通过获取第一通信系统的第一密钥参数K,确定第二通信系统的第二密钥参数K d,能够在各个通信系统之间完全独立的情况下,根据某通信系统的密钥参数确定其它通信系统的密钥参数,使得其它通信系统可以基于上述密钥参数生成用于加解密的密钥和/或完整性保护的密钥等,省略密钥协商推演的流程,大大节省了信令,提高了效率。
另外,如果上述第二密钥参数K d的长度等于第二密钥参数K d对应的目标类型密钥的长度,上述目标类型密钥为上述第二密钥参数K d。图4为本申请实施例提出的再一种密钥处理方法的流程示意图,本实施例的执行主体可以为图1所示实施例中的分析装置101。如图4所示,该方法包括:
S401:获取第一密钥参数K,其中,第一密钥参数K为第一通信系统的密钥参数。
其中,步骤S401与上述步骤S201的实现方式相同,此处不再赘述。
S402:第二密钥参数K d对应目标类型密钥,根据上述第一密钥参数K以及第二通信系统的标识,确定第二通信系统的上述第二密钥参数K d
其中,上述第一通信系统与上述第二通信系统不同。上述目标类型密钥为上述第二密钥参数K d
这里,如果上述第二密钥参数K d的长度等于上述目标类型密钥的长度,上述目标类型密钥为 上述第二密钥参数K d
在一些可行的实施方式中,在上述确定第二通信系统的上述第二密钥参数K d之后,还包括:
确定上述目标类型密钥的长度;
若上述第二密钥参数K d的长度等于上述目标类型密钥的长度,则确定上述目标类型密钥为上述第二密钥参数K d
如果上述第二密钥参数K d的长度等于上述目标类型密钥的长度,则确定上述目标类型密钥为上述第二密钥参数K d,进而,第二通信系统可以直接把第二密钥参数K d用于该系统的加密和/或完整性保护,从而省略了该系统密钥协商推演的过程。
本申请实施例,通过获取第一通信系统的第一密钥参数K,确定第二通信系统的第二密钥参数K d,如果第二密钥参数K d的长度等于第二密钥参数K d对应的目标类型密钥的长度,目标类型密钥为上述第二密钥参数K d,从而,在各个通信系统之间完全独立的情况下,根据某通信系统的密钥参数确定其它通信系统的密钥参数,使得其它通信系统可以基于上述密钥参数生成用于加解密的密钥和/或完整性保护的密钥等,省略密钥协商推演的流程,大大节省了信令,提高了效率。
另外,如果上述第二密钥参数K d的长度大于第二密钥参数K d对应的目标类型密钥的长度,上述目标类型密钥为上述第二密钥参数K d从预设位置开始的M个比特位。
图5为本申请实施例提出的又一种密钥处理方法的流程示意图,本实施例的执行主体可以为图1所示实施例中的分析装置101。如图5所示,该方法包括:
S501:获取第一密钥参数K,其中,第一密钥参数K为第一通信系统的密钥参数。
其中,步骤S501与上述步骤S201的实现方式相同,此处不再赘述。
S502:第二密钥参数K d对应目标类型密钥,根据上述第一密钥参数K以及第二通信系统的标识,确定第二通信系统的上述第二密钥参数K d
其中,上述第一通信系统与上述第二通信系统不同。上述第二密钥参数K d的长度大于上述目标类型密钥的长度,上述目标类型密钥为上述第二密钥参数K d中从预设位置开始的M个比特位,其中,M为上述目标类型密钥的长度,上述预设位置是预先定义或者配置的,M为大于0的整数。
这里,上述预设位置可以包括最高有效位和最低有效位中至少一个。如果上述第二密钥参数K d的长度大于上述目标类型密钥的长度,上述目标类型密钥为上述第二密钥参数K d中从预设位置开始的M个比特位,例如上述目标类型密钥为上述第二密钥参数K d中从最高有效位开始的M个比特位,或者,上述目标类型密钥为上述第二密钥参数K d中从最低有效位开始的M个比特位。
另外,上述预设位置除上述情况外,还可以根据实际情况设置,本申请实施例对此不做特别限制。
在一些可行的实施方式中,在上述确定第二通信系统的上述第二密钥参数K d之后,还包括:
确定上述目标类型密钥的长度;
若上述第二密钥参数K d的长度大于上述目标类型密钥的长度,则确定上述目标类型密钥为上述第二密钥参数K d中从预设位置开始的M个比特位,其中,M为上述目标类型密钥的长度,上述预设位置是预先定义或者配置的,M为大于0的整数。
这里,在确定上述目标类型密钥的长度后,如果上述第二密钥参数K d的长度大于上述目标类型密钥的长度,则需要对上述第二密钥参数K d进行截取,确定上述目标类型密钥为上述第二密钥参数K d中从预设位置开始的M个比特位,例如确定上述目标类型密钥为上述第二密钥参数K d中从最高有效位开始的M个比特位,或者,确定上述目标类型密钥为上述第二密钥参数K d中从最 低有效位开始的M个比特位。
本申请实施例,通过获取第一通信系统的第一密钥参数K,确定第二通信系统的第二密钥参数K d,如果第二密钥参数K d的长度大于第二密钥参数K d对应的目标类型密钥的长度,目标类型密钥为上述第二密钥参数K d中从预设位置开始的M个比特位,其中,M为上述目标类型密钥的长度,从而,在各个通信系统之间完全独立的情况下,根据某通信系统的密钥参数确定其它通信系统的密钥参数,使得其它通信系统可以基于上述密钥参数生成用于加解密的密钥和/或完整性保护的密钥等,省略密钥协商推演的流程,大大节省了信令,提高了效率。
另外,本申请实施例在确定第二通信系统的第二密钥参数K d时,通过第一密钥派生函数确定。
图6为本申请实施例提出的又一种密钥处理方法的流程示意图,本实施例的执行主体可以为图1所示实施例中的分析装置101。如图6所示,该方法包括:
S601:获取第一密钥参数K,其中,第一密钥参数K为第一通信系统的密钥参数。
其中,步骤S601与上述步骤S201的实现方式相同,此处不再赘述。
S602:第二密钥参数K d对应目标类型密钥,确定上述目标类型密钥的长度。
S603:通过第一密钥派生函数、上述第一密钥参数K以及第二通信系统的标识,确定上述第二通信系统的第二密钥参数K d
其中,上述第一密钥派生函数是根据上述目标类型密钥的长度确定的,或者说,上述第一密钥派生函数对应于上述目标类型密钥的长度,也可以理解为上述第一密钥派生函数与上述目标类型密钥的长度之间存在对应关系。
这里,不同密钥的长度可能对应不同或者相同的密钥派生函数,不同密钥类型也可能对应不同或相同的密钥派生函数,取决系统配置。示例性的,可以设置上述第一密钥派生函数是根据上述目标类型密钥的长度确定的。
在上述确定上述第二通信系统的第二密钥参数K d时,首先考虑上述目标类型密钥的长度,从而,确定第一密钥派生函数,进而,通过第一密钥派生函数、上述第一密钥参数K以及第二通信系统的标识,确定上述第二通信系统的第二密钥参数K d,快速、准确的生成满足第二通信系统密钥要求的第二密钥参数K d
其中,密钥派生函数(KDF)可用于派生各种算法的输入密钥,如可以将第一密钥参数K以及第二通信系统的标识作为输入参数,生成第二通信系统的第二密钥参数K d,示例性的,如:K d=KDF(K,第二通信系统的标识)。
另外,KDF还可能包括其它的输入参数,例如上述第二密钥参数K d对应目标类型密钥,KDF的输入参数还包括目标类型密钥的类型标识,除此之外,KDF的输入参数还可能包括第一通信系统的标识,本申请实施例对此不作特别限制。
示例性的,上述确定第二通信系统的上述第二密钥参数K d,还可以包括:
通过第一密钥派生函数、上述第一密钥参数K、第二通信系统的标识以及上述目标类型密钥的类型标识,确定上述第二密钥参数K d。示例性的,可以将上述第一密钥参数K、第二通信系统的标识以及上述目标类型密钥的类型标识作为输入参数,生成第二通信系统的第二密钥参数K d,K d=KDF(K,第二通信系统的标识,目标类型密钥的类型标识)。其中,目标类型密钥的类型标识为可选参数。
示例性的,上述确定上述第二密钥参数K d还可以包括:
通过第一密钥派生函数、上述第一密钥参数K、第一通信系统的标识,第二通信系统的标识 以及上述目标类型密钥的类型标识,确定上述第二密钥参数K d,K d=KDF(K,第一通信系统的标识,第二通信系统的标识,目标类型密钥的类型标识),其中,第一通信系统的标识和目标类型密钥的类型标识为可选参数。
在一些可行的实施方式中,上述第一密钥派生函数可以包括例如HMAC-SHA256、HMAC-SHA3和HMAC-SM3等。本申请采用的密钥派生函数除上述外,还可以采用其它密钥派生函数,本申请实施例对此不做特别限制。
另外,本申请实施中密钥派生函数所采用的算法、标准还可以包括其他的算法、标准等,本申请实施例对此不做特别限制。
这里,上述密钥派生函数可以包括不同的算法,例如上述HMAC-SHA256、HMAC-SHA3和HMAC-SM3等。因此,KDF的输入参数还可以包括算法标识,用于标识不同的算法,相应的,上述确定上述第二密钥参数K d还可以包括:
通过第一密钥派生函数、上述第一密钥参数K、第一通信系统的标识,第二通信系统的标识、上述目标类型密钥的类型标识以及算法标识,确定上述第二密钥参数K d,K d=KDF(K,第一通信系统的标识,第二通信系统的标识,目标类型密钥的类型标识,算法标识),其中,第一通信系统的标识、目标类型密钥的类型标识和算法标识为可选参数。
本申请实施例,通过考虑上述目标类型密钥的长度,从而,确定第一密钥派生函数,进而,通过第一密钥派生函数、上述第一密钥参数K以及第二通信系统的标识,生成满足第二通信系统密钥要求的第二密钥参数K d,而且,通过获取第一通信系统的第一密钥参数K,确定第二通信系统的第二密钥参数K d,能够在各个通信系统之间完全独立的情况下,根据某通信系统的密钥参数确定其它通信系统的密钥参数,使得其它通信系统可以基于上述密钥参数生成用于加解密的密钥和/或完整性保护的密钥等,省略密钥协商推演的流程,大大节省了信令,提高了效率。
另外,如果上述第二密钥参数K d的长度小于第二密钥参数K d对应的目标类型密钥的长度,上述目标类型密钥为多个第二密钥参数K d1-K dN的组合,或者,上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合中的M个比特位。图7为本申请实施例提出的又一种密钥处理方法的流程示意图,本实施例的执行主体可以为图1所示实施例中的分析装置101。如图7所示,该方法包括:
S701:获取第一密钥参数K,其中,第一密钥参数K为第一通信系统的密钥参数。
其中,步骤S701与上述步骤S201的实现方式相同,此处不再赘述。
S702:第二密钥参数K d对应目标类型密钥,上述第一密钥参数K包含多个第一密钥参数K 1-K N,根据上述多个第一密钥参数K 1-K N以及第二通信系统的标识,确定上述第二通信系统的多个第二密钥参数K d1-K dN,其中,N为大于1的整数。
其中,上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合,或者,上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合中的M个比特位,其中,M为上述目标类型密钥的长度,M为大于0的整数。
这里,如果上述第二密钥参数K d的长度小于上述目标类型密钥的长度,可以根据多个第一密钥参数K 1-K N以及第二通信系统的标识,确定上述第二通信系统的多个第二密钥参数K d1-K dN,从而,使得上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合,例如,如果上述目标类型密钥的长度正好等于上述多个第二密钥参数K d1-K dN的组合长度,则上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合。其中,可以按照预设顺序将上述多个第二密钥参数K d1-K dN进行 组合,上述预设顺序可以根据实际情况设置,本申请实施例对此不做特别限制。示例性的,上述目标类型密钥=K d1||K d2……||K dN
或者,使得上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合中的M个比特位,例如,如果上述目标类型密钥的长度小于上述多个第二密钥参数K d1-K dN的组合长度,则上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合中的M个比特位,M为上述目标类型密钥的长度。
在一些可行的实施方式中,上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合中从预设位置开始的M个比特位,其中,上述预设位置是预先定义或者配置的。示例性的,上述预设位置可以包括最高有效位和最低有效位中至少一个。
示例性的,以上述预设位置为最高有效位为例,上述目标类型密钥=MSB(K d1||K d2……||K dN,M个比特位)。其中,MSB表示最高有效位。
在一些可行的实施方式中,上述多个第一密钥参数K 1-K N是根据多个新鲜性参数(fresh)获取的。
其中,上述N的取值是根据上述目标类型密钥的长度确定的,或者说,上述N的取值对应上述目标类型密钥的长度,也可以理解为上述N的取值与上述目标类型密钥存在对应关系。
这里,对于不同个数的密钥,可能对应不同或者相同的密钥长度,对于不同密钥类型,也可能对应不同或相同的密钥长度,取决系统配置,这里,可以设置上述N的取值是根据上述目标类型密钥的长度确定的。
在一些可行的实施方式中,上述多个新鲜性参数是随机生成的,或者,上述多个新鲜性参数为多个等间隔的数值,又或者是时间戳相关的数值等。
这里,除上述情况外,可以根据实际情况确定上述多个新鲜性参数,本申请实施例对此不做特别限制。
在一些可行的实施方式中,上述方法还包括:
确定上述目标类型密钥的长度;
若上述第二密钥参数K d的长度小于上述目标类型密钥的长度,则根据上述多个第一密钥参数K 1-K N以及第二通信系统的标识,确定上述第二通信系统的多个第二密钥参数K d1-K dN,其中,N为大于1的整数;
确定上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合,或者,确定上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合中的M个比特位,其中,M为上述目标类型密钥的长度。
本申请实施例,通过获取第一通信系统的第一密钥参数K,确定第二通信系统的第二密钥参数K d,如果第二密钥参数K d的长度小于第二密钥参数K d对应的目标类型密钥的长度,根据上述第一密钥参数K包含的多个第一密钥参数K 1-K N以及第二通信系统的标识,确定上述第二通信系统的多个第二密钥参数K d1-K dN,上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合,或者,上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合中的M个比特位,其中,M为上述目标类型密钥的长度,从而,在各个通信系统之间完全独立的情况下,根据某通信系统的密钥参数确定其它通信系统的密钥参数,使得其它通信系统可以基于上述密钥参数生成用于加解密的密钥和/或完整性保护的密钥等,省略密钥协商推演的流程,大大节省了信令,提高了效率。
另外,本申请实施例在确定第二通信系统的第二密钥参数K d时,通过第二密钥派生函数确定。 图8为本申请实施例提出的又一种密钥处理方法的流程示意图,本实施例的执行主体可以为图1所示实施例中的分析装置101。如图8所示,该方法包括:
S801:获取第一密钥参数K,其中,第一密钥参数K为第一通信系统的密钥参数。
其中,步骤S801与上述步骤S201的实现方式相同,此处不再赘述。
S802:通过第二密钥派生函数、上述第一密钥参数K以及第二通信系统的标识,确定上述第二密钥参数K d
在一些可行的实施方式中,上述第二密钥派生函数对应上述第二通信系统。
这里,不同通信系统可能对应不同或者相同的密钥派生函数,取决系统配置。示例性的,可以设置上述第二密钥派生函数对应上述第二通信系统,通过第二通信系统对应的第二密钥派生函数,根据上述第一密钥参数K以及第二通信系统的标识,确定上述第二密钥参数K d,从而省略了第二通信系统密钥协商推演的过程。
其中,密钥派生函数(KDF)可用于派生各种算法的输入密钥,如可以将第一密钥参数K以及第二通信系统的标识作为输入参数,生成第二通信系统的第二密钥参数K d,示例性的,如:K d=KDF(K,第二通信系统的标识)。
另外,KDF还可能包括其它的输入参数,这里,以上述第一密钥参数K包含多个第一密钥参数K 1-K N,确定上述第二通信系统的多个第二密钥参数K d1-K dN为例。
KDF的输入参数还包括目标类型密钥的类型标识,上述确定上述第二通信系统的多个第二密钥参数K d1-K dN可以包括:
通过KDF、上述多个第一密钥参数K 1-K N、第二通信系统的标识以及上述目标类型密钥的类型标识,确定第二通信系统的多个第二密钥参数K d1-K dN
示例性的,可以将上述多个第一密钥参数K 1-K N、第二通信系统的标识以及上述目标类型密钥的类型标识作为输入参数,生成第二通信系统的多个第二密钥参数K d1-K dN,第二密钥参数=KDF(第一密钥参数,第二通信系统的标识,目标类型密钥的类型标识)。其中,目标类型密钥的类型标识为可选参数。
这里,KDF还可能包括其它的输入参数,例如还包括第一通信系统的标识,另外上述多个第一密钥参数K 1-K N是根据多个新鲜性参数获取的,KDF的输入参数还可能包括新鲜性参数。
示例性的,如果KDF的输入参数还包括第一通信系统的标识,上述确定上述第二通信系统的多个第二密钥参数K d1-K dN还可以包括:通过KDF、上述多个第一密钥参数K 1-K N、第一通信系统的标识,第二通信系统的标识以及上述目标类型密钥的类型标识,确定第二通信系统的多个第二密钥参数K d1-K dN,第二密钥参数=KDF(第一密钥参数,第一通信系统的标识,第二通信系统的标识,目标类型密钥的类型标识),其中,第一通信系统的标识和目标类型密钥的类型标识为可选参数。
如果KDF的输入参数还包括新鲜性参数,上述确定上述第二通信系统的多个第二密钥参数K d1-K dN还可以包括:通过KDF、上述多个第一密钥参数K 1-K N、新鲜性参数,第二通信系统的标识以及上述目标类型密钥的类型标识,确定第二通信系统的多个第二密钥参数K d1-K dN,第二密钥参数=KDF(第一密钥参数,新鲜性参数,第二通信系统的标识,目标类型密钥的类型标识),其中,新鲜性参数和目标类型密钥的类型标识为可选参数。
如果KDF的输入参数还包括第一通信系统的标识和新鲜性参数,上述确定上述第二通信系统的多个第二密钥参数K d1-K dN还可以包括:通过KDF、上述多个第一密钥参数K 1-K N、新鲜性参 数,第一通信系统的标识,第二通信系统的标识以及上述目标类型密钥的类型标识,确定第二通信系统的多个第二密钥参数K d1-K dN,第二密钥参数=KDF(第一密钥参数,新鲜性参数,第一通信系统的标识,第二通信系统的标识,目标类型密钥的类型标识),其中,新鲜性参数、第一通信系统的标识和目标类型密钥的类型标识为可选参数。
在一些可行的实施方式中,上述第二密钥派生函数可以包括例如HMAC-SHA256、HMAC-SHA3和HMAC-SM3等。本申请采用的密钥派生函数除上述外,还可以采用其它密钥派生函数,本申请实施例对此不做特别限制。
另外,本申请实施中密钥派生函数所采用的算法、标准还可以包括其他的算法、标准等,本申请实施例对此不做特别限制。
这里,上述密钥派生函数可以包括不同的算法,例如上述HMAC-SHA256、HMAC-SHA3和HMAC-SM3等。因此,KDF的输入参数还可以包括算法标识,用于标识不同的算法,相应的,上述确定上述第二通信系统的多个第二密钥参数K d1-K dN还可以包括:
通过KDF、上述多个第一密钥参数K 1-K N、新鲜性参数,第一通信系统的标识,第二通信系统的标识、上述目标类型密钥的类型标识以及算法标识,确定第二通信系统的多个第二密钥参数K d1-K dN,第二密钥参数=KDF(第一密钥参数,新鲜性参数,第一通信系统的标识,第二通信系统的标识,目标类型密钥的类型标识,算法标识),其中,新鲜性参数、第一通信系统的标识、目标类型密钥的类型标识和算法标识为可选参数。
本申请实施例,通过第二密钥派生函数,根据上述第一密钥参数K以及第二通信系统的标识,准确生成满足第二通信系统密钥要求的第二密钥参数K d,而且,通过获取第一通信系统的第一密钥参数K,确定第二通信系统的第二密钥参数K d,能够在各个通信系统之间完全独立的情况下,根据某通信系统的密钥参数确定其它通信系统的密钥参数,使得其它通信系统可以基于上述密钥参数生成用于加解密的密钥和/或完整性保护的密钥等,省略密钥协商推演的流程,大大节省了信令,提高了效率。
图9为本申请提供的一种密钥处理装置的结构示意图,该装置包括:获取模块901、确定模块902和发送模块903。这里的密钥处理装置可以是分析装置本身,或者是实现分析装置的功能的芯片或者集成电路。这里需要说明的是,获取模块和确定模块的划分只是一种逻辑功能的划分,物理上两者可以是集成的,也可以是独立的。
其中,获取模块901,用于获取第一密钥参数K,该第一密钥参数K为第一通信系统的密钥参数。
确定模块902,用于根据上述第一密钥参数K以及第二通信系统的标识,确定第二通信系统的第二密钥参数K d
其中,上述第一通信系统与上述第二通信系统不同。
一种可能设计,发送模块903,用于在上述确定模块902确定上述第二通信系统的第二密钥参数K d之后,向上述第二通信系统发送上述第二密钥参数K d,上述第二密钥参数K d用于上述第二通信系统确定目标类型密钥。
一种可能设计,上述第二密钥参数K d对应目标类型密钥。
上述确定模块902,具体用于:
根据上述第一密钥参数K、上述第二通信系统的标识以及上述目标类型密钥的类型标识,确定上述第二通信系统的第二密钥参数K d
一种可能设计,上述目标类型密钥为上述第二密钥参数K d
其中,如果上述第二密钥参数K d的长度等于上述目标类型密钥的长度,上述目标类型密钥为上述第二密钥参数K d
一种可能设计,上述确定模块902还用于:
确定上述目标类型密钥的长度;
若上述第二密钥参数K d的长度等于上述目标类型密钥的长度,则确定上述目标类型密钥为上述第二密钥参数K d
一种可能设计,上述第二密钥参数K d对应目标类型密钥;
上述第二密钥参数K d的长度大于上述目标类型密钥的长度;
上述目标类型密钥为上述第二密钥参数K d中从预设位置开始的M个比特位,其中,M为上述目标类型密钥的长度,上述预设位置是预先定义或者配置的,M为大于0的整数。
一种可能设计,上述确定模块902还用于:
确定上述目标类型密钥的长度;
若上述第二密钥参数K d的长度大于上述目标类型密钥的长度,则确定上述目标类型密钥为上述第二密钥参数K d中从预设位置开始的M个比特位,其中,M为上述目标类型密钥的长度,上述预设位置是预先定义或者配置的。
一种可能设计,上述第二密钥参数对应目标类型密钥;
上述确定模块902,具体用于:
确定上述目标类型密钥的长度;
通过第一密钥派生函数、上述第一密钥参数K以及第二通信系统的标识,确定上述第二通信系统的第二密钥参数K d
其中,上述第一密钥派生函数是根据上述目标类型密钥的长度确定的,或者说,上述第一密钥派生函数对应于上述目标类型密钥的长度,也可以理解为上述第一密钥派生函数与上述目标类型密钥的长度之间存在对应关系。
一种可能设计,上述第二密钥参数K d对应目标类型密钥;
上述第一密钥参数K包含多个第一密钥参数K 1-K N,其中,N为大于1的整数;
上述确定模块902,具体用于:
根据上述多个第一密钥参数K 1-K N以及第二通信系统的标识,确定上述第二通信系统的多个第二密钥参数K d1-K dN
其中,上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合,或者,上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合中的M个比特位,其中,M为上述目标类型密钥的长度,M为大于0的整数。
一种可能设计,上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合中从预设位置开始的M个比特位,其中,上述预设位置是预先定义或者配置的。
一种可能设计,上述多个第一密钥参数K 1-K N是根据多个新鲜性参数获取的;
上述N的取值是根据上述目标类型密钥的长度确定的,或者说,上述N的取值对应上述目标类型密钥的长度,也可以理解为上述N的取值与上述目标类型密钥存在对应关系。
一种可能设计,上述多个新鲜性参数是随机生成的,或者,上述多个新鲜性参数为多个等间隔的数值,又或者是时间戳相关的数值等。
一种可能设计,上述确定模块902,具体用于:
通过第二密钥派生函数、上述第一密钥参数K以及第二通信系统的标识,确定上述第二密钥参数K d
一种可能设计,上述第二密钥派生函数对应上述第二通信系统。
一种可能设计,上述第一密钥派生函数或上述第二密钥派生函数包括HMAC-SHA256、HMAC-SHA3和HMAC-SM3中至少一个。
本实施例的装置,对应地可用于执行上述方法所示实施例中的技术方案,其实现原理、实现细节和技术效果类似,此处不再赘述。
可选地,图10A和10B示意性地提供本申请所述密钥处理装置的一种可能的基本硬件架构。
参见图10A和10B,密钥处理装置1000包括至少一个处理器1001以及通信接口1003。进一步可选的,还可以包括存储器1002和总线1004。
其中,密钥处理装置1000可以是计算机或服务器,本申请对此不作特别限制。密钥处理装置1000中,处理器1001的数量可以是一个或多个,图10A和10B仅示意了其中一个处理器1001。可选地,处理器1001,可以是中央处理器(central processing unit,CPU)、图形处理器(graphics processing unit,GPU)或者数字信号处理器(digital signal processor,DSP)。如果密钥处理装置1000具有多个处理器1001,多个处理器1001的类型可以不同,或者可以相同。可选地,密钥处理装置1000的多个处理器1001还可以集成为多核处理器。
存储器1002存储计算机指令和数据;存储器1002可以存储实现本申请提供的上述密钥处理方法所需的计算机指令和数据,例如,存储器1002存储用于实现上述密钥处理方法的步骤的指令。存储器1002可以是以下存储介质的任一种或任一种组合:非易失性存储器(例如只读存储器(ROM)、固态硬盘(SSD)、硬盘(HDD)、光盘),易失性存储器。
通信接口1003可以为所述至少一个处理器提供信息输入/输出。也可以包括以下器件的任一种或任一种组合:网络接口(例如以太网接口)、无线网卡等具有网络接入功能的器件。
可选的,通信接口1003还可以用于密钥处理装置1000与其它计算设备或者终端进行数据通信。
进一步可选的,图10A和10B用一条粗线表示总线1004。总线1004可以将处理器1001与存储器1002和通信接口1003连接。这样,通过总线1004,处理器1001可以访问存储器1002,还可以利用通信接口1003与其它计算设备或者终端进行数据交互。
在本申请中,密钥处理装置1000执行存储器1002中的计算机指令,使得密钥处理装置1000实现本申请提供的上述密钥处理方法,或者使得密钥处理装置1000部署上述的密钥处理装置。
从逻辑功能划分来看,示例性的,如图10A所示,存储器1002中可以包括获取模块901和确定模块902。这里的包括仅仅涉及存储器中所存储的指令被执行时可以分别实现获取模块和确定模块的功能,而不限定是物理上的结构。
其中,获取模块901,用于获取第一密钥参数K,该第一密钥参数K为第一通信系统的密钥参数。
确定模块902,用于根据上述第一密钥参数K以及第二通信系统的标识,确定第二通信系统的第二密钥参数K d
其中,上述第一通信系统与上述第二通信系统不同。
一种可能设计,如图10B所示,存储器1002中还包括发送模块903,用于在上述确定模块 902确定上述第二通信系统的第二密钥参数K d之后,向上述第二通信系统发送上述第二密钥参数K d,上述第二密钥参数K d用于上述第二通信系统确定目标类型密钥。
一种可能设计,上述第二密钥参数K d对应目标类型密钥。
上述确定模块902,具体用于:
根据上述第一密钥参数K、上述第二通信系统的标识以及上述目标类型密钥的类型标识,确定上述第二通信系统的第二密钥参数K d
一种可能设计,上述目标类型密钥为上述第二密钥参数K d
其中,如果上述第二密钥参数K d的长度等于上述目标类型密钥的长度,上述目标类型密钥为上述第二密钥参数K d
一种可能设计,上述确定模块902还用于:
确定上述目标类型密钥的长度;
若上述第二密钥参数K d的长度等于上述目标类型密钥的长度,则确定上述目标类型密钥为上述第二密钥参数K d
一种可能设计,上述第二密钥参数K d对应目标类型密钥;
上述第二密钥参数K d的长度大于上述目标类型密钥的长度;
上述目标类型密钥为上述第二密钥参数K d中从预设位置开始的M个比特位,其中,M为上述目标类型密钥的长度,上述预设位置是预先定义或者配置的,M为大于0的整数。
一种可能设计,上述确定模块902还用于:
确定上述目标类型密钥的长度;
若上述第二密钥参数K d的长度大于上述目标类型密钥的长度,则确定上述目标类型密钥为上述第二密钥参数K d中从预设位置开始的M个比特位,其中,M为上述目标类型密钥的长度,上述预设位置是预先定义或者配置的。
一种可能设计,上述第二密钥参数对应目标类型密钥;
上述确定模块902,具体用于:
确定上述目标类型密钥的长度;
通过第一密钥派生函数、上述第一密钥参数K以及第二通信系统的标识,确定上述第二通信系统的第二密钥参数K d
其中,上述第一密钥派生函数是根据上述目标类型密钥的长度确定的,或者说,上述第一密钥派生函数对应于上述目标类型密钥的长度,也可以理解为上述第一密钥派生函数与上述目标类型密钥的长度之间存在对应关系。
一种可能设计,上述第二密钥参数K d对应目标类型密钥;
上述第一密钥参数K包含多个第一密钥参数K 1-K N,其中,N为大于1的整数;
上述确定模块902,具体用于:
根据上述多个第一密钥参数K 1-K N以及第二通信系统的标识,确定上述第二通信系统的多个第二密钥参数K d1-K dN
其中,上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合,或者,上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合中的M个比特位,其中,M为上述目标类型密钥的长度,M为大于0的整数。
一种可能设计,上述目标类型密钥为上述多个第二密钥参数K d1-K dN的组合中从预设位置开 始的M个比特位,其中,上述预设位置是预先定义或者配置的。
一种可能设计,上述多个第一密钥参数K 1-K N是根据多个新鲜性参数获取的;
上述N的取值是根据上述目标类型密钥的长度确定的,或者说,上述N的取值对应上述目标类型密钥的长度,也可以理解为上述N的取值与上述目标类型密钥存在对应关系。
一种可能设计,上述多个新鲜性参数是随机生成的,或者,上述多个新鲜性参数为多个等间隔的数值,又或者是时间戳相关的数值等。
一种可能设计,上述确定模块902,具体用于:
通过第二密钥派生函数、上述第一密钥参数K以及第二通信系统的标识,确定上述第二密钥参数K d
一种可能设计,上述第二密钥派生函数对应上述第二通信系统。
一种可能设计,上述第一密钥派生函数或上述第二密钥派生函数包括HMAC-SHA256、HMAC-SHA3和HMAC-SM3中至少一个。
另外,上述的密钥处理装置除了可以像上述图10A和10B通过软件实现外,也可以作为硬件模块,或者作为电路单元,通过硬件实现。
本申请提供一种计算机可读存储介质,所述计算机程序产品包括计算机指令,所述计算机指令指示计算设备执行本申请提供的上述密钥处理方法。
本申请提供一种芯片,包括至少一个处理器和通信接口,所述通信接口为所述至少一个处理器提供信息输入和/或输出。进一步,所述芯片还可以包含至少一个存储器,所述存储器用于存储计算机指令。所述至少一个处理器用于调用并运行该计算机指令,以执行本申请提供的上述密钥处理方法。
本申请提供一种终端,所述终端可以为运输工具或者智能设备,例如车辆、无人机、无人运输车或者机器人等,其上包含上述密钥处理装置。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。

Claims (20)

  1. 一种密钥处理方法,其特征在于,所述方法包括:
    获取第一密钥参数K,所述第一密钥参数K为第一通信系统的密钥参数;
    根据所述第一密钥参数K以及第二通信系统的标识,确定所述第二通信系统的第二密钥参数K d
    其中,所述第一通信系统与所述第二通信系统不同。
  2. 根据权利要求1所述的方法,其特征在于,所述第二密钥参数K d对应目标类型密钥;
    所述根据所述第一密钥参数K以及第二通信系统的标识,确定所述第二通信系统的第二密钥参数K d,包括:
    根据所述第一密钥参数K、所述第二通信系统的标识以及所述目标类型密钥的类型标识,确定所述第二通信系统的所述第二密钥参数K d
  3. 根据权利要求2所述的方法,其特征在于,所述目标类型密钥为所述第二密钥参数K d
  4. 根据权利要求1或2所述的方法,其特征在于,所述第二密钥参数K d对应目标类型密钥;
    所述第二密钥参数K d的长度大于所述目标类型密钥的长度;
    所述目标类型密钥为所述第二密钥参数K d中从预设位置开始的M个比特位,所述M为所述目标类型密钥的长度,所述预设位置是预先定义或者配置的,M为大于0的整数。
  5. 根据权利要求1至4任一项所述的方法,其特征在于,所述第二密钥参数K d对应目标类型密钥;
    所述根据所述第一密钥参数K以及第二通信系统的标识,确定所述第二通信系统的第二密钥参数K d,包括:
    确定所述目标类型密钥的长度;
    通过第一密钥派生函数、所述第一密钥参数K以及第二通信系统的标识,确定所述第二通信系统的第二密钥参数K d
    其中,所述第一密钥派生函数是根据所述目标类型密钥的长度确定的。
  6. 根据权利要求1或2所述的方法,其特征在于,所述第二密钥参数K d对应目标类型密钥;
    所述第一密钥参数K包含多个第一密钥参数K 1-K N,其中,N为大于1的整数;
    所述根据所述第一密钥参数K以及第二通信系统的标识,确定所述第二通信系统的第二密钥参数K d;包括:
    根据所述多个第一密钥参数K 1-K N以及第二通信系统的标识,确定所述第二通信系统的多个第二密钥参数K d1-K dN
    其中,所述目标类型密钥为所述多个第二密钥参数K d1-K dN的组合,或者,所述目标类型密钥为所述多个第二密钥参数K d1-K dN的组合中的M个比特位,所述M为所述目标类型密钥的长度,M为大于0的整数。
  7. 根据权利要求6所述的方法,其特征在于,所述多个第一密钥参数K 1-K N是根据多个新鲜性参数获取的;
    所述N的取值是根据所述目标类型密钥的长度确定的。
  8. 根据权利要求1至4与6至7中任一项所述的方法,其特征在于,所述根据所述第一密钥参数K以及第二通信系统的标识,确定所述第二通信系统的第二密钥参数K d,包括:
    通过第二密钥派生函数、所述第一密钥参数K以及第二通信系统的标识,确定所述第二密钥参数K d
  9. 根据权利要求5或8所述的方法,其特征在于,所述第一密钥派生函数或所述第二密钥派生函数包括哈希消息认证码HMAC-安全散列算法SHA256、HMAC-SHA3和HMAC-SM3中至少一个。
  10. 一种密钥处理装置,其特征在于,包括:
    获取模块,用于获取第一密钥参数K,所述第一密钥参数K为第一通信系统的密钥参数;
    确定模块,用于根据所述第一密钥参数K以及第二通信系统的标识,确定所述第二通信系统的第二密钥参数K d
    其中,所述第一通信系统与所述第二通信系统不同。
  11. 根据权利要求10所述的装置,其特征在于,所述第二密钥参数K d对应目标类型密钥;
    所述确定模块,具体用于:
    根据所述第一密钥参数K、所述第二通信系统的标识以及所述目标类型密钥的类型标识,确定所述第二通信系统的所述第二密钥参数K d
  12. 根据权利要求11所述的装置,其特征在于,所述目标类型密钥为所述第二密钥参数K d
  13. 根据权利要求10或11所述的装置,其特征在于,所述第二密钥参数K d对应目标类型密钥;
    所述第二密钥参数K d的长度大于所述目标类型密钥的长度;
    所述目标类型密钥为所述第二密钥参数K d中从预设位置开始的M个比特位,所述M为所述目标类型密钥的长度,所述预设位置是预先定义或者配置的,M为大于0的整数。
  14. 根据权利要求10至13任一项所述的装置,其特征在于,所述第二密钥参数K d对应目标类型密钥;
    所述确定模块,具体用于:
    确定所述目标类型密钥的长度;
    通过第一密钥派生函数、所述第一密钥参数K以及第二通信系统的标识,确定所述第二通信系统的第二密钥参数K d
    其中,所述第一密钥派生函数是根据所述目标类型密钥的长度确定的。
  15. 根据权利要求10或11所述的装置,其特征在于,所述第二密钥参数K d对应目标类型密钥;
    所述第一密钥参数K包含多个第一密钥参数K 1-K N,其中,N为大于1的整数;
    所述确定模块,具体用于:
    根据所述多个第一密钥参数K 1-K N以及第二通信系统的标识,确定所述第二通信系统的多个第二密钥参数K d1-K dN
    其中,所述目标类型密钥为所述多个第二密钥参数K d1-K dN的组合,或者,所述目标类型密钥为所述多个第二密钥参数K d1-K dN的组合中的M个比特位,所述M为所述目标类型密钥的长度,M为大于0的整数。
  16. 根据权利要求15所述的装置,其特征在于,所述多个第一密钥参数K 1-K N是根据多个新鲜性参数获取的;
    所述N的取值是根据所述目标类型密钥的长度确定的。
  17. 根据权利要求11至13与15至16中任一所述的装置,其特征在于,所述确定模块,具体用于:
    通过第二密钥派生函数、所述第一密钥参数K以及第二通信系统的标识,确定所述第二密钥参数K d
  18. 根据权利要求14或17所述的装置,其特征在于,所述第一密钥派生函数或所述第二密钥派生函数包括HMAC-SHA256、HMAC-SHA3和HMAC-SM3中至少一个。
  19. 一种密钥处理装置,其特征在于,包括:
    包括处理器和存储器;
    所述存储器,用于存储计算机指令;
    所述处理器,用于执行所述存储器存储的计算机指令,使得所述密钥处理装置实现权利要求1至9任一项所述的方法。
  20. 一种计算机程序产品,其特征在于,所述计算机程序产品包括计算机指令,所述计算机指令指示计算设备执行权利要求1至9任一项所述的方法。
PCT/CN2020/082628 2020-03-31 2020-03-31 密钥处理方法和装置 WO2021196047A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2020/082628 WO2021196047A1 (zh) 2020-03-31 2020-03-31 密钥处理方法和装置
CN202080005167.0A CN112771815B (zh) 2020-03-31 2020-03-31 密钥处理方法和装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/082628 WO2021196047A1 (zh) 2020-03-31 2020-03-31 密钥处理方法和装置

Publications (1)

Publication Number Publication Date
WO2021196047A1 true WO2021196047A1 (zh) 2021-10-07

Family

ID=75699495

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/082628 WO2021196047A1 (zh) 2020-03-31 2020-03-31 密钥处理方法和装置

Country Status (2)

Country Link
CN (1) CN112771815B (zh)
WO (1) WO2021196047A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115734219A (zh) * 2021-08-30 2023-03-03 华为技术有限公司 一种通信方法、装置及系统
CN113872752B (zh) * 2021-09-07 2023-10-13 哲库科技(北京)有限公司 安全引擎模组、安全引擎装置和通信设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101056177A (zh) * 2007-06-01 2007-10-17 清华大学 基于无线局域网安全标准wapi的无线网状网重认证方法
US20090067623A1 (en) * 2007-09-12 2009-03-12 Samsung Electronics Co., Ltd. Method and apparatus for performing fast authentication for vertical handover
CN103888941A (zh) * 2012-12-20 2014-06-25 杭州华三通信技术有限公司 一种无线网络密钥协商的方法及装置
CN104618103A (zh) * 2013-11-04 2015-05-13 华为技术有限公司 密钥协商处理方法和装置
CN108199837A (zh) * 2018-01-23 2018-06-22 新华三信息安全技术有限公司 一种密钥协商方法及装置

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101938743B (zh) * 2009-06-30 2013-05-08 中兴通讯股份有限公司 一种安全密钥的生成方法和装置
CN104253692B (zh) * 2014-01-21 2018-03-23 北京印天网真科技有限公司 基于se的密钥管理方法和装置
WO2016034453A1 (en) * 2014-09-04 2016-03-10 Koninklijke Philips N.V. Cryptographic system arranged for key sharing
WO2016134536A1 (zh) * 2015-02-28 2016-09-01 华为技术有限公司 密钥生成方法、设备及系统
CN107079293A (zh) * 2015-04-08 2017-08-18 华为技术有限公司 一种gprs系统密钥增强的方法、sgsn设备、ue、hlr/hss及gprs系统
CN104852806B (zh) * 2015-05-15 2018-01-05 飞天诚信科技股份有限公司 一种根据密钥类型进行签名的实现方法
US10237305B2 (en) * 2016-02-17 2019-03-19 Nagravision S.A. Methods and systems for enabling legal-intercept mode for a targeted secure element
CN106209777A (zh) * 2016-06-24 2016-12-07 韩磊 一种无人驾驶车车载信息交互系统及安全通信方法
CN109788474A (zh) * 2017-11-14 2019-05-21 华为技术有限公司 一种消息保护的方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101056177A (zh) * 2007-06-01 2007-10-17 清华大学 基于无线局域网安全标准wapi的无线网状网重认证方法
US20090067623A1 (en) * 2007-09-12 2009-03-12 Samsung Electronics Co., Ltd. Method and apparatus for performing fast authentication for vertical handover
CN103888941A (zh) * 2012-12-20 2014-06-25 杭州华三通信技术有限公司 一种无线网络密钥协商的方法及装置
CN104618103A (zh) * 2013-11-04 2015-05-13 华为技术有限公司 密钥协商处理方法和装置
CN108199837A (zh) * 2018-01-23 2018-06-22 新华三信息安全技术有限公司 一种密钥协商方法及装置

Also Published As

Publication number Publication date
CN112771815A (zh) 2021-05-07
CN112771815B (zh) 2022-11-11

Similar Documents

Publication Publication Date Title
EP1868314B1 (en) Communication apparatus and method thereof
US10091650B2 (en) Wireless terminal configuration method, device, and system
US11924635B2 (en) Security authentication method and apparatus thereof, and electronic device
US11108548B2 (en) Authentication method, server, terminal, and gateway
EP3562256A1 (en) Communication device, control method, and program
WO2021196047A1 (zh) 密钥处理方法和装置
WO2019019853A1 (zh) 处理数据的方法、终端设备和网络设备
EP4068675A1 (en) Method and device for certificate application
US20230179997A1 (en) Method, system, and apparatus for determining user plane security algorithm
US11637704B2 (en) Method and apparatus for determining trust status of TPM, and storage medium
WO2023279283A1 (zh) 建立车辆安全通信的方法、车辆、终端及系统
CN116963054A (zh) Wlan多链路tdls密钥导出
US20230156467A1 (en) Terminal device and non-transitory computer-readable recording medium storing computer readable instructions for terminal device
WO2022143157A1 (zh) 一种密钥协商的方法及其相关设备
EP3028429B1 (en) Local communication interception
CN113455034B (zh) 一种通信方法及装置
CN117061115B (zh) 密钥协商方法、装置、计算机设备和计算机可读存储介质
CN115767541A (zh) 无线连接的建立方法、电子设备、程序产品和存储介质
CN117992414A (zh) 一种资源共享方法及电子设备
CN115767529A (zh) 无线连接的建立方法、电子设备、程序产品和存储介质
CN117135631A (zh) 设备认证方法及终端设备
CN117641307A (zh) 一种查找终端的方法、终端以及系统
CN115510458A (zh) 检测方法及相关装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20929629

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20929629

Country of ref document: EP

Kind code of ref document: A1