Communication methods and devices
By using the message authentication code generated by the shared key in A-IoT devices to simplify the authentication process of the core network-side device, the authentication complexity problem between the user equipment and the core network is solved, and efficient data transmission between devices is achieved.
Patent Information
- Application Number
- PCT/CN2023/096065
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-05-24
- Publication Date
- 2024-11-28
AI Technical Summary
In the prior art, the authentication process and key negotiation between the user equipment (UE) and the core network is complicated, making it difficult to reduce the computing complexity in zero-power devices (such as A-IoT devices), especially in their access network and When the service equipment communicates.
The message authentication code from the core network side is sent to the second device through the first device, so that the second device can authenticate the core network side device and generate a first key based on the shared key for use in the second device and the target service device. Communication between the two devices reduces the complexity of the authentication and communication process of the second device.
It realizes simplified the authentication process in A-IoT devices, reduces the computing complexity, is suitable for devices with low capabilities, and improves the efficiency of network-side authentication and data transmission.
Smart Images

Figure CN2023096065_28112024_PF_FP_ABST
Abstract
Description
Communication method and device Technical Field
[0001] The present application relates to the field of communications, and more particularly, to a communication method, device, computer-readable storage medium, computer program product, and computer program. Background Art
[0002] In related technologies, the authentication and key negotiation processes between UE (User Equipment) and the core network use highly complex computational functions and a complex key architecture. However, zero-power devices, such as A-IoT devices, also need to access networks such as the core network. Therefore, reducing the computational complexity of A-IoT devices during authentication with the network and communication between A-IoT devices and their corresponding service devices becomes a challenge.
[0003] Summary of the Invention
[0004] Embodiments of the present application provide a communication method, device, computer-readable storage medium, computer program product, and computer program.
[0005] An embodiment of the present application provides a communication method, including:
[0006] The first device sends first information from the core network side device to the second device, where the first information includes a first message authentication code, the first message authentication code is related to a first shared key, the first shared key is shared between the second device and the core network side device and / or the target service device, and the first message authentication code is used by the second device to authenticate the core network side device;
[0007] The first device receives a first key from the core network side device, where the first key is used for communication between the first device and a second device, and the first device is used to transmit data between the second device and the target service device.
[0008] An embodiment of the present application provides a communication method, including:
[0009] The second device receives first information from the core network side device, where the first information includes a first message authentication code, where the first message authentication code is related to a first shared key, and the first shared key is shared between the second device and the core network side device and / or the target service device;
[0010] The second device calculates a second message authentication code based on the first shared key;
[0011] When the second message authentication code is the same as the first message authentication code, the second device calculates a first key based on the first shared key and the identifier of the target service device. The first key is used for communication between the second device and the target service device and / or the first device.
[0012] An embodiment of the present application provides a communication method, including:
[0013] The core network side device sends first information to the second device, where the first information includes a first message authentication code, the first message authentication code is related to a first shared key, the first shared key is shared between the second device and the core network side device and / or the target service device, and the first message authentication code is used by the second device to authenticate the core network device;
[0014] The core network side device sends a first key to the target service device and / or the first device, the first key is used for communication between the second device and the target service device or the first device, and the first device is used to transmit data between the second device and the target service device.
[0015] An embodiment of the present application provides a communication method, including:
[0016] The target service device receives a first key sent by the core network side device, where the first key is used for communication between the target service device and the second device.
[0017] An embodiment of the present application provides a first device, including:
[0018] A first communication unit is used to send first information from a core network side device to a second device, where the first information includes a first message authentication code, where the first message authentication code is related to a first shared key, where the first shared key is shared between the second device and the core network side device and / or the target service device, and where the first message authentication code is used by the second device to authenticate the core network side device; and receive a first key from the core network side device, where the first key is used for communication between the first device and the second device, and the first device is used to transmit data between the second device and the target service device.
[0019] An embodiment of the present application provides a second device, including:
[0020] a second communication unit, configured to receive first information from a core network side device, where the first information includes a first message authentication code, where the first message authentication code is associated with a first shared key, and where the first shared key is shared between the second device and the core network side device and / or the target service device;
[0021] The second processing unit is configured to calculate a second message authentication code based on the first shared key; when the second message authentication code is the same as the first message authentication code, calculate a first key based on the first shared key and the identifier of the target service device, wherein the first key is used for communication between the second device and the target service device and / or the first device.
[0022] An embodiment of the present application provides a core network side device, including:
[0023] A third communication unit is used to send first information to a second device, wherein the first information includes a first message authentication code, the first message authentication code is related to a first shared key, the first shared key is shared between the second device and the core network side device and / or the target service device, and the first message authentication code is used by the second device to authenticate the core network device; a first key is sent to the target service device and / or the first device, the first key is used for communication between the second device and the target service device or the first device, and the first device is used to transmit data between the second device and the target service device.
[0024] The present invention provides a target service device, including:
[0025] The fourth communication unit is configured to receive a first key sent by a core network side device, where the first key is used for communication between the target service device and the second device.
[0026] An embodiment of the present application provides a first device, comprising: a memory communicating with the processor, the memory being used to store instructions, and when the instructions are executed by the processor, the instructions cause the first device to execute: sending first information from a core network side device to a second device, the first information comprising a first message authentication code, the first message authentication code being related to a first shared key, the first shared key being shared between the second device and the core network side device and / or the target service device, the first message authentication code being used by the second device to authenticate the core network side device; receiving a first key from the core network side device, the first key being used for communication between the first device and the second device, and the first device being used to transmit data between the second device and the target service device.
[0027] An embodiment of the present application provides a second device, including: a processor, a memory communicating with the processor, the memory being used to store instructions, and when the instructions are executed by the processor, the instructions cause the second device to execute: receiving first information from a core network side device, the first information including a first message authentication code, the first message authentication code being related to a first shared key, the first shared key being shared between the second device and the core network side device and / or the target service device; calculating a second message authentication code based on the first shared key; and when the second message authentication code is the same as the first message authentication code, calculating a first key based on the first shared key and an identifier of the target service device, the first key being used for communication between the second device and the target service device and / or the first device.
[0028] An embodiment of the present application provides a core network side device, comprising: a processor, a memory communicating with the processor, the memory being used to store instructions, and when the instructions are executed by the processor, the instructions cause the core network side device to execute: sending first information to a second device, wherein the first information includes a first message authentication code, the first message authentication code is related to a first shared key, the first shared key is shared between the second device and the core network side device and / or the target service device, and the first message authentication code is used by the second device to authenticate the core network device; sending a first key to the target service device and / or the first device, the first key is used for communication between the second device and the target service device or the first device, and the first device is used to transmit data between the second device and the target service device.
[0029] An embodiment of the present application provides a target service device, comprising: a processor, a memory communicating with the processor, the memory being used to store instructions, and when the instructions are executed by the processor, the instructions cause the target service device to execute: receiving a first key sent by a core network side device, the first key being used for communication between the target service device and a second device.
[0030] The embodiment of the present application provides a chip for implementing the above method.
[0031] Specifically, the chip includes: a processor, which is used to call and run a computer program from a memory, so that a device equipped with the chip executes the above method.
[0032] An embodiment of the present application provides a computer-readable storage medium for storing a computer program, which enables a device to perform the above method when the computer program is executed by the device.
[0033] An embodiment of the present application provides a computer program product, including computer program instructions, which enable a computer to execute the above method.
[0034] An embodiment of the present application provides a computer program, which, when executed on a computer, enables the computer to execute the above method.
[0035] By adopting the solution provided in this embodiment, the message authentication code from the core network side can be sent to the second device through the first device, so that the second device authenticates the core network side device, and the first message authentication code is generated based on the shared key of the second device, and then the first device can obtain the first key, which is used for communication between the first device and the second device when the first device acts as a relay or proxy device. In this way, the second device can obtain authentication-related information on the network side through the first device and obtain the key used for communication between the first device and the second device, so as to enable the second device to transmit data to the target service device through the first device. Moreover, in the above solution, since the first message authentication code is generated based on the shared key of the second device, the second device only needs to use the shared key to achieve authentication, which reduces the process complexity of the second device and is particularly suitable for devices with lower capabilities. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] FIG1 is a schematic diagram of an application scenario according to an embodiment of the present application.
[0037] 2-5 are various schematic flow charts of a communication method according to an embodiment of the present application.
[0038] 6 to 12 are schematic diagrams of various exemplary processes of a communication method according to an embodiment of the present application.
[0039] FIG13 is a schematic diagram of an application scenario according to an embodiment of the present application.
[0040] 14-16 are schematic diagrams of various processes of key security communication according to embodiments of the present application.
[0041] Figure 17 is a schematic diagram of the derivation of NAS and AS security contexts according to an embodiment of the present application.
[0042] FIG18 is a schematic block diagram of a first device according to an embodiment of the present application.
[0043] FIG19 is a schematic block diagram of a second device according to an embodiment of the present application.
[0044] Figure 20 is a schematic block diagram of a core network side device according to an embodiment of the present application.
[0045] FIG21 is a schematic block diagram of a target service device according to an embodiment of the present application.
[0046] Figure 22 is a schematic block diagram of a communication device according to an embodiment of the present application.
[0047] Figure 23 is a schematic block diagram of a chip according to an embodiment of the present application.
[0048] Figure 24 is a schematic block diagram of a communication system according to an embodiment of the present application. DETAILED DESCRIPTION
[0049] The technical solutions of the embodiments of the present application can be applied to various communication systems, such as: GSM, CDMA, WCDMA, GPRS, LTE, LTE-A, NR, NR evolution, WLAN, WiFi, or other communication systems.
[0050] The embodiments of the present application describe various embodiments in conjunction with network devices and terminals. The terminals can be mobile or fixed, and can also be referred to as mobile stations, user units, etc. The terminal can be a site in a WLAN, and can be a smart terminal, wireless modem, laptop computer, tablet computer, or other terminal. In the embodiments of the present application, the terminal can be a VR terminal / AR terminal, an industrial control terminal, an unmanned driving terminal, a telemedicine terminal, a smart grid terminal, a transportation safety terminal, a smart city terminal, or a wireless terminal for a smart home, etc. As an example and not a limitation, in the embodiments of the present application, the terminal can also be a wearable device.
[0051] In the embodiment of the present application, the network device may be a device for communicating with a terminal, and the network device may be an access point in WLAN, a base station in GSM, CDMA, or WCDMA, an evolved base station in LTE, or a relay station, or a network device (gNB) in an in-vehicle device, a wearable device, and an NR network, or a network device in a future evolved PLMN network, or a network device in a non-terrestrial network, etc. As an example and not a limitation, in the embodiment of the present application, the network device may have a mobile feature, for example, the network device may be a mobile device.
[0052] It should be understood that the terms "system" and "network" are often used interchangeably in this article. The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects associated before and after are in an "or" relationship. It should be understood that the "indication" mentioned in the embodiments of this application can be a direct indication, an indirect indication, or an indication of an association relationship. For example, A indicates B, which can mean that A directly indicates B, for example, B can be obtained through A; it can also mean that A indirectly indicates B, for example, A indicates C, and B can be obtained through C; it can also mean that there is an association relationship between A and B. In the description of the embodiments of this application, the term "corresponding" can mean that there is a direct or indirect correspondence between the two, or it can mean that there is an association relationship between the two, or it can mean a relationship between indication and indication, configuration and configuration, etc.
[0053] To facilitate understanding of the technical solutions of the embodiments of the present application, the relevant technologies of the embodiments of the present application are described below. The following relevant technologies can be arbitrarily combined with the technical solutions of the embodiments of the present application as optional solutions, and they all fall within the protection scope of the embodiments of the present application.
[0054] Figure 1 exemplarily illustrates a communication system 100. The communication system includes a network device 110 and two terminals 120. In one possible implementation, the communication system 100 may include multiple network devices 110, and each network device 110 may include a different number of terminals 120 within its coverage area, although this embodiment of the present application does not limit this. In one possible implementation, the communication system 100 may also include a mobility management entity, access and mobility management functions, and other network entities, although this embodiment of the present application does not limit this. The network devices may include access network devices and core network devices. That is, the communication system may also include multiple core networks for communicating with the access network devices. The access network devices may be base stations of LTE, LTE-A, or NR systems. Taking the communication system shown in Figure 1 as an example, the communication devices may include network devices and terminals with communication functions. The communication devices may also include other devices in the communication system, such as network controllers, mobility management entities, and other network entities, although this embodiment of the present application does not limit this.
[0055] FIG2 is a schematic flow chart of a communication method according to an embodiment of the present application. The method includes at least part of the following contents.
[0056] S210. The first device sends first information of the core network side device to the second device, where the first information includes a first message authentication code, the first message authentication code is related to a first shared key, the first shared key is shared between the second device and the core network side device and / or the target service device, and the first message authentication code is used by the second device to authenticate the core network side device;
[0057] S220. The first device receives a first key from a core network side device, where the first key is used for communication between the first device and a second device, and the first device is used to transmit data between the second device and the target service device.
[0058] Figure 3 is a schematic flow chart of a communication method according to another embodiment of the present application. The method includes at least part of the following contents.
[0059] S310. A second device receives first information from a core network side device, where the first information includes a first message authentication code, where the first message authentication code is associated with a first shared key, and the first shared key is shared between the second device and the core network side device and / or the target service device.
[0060] S320. The second device calculates a second message authentication code based on the first shared key.
[0061] S330: When the second message authentication code is the same as the first message authentication code, the second device calculates a first key based on the first shared key and the identifier of the target service device. The first key is used for communication between the second device and the target service device or the first device.
[0062] Figure 4 is a schematic flow chart of a communication method according to another embodiment of the present application. The method includes at least part of the following contents.
[0063] S410. The core network side device sends first information to the second device, where the first information includes a first message authentication code, the first message authentication code is related to a first shared key, the first shared key is shared between the second device and the core network side device and / or the target service device, and the first message authentication code is used by the second device to authenticate the core network device;
[0064] S420. The core network side device sends a first key to the target service device and / or the first device. The first key is used for communication between the second device and the target service device or the first device. The first device is used to transmit data between the second device and the target service device.
[0065] Figure 5 is a schematic flow chart of a communication method according to another embodiment of the present application. The method includes at least part of the following contents.
[0066] S510: The target service device receives a first key sent by a core network side device, where the first key is used for communication between the target service device and a second device.
[0067] The first device includes at least one of the following: a first terminal device, a first access network device. In some possible examples, the first device may also be an IAB node (IAB-node).
[0068] The second device is one of the following: an ambient IoT (A-IoT) device and a zero-power device.
[0069] In some possible examples, the second device may be a zero-power device, such as an active zero-power device, a passive zero-power device, or a semi-passive zero-power device, etc. Optionally, the second device may be called a tag. In other possible examples, the second device may be a terminal with lower computing power. All possible names or possible devices of the second device are not exhaustive here.
[0070] Exemplarily, the second device may be connected to the core network via indirect mode. In this mode, the second device is connected to the core network via a first terminal device and an access network device corresponding to the first terminal device. In this case, the first device is a terminal device. Exemplarily, the second device may be connected to the core network via direct mode. In this mode, the second device is connected to the core network via a corresponding first access network device. In this case, the first device is a first access network device. In addition, when the first device is a first terminal device, the first device may be a proxy UE or a relay UE, etc.
[0071] The core network side equipment includes at least one of the following: a bootstrapping server function (BSF), an A-IoT network element, a home subscription system (HSS), a home location register (HLR), a key management service (KMS), and an authentication server function (AUSF).
[0072] The A-IoT network element can be expressed as A-NF (Network Function). The above-mentioned A-IOT network element can refer to a network element with A-IOT function; the network element with A-IoT function can be a core network element with A-IOT function, or a core network element specific to A-IoT services, or a core network element with at least A-IoT authentication function, or a network element with at least A-IoT authentication function, etc. It should be understood that the A-IOT network element can be a separately set network element specifically used to serve the A-IOT function (such as a core network network element), or it can be an existing core network element with A-IOT function added (or at least A-IoT authentication function added, or A-IoT related function added). This embodiment does not enumerate all possible situations.
[0073] The KMS may be a key management service dedicated to the A-IoT service, or may be a key management service that can serve the A-IoT.
[0074] In addition to the devices exemplified above, the core network side devices may also include at least one of the following: UDM (Unified Data Management), ARPF (Authentication credential Repository and Processing Function), AMF, UPF, SEAF, etc. It should be understood that this is only an exemplary description. In actual processing, the core network side devices may also include other core network devices, but they are not exhaustive here. It should also be pointed out that any device on the core network side may also be referred to as a core network network element. In the following embodiments, core network devices and core network elements have the same meaning and will not be repeated.
[0075] The target service device may refer to a target AF (Application Function) or a target server; the target service device may be a device dedicated to serving A-IoT services or a device capable of serving A-IoT-related services. All possible functions of the target service device are not enumerated here.
[0076] In some possible implementations, the first device acts as a proxy device to participate in the authentication process of the second device, and after the second device completes the authentication, acts as a proxy device between the second device and the target service device to transmit data between the second device and the target service device.
[0077] The processing by the second device may include: the second device sending a first request message to the first device, where the first request message is used to request authentication, and the first request message carries a first identifier of the second device.
[0078] The processing by the first device may include: the first device receiving a first request message from the second device, where the first request message is used to request authentication, and the first request message carries a first identifier of the second device.
[0079] Furthermore, the processing of the first device may also include: the first device sends a second request message to the core network side device, the second request message is used to request authentication, and the second request message carries the first identifier of the second device and / or the second identifier of the second device.
[0080] The processing of the core network side device may include: the core network side device receives a second request message sent by the first device, the second request message is used to request authentication, and the second request message carries the first identifier of the second device and / or the second identifier of the second device.
[0081] Here, when the first device is a first terminal device, the first request message may be any side link message; when the first device is a first access network device, the first request message may be any AS (Access Stratum) message.
[0082] The second identifier of the second device may be the original identifier of the second device, and the original identifier may be an ID and / or a network identifier. The ID may include but is not limited to at least one of the following: SUPI (Subscription Permanent Identifier), SUCI (Subscription Concealed Identifier), PEI (Permanent Equipment Identifier), 5G-GUTI (5G Globally Unique Temporary Identifier), Internal-Group Identifier (IGI), GPSI (Generic Public Subscription Identifier), etc.; the above-mentioned network identifier may include: IP address (Internet Protocol Address), MAC (Media Access Control) address, etc. at least one.
[0083] The first identifier of the second device can be an identifier obtained by anonymously processing the second identifier of the second device. For example, the first identifier of the second device can be called the anonymous identifier of the second device, or the pseudonym of the second device, etc. All possible names of the first identifier are not enumerated here. As long as the first identifier of the second device is different from the second identifier, it is within the protection scope of this embodiment.
[0084] Optionally, the manner in which the second device anonymizes the second identifier may include: the second device calculating the first identifier based on the second identifier and a second shared key using a third calculation manner, wherein the second shared key may be a key shared between the second device and the first device. For example, the second shared key may be at least one of a pre-shared key (PSK), a pre-distributed key, a private network key, an application layer key, and a physical layer key.
[0085] Among them, the third calculation method can be at least one of the following: a first authentication function (for example, expressed as f1), a second authentication function (for example, expressed as f2), a third authentication function (for example, expressed as f3), a hash algorithm, AES, SNOW 3G, ZUC, a fourth key generation function (for example, expressed as f4), a fifth key generation function (for example, expressed as f5), KDF, XOR calculation, direct connection calculation, etc.
[0086] Taking the third calculation method as an XOR calculation as an example, the above calculation of the first identifier can be expressed as: DIDi = IDi ⊕ N1, where DIDi is the first identifier of the second device, IDi is the second identifier of the second device, and N1 is the second shared key. Taking the third calculation method as an arbitrary function as an example, the above calculation of the first identifier can be expressed as: DIDi = fn1(IDi), where n1 is the second shared key, and f represents any function or algorithm in the third calculation method. For example, f can be any one of f1 to f5, KDF, etc., and these are not exhaustive.
[0087] Optionally, the way in which the second device anonymously processes the second identifier may include: the second device uses a third calculation method to calculate the first identifier based on the second identifier and a second random number, wherein the second random number can be a random number shared between the second device and the core network side device.
[0088] The second random number may be sent in advance by the core network side device to the second device. For example, after the second device pre-establishes a security context, the core network device sends the second random number to the second device. This embodiment does not limit the process of establishing a security context between the second device and the core network side device.
[0089] Assuming that the second random number can also be expressed as N1, the calculation method of the first identifier is the same as the above example and will not be repeated.
[0090] In the following, to distinguish the second shared key from the second random number, in some possible examples, the second shared key may be represented as K2 and the second random number may be represented as N1; in some possible examples, the second shared key may be represented as N1 and the second random number may be represented as Nonce1. This does not exhaustively list all possible representations of the second shared key and the second random number.
[0091] The second request message may be a Hypertext Transfer Protocol (HTTP) request. Alternatively, the second request message may be another type of message. For example, when the first device is a first terminal device, the second request message may be any type of NAS (Non-Access Stratum) message. For example, when the first device is a first access network device, the second request message may be any type of message transmitted between an access network device and a core network device. This embodiment does not exhaustively list all possible types of the second request message.
[0092] Optionally, the first identifier of the second device is calculated based on the second shared key.
[0093] After receiving the first request message, the first device may deanonymize the first identifier of the second device. Specifically, this may include: the first device uses a third calculation method to calculate the second identifier of the second device based on the second shared key. For example, the first device performs an exclusive-OR operation on the first identifier of the second device and the second shared key to obtain the second identifier of the second device.
[0094] In this case, the second request message carries the second identifier of the second device; further, the second request message may also carry at least one of the following: the identifier of the first device and the second shared key. Here, the identifier of the first device may be the ID and / or network identifier of the first device. The description of the ID and network identifier is the same as in the previous embodiment and is not repeated here.
[0095] Optionally, the first identifier of the second device is calculated based on the second shared key.
[0096] After receiving the first request message, the first device may not deanonymize the first identifier of the second device. In this case, the second request message carries the first identifier of the second device, and the second request message may also carry at least one of the following: the identifier of the first device and the second shared key.
[0097] Optionally, the first identifier of the second device is calculated based on a second random number.
[0098] Since the second random number is shared by the second device and the core network side device, the first device may not deanonymize the first identifier of the second device after receiving the first request message. In this case, the second request message carries the first identifier of the second device. Furthermore, the second request message may also carry the identifier of the first device.
[0099] After receiving the second request message, the core network device can determine whether a preset condition is met based on the subscription credentials of the first device and the subscription credentials of the second device. If the preset condition is met, the first device and the second device are authorized to use the target service. The preset condition may include at least one of the following: the first device can act as a proxy device for the second device, and the second device has the right to use the target service; the target service may refer to an A-IoT service, or other types of services requested by the second device, which are not exhaustive here.
[0100] If the aforementioned second request message carries the second identifier of the second device, the core network side device obtains the subscription certificate of the second device based on the second identifier of the second device, obtains the subscription certificate of the first device based on the identifier of the first device, and then determines whether the preset conditions are met based on the subscription certificate of the first device and the subscription certificate of the second device.
[0101] If the aforementioned second request message carries the first identifier of the second device, the core network side device may also deanonymize the first identifier of the second device before determining whether the preset conditions are met based on the subscription credentials of the first device and the subscription credentials of the second device, obtain the second identifier of the second device, and then obtain the subscription identifier of the second device based on the second identifier of the second device, and obtain the subscription identifier of the first device based on the identifier of the first device.
[0102] Optionally, the first identifier of the second device is calculated based on the second shared key. The second request message received by the core network-side device carries the second shared key, and the core network-side device uses a third calculation method to calculate the first identifier of the second device based on the second shared key to obtain the second identifier of the second device. For example, the core network-side device performs an exclusive-OR calculation on the first identifier of the second device and the second shared key to obtain the second identifier of the second device.
[0103] Optionally, the first identifier of the aforementioned second device is calculated based on a second random number. The core network side device uses a third calculation method to calculate the first identifier of the second device based on the second random number to obtain the second identifier of the second device. For example, the core network side device performs an XOR calculation on the first identifier of the second device and the second random number to obtain the second identifier of the second device. For example, it can be expressed by the following calculation formula: IDi=DIDi⊕N1, where N1 represents the second random number; for another example, taking the third calculation method as any function as an example, the second identifier of the second device obtained by the above calculation can be expressed as: IDi=fn1(DIDi), where n1 is the second shared key, and f represents any function or algorithm in the third calculation method. For example, f can specifically be any one of f1~f5, KDF, etc., and these are not exhaustive.
[0104] This embodiment does not limit the order in which the core network side device authorizes the first device and the second device, and performs the authentication process. In some possible examples, the core network side device authorizes the first device and the second device to use the target service, which can be performed in parallel with the core network side device performing the authentication process. In other possible examples, the core network side device can perform the authentication process after determining that the first device and the second device are authorized to use the target service. This is only an example and does not limit the timing of the core network side device performing the authentication process.
[0105] The core network side device performs authentication processing on the second device, and may also include at least one of the following: the core network side device uses a first calculation method to calculate a first message authentication code based on the first shared key, the first random number and the first authentication parameter, wherein the first authentication parameter includes at least one of: a second shared key, a second random number, and a third random number; the core network side device uses a second calculation method to calculate the second response based on the first shared key, the first random number and the second authentication parameter, wherein the second authentication parameter includes at least one of: a second shared key, a second random number, and a third random number; the first calculation method is different from the second calculation method, and / or the first authentication parameter and the second authentication parameter are at least partially different.
[0106] The first shared key may be at least one of the following: a pre-shared key (PSK), a pre-distributed key, a private network key, an application layer key, a physical layer key, etc. In one possible example of this embodiment, the first shared key may be a PSK between the second device and the core network side device, for example, a root key.
[0107] The above-mentioned first random number can be generated by the core network side device, and the above-mentioned first information can also include the first random number. The second random number is shared by the second device and the core network side device and / or the target service device; and / or, the second shared key is shared by the second device and the first device; and / or, the third random number is configured, or the third random number is selected by the core network side device, or the third random number is shared by the second device and the core network side device and / or the target service device. In this embodiment, the second random number can be shared by the second device and the core network side device; the third random number can be selected by the core network side device, or shared by the second device and the core network side device.
[0108] Optionally, the first authentication parameter and the second authentication parameter are at least partially different, which may mean that the first authentication parameter and the second authentication parameter are completely different, or the first authentication parameter and the second authentication parameter are partially the same and partially different. For example, if the first authentication parameter includes a second shared key (or a second random number), the second authentication parameter includes a third random number, or vice versa; or the first authentication parameter includes the second shared key, the second random number, and the third random number, and the second authentication parameter includes only one of the second shared key, the second random number, and the third random number, or vice versa. Various situations in which the first authentication parameter and the second authentication parameter are at least partially different are not exhaustively listed here.
[0109] Optionally, both the first calculation method and the second calculation method may include at least one of the following: a first authentication function, a second authentication function, a third key generation function, a fourth key generation function, a fifth key generation function, a hash algorithm, AES, Ascon, SNOW3G, ZUC, SPECK, SIMON, KDF, etc. The first calculation method and the second calculation method are different, which may mean that, in actual calculation, the first calculation method may select at least one of the above algorithms or functions, and the second calculation method may select other algorithms or functions from the above algorithms or functions except the first calculation method; for example, the first calculation method is specifically the first authentication function, and the second calculation method may be a hash algorithm; for example, the first calculation method is specifically the second authentication function, and the second calculation method may be the fifth key generation function. It should be understood that this is only an exemplary explanation of the difference between the first calculation method and the second calculation method. Other selection methods may be used in actual processing, and are not exhaustive here.
[0110] Optionally, the first authentication parameter and the second authentication parameter are at least partially different, and / or the first calculation method and the second calculation method are different, which may mean: using the same first authentication parameter and the second authentication parameter, but using different first calculation methods and second calculation methods; or, using at least partially different first authentication parameters and the second authentication parameter, but using the same first calculation method and second calculation method; or, using at least partially different first authentication parameters and the second authentication parameter, and using different first calculation methods and second calculation methods.
[0111] In this embodiment, the core network side device can use a first calculation method to calculate the first message authentication code based on the first shared key, the first random number and the first authentication parameter; the core network side device can use a second calculation method to calculate the second response based on the first shared key, the first random number and the second authentication parameter.
[0112] For example, the first authentication parameter and the second authentication parameter are different, and the first authentication parameter includes a second shared key, and the second authentication parameter includes a third random number. The first message authentication code is calculated based on the first shared key, the first random number, and the first authentication parameter using a first calculation method, which can be expressed as: MAC = fk(RAND, N1), where MAC is the first message authentication code, f is any algorithm or function in the first calculation method, k represents the first shared key, RAND represents the first random number, and N1 represents the second shared key. The second response is calculated based on the first shared key, the first random number, and the second authentication parameter using a second calculation method, which can be expressed as: XRES = fk(RAND, N2), where XRES represents the second response (or second expected response), f can be any algorithm or function in the second calculation method, and f can be the same algorithm or function as that used to calculate the first message authentication code, RAND is the first random number, and N2 is the third random number.
[0113] For example, the first authentication parameter and the second authentication parameter are partially different, the first authentication parameter includes a second shared key and a third random number, the second authentication parameter includes the second shared key, and the first calculation method and the second calculation method are different. Calculating the first message authentication code using the first calculation method based on the first shared key, the first random number, and the first authentication parameter can be expressed as: MAC = f1k(RAND, N1, N2), where MAC is the first message authentication code, f1 is any algorithm or function in the first calculation method, k is the first shared key, RAND is the first random number, N1 is the second shared key, and N2 is the third random number. Calculating the second response using the second calculation method based on the first shared key, the first random number, and the second authentication parameter can be expressed as: XRES = f2k(RAND, N1), where XRES represents the second response (or second expected response), f2 can be any algorithm or function in the second calculation method and is different from f1, RAND is the first random number, and N1 is the second shared key.
[0114] For example, the first authentication parameter and the second authentication parameter may not be used in the process of calculating the first message authentication code and / or calculating the second response. For example, the first message authentication code may be calculated using the first calculation method based on the first shared key and the first random number, which can be expressed as: MAC = f1k(RAND); for example, the second response may be calculated using the second calculation method based on the first shared key and the first random number, which may only use the first shared key and the first random number, which can be expressed as: XRES = f2k(RAND), where f1 and f2 are different algorithms or different functions.
[0115] The above is merely an example description, and all possible ways of generating the first message authentication code and the second response are not exhaustively listed here. As long as the generated second response is ultimately completely different from the first message authentication code, it is within the scope of protection of this embodiment.
[0116] After obtaining the first message authentication code and the second response, the core network side device may use the first message authentication code and the second response as authentication vectors.
[0117] Optionally, the authentication vector may further include relevant information of the third random number and / or an anonymous key.
[0118] For example, if the third random number is selected or generated by the core network side device, the authentication vector includes relevant information about the third random number. The relevant information about the third random number can be the result of calculating the third random number and the anonymous key, such as N2⊕AK, where N2 is the third random number, AK is the anonymous key, and ⊕ is an XOR calculation. It should be understood that the calculation method of the third random number and the anonymous key can be replaced by other algorithms or functions in addition to the XOR calculation, which are not exhaustive here. In this case, the above authentication vector can be expressed as: AV=RAND||N2⊕AK||MAC||XRES, where AV is the authentication vector, || represents direct calculation, and the meaning of the remaining content is the same as the above example and is not repeated here.
[0119] For another example, if the third random number is shared by the core network device and the second device, the authentication vector may include an anonymous key. In this case, the authentication vector can be expressed as: AV = RAND || AK || MAC || XRES. The meaning of each component in the formula is the same as in the previous example and is not repeated here.
[0120] Optionally, the authentication vector may further include at least one of the second identifier of the second device, the identifier of the first device, the identifier of the core network side device, etc. This embodiment does not exhaustively list all possible contents of the authentication vector.
[0121] The calculation method of the above-mentioned anonymous key can be to calculate the anonymous key based on the first shared key; the calculation of the anonymous key based on the first shared key can include one of the following: calculating the anonymous key based on the first shared key and a first random number; calculating the anonymous key based on the first shared key and the second shared key; calculating the anonymous key based on the first shared key and the second random number.
[0122] Calculating the anonymous key based on the first shared key and the first random number can be applicable to the case where the second shared key is shared by the first device and the second device (i.e., the case where the second shared key is carried in the second request message), and can also be applicable to the case where the second random number is shared by the second device and the core network side device. For example, the anonymous key can be calculated based on the first random number and the first shared key using any algorithm or function in the first calculation method or the second calculation method, and can be exemplarily expressed as: AK=fk(RAND), where k is the first shared key, f is any algorithm or function in the first calculation method or the second calculation method, RAND is the first random number, and AK is the anonymous key.
[0123] The anonymous key is calculated based on the first shared key and the second shared key, and is particularly applicable to the case where the second shared key is shared by the first device and the second device (i.e., the case where the second shared key is carried in the second request message). For example, the anonymous key can be calculated based on the first shared key and the second shared key using any algorithm or function in the first calculation method or the second calculation method, and can be exemplarily expressed as: AK=K⊕N1, where k is the first shared key, f is any algorithm or function in the first calculation method or the second calculation method, N1 is the second shared key, and AK is the anonymous key.
[0124] The anonymous key is calculated based on the first shared key and the second random number, and is particularly applicable to situations where the second random number is shared by the second device and the core network side device. For example, the anonymous key can be calculated based on the first shared key and the second random number using any algorithm or function in the first calculation method or the second calculation method. Exemplarily, it can be expressed as: AK = K ⊕ Nonce1, where k is the first shared key, f is any algorithm or function in the first calculation method or the second calculation method, Nonce1 is the second random number, and AK is the anonymous key.
[0125] The aforementioned embodiments have explained that the core network side device may include one or more core network devices (or core network network elements), and interaction can be performed within the core network side device.
[0126] For example: the core network side equipment includes a first core network equipment and a second core network equipment. The above-mentioned first core network equipment may include BSF and / or A-NF, and the above-mentioned second core network equipment may include at least one of HSS / HLR, AUSF, KMS, etc.
[0127] The first core network device can be used to receive a second request message, and then the first core network device sends the second request message to the second core network device; the second core network device can query the subscription credentials of the first device and the subscription credentials of the second device, and then determine whether the preset conditions are met based on the subscription credentials of the first device and the subscription credentials of the second device. If the preset conditions are met, the first device and the second device are authorized to use the target service. The relevant instructions on the authorization of the first device and the second device to use the target service and the order of authentication processing of the core network side device are the same as those in the aforementioned embodiment and will not be repeated here. In addition, the second core network device can also perform the aforementioned de-anonymization processing of the first identifier of the second device, which will not be repeated.
[0128] Here, when the first core network device sends the second request message to the second core network device, it can also add indication information of the authentication type in the second request message. The indication information of the authentication type is used to indicate the authentication type corresponding to the second device, and the indication information of the authentication type may include at least one of the following: based on the identification type of the first core network device, or based on the type of the first identification of the second device, or based on the authentication type (for example, expressed as Auth_type_ID). Accordingly, the second core network device can also determine whether the authentication type corresponding to the second device is the target type based on the indication information of the authentication type in the second request message when it is determined that the preset conditions are met, and if it is the target type, it determines to authorize the first device and the second device to use the target service; wherein, the target type can be set according to the actual situation, such as A-IoT authentication, or other specified types of authentication, which are not exhaustively listed here.
[0129] The second core network device may perform the aforementioned process of generating the first message authentication code and the second response to ultimately obtain an authentication vector, and the second core network device may send the authentication vector to the first core network device. It should be understood that the authentication vector may include an anonymous key AK, which is provided to the BSF / A-NF (i.e., the first core network device) and / or used to protect the transmission of the third random number (N2) (particularly applicable when the third random number N2 is selected by the core network side).
[0130] After completing the above processing, the core network side device sends the above first information to the first device; then the first device sends the first information from the core network side device to the second device. Correspondingly, the second device receives the first information from the core network side device, including: the second device receives the first information from the core network side device through the first device.
[0131] Here, the core network side device (such as the aforementioned first core network device) can carry the first information in a first message and send it to the first device. The first message can be a 401 message or any NAS message; for example, if the first core network device in the core network side device is a BSF, the aforementioned first message can be a 401 message; if the first core network device in the core network side device is an N-AF, the aforementioned first message can be any NAS message.
[0132] The first device sends the first information from the core network side device to the second device, and the first device may carry the first information in the second message and send it to the second device; accordingly, the second device obtains the first information from the core network side device by receiving the second message. The above-mentioned second message may be in response to the first request message, and the second message may also be called an authentication response message. The second message may be a side link message or an AS message. For example, if the first device is a first terminal device, the second message may be any side link message; if the first device is a first access network device, the second message may be any AS message. It should be understood that in addition to carrying the aforementioned first information, the first message and / or the second message may also carry the identifier of the core network side device, such as the identifier of the first core network device.
[0133] Furthermore, after receiving the first information, the second device calculates a second message authentication code based on the first shared key. Specifically, this may include: the second device calculates the second message authentication code based on the first shared key, the first random number, and a first authentication parameter using a first calculation method, wherein the first authentication parameter includes at least one of the second shared key, the second random number, and the third random number.
[0134] The second random number is shared by the second device and the core network side device and / or the target service device. In this embodiment, the second random number can be shared by the second device and the core network side device.
[0135] And / or, the second shared key is shared by the second device and the first device.
[0136] And / or, the third random number is configured, or the third random number is shared by the second device and the core network side device and / or the target service device. For example, if the third random number is configured, it may mean that the third random number is generated by the core network side device and configured to the second device. In this case, the aforementioned first information may also include relevant information of the third random number. The relevant information of the third random number may be "N2⊕AK", and the description of the relevant information of the third random number is the same as that of the aforementioned embodiment and will not be repeated. Furthermore, the second device may first calculate the anonymous key, and then perform an XOR calculation based on the anonymous key and the relevant information of the third random number to obtain the third random number. The way the second device calculates the anonymous key should be the same as the way the core network side device calculates the anonymous key, for example, it may be AK=fk(RAND) or AK=K⊕N1.
[0137] This embodiment mainly adopts the first calculation method to calculate the second message authentication code based on the first shared key, the first random number and the first authentication parameter. The way in which the second device calculates the second message authentication code should be the same as the way in which the core network side device calculates the first message authentication code. For example, the first authentication parameter includes the second shared key, and the second message authentication code is calculated based on the first shared key, the first random number and the first authentication parameter using the first calculation method, which can be expressed as: MAC'=fk(RAND,N1), where MAC' represents the second message authentication code, and the meanings of the remaining parameters in the formula are the same as those in the aforementioned embodiment and are not repeated here. It should be understood that this is only an exemplary explanation. In actual processing, the various methods for calculating the first message authentication code by the aforementioned core network side device can be used for the second device to calculate the second message authentication code. As long as the core network side device and the second device use the same parameters and the same algorithm or function, they are within the protection scope of this embodiment and are not repeated here.
[0138] If the second message authentication code and the first message authentication code are the same, the second device may determine that the second device has successfully authenticated the core network side device. After the second device determines that the second device has successfully authenticated the core network side device, the method may further include: the second device calculating a first response based on the first shared key, the first response being used by the core network side device to authenticate the second device; and the second device sending second information to the core network side device, the second information including the first response.
[0139] Among them, the second device calculating the first response based on the first shared key may include: the second device adopts a second calculation method to calculate the first response based on the first shared key, the first random number and the second authentication parameter, wherein the second authentication parameter includes at least one of: a second shared key, a second random number, and a third random number; the first calculation method is different from the second calculation method, and / or the first authentication parameter and the second authentication parameter are at least partially different.
[0140] Regarding the difference between the first calculation method and the second calculation method, and / or the at least partial difference between the first authentication parameter and the second authentication parameter, it is the same as the description of the previous embodiment and will not be repeated.
[0141] This embodiment mainly adopts the second calculation method to calculate the first response based on the first shared key, the first random number and the second authentication parameter. The way in which the second device calculates the first response should be the same as the way in which the core network side device calculates the second response. For example, the second authentication parameter includes a third random number, and the second calculation method is used to calculate the first response based on the first shared key, the first random number and the second authentication parameter, which can be expressed as: RES = fk(RAND, N2), where RES represents the first response, and the meanings of the remaining parameters in the formula are the same as those in the aforementioned embodiment and are not repeated here. It should be understood that this is only an exemplary explanation. In actual processing, the various methods for calculating the second response by the aforementioned core network side device can be used for the second device to calculate the first response. As long as the core network side device and the second device use the same parameters and the same algorithm or function, they are within the protection scope of this embodiment and are not repeated here.
[0142] The second device sending the second information to the core network device includes: the second device sending the second information to the core network device via the first device. Accordingly, the core network device receives the second information from the second device, where the second information includes a first response. If the first response and the second response are identical, the core network device determines that authentication of the second device is successful. The processing of the core network device generating the second response has been detailed in the aforementioned embodiment and will not be repeated here.
[0143] Furthermore, the processing by the first device may further include: the first device sending second information from the second device to the core network side device, where the second information includes the first response, and the first response is used by the core network side device to authenticate the second device. Accordingly, the core network side device receiving the second information from the second device includes: the core network side device receiving the second information from the second device via the first device.
[0144] Here, when the second device sends the second information to the first device, if the first device is a first terminal device, the second information can be carried by any sidelink message; if the first device is a first access network device, the second information can be carried by any AS message. When the first device sends the second information from the second device to the core network side device, the second information can be carried by any NAS message or any HTTP request message.
[0145] After the core network side device successfully authenticates the second device, it can also include: the core network side device sends a first response message to the first device, the first response message is used to indicate that the authentication of the second device is successful, the first response message carries the identification information, and the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device and the identification of the core network side device.
[0146] The processing by the first device may further include: the first device receiving a first response message from the core network-side device, the first response message being used to indicate successful authentication of the second device, the first response message carrying the identification information, the identification information being related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device, and the identification of the core network-side device. The first device may then further perform the following processing: the first device sending a fifth response message to the second device, the fifth response message being used to indicate successful authentication of the second device, the fifth response message carrying the identification information.
[0147] The processing of the second device may also include: the second device receives a fifth response message from the first device, the fifth response message is used to indicate that the authentication of the second device is successful, the fifth response message carries the identification information, and the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device and the identification of the core network side device.
[0148] The core network side device may obtain the identification information in one of the following ways: calculating the identification information based on the first identification of the second device and the identification of the core network side device; calculating the second intermediate key based on the anonymous key, and calculating the second identification of the second device based on the second intermediate key and the identification information together with the identification of the core network side device.
[0149] Among them, the identification information obtained by calculating based on the first identification of the second device and the identification of the core network side device can be calculated in a direct connection calculation manner, for example, it can be expressed as: B-TID=DIDi||BSF ID, wherein B-TID is the identification information, DIDi is the first identification of the second device, and BSF ID is the identification of the core network side device (such as the first core network device). Alternatively, the identification information can be calculated by adding the identification of the first device, such as the identification information obtained by calculating based on the first identification of the second device, the identification of the core network side device, and the identification of the first device, and the following formula is used to express it: B-TID=DIDi||UE ID||BSF ID, wherein UE ID can be the identification of the first device (when the first device is the first terminal device). The meaning of the remaining content is the same as that of the above embodiment and is not repeated here.
[0150] The calculation of the second intermediate key based on the anonymous key may refer to: calculating the second intermediate key based on the anonymous key and the fourth authentication parameter, wherein the fourth authentication parameter includes at least one of the following: a second shared key, a second random number, a third random number, a second identifier of the second device, an identifier of the core network side device, and an identifier of the first device. Exemplarily, the second intermediate key may be calculated using the anonymous key, the second shared key, the third random number, the second identifier of the second device, and the identifier of the core network side device, such as Ks=fak(N1, N2, IDi, BSF ID), where Ks may be the second intermediate key, ak represents the anonymous key, N1 may be the second shared key, N2 is the third random number, Idi is the second identifier of the second device, BSF ID is the identifier of the core network side device (for example, the first core network device is BSF), and f may be any algorithm or function in the third calculation method. Exemplarily, the second intermediate key can be calculated using an anonymous key, a second shared key, a third random number, a second identifier of the second device, an identifier of the core network side device, and an identifier of the first device, such as Ks=fak(N1, N2, UE ID, IDi, BSF ID). It should be understood that this is only an exemplary description. In actual processing, one or more of the above parameters can be used in combination to calculate the second intermediate key Ks. Moreover, when the above-mentioned first device is an access network device, the above-mentioned UE ID can also be replaced by gNB ID. When the first core network device is A-NF, the above-mentioned BSF ID can also be replaced by A-NF ID, and so on. All possible examples are not enumerated here.
[0151] The second identifier of the second device is calculated based on the second intermediate key and then combined with the identifier of the core network device to obtain identification information. This information can be expressed using the following formula: B-KID = fks(IDi) || BSF ID, where B-KID is identification information, f is any one of the third calculation method (or the first calculation method or the second calculation method), ks is the second intermediate key, and BSF ID is the identifier of the core network device. For another example, the second identifier of the second device can be calculated based on the second intermediate key and then combined with the identifier of the core network device and the identifier of the first device to obtain identification information using the following formula: B-KID = fks(IDi) || UE ID || BSF ID. The meanings of the various components in the formula are the same as in the above embodiment and are not further described. It should be understood that the identification of the core network device described above is only described using the example of the first core network device being a BSF. In practice, the first core network device can also be an A-NF, i.e., the BSF ID can also be replaced by the A-NF ID. This does not exhaust all possible scenarios.
[0152] After the second device successfully authenticates the core network side, the second intermediate key can also be calculated based on the anonymous key. The specific calculation method is the same as the method in which the core network side device calculates the second intermediate key, and will not be repeated.
[0153] It should be noted that the first response message may also carry the validity period of the second intermediate key.
[0154] The purpose of the second device calculating the second intermediate key may be to perform integrity protection verification based on the second intermediate key; for example, if the core network side device uses the second intermediate key Ks for integrity protection when sending the first response message, then the second response message sent by the first device may be the same as the first response message. At this time, the second device may first perform integrity verification on the second response message based on the second intermediate key when receiving the second response message, and extract identification information from the second response message if the verification is successful. Regarding the way in which the core network side device performs integrity protection on the first response message, it may be to calculate an integrity check code (for example, MIC, Messages Integrity Check) for the first response message based on the second intermediate key, and carry the integrity check code in the first response message; accordingly, the second device may calculate the integrity check code for the received second response message based on the second intermediate key. If the integrity check code is the same as the integrity check code, it is determined that the integrity check is successful.
[0155] 6, the first device is represented as an agent (including any one of a UE, an IAB node, and a base station), the second device is a tag, and the core network side device includes a first core network element such as a BSF and / or an A-NF (FIG. 6 represents the first core network element as BSF / A-NF for simplicity). The core network side device also includes a second core network element, which may include at least one of an HSS, an HLR, an AUSF, and a KMS (FIG. 6 represents the second core network element as HSS / HLR / KMS / AUSF for simplicity). As an example, the authentication process provided in the aforementioned embodiment (which may also be referred to as Bootstrapping authentication) is described:
[0156] Step 600: A pre-shared root key K exists between the tag and a second network element (HSS / HLR / KMS / AUSF) on the network side; the second network element may be the aforementioned second core network element. The root key is the aforementioned first shared key.
[0157] Step 601: The Tag sends a request message (authentication request or communication request) to the proxy (the proxy can be a UE, an IAB node, or a device in the access network. This example uses the UE as the proxy for illustration). The request message includes the anonymized Tag's identity DIDi. This request message is the first request message in the aforementioned embodiment.
[0158] This anonymity can be handled in two ways: In Method 1, N1 is a random number pre-shared between the Tag and the network (HSS). After establishing the Tag's security context, the network can send a new random number to the Tag to update the pseudonym DIDi. The pseudonym is generated using the following method: DIDi = IDi ⊕ N1. In Method 2, N1 is the key between the Tag and the UE (which can be a physical layer key). When the UE sends a Tag authentication request to the network, it must carry N1. DIDi = IDi ⊕ N1 or DIDi = fn1(IDi). Note: The proxy UE and the Tag can also authenticate each other, and step 601 is executed after mutual authentication is complete.
[0159] Step 602: The proxy sends an HTTP request / NAS message to the BSF. For example, if the proxy is a UE, the message includes DIDi and UE ID (GPSI, SUCI, GUTI). The message may also include at least one of N1, IDi, etc. This message may be the second request message in the aforementioned embodiment.
[0160] For example, if Tag uses the key N1 between UE and base station (ie, the second shared key) to process IDi, the UE de-anonymizes and obtains IDi accordingly, and the HTTP request sent to the BSF includes IDi, UE ID, and N1.
[0161] Exemplarily, an agent (such as a UE) sends an authentication request to a core network element A-NF specific to the A-IoT service. The request message is carried on a NAS message of the UE and is protected by the NAS security context of the UE.
[0162] Step 603. The BSF / A-NF sends a request for an authentication vector to the second network element in the core network (at least one of the HSS, HLR, AUSF, and Tag's key management center KMS); the message may contain an identifier that indicates the authentication type, which may be based on the BSF ID, the A-NF's identification type, or the IDi-based type, or the authentication type Auth_type_ID.
[0163] Step 604. The second network element in the core network (at least one of HSS, HLR, AUSF, KMS) performs at least one of the following operations: performing authorization check, confirming the authentication type, deanonymizing, selecting N2 (third random number), selecting RAND (first random number), calculating MAC (first message authentication code), calculating XRES (second response), and forming an authentication vector AV.
[0164] Optionally, the subscription credentials of the Tag and UE are queried through the core network element (such as UDM) to determine whether they are entitled to use the A-IoT service; specifically, the subscription credentials of the Tag and UE can be checked through the core network element UDM based on IDi and UE ID.
[0165] Optionally, determining the authentication type: determining that the authentication type is A-IoT authentication based on an identifier that can indicate the authentication type.
[0166] Optionally, the de-anonymization process may be calculated using the following formula: IDi=DIDi⊕N1. This example is particularly applicable to the case where N1 (the second random number) is pre-shared between the Tag and the network side.
[0167] Optionally, calculate AK=K⊕N1 (applicable to the case where N1 (the second random number) is pre-shared), or AK=fk(RAND) (applicable to the case where N1 (the second random number) is pre-shared, or N1 (the second shared key) is uploaded by the proxy).
[0168] Optionally, a third random number N2 is selected, or N2 is pre-shared between the core network side device (such as the second network element) and the Tag.
[0169] Optionally, a first random number RAND is selected, and AK = fk(RAND) or AK = K⊕N1, and MAC / XRES = fk(RAND, N1, N2) is calculated. AK is provided to the BSF / A-NF and used to protect the transmission of N2 (applicable when N2 is selected by a core network device (e.g., a second network element)). Function f can be functions f1 to f5 defined by 3GPP, or a KDF (HMAC-SHA256), or other lightweight functions such as ASCON. The calculation parameters of MAC / XRES can include only RAND, or RAND and N1, or RAND and N2, or RAND, N1, and N2. The calculation methods of MAC and XRES are different, that is, different parameters are introduced when calculating MAC and XRES, or if the same calculation parameters are used, different functions are used for calculation.
[0170] Optionally, an authentication vector AV=RAND||N2⊕AK||MAC||XRES is formed (applicable to the case where N2 is selected by the network side), or AV=RAND||AK||MAC||XRES (applicable to the case where N2 is pre-shared).
[0171] Optionally, the authentication vector may further include at least one of the following: IDi, UE ID, BSF ID.
[0172] Step 605: The second network element in the core network (at least one of the HSS, HLR, AUSF, and KMS) returns the authentication vector AV to the BSF / A-NF.
[0173] Step 606: The BSF / A-NF returns a 401 message to the proxy (the A-NF returns a NAS message), which contains RAND, MAC (or N2⊕AK||MAC, only applicable when N2 is a random number selected by the network and the AK is used to protect the secure transmission of N2), and may contain the BSF ID. The 401 message (or NAS message) is the first message in the aforementioned embodiment. RAND, MAC (or N2⊕AK||MAC) can be the content included in the first message in the aforementioned embodiment.
[0174] Step 607: The proxy returns an authentication response to the Tag, which includes RAND, MAC (or N2⊕AK||MAC, only applicable when N2 is a random number selected by the network and AK is used to protect the secure transmission of N2), and may include the BSF ID. The authentication response can be the aforementioned second message.
[0175] Step 608. Tag calculates and verifies the MAC. Successful authentication confirms successful authentication of the core network device. RES = fk(RAND, N1), Ks = fak(N1, N2, UE ID, IDi, BSF ID) is then calculated. RES is the aforementioned first response, and Ks is the second intermediate key in the aforementioned embodiment. Optionally, if the first core network element is an A-NF and the proxy is a UE, the second intermediate key can be calculated using the following formula: Ks = fak(N1, N2, UE ID, IDi, A-NF ID).
[0176] Step 609: Tag sends a response message to the proxy, including RES; the response message may be the aforementioned second message.
[0177] Step 610: The proxy sends an HTTP request to the BSF / A-NF (or sends an authentication response to the A-NF), which includes RES. The HTTP request or authentication response can be any HTTP request or any NAS message carrying the second information in the aforementioned embodiments.
[0178] Step 611. BSF / A-NF verifies RES, for example, compares RES with XRES (first response) to verify the tag. After the tag is successfully verified, Ks=fak(N1, N2, IDi, BSF ID) is calculated to generate identification information, which can be B-TID or B-KID. Taking the agent as UE as an example, B-TID=DIDi||UE ID||BSF ID, B-KID=fks(IDi)||UE ID||BSF ID, where B-KID can be used to prevent the B-TID from being propagated on the air interface.
[0179] Step 612: The BSF / A-NF sends a 200OK message to the agent, which includes the B-TID / B-KID, the validity period of the key Ks, and may include a newly selected random number N1' for the tag to update the pseudonym. This message can be integrity-protected, or integrity-and-encrypted, using the key Ks. Here, the 200OK message can be the first response message in the aforementioned embodiment.
[0180] Step 613: The proxy returns a successful response to the Tag, which includes the B-TID / B-KID, the validity period of the key Ks, possibly including N1', and the message integrity check code MIC. The message can be integrity-protected, or integrity-and-encrypted, using the key Ks. The successful response can be the second response message in the aforementioned embodiment.
[0181] In some possible implementations, after the second device completes the above authentication process, the second device may further establish communication with the target service device through the first device.
[0182] The second device sends a third request message to the target service device through the first device, the third request message being used to request communication and carrying the identification information. The method further includes at least one of the following: the second device receiving a third response message from the first device, the third response message being used to instruct the target service device to obtain the first key; and the second device receiving a sixth response message from the target service device, the sixth response message being used to instruct the target service device to obtain the first key.
[0183] In this implementation manner, the second device may calculate the first key by itself. For example, the second device may calculate the first key when determining that the first message authentication code and the second message authentication code are the same.
[0184] The second device calculates the first key based on the first shared key and the identifier of the target service device, including: the second device calculates the first key based on the first shared key, the identifier of the target service device and a third authentication parameter, and the third authentication parameter includes at least one of the following: a second shared key, a second random number, a third random number, a second identifier of the second device, an identifier of the core network side device, an identifier of the first device, and identification information.
[0185] The second device calculates the first key based on the first shared key, the identifier of the target service device and the third authentication parameter, which may include: the second device calculates an anonymous key based on the first shared key; calculates a second intermediate key based on the anonymous key and the fourth authentication parameter, the fourth authentication parameter includes at least one of the following: a second shared key, a second random number, a third random number, a second identifier of the second device, an identifier of the core network side device, and an identifier of the first device; calculates the first key based on the second intermediate key, the identification information, and the identifier of the target service device. Among them, the third authentication parameter includes the aforementioned fourth authentication parameter, and identification information is added on the basis of the fourth authentication parameter, that is, the third authentication parameter may include identification information and / or at least one of the fourth authentication parameter. The description of the fourth authentication parameter is the same as that of the aforementioned embodiment and will not be repeated.
[0186] The manner in which the second device calculates the anonymous key based on the first shared key can be the same as the manner in which the core network side device calculates the anonymous key based on the first shared key in the aforementioned embodiment, and is not described in detail here. The manner in which the second intermediate key is calculated based on the anonymous key and the fourth authentication parameter is the same as that described in the aforementioned embodiment, and is not described in detail here.
[0187] Calculating the first key based on the second intermediate key, the identification information, and the target service device's identification may include: calculating the first key based on the second intermediate key, the identification information, and the target service device's identification using a first calculation method. For example, the following formula can be used: Ks_NAF = fks(NAF ID, B-TID), where Ks_NAF represents the first key, f can be any algorithm or function in the first calculation method, Ks is the second intermediate key, NAF ID is the target service device's identification, and B-TID is the identification information. The B-TID can also be replaced with a B-KID. The method for obtaining the identification information is the same as in the previous embodiment and is not described again. Alternatively, calculating the first key based on the second intermediate key, the identification information, and the target service device's identification may also include the identification of the first device. For example, calculating the first key based on the second intermediate key, the identification information, the target service device's identification, and the first device's identification using the first calculation method. For example, the following formula can be used: Ks_NAF = fks(NAF ID, B-TID, UE ID). The meanings of the various components in this formula are the same as in the previous embodiment and are not described again.
[0188] The second device can calculate the first key before sending a communication request, or the second device can calculate the first key after receiving the third response message and / or the sixth response message. This embodiment does not limit the timing of the second device calculating the first key.
[0189] The first device receives a first key from a core network side device, including: the first device forwards a third request message sent by the second device to the target service device, the third request message is used to request communication, and the third request message carries identification information; the first device receives a third response message from the core network side device, and the third response message carries the first key.
[0190] The method further includes: the first device sending a third response message to the second device, where the third response message is used to instruct the target service device to obtain the first key.
[0191] The processing of the target service device may include: the method also includes one of the following: the target service device receives a third request message sent by the second device through the first device, the third request message is used to request communication, and the third request message carries identification information, and the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device and the identification of the core network side device; the target service device receives a sixth request message sent by the second device, the sixth request message is used to request communication, and the sixth request message carries the identification information.
[0192] The processing by the target service device further includes: the target service device sending a key request message to the core network side device, the key request message carrying the identification information. The method further includes: the target service device receiving a ninth response message from the core network side device, the ninth response message responding to the key request message, the ninth response message carrying the first key; and the target service device sending a sixth response message to the second device, the sixth response message being used to instruct the target service device to obtain the first key.
[0193] In this embodiment, the target service device does not directly receive the request from the second device. Therefore, the processing of the target service device in this embodiment may specifically include: the target service device receives the third request message sent by the second device through the first device. Then, after receiving the third request message, the target service device sends the key request message to the core network side device.
[0194] In the processing of the core network side device, the method further includes: the core network side device receiving a key request message from the target service device, the key request message carrying the identification information;
[0195] The core network side may also calculate the first key in the following manner: the core network side device calculates the first key based on the first shared key, the identifier of the target service device, and a third authentication parameter, where the third authentication parameter includes at least one of the following: a second shared key, a second random number, a third random number, a second identifier of the second device, an identifier of the core network side device, an identifier of the first device, and identifier information. The specific manner in which the core network side device calculates the first key should be the same as that for the second device and will not be described again.
[0196] In the processing of the core network side device, the method also includes at least one of the following: the core network side device sends a second response message to the first device, the second response message responds to the key request message, the second response message carries a first key, the first key is used for communication between the first device and the second device, and the first device is used to transmit data between the second device and the target service device; the core network side device sends a ninth response message to the target service device, the ninth response message responds to the key request message, the ninth response message carries the first key, and the first key is used for communication between the second device and the target service device.
[0197] It should be noted that the sixth response message may also carry the validity period of the first key; similarly, the ninth response message may also carry the validity period of the first key. This embodiment does not limit the specific duration of the validity period of the first key.
[0198] By adopting the above solution, both the second device and the first device can obtain the first key. Then, during the process of the second device communicating with the target service device through the first device, the integrity protection key and the encryption key can be further derived based on the first key. Alternatively, the second device and the first device can further calculate the second key based on the first key and the second shared key, and derive the integrity protection key and the encryption key based on the second key. For example, the second key can be calculated based on the first key and the second shared key by performing an exclusive OR operation on the first key and the second shared key to obtain the second key. For example, the following formula can be used to calculate Ku1 = Ks_NAF ⊕ N1, where Ku1 is the second key, KS_NAF is the first key, and N1 is the aforementioned second shared key. This embodiment does not limit the method for deriving the integrity protection key and the encryption key based on the first key. Similarly, this embodiment does not limit the method for deriving the integrity protection key and the encryption key based on the second key.
[0199] 7, taking the first device as a proxy node (including any one of a UE, an IAB node, and a base station), the second device as a tag (ie, any tag), the target service device as a NAF, and the core network side device as a first core network device BSF as an example, the above communication method is exemplarily described, including:
[0200] In step 700, the tag and the proxy node share a second shared key N1, which may be a physical layer key.
[0201] Step 701: The Tag sends a communication request to the NAF through a proxy node, wherein the communication request includes a B-TID or a B-KID; the communication request may be the third request message in the aforementioned embodiment.
[0202] Step 702: The NAF sends a key request to the BSF, which includes the B-TID or B-KID; the key request is the key request message in the aforementioned embodiment.
[0203] In step 703a, the BSF generates a first key Ks_NAF = fks(NAF ID, B-TID / B-KID) and returns a key response to the NAF containing Ks_NAF and the key validity period. The key response can be the ninth response message described above. In this step, the BSF may also return Ks_NAF and the key validity period to the KMS to facilitate mobility management. In step 705a, the NAF returns a communication response to the tag. This communication response can be the sixth response message described above.
[0204] And / or, in step 703b, the BSF returns a key response to the proxy node, including the Ks_NAF and key validity period. Here, the key response returned by the BSF to the proxy node may be the second response message in the aforementioned embodiment. In this step, the BSF may also return the Ks_NAF and key validity period to the KMS to facilitate mobility management. In step 705b, the proxy node returns a communication response to the tag, which may be the third response message in the aforementioned embodiment.
[0205] In the aforementioned step 703a, the BSF may also send a key response to the UE. For example, the aforementioned ninth response message may be sent to the NAF and the UE at the same time.
[0206] Optionally, if the proxy node receives Ks_NAF and the key validity period, the proxy node and the tag can generate an integrity protection key and an encryption key between the tag and the proxy based on Ks_NAF = fks(NAF ID, B-TID / B-KID, UE ID). Optionally, as shown in step 704 of Figure 7, the proxy nodes generate a second key Ku1 = Ks_NAF⊕N1 based on the shared key N1, Ks_NAF = fks(NAF ID, B-TID / B-KID). Ku1 further generates encryption keys and integrity protection keys for protecting communications. Later, when a tag uses another UE (e.g., UEx) as a proxy, it can use Ks_NAF and the key Nx between the tag and UEx to derive the lower-level key Kux, without necessarily requiring tag authentication and key agreement. To illustrate various possibilities, the tag-side Ks_NAF and Ku1 calculation process is indicated by a dashed box in Figure 7. This process can occur before step 700 or after steps 705a and 705b. After receiving the communication response, the tag can also execute step 706 to send a response to the proxy node.
[0207] Through the above process, the first device and the second device can obtain a shared first key and / or second key. If the first device is an L3 relay, there may only be a security context between the first and second devices. If the first device is an L2 relay, there may be both a security context between the first and second devices and a NAS / AS security context for the second device.
[0208] Regarding the process of establishing a NAS / AS security context on the second device (especially applicable to the case where the first device is an L2 relay), after the second device goes through the solution provided in the aforementioned embodiment (such as the authentication process), both the core network side device and the second device can obtain a second intermediate key, which can be used as a shared key. The core network side device can derive a NAS security context based on the second intermediate key. The establishment of the NAS security context can refer to the 5G security mechanism, which is not exhaustive in this embodiment. The core network side device can also provide the second intermediate key to the access network device for the access network device to derive the AS security context.
[0209] For example, the second device is a tag. The core network-side devices specifically include a first core network device and a third core network device. The first core network device can be a BSF, and the third core network device can be an AMF. The BSF and the tag generate a shared second intermediate key Ks. The BSF provides the key Ks to the AMF for deriving a NAS security context. Here, the NAS security context can refer to the existing 5G security mechanism, that is, Ks = Kamf, to derive Knas-int (i.e., the NAS integrity protection key) and Knas-enc (i.e., the NAS encryption key (or security key)). For another example, the access network device is specifically a base station (such as a gNB). The BSF provides the key Ks to the gNB for deriving an AS security context. Here, the AS security context can refer to the existing 5G security mechanism, that is, Ks = Kgnb. The gNB then derives subordinate keys based on Kgnb.
[0210] In some possible implementations, security negotiation may also be performed between the second device and the first device.
[0211] The processing by the second device may also include: the second device sending security capability information to the first device, where the security capability information is used to indicate one or more security algorithms supported by the second device, or to indicate a target security algorithm specified by the second device.
[0212] Correspondingly, the processing of the first device may also include: the first device receiving security capability information from the second device, the security capability information being used to indicate one or more security algorithms supported by the second device, or being used to indicate a target security algorithm specified by the second device.
[0213] The aforementioned security capability information may be carried in any information and / or message sent by the aforementioned second device to the first device.
[0214] Optionally, security capability information can be carried in the first request message, and the first device can receive and save the security capability information, and send a second request message that does not contain the security capability information to the core network side device; or, the first device can further carry the security capability information in the second request message and send it to the core network side device, which is not limited in this embodiment.
[0215] Optionally, the security capability information may be sent simultaneously with the second information. For example, the second information may include the security capability information, or the second device may carry the second information and the security capability information as an information element in the same message and send it to the first device. In this case, the first device may extract the security capability information from the second information and save it without sending it to the core network device, or the first device may not process the second information or the message carrying the second information and the security capability information and directly transmit it to the core network side device.
[0216] Optionally, the security capability information can also be carried in the aforementioned third request message. In this case, the core network side device can carry the security capability information in the second response message and send it to the first device. That is, a second response message and / or a ninth response message will be generated during the processing of the core network side device, wherein the second response message also carries the security capability information of the second device, and the security capability information is used to indicate one or more security algorithms supported by the second device, or to indicate the target security algorithm specified by the second device; and / or, the ninth response message also carries the security capability information of the second device.
[0217] It should be understood that this is merely an exemplary description, and in other examples, the security capability information may also be carried by other messages or information, and this embodiment does not provide an exhaustive list.
[0218] Optionally, the security capability information may be used to indicate one or more security algorithms supported by the second device. That is, the security capability information may include all security algorithms supported by the second device, or the security capability information may include preferred security algorithms supported by the second device. The security capability information may specifically include the names, / or numbers, and / or identifiers of various security algorithms supported by the second device.
[0219] In this case, the processing by the first device may further include: the first device sending security algorithm indication information to the second device, where the security algorithm indication information is used to indicate a target security algorithm. Correspondingly, the processing by the second device may further include: the second device receiving security algorithm indication information from the first device, where the security algorithm indication information is used to indicate a target security algorithm.
[0220] The security algorithm indication information may include the name, number, and / or identifier of the target security algorithm. The security algorithm indication information may be carried in any information or message sent by the first device to the second device. For example, the security algorithm indication information may be carried in the aforementioned second message, second response message, or third response message. This does not exhaustively list all possible information or messages that can carry the security algorithm indication information.
[0221] The way in which the first device selects the target security algorithm may be: the first device may determine whether there is one or more security algorithms supported by the second device among the one or more security algorithms supported by the first device, and if so, select any one of the security algorithms supported by the first device as the target security algorithm. Alternatively, it may also include: if there is no security algorithm supported by the first device, then based on the security capabilities of the second device, select a security algorithm supported by the first device as the target security algorithm; wherein the security capabilities of the second device may also be carried in the security capability information, such as indicating at least one of the type of the second device, the model of the second device, the maximum computing power supported by the second device, and so on. Alternatively, it may also include: if there is no security algorithm supported by the first device, then an indication information indicating that the security algorithm negotiation failed may be sent to the second device. The indication information indicating that the security algorithm negotiation failed may also be carried in any information or message sent by the first device to the second device.
[0222] Optionally, the security capability information may be used to indicate a target security algorithm specified by the second device.
[0223] In this case, the processing of the first device may include: if the first device supports the target security algorithm, directly using the target security algorithm. Furthermore, if the first device does not support the target security algorithm, sending an indication of a security algorithm negotiation failure to the second device. The indication of a security algorithm negotiation failure may also be included in any information or message sent by the first device to the second device.
[0224] For example, the second device is a tag, the first device is a proxy, the core network side devices include the BSF, and the target service device is the NAF. Reporting of the tag's security capabilities and selected security algorithm: The tag can be carried in the bootstrapping initialization process, in the uplink message of lightweight bootstrapping authentication (such as steps 601 and 609 in Figure 6), and in the communication request message to the NAF (such as step 701 in Figure 7). When the NAF requests a key, the BSF can carry the tag's security capabilities and selected security algorithm and return it in the response message, such as step 703b in Figure 7. After receiving the tag's security capabilities, the proxy selects a supported security algorithm based on its own security capabilities. Alternatively, it checks whether the security algorithm selected by the tag is supported. If not, it selects a supported security algorithm from the tag's security capabilities. Otherwise, the proxy returns an indication of negotiation failure. If the security algorithm is successfully determined, the proxy returns the selected security algorithm (i.e., the target security algorithm) based on the tag's security capabilities (anti-price reduction attacks) to the tag. This parameter can be carried in the downlink message of the lightweight bootstrapping authentication (such as step 613 in Figure 6) and in the communication response returned by the proxy to the tag (such as step 705b in Figure 7). Alternatively, considering the tag's lower security and computing capabilities, the tag may directly report the security algorithms supported by the proxy to the network (i.e., directly specify the target security algorithm).
[0225] In some possible embodiments, the target security algorithm includes a target integrity protection algorithm and / or a target encryption algorithm. The target integrity protection algorithm is used by the second device to calculate the integrity protection code for messages sent based on the integrity protection key pair and / or to verify the integrity of messages received based on the integrity protection key pair. The target encryption algorithm is used by the second device to encrypt data sent based on the encryption key pair and / or to decrypt data received based on the encryption key pair. The integrity protection key is related to the first key, and the encryption key is related to the first key. Accordingly, the first device can also determine the target security algorithm corresponding to the second device. On the first device side, the target integrity protection algorithm is used by the first device to calculate the integrity protection code for messages sent based on the integrity protection key pair and / or to verify the integrity of messages received based on the integrity protection key pair. The target encryption algorithm is used by the first device to encrypt data sent based on the encryption key pair and / or to decrypt data received based on the encryption key pair. The integrity protection key is related to the first key, and the encryption key is related to the first key.
[0226] Optionally, the second device may directly generate the aforementioned first key (and / or second key) after completing the authentication.
[0227] After obtaining the second intermediate key, the second device may use the second intermediate key to derive a subordinate key as an integrity protection key, and perform integrity protection on the message sent by the second device to the first device. For example, when the second device sends the second information to the first device, it calculates the integrity protection code (or integrity check code MIC) for the message carrying the second information, and carries the integrity protection code in the message carrying the second information. Furthermore, the first device may perform integrity verification when receiving the message carrying the second information. For example, the second device is a tag. After the tag generates the key Ks, it can use Ks or a subordinate key derived from Ks to enable integrity protection. Then, the MIC (Message Integrity Code) message integrity check code may be included when sending the response message in step 609 in Figure 6.
[0228] Alternatively, after completing the authentication process, the second device can calculate the first key Ks_NAF, or the first key Ks_NAF and the second key Ku1. The second device can derive a next-level integrity protection key based on the first key (or the second key) and perform integrity protection. For example, when the second device sends the aforementioned third request message, it carries a corresponding integrity protection code (or MIC) in the third request message. For example, the second device is a tag. After generating Ks_NAF / Ku1, the tag can use Ks_NAF / Ku1 or a lower-level key derived from Ks_NAF / Ku1 to enable integrity protection. The communication request sent in step 701 in Figure 7 can include a MIC.
[0229] Before obtaining the first key, the first device can send a message for integrity protection to the core network side device, and the core network side device will perform integrity verification. In this case, if the integrity-protected message received by the first device also carries the security capability information of the second device, the first device can select a target security algorithm and report the security capability information, target security algorithm and integrity verification code of the second device to the core network side device at the same time. For example, the first device is an agent, and the agent sends the message sent by the second device and the MIC it carries to the BSF / A-NF for integrity verification. If the message also carries the security capability of the tag, the first device can further select a target security algorithm and report the security capability of the tag and the selected target security algorithm to the BSF / A-NF (i.e., the core network side device).
[0230] Alternatively, after receiving the first key (or calculating the second key), the first device may also perform an integrity check on the message sent by the second device. For example, if the first device is a proxy, after receiving the key Ks (second intermediate key) or Ks_NAF (first key) returned by the BSF (i.e., the core network side device), or generating Ku1 (second key) based on Ks_NAF, the proxy may verify the integrity of the message based on the security algorithm selected by the Tag.
[0231] Furthermore, the first device can enable integrity protection and encryption protection after successfully checking the security of any message carrying the integrity check code sent by the second device. Correspondingly, the second device, such as a tag, can enable encryption protection after successfully checking the integrity of the message carrying the integrity check code.
[0232] Optionally, the second device may calculate the first key and / or the second key after receiving a response message in response to the third request message.
[0233] The first device may be able to derive a lower-level encryption key and / or integrity protection key based on the first key and / or the second key and perform integrity protection after receiving the first key (or further calculating the second key). For example, the first device may perform integrity protection on the third response message, that is, carry the integrity protection code in the third response message. Accordingly, the second device may calculate the first key (or further calculate the second key) after receiving the third response message, derive a lower-level encryption key and / or integrity protection key based on the first key and / or the second key, and perform an integrity check on the third response message. If the verification is successful, the second device may send a response to the first device. Accordingly, after receiving the response, the first device determines that the integrity check is successful and enables encryption protection.
[0234] For example, the second device is a tag. After receiving the communication response, the tag generates Ks_NAF, or Ks_NAF and Ku1. Specifically, after receiving the key Ks_NAF, the agent (first device) generates Ku1. Based on Ks_NAF / Ku1, it generates a lower-level encryption key and integrity protection key, and uses integrity protection to protect the communication response (for example, step 705b in Figure 7). After receiving the communication response sent by the agent containing the MIC (step 705b in Figure 7), the tag generates the key Ks_NAF or Ku1, as well as the lower-level encryption key and integrity protection key. It verifies the MIC using the integrity protection key. If verification is successful, encryption and integrity protection are enabled, and a response message is returned to the agent. After receiving the response message, the agent checks the integrity successfully and can enable encryption protection.
[0235] In some possible implementations, the processing by the second device may include: the second device sending a first request message to the first device, where the first request message is used to request authentication, and the first request message carries a first identifier of the second device.
[0236] The processing by the first device may include: the first device receiving a first request message from the second device, where the first request message is used to request authentication, and the first request message carries a first identifier of the second device.
[0237] In this embodiment, the processing of the first device may further include: the first device sending the fourth request message to the target service device to request authentication, the fourth request message carrying the first identifier of the second device and / or the second identifier of the second device.
[0238] In the processing of the target service device, the method also includes one of the following: the target service device receives a fourth request message sent by the first device, the fourth request message is used to request authentication, and the fourth request message carries the first identifier of the second device and / or the second identifier of the second device; the target service device receives a seventh request message sent by the second device, the seventh request message is used to request authentication, and the seventh request message carries the first identifier of the second device.
[0239] In this embodiment, the processing of the target service device is specifically as follows: the target service device receives the fourth request message sent by the first device. Further, the method also includes: the target service device sends an eighth request message to the core network side device, the eighth request message is used to request authentication, the eighth request message carries the second identifier and security credentials of the second device, the security credentials include at least one of the following: a first shared key, related information of the first shared key, and a first intermediate key, the first shared key is shared between the second device and the target service device, and the first intermediate key is obtained based on the first shared key.
[0240] The processing of the core network side device may include: the core network side device receives an eighth request message sent by the target service device, the eighth request message is used to request authentication, the eighth request message carries the second identifier and security credentials of the second device, and the security credentials include at least one of the following: the first shared key, related information of the first shared key, and a first intermediate key, and the first intermediate key is obtained based on the first shared key.
[0241] The first request message, the second identifier of the second device, the first identifier of the second device, and the manner in which the second device anonymously processes the second identifier are the same as those in the previous embodiment and are not described in detail in this embodiment.
[0242] Optionally, the first identifier of the second device is calculated based on the second shared key. After receiving the first request message, the first device may deanonymize the first identifier of the second device. The specific process is the same as in the aforementioned embodiment and is not further described. In this case, the fourth request message carries the second identifier of the second device; further, the fourth request message may also carry at least one of the following: the identifier of the first device and the second shared key.
[0243] Optionally, the first identifier of the second device is calculated based on the second shared key. After receiving the first request message, the first device may not deanonymize the first identifier of the second device. In this case, the fourth request message carries the first identifier of the second device, and the second request message may also carry at least one of the following: the identifier of the first device and the second shared key.
[0244] Optionally, the first identifier of the second device is calculated based on a second random number. The second random number is shared by the second device and the target service device. In this case, after receiving the first request message, the first device may not deanonymize the first identifier of the second device. The fourth request message carries the first identifier of the second device. Furthermore, the second request message may also carry the identifier of the first device.
[0245] After the target service device receives the fourth request message, it can perform authorization management on the second device and mapping management between the first device and the second device. Specifically: the target service device obtains the second identifier of the second device and checks whether the second device is authorized based on the second identifier of the second device. If the second device is authorized, it extracts the identifier of the first device from the fourth request message and checks whether the first device is authorized to act as a proxy device to provide communication services for the second device. If so, it further checks the mapping relationship between the first device and the second device. If the mapping relationship exists, it determines that the check has passed.
[0246] The target service device obtaining the second identifier of the second device may include: the target service device obtaining the first identifier of the second device from the fourth request message, and deanonymizing the first identifier of the second device to obtain the second identifier of the second device. The deanonymization process is the same as in the previous embodiment and is not repeated here. Alternatively, the target service device obtaining the second identifier of the second device may include: the target service device extracting the second identifier of the second device from the fourth request message.
[0247] Checking the mapping relationship between the first device and the second device can determine the mapping relationship between the two based on the whitelist of the first device and the whitelist of the second device saved by itself. For example, if the first device is in the whitelist of the second device and the second device is in the whitelist of the first device, then the two have a mapping relationship; otherwise, the two do not have a mapping relationship.
[0248] The target service device further generates security credentials.
[0249] Optionally, the security credential includes a first shared key. This first shared key differs from the previous embodiment in that it is shared by the second device and the target service device. The remaining description of the first shared key is the same as in the previous embodiment. For example, the first shared key may be a root key K.
[0250] Optionally, the security credential includes relevant information of the first shared key. The relevant information of the first shared key can be obtained by directly connecting the first shared key with other parameters. For example, it can be a direct connection between the first shared key and the second shared key, or it can be a direct connection between the first shared key and the second random number, or it can be a direct connection between the first shared key and the third random number, or it can be a direct connection between the first shared key, the second random number (or the second shared key), and the third random number. For example, the relevant information of the first shared key can be expressed as: K||N1, or K||N1||N2, or K||N2, where K is the first shared key (or called the root key), N1 is the second shared key (shared by the second device and the first device), or N1 is the second random number (shared by the second device and the target service device), and N2 is the third random number. It should be understood that this is only an exemplary description and is not exhaustive.
[0251] Optionally, the security credential may include a first intermediate key. The first intermediate key may be calculated based on the first shared key. For example, the first intermediate key may be calculated by XORing the first shared key with other parameters. The other parameters may be at least one of the second shared key, the second random number, and the third random number. For example, the first intermediate key is Kb, Kb=K⊕N1, or Kb=K⊕N2. For another example, the first intermediate key may be calculated by XORing the first shared key with other parameters, and further obtaining relevant information of the first intermediate key. The relevant information of the first intermediate key may also be obtained by directly connecting the first intermediate key with the other parameters. For example, the relevant information of the first intermediate key may be expressed as: Kb||N2 (when Kb=K⊕N1), or Kb||N1 (when Kb=K⊕N2).
[0252] The second random number is shared by the second device and the target service device; and / or, the second shared key is shared by the second device and the first device; and / or, the third random number is selected by the target service device, or the third random number is shared by the second device and the target service device.
[0253] If the third random number is selected by the target service device, it can be sent by the target service device to the core network device, for example, by including the third random number in the eighth request message. Furthermore, the core network device can include the third random number in the first message when sending the first message. If the third random number is shared by the second device and the target service device, it can be sent by the target service device to the core network device, for example, by including the third random number in the eighth request message. The core network device does not need to send the third random number to the second device.
[0254] The eighth request message sent by the target service device may also include authentication type indication information. The authentication type indication information is used to indicate the authentication type corresponding to the second device. The detailed description of the authentication type indication information is the same as that in the previous embodiment and will not be repeated.
[0255] After receiving the eighth request message, the core network side device can determine whether the preset conditions are met based on the subscription credentials of the first device and the subscription credentials of the second device. If the preset conditions are met, the first device and the second device are authorized to use the target service. The specific processing is the same as that in the previous embodiment and is not repeated here.
[0256] Furthermore, if the core network device determines that the first device and the second device are authorized to use the target service, subsequent authentication processing can be performed on the second device. The processing of the core network device can also include at least one of the following: the core network device calculates a first message authentication code based on the first shared key, the first random number, and the first authentication parameter using a first calculation method, wherein the first authentication parameter includes at least one of: a second shared key, a second random number, and a third random number; the core network device calculates the first message authentication code based on the first intermediate key, the first random number, and the first authentication parameter using the first calculation method, wherein the first intermediate key is related to the first shared key; the core network device calculates the second response based on the first shared key, the first random number, and the second authentication parameter using a second calculation method, wherein the second authentication parameter includes at least one of: a second shared key, a second random number, and a third random number; the first calculation method is different from the second calculation method, and / or the first authentication parameter and the second authentication parameter are at least partially different; the core network device calculates the second response based on the first intermediate key, the first random number, and the second authentication parameter using the second calculation method.
[0257] The first random number may be generated by a core network device, and the first information may further include the first random number. The description of the first calculation method being different from the second calculation method, and / or the first authentication parameter being at least partially different from the second authentication parameter is the same as in the previous embodiment and is not further described.
[0258] Optionally, if the security credential includes the first shared key, the core network device can directly obtain the first shared key. Alternatively, if the security credential includes information related to the first shared key, the core network device can extract the first shared key from the information related to the first shared key based on at least one of the second random number, the second shared key, and the third random number.
[0259] Accordingly, the core network side device may use a first calculation method to calculate a first message authentication code based on the first shared key, the first random number, and the first authentication parameter; and the core network side device may use a second calculation method to calculate the second response based on the first shared key, the first random number, and the second authentication parameter. In this example, the relevant instructions for calculating the first message authentication code are the same as those in the previous embodiment and are not repeated here.
[0260] Optionally, if the security credential includes the first intermediate key, the core network device may directly use the first intermediate key. Alternatively, if the security credential includes relevant information about the first intermediate key, the core network device may extract the first intermediate key from the relevant information about the first intermediate key based on at least one of the second random number, the second shared key, and the third random number.
[0261] Correspondingly, the core network side device calculates the first message authentication code based on the first intermediate key, the first random number and the first authentication parameter using the first calculation method; the core network side device calculates the second response based on the first intermediate key, the first random number and the second authentication parameter using the second calculation method.
[0262] For example, the first authentication parameter and the second authentication parameter are different, and the first authentication parameter includes a second shared key, and the second authentication parameter includes a third random number. The first message authentication code is calculated based on the first shared key, the first random number and the first authentication parameter using the first calculation method, which can be expressed as: MAC = fkb (RAND, N1). The second response is calculated based on the first shared key, the first random number and the second authentication parameter using the second calculation method, which can be expressed as: XRES = fkb (RAND, N2), where f can be the same algorithm or function as that used to calculate the first message authentication code, kb represents the first intermediate key, and the meanings of the remaining parameters are the same as those in the aforementioned embodiment and are not repeated here.
[0263] The above is merely an example description, and all possible ways of generating the first message authentication code and the second response are not exhaustively listed here. As long as the generated second response is ultimately completely different from the first message authentication code, it is within the scope of protection of this embodiment.
[0264] After obtaining the first message authentication code and the second response, the core network side device may use the first message authentication code and the second response as authentication vectors.
[0265] Optionally, the authentication vector may further include a first random number and / or an anonymous key. For example, the authentication vector may be expressed as: AV = RAND | | AK | | MAC | | XRES, or as: AV = RAND | | MAC | | XRES. The meanings of the various components in the formula are the same as in the above examples and are not further described.
[0266] Optionally, the authentication vector may further include at least one of the second identifier of the second device, the identifier of the first device, the identifier of the core network side device, the identifier of the target service device, etc. This embodiment does not exhaustively list all possible contents of the authentication vector.
[0267] The calculation method of the above anonymous key is the same as that in the previous embodiment and will not be described in detail.
[0268] For example, the core network side device includes a first core network device and a second core network device. The first core network device may include a BSF and / or an A-NF, and the second core network device may include at least one of an HSS / HLR, an AUSF, a KMS, and the like. The functions of the first core network device and the second core network device are the same as those in the aforementioned embodiment, except that the second core network device calculates the first message authentication code and the second response in a manner different from that in the aforementioned embodiment. The calculation method has been described in detail in the aforementioned embodiment and is therefore not repeated here.
[0269] After completing the above processing, the core network side device sends the above first information to the first device; then the first device sends the first information from the core network side device to the second device. Correspondingly, the second device receives the first information from the core network side device, including: the second device receives the first information from the core network side device through the first device.
[0270] Here, the core network side device (such as the aforementioned first core network device) can carry the first information in the first message and send it to the first device. The first device sends the first information from the core network side device to the second device, and the first device can carry the first information in the second message and send it to the second device; accordingly, the second device obtains the first information from the core network side device by receiving the second message. The above-mentioned second message can be in response to the first request message, and the second message can also be called an authentication response message. The relevant descriptions of the first message and the second message are the same as those in the aforementioned embodiment and are not repeated here.
[0271] Furthermore, after receiving the first information, the second device calculates a second message authentication code based on the first shared key. Specifically, the calculation may include one of the following: the second device calculates the second message authentication code based on the first shared key, the first random number, and the first authentication parameter using a first calculation method, where the first authentication parameter includes at least one of: a second shared key, a second random number, and a third random number; the second device calculates a first intermediate key based on the first shared key, and calculates the second message authentication code based on the first intermediate key, the first random number, and the first authentication parameter using the first calculation method.
[0272] The second random number is shared by the second device and the target service device. In this embodiment, the second random number can be shared by the second device and the core network side device. And / or, the second shared key is shared by the second device and the first device. And / or, the third random number is configured, or the third random number is shared by the second device and the target service device. For example, if the third random number is configured, it may mean that the third random number is generated by the target service device and configured to the second device. In this case, the aforementioned first information may also include relevant information of the third random number and / or the third random number. The description of the relevant information of the third random number is the same as that of the aforementioned embodiment and will not be repeated.
[0273] In this embodiment, the second device calculates the second message authentication code in the same manner as the core network side device calculates the first message authentication code, which will not be described in detail.
[0274] If the second message authentication code and the first message authentication code are the same, the second device may determine that the second device has successfully authenticated the core network side device. After the second device determines that the second device has successfully authenticated the core network side device, the method may further include: the second device calculating a first response based on the first shared key, the first response being used by the core network side device to authenticate the second device; and the second device sending second information to the core network side device, the second information including the first response.
[0275] Among them, the second device calculates the first response based on the first shared key, which may include one of the following: the second device adopts a second calculation method to calculate the first response based on the first shared key, the first random number and the second authentication parameter, wherein the second authentication parameter includes at least one of: a second shared key, a second random number, and a third random number; the first calculation method is different from the second calculation method, and / or the first authentication parameter and the second authentication parameter are at least partially different; the second device calculates a first intermediate key based on the first shared key, and adopts a second calculation method to calculate the first response based on the first intermediate key, the first random number and the second authentication parameter.
[0276] Regarding the difference between the first calculation method and the second calculation method, and / or the at least partial difference between the first authentication parameter and the second authentication parameter, it is the same as the description of the previous embodiment and will not be repeated.
[0277] In this embodiment, the processing of calculating the first response by the second device should also be the same as that of the core network side device, and will not be repeated here.
[0278] The processing after the second device sends the second information to the core network side device and the core network side device receives the second information from the second device is the same as in the above-mentioned embodiment and will not be repeated here. Furthermore, the processing of the first device may also include: the first device sends the second information from the second device to the core network side device, the second information includes the first response, and the first response is used by the core network side device to authenticate the second device. Correspondingly, the core network side device receives the second information from the second device including: the core network side device receives the second information from the second device through the first device. Here, the way of carrying the second information is the same as in the above-mentioned embodiment and will not be repeated.
[0279] After the core network side device successfully authenticates the second device, the method also includes at least one of the following: the core network side device sends a tenth response message to the target service device, the tenth response message is used to indicate that the authentication of the second device is successful, and the tenth response message carries the identification information and the first key, and the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device and the identification of the core network side device; the first key is used for communication between the second device and the target service device, and / or, the first key is used for communication between the first device and the second device, and the first device is used to transmit data between the second device and the target service device; the core network side device sends a fourth response message to the first device, the fourth response message is used to indicate that the authentication of the second device is successful, and the fourth response message carries the identification information and the first key.
[0280] Correspondingly, the first device receives the first key from the core network side device, including: the first device receives a fourth response message from the core network side device, the fourth response message is used to indicate that the authentication of the second device is successful, and the fourth response message carries identification information and the first key, and the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device and the identification of the core network side device.
[0281] Then, the first device may further perform the following processing: the first device sends a fifth response message to the second device, where the fifth response message is used to indicate that the authentication of the second device is successful, and the fifth response message carries the identification information.
[0282] The processing of the second device may also include: the second device receives a fifth response message from the first device, the fifth response message is used to indicate that the authentication of the second device is successful, the fifth response message carries the identification information, and the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device and the identification of the core network side device.
[0283] The target service device receives the first key sent by the core network side device, including: the target service device receives the tenth response message from the core network side device, the tenth response message is used to indicate that the authentication of the second device is successful, and the tenth response message carries the identification information and the first key, and the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device and the identification of the core network side device; the first key is used for communication between the second device and the target service device, or the first key is used for communication between the first device and the second device, and the first device is used to transmit data between the second device and the target service device. In this embodiment, the first key is used for communication between the first device and the second device.
[0284] The manner in which the core network side device obtains the identification information is the same as that in the aforementioned embodiment and will not be described in detail.
[0285] In this embodiment, the second device may calculate the first key itself. For example, the second device may calculate the first key when determining that the first message authentication code and the second message authentication code are the same. Alternatively, the second device may calculate the first key after receiving the fifth response message.
[0286] The second device calculates the first key based on the first shared key and the identifier of the target service device, including: the second device calculates the first key based on the first shared key, the identifier of the target service device and a third authentication parameter, and the third authentication parameter includes at least one of the following: a second shared key, a second random number, a third random number, a second identifier of the second device, an identifier of the core network side device, an identifier of the first device, and identification information.
[0287] Optionally, the second device calculates the first key based on the first shared key, the identifier of the target service device, and the third authentication parameter, which may include: the second device calculates an anonymous key based on the first shared key; calculates a second intermediate key based on the anonymous key and a fourth authentication parameter, the fourth authentication parameter including at least one of the following: a second shared key, a second random number, a third random number, a second identifier of the second device, an identifier of the core network side device, an identifier of the first device, and an identifier of the target service device; and calculates the first key based on the second intermediate key, the identification information, and the identifier of the target service device. The third authentication parameter includes the aforementioned fourth authentication parameter, and identification information is further added on the basis of the fourth authentication parameter, that is, the third authentication parameter may include at least one of the identification information and / or the fourth authentication parameter.
[0288] The fourth authentication parameter differs from the previous embodiment only in the addition of the target service device identifier. The specific calculation method can be added to the formula for calculating the second intermediate key in the previous embodiment, by adding the NAF ID (i.e., the target service device identifier), such as Ks = fak(N1, N2, IDi, UE ID, BSF ID, NAF ID). This description is omitted here. The specific method for calculating the first key is the same as in the previous embodiment and is not repeated here.
[0289] Optionally, the second device calculates the first key based on the first shared key, the identifier of the target service device and the third authentication parameter, which may include: the second device calculates the first intermediate key based on the first shared key; calculates the second intermediate key based on the first intermediate key and the fourth authentication parameter, the fourth authentication parameter including at least one of the following: the second shared key, the second random number, the third random number, the second identifier of the second device, the identifier of the core network side device, the identifier of the first device, and the identifier of the target service device; calculates the first key based on the second intermediate key, the identification information, and the identifier of the target service device.
[0290] The manner in which the second device calculates the first intermediate key based on the first shared key may be the same as the manner in which the target service device calculates the first intermediate key based on the first shared key in the aforementioned embodiment, and details thereof will not be repeated.
[0291] An exemplary method for calculating the second intermediate key based on the first intermediate key and the fourth authentication parameter is as follows: the first intermediate key, the second shared key, the third random number, the second identifier of the second device, the identifier of the core network device, and the identifier of the target service device may be used to calculate the second intermediate key, such as Ks=fkb(N1, N2, IDi, BSF ID, NAF ID), where Ks may be the second intermediate key, kb represents the first intermediate key, N1 may be the second shared key, N2 is the third random number, Idi is the second identifier of the second device, BSF ID is the identifier of the core network device (for example, the first core network device is the BSF), f may be any algorithm or function in the third calculation method, and NAF ID is the identifier of the target service device. Exemplarily, the second intermediate key may be calculated using the first intermediate key, the second shared key, the third random number, the second identifier of the second device, the identifier of the core network device, the identifier of the first device, and the identifier of the target service device, such as Ks=fkb(N1, N2, IDi, UE ID, BSF ID, NAF ID). It should be understood that this is merely an example. In actual processing, one or more of the above parameters may be used in combination to calculate the second intermediate key Ks. When the first device is an access network device, the UE ID may be replaced with a gNB ID; and / or, when the first core network device is an A-NF, the BSF ID may be replaced with an A-NF ID; and / or, the NAF ID in the above formula may not be used, etc. All possible examples are not exhaustive here.
[0292] Calculating the first key based on the second intermediate key, the identification information, and the target service device's identification may include: calculating the first key based on the second intermediate key, the identification information, and the target service device's identification using a first calculation method. For example, the following formula can be used: Ks_NAF = fks(NAF ID, B-TID), where Ks_NAF represents the first key, f can be any algorithm or function in the first calculation method, Ks is the second intermediate key, NAF ID is the target service device's identification, and B-TID is the identification information. The B-TID can also be replaced with a B-KID. The method for obtaining the identification information is the same as in the previous embodiment and is not described again. Alternatively, calculating the first key based on the second intermediate key, the identification information, and the target service device's identification may also include the identification of the first device. For example, calculating the first key based on the second intermediate key, the identification information, the target service device's identification, and the first device's identification using the first calculation method. For example, the following formula can be used: Ks_NAF = fks(NAF ID, B-TID, UE ID). The meanings of the various components in this formula are the same as in the previous embodiment and are not described again. For another example, the parameters for calculating the first key may further include a second identifier of the second device, such as Ks_NAF=fks(NAF ID, IDi, UE ID, B-TID (or B-KID)), etc., which are not exhaustive here.
[0293] The way in which the core network side device calculates the first key should also be the same as the way in which the aforementioned second device calculates the first key. The difference may be that the core network side device does not need to calculate the first intermediate key, and can directly execute the aforementioned calculation of the second intermediate key based on the first intermediate key and the fourth authentication parameter, and the calculation of the first key based on the second intermediate key, the identification information, and the identification of the target service device. The remaining processing is the same as the aforementioned second device, so it will not be repeated.
[0294] It should be noted that the fifth response message may also carry the validity period of the first key. The fifth response message may also include the updated second random number, and the fifth response message may also carry a message integrity check code (or integrity verification code, or integrity protection code). The integrity check code may be obtained based on the first key, or a second key calculated from the first key, or a further derived subordinate key. Exhaustive examples are not given here.
[0295] It should also be pointed out that in some possible examples, the aforementioned second intermediate key can be directly used as the first key.
[0296] The second device may also calculate the second key based on the first key, and calculate the integrity protection key and encryption key based on the first key or the second key or a further derived lower-level key, etc. The method for calculating the second key is the same as that in the above embodiment and will not be described in detail.
[0297] In conjunction with Figure 8, the first device is represented as an agent (including any one of a UE, an IAB node, and a base station), the second device is a tag, and the core network side device includes a first core network element such as a BSF and / or an A-NF (Figure 8 represents the first core network element as a BSF for simplicity). The core network side device also includes a second core network element, which may include at least one of an HSS, an HLR, and a KMS (Figure 8 represents the second core network element as HSS / HLR / KMS for simplicity). The target service device is a NAF as an example. The communication method provided in the foregoing embodiment is described:
[0298] Step 800: The Tag and the A-IoT application server NAF (or AF) pre-share a root key K; the root key is the aforementioned first shared key.
[0299] Step 801a. The Tag sends a request message (authentication request or communication request) to the proxy (the proxy can be a UE, an IAB node, or a device in the access network. This example uses the UE as an example). The request message includes the anonymized Tag's identity DIDi. This request message is the first request message in the aforementioned embodiment.
[0300] This anonymity processing can be done in the following two ways: Processing method A: N1 is a random number shared in advance by the Tag and the NAF. After the security context of the Tag is established, the NAF can send a new random number to the Tag to update the pseudonym DIDi. The pseudonym is generated in the following way: DIDi = IDi⊕N1; Processing method B: N1 is the key between the Tag and the UE (which can be a physical layer key). When the UE sends the Tag authentication request to the NAF, it needs to carry N1, DIDi = IDi⊕N1 or DIDi = fn1(IDi). Note: The proxy UE and the Tag can also authenticate each other, and execute step 801 after completing the mutual authentication.
[0301] Step 801b: The proxy sends an authentication request to the NAF, which includes DIDi and UE ID (GPSI, SUCI, GUTI) or includes IDi, UE ID, and N1. In this step, the authentication request is the fourth request message in the above embodiment.
[0302] In step 802, the NAF performs at least one of the following processes: deanonymization, authorization check, whitelist management, determination of mapping relationship, and calculation of Kb (ie, the aforementioned first intermediate key).
[0303] Optionally, authorization management and tag-UE mapping management can be as follows: The NAF checks whether the tag is authorized, whether the UE is authorized to provide A-IoT communication services as a proxy, and the mapping relationship between the UE and the tag based on the N1 de-anonymization IDi = DIDi ⊕ N1 or IDi = fn1(DIDi) shared with the tag. The NAF can manage the mapping between the tag whitelist and the proxy UE list. Here, if the NAF receives IDi, the UE ID, and N1, the NAF directly performs the authorization check and manages the mapping between the tag and the UE.
[0304] In step 803, the NAF provides security credentials to the BSF. Specifically, it may provide the root key K, or K||N1, or K||N1||N2, or K||N2; or it may provide the processed key Kb, or Kb||N2 (Kb=K⊕N1), or Kb||N1 (Kb=K⊕N2). N2 may be a tag shared with the NAF or selected by the NAF. Here, the security credentials may be carried in the eighth request message sent to the BSF in the aforementioned embodiment.
[0305] The message may contain an identifier that indicates the authentication type, which may be based on the NAF ID, or based on the type of IDi, or based on the authentication type Auth_type_ID.
[0306] Step 804: BSF requests an authentication vector from HSS / HLR / KMS (or AUSF). The authentication request sent includes NAF ID, IDi, UE ID, security credentials from NAF, and an identifier that can indicate the authentication type.
[0307] Step 805. HSS / HLR / KMS (or AUSF) performs at least one of the following operations: authorization check, authentication type confirmation, calculation of MAC, XRES, and formation of authentication vector AV.
[0308] Optionally, the subscription credentials of the Tag and UE can be queried through the core network element (such as UDM), and the subscription credentials of the Tag and UE can be checked based on IDi and UE ID to determine whether they are entitled to use the A-IoT service.
[0309] Optionally, the authentication type confirmation may be: determining that the authentication type is A-IoT authentication based on an identifier that can indicate the authentication type.
[0310] Optionally, calculate the authentication vector: if the root key K or K||N1 or K||N1||N2 is received, select the random number RAND, calculate AK=fk(RAND) or AK=K⊕N1, MAC / XRES=fk(RAND,N1,N2), then AV=RAND||AK||MAC||XRES; if Kb or Kb||N1 / N2 is received, MAC / XRES=fkb(RAND) or fkb(RAND,N1 / N2), AV=RAND||MAC||XRES; where the function f can be the functions f1 to f5 defined by 3GPP, or KDF (HMAC-SHA256), or other lightweight functions.
[0311] Step 806: HSS / HLR / KMS returns an authentication vector AV to BSF. The authentication vector may include IDi, UE ID, BSF ID, and NAF ID.
[0312] Step 807: BSF performs lightweight bootstrapping authentication with the Tag and forwards the corresponding authentication message through the proxy.
[0313] Taking the UE as an example, this step may include: the BSF returns an authentication response to the Tag through the UE, which includes RAND, MAC, and may include AK⊕N2 or Kb⊕N2 (only applicable when N2 is selected by the NAF and is securely delivered to N2), and may include the BSF ID, IDi; the Tag verifies the network side by calculating and verifying the MAC. After successful verification, RES is calculated, and Ks = fak / kb(N1, N2, IDi, UE ID, BSF ID, NAF ID); the Tag sends a response message to the UE, which includes RES; the UE sends an HTTP request to the BSF, which includes RES; the BSF verifies the Tag based on the RES and XRES. After successful verification, Ks = fak / kb(N1, N2, IDi, UE ID, BSF ID, NAF ID) is calculated, and B-TID = DIDi||UE ID||BSF ID is generated. B-KID = fks(IDi)||UE ID||BSF ID may be generated to prevent the B-TID from being propagated over the air interface. The authentication response may be the aforementioned second message. The response information may be the aforementioned second information.
[0314] Step 808: The BSF provides the proxy / NAF with Ks_NAF = fks(NAF ID, IDi, UE ID, B-TID / B-KID) (or Ks_NAF = Ks, assuming the proxy is a UE) and the key validity period, which may include a newly selected random number N1' for the tag to update the pseudonym. In other words, the BSF may send the aforementioned fourth response message to the proxy and the tenth response message to the NAF.
[0315] Step 809: The agent returns a success response to the Tag, which includes the B-TID or B-KID, the key validity period, and may include a newly selected random number N1' and a message integrity check code MIC (the message may be integrity-protected, or integrity-protected and encrypted, using the keys Ks_NAF and Ku1 and derived lower-level keys). The success response may be the fifth response message of the aforementioned embodiment.
[0316] Step 810. The key N1 (possibly a physical layer key) between the tag and the UE is used for mobility management: The tag and UE1 generate the key Ku1 = Ks_NAF⊕N1 based on the shared key N1 and Ks_NAF = fks(NAF ID, IDi, UE ID, B-TID / B-KID). Note: Ku1 can be used to generate encryption keys and security keys for communication protection. Later, when a tag uses another UE (e.g., UEx) as a proxy, it can use Ks_NAF and the key Nx between the tag and UEx to derive the lower-level key Kux, without necessarily requiring tag authentication and key agreement.
[0317] Through the above process, in the case where the first device is an L3 relay, there may only be a security context between the first device and the second device; the first device and the second device can obtain a shared first key and / or second key. In the case where the first device is an L2 relay, there may be both a security context between the first device and the second device and a NAS / AS security context for the second device. Regarding the process of establishing a NAS / AS security context for the second device, after the second device has gone through the solution provided in the aforementioned embodiment, both the core network side device and the second device can obtain the second intermediate key Ks, and the second intermediate key can be used as a shared key. The core network side device can derive a NAS security context based on the second intermediate key. The establishment of the NAS security context can refer to the 5G security mechanism, which is not exhaustive in this embodiment. The core network side device can also provide the second intermediate key to the access network device for the access network device to derive the AS security context.
[0318] For example, the second device is a tag. The core network-side devices specifically include a first core network device and a third core network device. The first core network device can be a BSF, and the third core network device can be an AMF. The BSF and the tag generate a shared second intermediate key Ks. The BSF provides the key Ks to the AMF for deriving a NAS security context. Here, the NAS security context can refer to the existing 5G security mechanism, that is, Ks = Kamf, to derive Knas-int (i.e., the NAS integrity protection key) and Knas-enc (i.e., the NAS encryption key (or security key)). For another example, the access network device is specifically a base station (such as a gNB). The BSF provides the key Ks to the gNB for deriving an AS security context. Here, the AS security context can refer to the existing 5G security mechanism, that is, Ks = Kgnb. The gNB then derives subordinate keys based on Kgnb.
[0319] In some possible implementations, security negotiation may also be performed between the second device and the first device.
[0320] The difference from the previous embodiment is that, in this embodiment, the security capability information can be carried in the first request message, then the first device can receive and save the security capability information, and send a fourth request message that does not contain the security capability information to the core network side device; or, the first device can further carry the security capability information in the fourth request message and send it to the core network side device, which is not limited in this embodiment. Optionally, the security capability information can be sent simultaneously with the second information, for example, the second information can include the security capability information, or the second device carries the second information and the security capability information as an information element in the same message and sends it to the first device; in this case, the first device can extract the security capability information from the second information and save it without sending it to the core network device, or the first device does not process the second information or the message carrying the second information and the security capability information, and directly transmits it to the core network side device. It should be understood that this is only an exemplary explanation. In other examples, the security capability information can also be carried by other messages or information, and this embodiment is not exhaustive.
[0321] Optionally, the security capability information may be used to indicate a target security algorithm specified by the second device.
[0322] For example, the second device is a tag, the first device is an agent, the core network side devices include BSF, and the target service device is NAF. Reporting of the tag's security capabilities and the selected security algorithm: The tag can be carried in the uplink message of the Bootstrapping initial process and the lightweight Bootstrapping authentication; after receiving the tag's security capabilities, the agent selects a supported security algorithm based on its own security capabilities; or checks whether the security algorithm selected by the tag can be supported. If not, it selects a supported security algorithm from the tag's security capabilities; otherwise, the agent will return an indication of negotiation failure. If the security algorithm is successfully determined, the agent returns the selected security algorithm (i.e., the target security algorithm) based on the tag's security capabilities (anti-price reduction attacks) to the tag; this parameter can be carried in the downlink message of the lightweight Bootstrapping authentication and the communication response returned by the agent to the tag. Alternatively, considering the tag's lower security and computing capabilities, the tag may directly report the security algorithms it supports to the network side and the agent (i.e., directly specify the target security algorithm).
[0323] In some possible embodiments, the target security algorithm includes a target integrity protection algorithm and / or a target encryption algorithm. The description of the target integrity protection algorithm is the same as in the previous embodiment and is not repeated here. For example, the second device is a tag. After completing authentication, the tag directly generates Ks_NAF / Ku1. Integrity protection can be enabled using Ks_NAF / Ku1 or a subordinate key derived from Ks_NAF / Ku1. The first device is a proxy. The proxy sends the message sent by the second device and the MIC it carries to the BSF / A-NF for integrity verification. If the message also carries the tag's security capabilities, the first device can further select a target security algorithm and report the tag's security capabilities and the selected target security algorithm to the BSF / A-NF (i.e., the core network device). Alternatively, after receiving the keys Ks and Ks_NAF (first key) returned by the BSF (i.e., the core network device), or generating Ku1 (second key) based on Ks_NAF, the proxy can verify the message integrity based on the security algorithm selected by the tag. After the security verification of any message carrying the integrity check code is successful, integrity protection and encryption protection can be enabled. Correspondingly, after receiving the message carrying the integrity check code, the Tag can check the integrity successfully and then enable encryption protection. For example, after receiving the fifth response message, the tag can calculate Ks_NAF, or Ks_NAF and Ku1. Specifically: after receiving the key Ks_NAF, the agent (first device) generates Ku1, generates the lower-level encryption key and integrity protection key based on Ks_NAF / Ku1, and uses the integrity protection authentication success response; after receiving the communication response containing MIC sent by the agent, the Tag generates the key Ks_NAF, or Ku1, as well as the lower-level encryption key and integrity protection key, verifies the MIC using the integrity protection key, and turns on encryption and integrity protection after successful verification, and returns the response information to the agent. After receiving the response message, the agent checks the integrity successfully and then enables encryption protection.
[0324] In some possible implementations, the second device may directly interact with the core network side device to complete the authentication process, and then the second device may directly interact with the target service device.
[0325] The processing by the second device may include: the second device sending a fifth request message to the core network side device, where the fifth request message is used to request authentication, and the fifth request message carries the first identifier of the second device.
[0326] The method also includes: the second device receives a seventh response message from the core network side device, the seventh response message is used to indicate that the authentication of the second device is successful, the seventh response message carries the identification information, and the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device and the identification of the core network side device.
[0327] The processing by the core network side device may include: the core network side device receiving a fifth request message sent by the second device, the fifth request message is used to request authentication, and the fifth request message carries the first identifier of the second device.
[0328] The method further includes: the core network side device sending a seventh response message to the second device, the seventh response message being used to indicate successful authentication of the second device, the seventh response message carrying identification information, the identification information being related to at least one of the following: the second identification of the second device, the first identification of the second device, and the identification of the core network side device
[0329] Here, the fifth request message can be any one of the following: an HTTP request, any NAS message, any upper layer protocol carried by the physical layer (PHY), and any upper layer protocol carried by the MAC layer. For example, when the second device interacts with the first core network device on the core network side, and the first core network device is an A-NF, the fifth request message can be any NAS (Non-Access Stratum) message; for example, when the first core network device is a BSF, the fifth request message can be any HTTP request. This embodiment does not enumerate all possible types of the fifth request message.
[0330] The second identifier of the second device, the first identifier of the second device, and the method for the second device to anonymize the second identifier are the same as those in the above embodiment and will not be described repeatedly.
[0331] Optionally, after receiving the fifth request message, the core network device first de-anonymizes the first identifier of the second device. In this embodiment, the parameters used for the anonymization or de-anonymization process may include a second random number or a second shared key. Both the second random number and the second shared key may be represented as N1. The second random number or the second shared key may be shared by the second device and the core network device, or the second random number may be selected by the core network device. The remaining processing is the same as the aforementioned anonymization or de-anonymization process and is not repeated here.
[0332] Optionally, after receiving the fifth request message, the core network side device may determine whether a preset condition is satisfied based on the subscription credentials of the second device, and if so, determine to authorize the second device to use the target service. The preset condition may include that the second device is authorized to use the target service; the target service may refer to an A-IoT service, or other types of services requested by the second device, which are not exhaustively listed here.
[0333] Furthermore, the processing of the core network side device may also include at least one of the following: the core network side device adopts a first calculation method to calculate a first message authentication code based on the first shared key, the first random number and the first authentication parameter, wherein the first authentication parameter includes at least one of: a second shared key, a second random number, and a third random number; the core network side device adopts a second calculation method to calculate the second response based on the first shared key, the first random number and the second authentication parameter, wherein the second authentication parameter includes at least one of: a second shared key, a second random number, and a third random number; the first calculation method is different from the second calculation method, and / or the first authentication parameter and the second authentication parameter are at least partially different.
[0334] In this implementation, the first shared key may be a PSK between the second device and the core network side device, for example, a root key.
[0335] Optionally, the manner in which the core network side device calculates the first message authentication code and the second response is the same as that in the aforementioned embodiment and will not be repeated.
[0336] Optionally, the process of the core network side device calculating the first message authentication code may include: the core network side device using any one of the algorithms or functions in the first calculation method to calculate the anonymous key based on the first shared key and the third random number, and then using any one of the algorithms or functions in the first calculation method to calculate the first message authentication code based on the anonymous key, the first random number, and the first authentication parameter. Exemplarily, the calculation of the anonymous key can be expressed as: AK = fk(RAND, N2), where k is the first shared key, f is any one of the algorithms or functions in the first calculation method or the second calculation method, RAND is the first random number, AK is the anonymous key, and N2 is the third random number; or, exemplarily, it can be expressed as AK = K⊕N2. The meaning of each content in the formula is the same as in the previous embodiment and is not repeated. In this embodiment, the anonymous key can also be expressed as Kc.
[0337] For example, the calculation of the first message authentication code can be expressed as: MAC = f1kc(RAND, N2), or MAC = f1kc(RAND), where MAC is the first message authentication code, f1 is any algorithm or function in the first calculation method, kc represents the anonymous key, RAND represents the first random number, N1 represents the second shared key, and N2 is the third random number.
[0338] The processing of the core network side device calculating the second response may include: the core network side device using any algorithm or function of the second calculation method to calculate the second response based on the anonymous key, the first random number, and the second authentication parameter. For example, the calculation of the second response can be expressed as: XRES = f2kc(RAND, N1), where XRES represents the second response (or the second expected response), f2 can be any algorithm or function in the second calculation method, and f2 is the same as or different from f1, RAND is the first random number, and N1 is the second shared key (or second random number).
[0339] After obtaining the first message authentication code and the second response, the core network side device may use the first message authentication code and the second response as authentication vectors.
[0340] Optionally, the authentication vector may also include a second random number and / or an anonymous key. For example, if the second random number is selected or generated by the core network side device, the authentication vector includes the second random number. The authentication vector can be expressed as: AV = RAND||MAC||XRES||AK||N1, where AV is the authentication vector, || represents direct calculation, RAND is the first random number, MAC is the first message authentication code, XRES is the second response, AK is the anonymous key (or the anonymous key can also be expressed as Kc), and N1 is the second random number.
[0341] Optionally, the authentication vector may further include at least one of the second identifier of the second device, the identifier of the first device, the identifier of the core network side device, etc. This embodiment does not exhaustively list all possible contents of the authentication vector.
[0342] As described in the preceding embodiments, the core network side devices may include one or more core network devices (or core network elements), and interaction may occur within the core network side devices. For example, the core network side devices include a first core network device and a second core network device. The first core network device may include a BSF and / or an A-NF, and the second core network device may include at least one of an HSS / HLR, an AUSF, a KMS, and the like. The functions of the first core network device and the second core network device are similar to those in the preceding embodiments and will not be repeated here.
[0343] After completing the above processing, the core network side device sends the above first information to the second device. Correspondingly, the second device receives the first information from the core network side device.
[0344] Here, the core network side device (such as the aforementioned first core network device) can carry the first information in a third message and send it to the second device. The third message can be a 401 message or any NAS message. For example, if the first core network device in the core network side device is a BSF, the third message can be a 401 message. If the first core network device in the core network side device is an N-AF, the third message can be any NAS message.
[0345] Furthermore, after receiving the first information, the second device calculates a second message authentication code based on the first shared key. Specifically, this may include: the second device calculates the second message authentication code based on the first shared key, the first random number, and a first authentication parameter using a first calculation method, wherein the first authentication parameter includes at least one of the second shared key, the second random number, and the third random number.
[0346] The second random number is shared by the second device and the core network side device. And / or, the third random number is configured, or the third random number is shared by the second device and the core network side device. For example, if the third random number is configured, it may mean that the third random number is generated by the core network side device and configured for the second device. In this case, the aforementioned first information may also include the third random number. The description of the relevant information of the third random number is the same as that of the aforementioned embodiment and is not repeated.
[0347] Furthermore, the second device may first calculate an anonymous key, for example, by performing an exclusive-OR calculation based on the first shared key and the third random number to obtain the anonymous key. The method by which the second device calculates the anonymous key should be the same as the method by which the core network-side device calculates the anonymous key, for example, AK' = fk(RAND, N2) or AK' = K⊕N2. In this embodiment, to distinguish the anonymous keys calculated by different devices, the anonymous key obtained by the second device is represented as AK'. In some possible examples, it can also be represented as Kc'. This embodiment does not exhaustively list all possible representations.
[0348] The way in which the second device calculates the second message authentication code should be the same as the way in which the core network side device calculates the first message authentication code. For example, the first authentication parameter includes a second shared key, and the second message authentication code is calculated based on the first shared key, the first random number and the first authentication parameter using the first calculation method, which can be expressed as: MAC'=fkc'(RAND,N1), wherein MAC' represents the second message authentication code, kc is another way of expressing the aforementioned anonymous key, and kc' represents the anonymous key calculated by the second device. The meanings of the remaining parameters in the formula are the same as those in the aforementioned embodiment and are not repeated here. It should be understood that this is only an illustrative explanation. In actual processing, the various ways in which the core network side device calculates the first message authentication code can be used by the second device to calculate the second message authentication code. As long as the core network side device and the second device use the same parameters and the same algorithm or function, they are within the protection scope of this embodiment and are not repeated here.
[0349] If the second message authentication code and the first message authentication code are the same, the second device may determine that the second device has successfully authenticated the core network side device. After the second device determines that the second device has successfully authenticated the core network side device, the method may further include: the second device calculating a first response based on the first shared key, the first response being used by the core network side device to authenticate the second device; and the second device sending second information to the core network side device, the second information including the first response.
[0350] The second device calculates the first response based on the first shared key in the same manner as the aforementioned core network side device calculates the second response, for example, RES = fkc'(RAND, N1), where RES is the first response, kc is another representation of the aforementioned anonymous key, kc' represents the anonymous key calculated by the second device, RAND is the first random number, and N1 is the second random number (or second shared key). As long as the second device calculates the first response using the same parameters and the same algorithm or function as the core network side device calculates the second response, it is within the scope of protection of this embodiment and will not be described in detail here.
[0351] After calculating the first response, the second device can send a second message to the core network device. Accordingly, the core network device receives the second message from the second device, which includes the first response. If the first response and the second response are identical, the core network device determines that authentication of the second device is successful. The process of generating the second response by the core network device has been detailed in the previous embodiment and will not be repeated here.
[0352] Here, when the second device sends the second information, the second information may be carried by any type of NAS message, or may be carried by any type of HTTP request message.
[0353] After the core network side device successfully authenticates the second device, it may also include: the core network side device sends a seventh response message to the first device, and the seventh response message can be any NAS message or any HTTP message (such as a 200OK message).
[0354] Here, the way in which the core network side device obtains identification information is the same as that in the aforementioned embodiment. For example, the identification information is obtained based on the first identification of the second device and the identification of the core network side device; the second intermediate key is calculated based on the anonymous key, and the second identification of the second device is calculated based on the second intermediate key and the identification information is obtained by calculating the second identification with the identification of the core network side device.
[0355] Calculating the second intermediate key based on the anonymous key may refer to calculating the second intermediate key based on the anonymous key and a fourth authentication parameter, wherein the fourth authentication parameter includes at least one of the following: a second shared key, a second random number, a third random number, a second identifier of the second device, and an identifier of the core network side device. Compared to the aforementioned embodiment, the fourth authentication parameter does not require the introduction of the identifier of the first device. Exemplarily, the second intermediate key may be calculated using the anonymous key, the second shared key, the second identifier of the second device, and the identifier of the core network side device, such as Ks=fkc(N1, IDi, BSF ID), where Ks may be the second intermediate key, kc represents the anonymous key, N1 may be the second shared key (or second random number), Idi is the second identifier of the second device, BSF ID is the identifier of the core network side device (e.g., the first core network device is a BSF), and f may be any algorithm or function in the third calculation method. All possible examples are not exhaustive here.
[0356] The second identifier of the second device is calculated based on the second intermediate key and then combined with the identifier of the core network device to obtain identification information. This identification information can be expressed using the following formula: B-KID = fks(IDi) || BSF ID, where B-KID is the identification information, f is any one of the aforementioned third calculation methods (or the first calculation method or the second calculation method), ks is the second intermediate key, and BSF ID is the identifier of the core network device. This differs from the previous embodiment in that the identifier of the first device does not need to be introduced for calculation. The remaining processing is the same as the previous embodiment and is not further described.
[0357] After the second device successfully authenticates the core network side, the second intermediate key can also be calculated based on the anonymous key. The specific calculation method is the same as the method in which the core network side device calculates the second intermediate key, and will not be repeated.
[0358] It should be noted that the seventh response message may also carry the validity period of the second intermediate key. Optionally, the seventh response message may also carry an updated second random number (N1'), which can be used by the second device to update the first identifier (ie, pseudonym).
[0359] The purpose of the second device calculating the second intermediate key may be to perform integrity protection verification based on the second intermediate key; for example, if the core network side device uses the second intermediate key Ks for integrity protection when sending the first response message, then the second response message sent by the first device may be the same as the first response message. At this time, the second device may first perform integrity verification on the second response message based on the second intermediate key when receiving the second response message, and extract identification information from the second response message if the verification is successful. Regarding the way in which the core network side device performs integrity protection on the first response message, it may be to calculate an integrity check code (for example, MIC, Messages Integrity Check) for the first response message based on the second intermediate key, and carry the integrity check code in the first response message; accordingly, the second device may calculate the integrity check code for the received second response message based on the second intermediate key. If the integrity check code is the same as the integrity check code, it is determined that the integrity check is successful.
[0360] 9, taking the second device as a tag, the core network side device includes a first core network network element such as a BSF and / or an A-NF (FIG. 9 represents the first core network element as BSF / A-NF for simplicity), and the core network side device further includes a second core network element, which may include at least one of an HSS, an HLR, an AUSF, and a KMS (FIG. 9 represents the second core network element as HSS / HLR / KMS for simplicity). As an example, the authentication process provided in the aforementioned embodiment (this authentication may also be referred to as Bootstrapping authentication) is described:
[0361] Step 900: A pre-shared root key K exists between the tag and a second network element (HSS / HLR / KMS / AUSF) on the network side; the second network element may be the aforementioned second core network element. The root key is the aforementioned first shared key.
[0362] Step 901. Tag sends an HTTP request to the BSF / A-NF, including DIDi. The HTTP request can also be replaced by any upper-layer protocol carried by the physical layer (PHY), any upper-layer protocol carried by the MAC layer, or any NAS message. This HTTP request is the fifth request message of the aforementioned embodiment. The anonymity processing method can be: DIDi = IDi ⊕ N1.
[0363] Step 902: The BSF / A-NF sends a request for an authentication vector to a second network element in the core network (at least one of the HSS, HLR, and the key management center KMS of the tag).
[0364] Step 903: The second network element (HSS / HLR / KMS) in the core network performs at least one of the following operations: authorization check, deanonymization, selection of RAND (first random number), calculation of MAC (first message authentication code), calculation of XRES (second response), and formation of authentication vector AV.
[0365] Optionally, the subscription credentials of the Tag and UE are queried through the core network element (such as UDM) to determine whether they are entitled to use the A-IoT service; specifically, the subscription credentials of the Tag and UE can be checked through the core network element UDM based on IDi and UE ID.
[0366] Optionally, the de-anonymization process may be calculated using the following formula: IDi=DIDi⊕N1.
[0367] Optionally, Kc (or expressed as AK) is calculated as K⊕N2, where N2 is a third random number.
[0368] Optionally, a first random number RAND is selected, and AK=fkc(RAND, N2) and XRES=fkc(RAND, N1) are calculated. Function f can be functions f1 to f5 defined by 3GPP, or KDF (HMAC-SHA256), or other lightweight functions such as ASCON.
[0369] Step 904: The second network element (HSS / HLR / KMS) in the core network returns the authentication vector AV=RAND||MAC||XRES||Kc||N1 to the BSF / A-NF, which may include Idi.
[0370] Step 905: The BSF / A-NF returns a 401 message to the Tag (the A-NF returns a NAS message), which contains RAND, MAC, and possibly the BSF ID. The 401 message (or NAS message) is the first message in the aforementioned embodiment. RAND and MAC may be the contents of the first message in the aforementioned embodiment.
[0371] Step 906. Tag calculates and verifies MAC. If the verification is successful, it can be determined that the core network side device is successfully authenticated. Then it calculates Kc'=Kr⊕N2, RES=fkc'(RAND, N1), Ks=fkc'(N1, IDi, BSF ID).
[0372] Step 907. Tag sends an HTTP request to BSF / A-NF (or sends an authentication response to A-NF), which includes RES. The HTTP request or authentication response can be any HTTP request or any NAS message carrying the second information in the above embodiments.
[0373] Step 908. The BSF / A-NF verifies RES, for example, by comparing RES with XRES (first response) to verify the tag. After successful tag verification, Ks = fkc(N1, IDi, BSF ID) is calculated to generate identification information, which can be B-TID or B-KID, where B-TID = DIDi || BSF ID or B-KID = fks(IDi) || BSF ID. The B-KID can be used to prevent the B-TID from being propagated on the air interface.
[0374] Step 909: The BSF / A-NF sends a 200OK message to the Tag, which includes the B-TID / B-KID, the validity period of the key Ks, and may include a newly selected second random number N1' for the Tag to update its pseudonym. This message may be integrity-protected, or integrity-and-encrypted, using the key Ks. Here, the 200OK message may be the seventh response message in the aforementioned embodiment.
[0375] In some possible implementations, after the second device completes the above authentication process, the second device may further establish communication with the target service device.
[0376] The second device sends a sixth request message to the target service device, the sixth request message being used to request communication and carrying the identification information. The method further includes: the second device receiving a sixth response message from the target service device, the sixth response message being used to instruct the target service device to obtain the first key. The sixth response message may be a response to the sixth request message.
[0377] In this implementation manner, the second device may calculate the first key by itself. For example, the second device may calculate the first key when determining that the first message authentication code and the second message authentication code are the same.
[0378] The second device calculates the first key based on the first shared key and the identifier of the target service device, including: the second device calculates the first key based on the first shared key, the identifier of the target service device, and a third authentication parameter, wherein the third authentication parameter includes at least one of the following: a second shared key, a second random number, a third random number, a second identifier of the second device, an identifier of the core network side device, an identifier of the first device, and identification information. In this embodiment, the third authentication parameter may not use the identifier of the first device, because this embodiment does not use the first device as a proxy device.
[0379] The second device calculates the first key based on the first shared key, the identifier of the target service device and the third authentication parameter, which may include: the second device calculates an anonymous key based on the first shared key; calculates a second intermediate key based on the anonymous key and the fourth authentication parameter, the fourth authentication parameter includes at least one of the following: a second shared key, a second random number, a third random number, a second identifier of the second device, an identifier of the core network side device, and an identifier of the first device; calculates the first key based on the second intermediate key, the identification information, and the identifier of the target service device. Among them, the third authentication parameter includes the aforementioned fourth authentication parameter, and identification information is added on the basis of the fourth authentication parameter, that is, the third authentication parameter may include at least one of the identification information and / or the fourth authentication parameter. Except that the fourth authentication parameter in this embodiment does not use the identifier of the first device, the description of the fourth authentication parameter is the same as that of the aforementioned embodiment and will not be repeated.
[0380] The manner in which the second device calculates the anonymous key based on the first shared key can be the same as the manner in which the core network side device calculates the anonymous key based on the first shared key in the aforementioned embodiment, and is not described in detail here. The manner in which the second intermediate key is calculated based on the anonymous key and the fourth authentication parameter is the same as that described in the aforementioned embodiment, and is not described in detail here. The manner in which the first key is calculated based on the second intermediate key, the identification information, and the identification of the target service device is the same as that of the aforementioned embodiment, except that the identification of the first device is not used, and the rest of the processing is the same as that of the aforementioned embodiment, and is not described in detail here.
[0381] The second device may calculate the first key before sending the communication request, or the second device may calculate the first key after receiving the sixth response message. This embodiment does not limit the timing of the second device calculating the first key.
[0382] The processing by the target service device may include: the method further includes one of the following: the target service device receives a sixth request message sent by the second device, the sixth request message is used to request communication, and the sixth request message carries the identification information.
[0383] The processing by the target service device further includes: the target service device sending a key request message to the core network side device, the key request message carrying the identification information. The method further includes: the target service device receiving a ninth response message from the core network side device, the ninth response message responding to the key request message, the ninth response message carrying the first key; and the target service device sending a sixth response message to the second device, the sixth response message being used to instruct the target service device to obtain the first key.
[0384] In the processing of the core network side device, the method further includes: the core network side device receiving a key request message from the target service device, the key request message carrying the identification information;
[0385] The method for calculating the first key on the core network side should be the same as that of the second device, and will not be repeated.
[0386] In the processing of the core network side device, the method also includes: the core network side device sends a ninth response message to the target service device, the ninth response message responds to the key request message, the ninth response message carries the first key, and the first key is used for communication between the second device and the target service device.
[0387] It should be noted that the ninth response message may also carry the validity period of the first key. This embodiment does not limit the specific duration of the validity period of the first key.
[0388] By adopting the above solution, both the second device and the target service device can obtain the first key. Furthermore, during communication between the second device and the target service device, the second device can further derive an integrity protection key and an encryption key based on the first key. Alternatively, the target service device and the first device can further calculate a second key based on the first key and the second shared key, and derive an integrity protection key and an encryption key based on the second key. This embodiment does not limit the method for deriving the integrity protection key and the encryption key from the first key, nor does it limit the method for deriving the integrity protection key and the encryption key from the second key.
[0389] In conjunction with Figure 10, taking the second device as a tag (ie, any tag), the target service device as the NAF, and the core network side device as the first core network device BSF as an example, the above communication method is exemplarily described, including:
[0390] Step 1001: The Tag sends a communication request to the NAF, which includes a B-TID or a B-KID; the communication request may be the sixth request message in the aforementioned embodiment.
[0391] Step 1002: The NAF sends a key request to the BSF, which includes the B-TID or B-KID; the key request is the key request message in the aforementioned embodiment.
[0392] Step 1003: The BSF generates a first key Ks_NAF=fks(NAF ID, B-TID / B-KID), and returns a key response to the NAF containing Ks_NAF and the key validity period. This key response is the ninth response message in the aforementioned embodiment.
[0393] Step 1004: The NAF sends a communication response to the tag, which is the aforementioned sixth response message.
[0394] Optionally, step 1005 may also be performed, where the tag sends a response to the NAF to indicate that the first key is generated successfully.
[0395] Tag may generate the first key Ks_NAF before executing step 1001, or may generate the first key Ks_NAF after executing step 1004 and before executing step 1005, which is not limited in this embodiment.
[0396] In some possible implementations, security negotiation may also be performed between the second device and the target service device.
[0397] In the processing of the second device, the method also includes one of the following: the second device reports security capability information to the target service device, and the security capability information is used to indicate one or more security algorithms supported by the second device, or to indicate the target security algorithm specified by the second device; the second device reports the security capability information to the core network side device.
[0398] Correspondingly, in the processing of the target service device, the method also includes one of the following: the target service device receives security capability information from the second device, and the security capability information is used to indicate one or more security algorithms supported by the second device, or to indicate the target security algorithm specified by the second device; the target service device receives the security capability information from the core network side device.
[0399] If the core network side device receives the security capability information, the security capability information of the second device may be further carried in the ninth response message. Correspondingly, the target service device receiving the security capability information from the core network side device may refer to: the target service device receiving the ninth response message from the core network side device, the ninth response message further carrying the security capability information.
[0400] The aforementioned security capability information may be carried in any information and / or message sent by the aforementioned second device to the target service device.
[0401] Optionally, the security capability information may be carried in the fifth request message. Optionally, the security capability information may be sent simultaneously with the second information. For example, the second information may include the security capability information, or the second device may carry the second information and the security capability information as information elements in the same message. Optionally, the security capability information may also be carried in the aforementioned sixth request message. It should be understood that this is merely an exemplary description. In other examples, the security capability information may also be carried by other messages or information, and this embodiment is not exhaustive.
[0402] Optionally, the security capability information may be used to indicate one or more security algorithms supported by the second device. That is, the security capability information may include all security algorithms supported by the second device, or the security capability information may include preferred security algorithms supported by the second device, etc. The description of the security capability information is the same as that in the aforementioned embodiment and is not repeated here.
[0403] In this case, the processing of the target service device may also include: the target service device sends security algorithm indication information to the second device, and the security algorithm indication information is used to indicate the target security algorithm. Correspondingly, the processing of the second device may also include: the second device receives security algorithm indication information from the target service device, and the security algorithm indication information is used to indicate the target security algorithm. The security algorithm indication information may include the name and / or number and / or identifier of the target security algorithm. The description of the security algorithm indication information is the same as that of the aforementioned embodiment and will not be repeated. The way in which the target service device selects the target security algorithm is the same as the way in which the first device selects the target security algorithm in the aforementioned embodiment and will not be repeated.
[0404] Optionally, the security capability information may be used to indicate a target security algorithm specified by the second device.
[0405] In this case, the processing by the target service device may include: if the target service device supports the target security algorithm, directly using the target security algorithm. Furthermore, if the target service device does not support the target security algorithm, sending an indication of a security algorithm negotiation failure to the second device. The indication of a security algorithm negotiation failure may also be included in any information or message sent by the first device to the second device.
[0406] For example, the second device is a tag, and the target service device is a NAF. Reporting of the tag's security capabilities and selected security algorithm: The tag can be carried in the bootstrapping initialization process, in uplink messages for lightweight bootstrapping authentication (e.g., steps 901 and 907 in Figure 9 ), and in communication request messages to the NAF (e.g., step 1001 in Figure 10 ). When the NAF requests a key, the BSF can carry the tag's security capabilities and selected security algorithm and return it to the NAF in a response message, e.g., step 1003 in Figure 10 . After receiving the tag's security capabilities, the NAF selects a supported security algorithm based on its own security capabilities. Alternatively, it checks whether the security algorithm selected by the tag is supported. If not, it selects a supported security algorithm from the tag's security capabilities. Otherwise, the NAF returns a negotiation failure indication. If the security algorithm is successfully determined, the NAF returns the selected security algorithm (i.e., the target security algorithm) based on the tag's security capabilities (anti-price-cutting attack) to the tag. This parameter can be carried in step 1004 in Figure 10 . Alternatively, considering the Tag's lower security and computing capabilities, the Tag may directly report the security algorithms it supports to the network side (i.e., directly specify the target security algorithm).
[0407] In some possible embodiments, the description of the target security algorithm is the same as that of the aforementioned embodiment and is not repeated here.
[0408] Optionally, the second device may directly generate the aforementioned first key after completing authentication.
[0409] After obtaining the first key, the second device may use a subordinate key derived from the first key as an integrity protection key and perform integrity protection on messages sent by the second device. Furthermore, the target service device may perform an integrity check upon receiving a message carrying the second information. For example, if the second device is a tag, after the tag generates the key Ks_NAF, it may enable integrity protection using Ks_NAF or a subordinate key derived from Ks_NAF. In this case, the communication request sent in step 1001 of Figure 10 may include a MIC (Message Integrity Code).
[0410] Before obtaining the first key, the target service device can send the integrity-protected message to the core network side device, and the core network side device will perform integrity verification. In this case, if the integrity-protected message received by the target service device also carries the security capability information of the second device, the target service device can select a target security algorithm and report the security capability information of the second device, the target security algorithm, and the integrity check code to the core network side device at the same time. For example, the target service device (NAF) sends the message sent by the tag and the MIC it carries to the BSF / A-NF to verify the integrity. If the message also carries the security capability of the tag, the target security algorithm is further selected, and the security capability of the tag and the selected target security algorithm are reported to the BSF / A-NF (i.e., the core network side device).
[0411] Alternatively, after receiving the first key, the target service device can also perform an integrity check on the message sent by the second device. For example, after receiving Ks_NAF returned by the BSF (i.e., the core network-side device), the NAF verifies the integrity of the message based on the security algorithm selected by the tag. After successfully verifying the security of any message sent by the second device that carries the integrity check code, integrity protection and encryption protection can be enabled. Accordingly, after receiving a message carrying the integrity check code, if the second device, such as the tag, successfully verifies the integrity, encryption protection can be enabled.
[0412] Optionally, the second device may calculate the first key after receiving the sixth response message.
[0413] After receiving the first key, the target service device may perform integrity protection based on the first key and / or derived lower-level encryption keys and / or integrity protection keys. For example, the target service device may perform integrity protection on the sixth response message, that is, carry an integrity protection code in the sixth response message. Accordingly, after receiving the sixth response message, the second device may calculate the first key, perform integrity verification on the sixth response message based on the first key and / or derived lower-level encryption keys and / or integrity protection keys, and if the verification is successful, the second device may send a response to the target service device. Accordingly, after receiving the response, the target service device determines that the integrity verification is successful and enables encryption protection.
[0414] For example, after receiving Ks_NAF, the NAF generates a lower-level encryption key and integrity protection key based on Ks_NAF, and uses integrity protection for the communication response (e.g., step 1004 in Figure 10 ). After receiving the communication response from the NAF containing the MIC (step 1004 in Figure 10 ), the Tag generates the key Ks_NAF, a lower-level encryption key, and an integrity protection key. It verifies the MIC using the integrity protection key. Upon successful verification, it enables encryption and integrity protection and returns a response message. After receiving the response message, the NAF verifies the integrity and enables encryption protection.
[0415] In some possible implementations, the processing by the second device may include: the second device sending a seventh request message to the target service device, where the seventh request message is used to request authentication, and the seventh request message carries the first identifier of the second device.
[0416] The method also includes: the second device receives an eighth response message from the target service device, the eighth response message is used to indicate that the authentication of the second device is successful, the eighth response message includes identification information, and the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device and the identification of the core network side device.
[0417] In the processing by the target service device, the method further includes: the target service device receiving a seventh request message sent by the second device, the seventh request message is used to request authentication, and the seventh request message carries the first identifier of the second device.
[0418] Furthermore, the method also includes: the target service device sends an eighth request message to the core network side device, the eighth request message is used to request authentication, the eighth request message carries the second identifier and security credentials of the second device, and the security credentials include at least one of the following: a first shared key, related information of the first shared key, and a first intermediate key, the first shared key is shared between the second device and the target service device, and the first intermediate key is obtained based on the first shared key.
[0419] The processing of the core network side device may include: the core network side device receives an eighth request message sent by the target service device, the eighth request message is used to request authentication, the eighth request message carries the second identifier and security credentials of the second device, and the security credentials include at least one of the following: the first shared key, related information of the first shared key, and a first intermediate key, and the first intermediate key is obtained based on the first shared key.
[0420] The seventh request message may carry the same content as the first request message in the aforementioned embodiment, and a repeated description thereof is omitted. The second identifier of the second device, the first identifier of the second device, and the manner in which the second device anonymizes the second identifier are the same as those in the aforementioned embodiment, and are not further described in this embodiment.
[0421] After receiving the seventh request message, the target service device may perform authorization management on the second device. For example, the target service device obtains the second identifier of the second device and checks whether the second device is authorized based on the second identifier of the second device.
[0422] The target service device obtaining the second identifier of the second device may include: the target service device obtaining the first identifier of the second device from the seventh request message, and de-anonymizing the first identifier of the second device to obtain the second identifier of the second device. The de-anonymization process is the same as in the previous embodiment and is not described again.
[0423] The target service device further generates a security certificate. The description of the security certificate is the same as that of the above embodiment and will not be repeated here.
[0424] The eighth request message sent by the target service device may also include authentication type indication information. The authentication type indication information is used to indicate the authentication type corresponding to the second device. The detailed description of the authentication type indication information is the same as that in the previous embodiment and will not be repeated.
[0425] After receiving the eighth request message, the core network side device can determine whether the preset conditions are met based on the subscription credentials of the first device and the subscription credentials of the second device. If the preset conditions are met, the first device and the second device are authorized to use the target service. The specific processing is the same as that in the previous embodiment and is not repeated here.
[0426] Furthermore, if the core network device determines that the first device and the second device are authorized to use the target service, subsequent authentication processing can be performed on the second device. The processing of the core network device can also include at least one of the following: the core network device calculates a first message authentication code based on the first shared key, the first random number, and the first authentication parameter using a first calculation method, wherein the first authentication parameter includes at least one of: a second shared key, a second random number, and a third random number; the core network device calculates the first message authentication code based on the first intermediate key, the first random number, and the first authentication parameter using the first calculation method, wherein the first intermediate key is related to the first shared key; the core network device calculates the second response based on the first shared key, the first random number, and the second authentication parameter using a second calculation method, wherein the second authentication parameter includes at least one of: a second shared key, a second random number, and a third random number; the first calculation method is different from the second calculation method, and / or the first authentication parameter and the second authentication parameter are at least partially different; the core network device calculates the second response based on the first intermediate key, the first random number, and the second authentication parameter using the second calculation method.
[0427] The detailed description of how the core network side device calculates the first message authentication code and calculates the second response is the same as that in the above embodiment and will not be repeated here.
[0428] After the core network side device obtains the first message authentication code and the second response, it can use the first message authentication code and the second response as the authentication vector. The description of the authentication vector is the same as that in the previous embodiment and will not be repeated here.
[0429] After completing the above processing, the core network side device sends the above first information to the second device. Correspondingly, the second device receives the first information from the core network side device.
[0430] Furthermore, after receiving the first information, the second device calculates a second message authentication code based on the first shared key. Specifically, the calculation may include one of the following: the second device calculates the second message authentication code based on the first shared key, the first random number, and the first authentication parameter using a first calculation method, where the first authentication parameter includes at least one of: a second shared key, a second random number, and a third random number; the second device calculates a first intermediate key based on the first shared key, and calculates the second message authentication code based on the first intermediate key, the first random number, and the first authentication parameter using the first calculation method.
[0431] The second random number is shared by the second device and the target service device. In this embodiment, the second random number can be shared by the second device and the core network side device. And / or, the second shared key is shared by the second device and the first device. And / or, the third random number is configured, or the third random number is shared by the second device and the target service device. For example, if the third random number is configured, it may mean that the third random number is generated by the target service device and configured to the second device. In this case, the aforementioned first information may also include relevant information of the third random number and / or the third random number. The description of the relevant information of the third random number is the same as that of the aforementioned embodiment and will not be repeated.
[0432] In this embodiment, the second device calculates the second message authentication code in the same manner as the core network side device calculates the first message authentication code, which will not be described in detail.
[0433] If the second message authentication code and the first message authentication code are the same, the second device may determine that the second device has successfully authenticated the core network side device. After the second device determines that the second device has successfully authenticated the core network side device, the method may further include: the second device calculating a first response based on the first shared key, the first response being used by the core network side device to authenticate the second device; and the second device sending second information to the core network side device, the second information including the first response.
[0434] Among them, the second device calculates the first response based on the first shared key, which may include one of the following: the second device adopts a second calculation method to calculate the first response based on the first shared key, the first random number and the second authentication parameter, wherein the second authentication parameter includes at least one of: a second shared key, a second random number, and a third random number; the first calculation method is different from the second calculation method, and / or the first authentication parameter and the second authentication parameter are at least partially different; the second device calculates a first intermediate key based on the first shared key, and adopts a second calculation method to calculate the first response based on the first intermediate key, the first random number and the second authentication parameter.
[0435] Regarding the difference between the first calculation method and the second calculation method, and / or the difference between the first authentication parameter and the second authentication parameter, which is at least partially different, the description is the same as that in the previous embodiment and is not repeated here. The processing of the second device calculating the first response in this embodiment should also be the same as that of the core network side device and is not repeated here.
[0436] The processing of the second device sending the second information to the core network side device and the core network side device receiving the second information from the second device is the same as that in the above embodiment and will not be repeated here.
[0437] After the core network side device successfully authenticates the second device, the method also includes at least one of the following: the core network side device sends a tenth response message to the target service device, the tenth response message is used to indicate that the authentication of the second device is successful, and the tenth response message carries the identification information and the first key, and the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device and the identification of the core network side device; the first key is used for communication between the second device and the target service device, and / or the first key is used for communication between the first device and the second device, and the first device is used to transmit data between the second device and the target service device.
[0438] Correspondingly, the target service device receives the first key sent by the core network side device, including: the target service device receives the tenth response message from the core network side device, the tenth response message is used to indicate that the authentication of the second device is successful, and the tenth response message carries the identification information and the first key, and the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device and the identification of the core network side device; the first key is used for communication between the second device and the target service device, or the first key is used for communication between the first device and the second device, and the first device is used to transmit data between the second device and the target service device. In this embodiment, the first key is used for communication between the target service device and the second device.
[0439] The manner in which the core network side device obtains the identification information is the same as that in the aforementioned embodiment and will not be described in detail.
[0440] In this embodiment, the second device may calculate the first key itself. For example, the second device may calculate the first key when determining that the first message authentication code and the second message authentication code are the same. Alternatively, the second device may calculate the first key after receiving the eighth response message.
[0441] The second device calculates the first key based on the first shared key and the identifier of the target service device, including: the second device calculates the first key based on the first shared key, the identifier of the target service device and a third authentication parameter, and the third authentication parameter includes at least one of the following: a second shared key, a second random number, a third random number, a second identifier of the second device, an identifier of the core network side device, an identifier of the first device, and identification information.
[0442] Optionally, the process of the second device calculating the first key based on the first shared key, the identifier of the target service device and the third authentication parameter is the same as that in the aforementioned embodiment, except that the identifier of the target service device may be added to the third authentication parameter, and the identifier of the target service device may also be added to the fourth authentication parameter, and the identifier of the first device may not be included in the third authentication parameter and the fourth authentication parameter. The only difference between the fourth authentication parameter and the aforementioned embodiment is that the identifier of the target service device is added and the identifier of the first device is not used. Regarding the specific calculation method, the NAF ID (i.e., the identifier of the target service device) can be added to the formula for calculating the second intermediate key in the aforementioned embodiment, and the identifier of the first device is deleted, such as Ks=fak(N1, N2, IDi, BSF ID, NAF ID), which will not be repeated here. The specific method of calculating the first key is the same as that in the aforementioned embodiment and will not be repeated.
[0443] Optionally, the second device calculates the first key based on the first shared key, the identifier of the target service device and the third authentication parameter, which may include: the second device calculates the first intermediate key based on the first shared key; calculates the second intermediate key based on the first intermediate key and the fourth authentication parameter, the fourth authentication parameter including at least one of the following: the second shared key, the second random number, the third random number, the second identifier of the second device, the identifier of the core network side device, the identifier of the first device, and the identifier of the target service device; calculates the first key based on the second intermediate key, the identification information, and the identifier of the target service device.
[0444] The manner in which the second device calculates the first intermediate key based on the first shared key may be the same as the manner in which the target service device calculates the first intermediate key based on the first shared key in the aforementioned embodiment, and details thereof will not be repeated.
[0445] A possible example of calculating the second intermediate key based on the first intermediate key and the fourth authentication parameter is: the second intermediate key can be calculated using the first intermediate key, the second shared key, the third random number, the second identifier of the second device, the identifier of the core network side device, and the identifier of the target service device, such as Ks=fkb(N1, N2, IDi, BSF ID, NAF ID), where Ks can be the second intermediate key, kb represents the first intermediate key, N1 can be the second shared key, N2 is the third random number, Idi is the second identifier of the second device, BSF ID is the identifier of the core network side device (for example, the first core network device is BSF), f can be any algorithm or function in the third calculation method, and NAF ID is the identifier of the target service device. Calculating the first key based on the second intermediate key, the identification information, and the identifier of the target service device may include: using the first calculation method to calculate the first key based on the second intermediate key, the identification information, and the identifier of the target service device. For example, the following formula can be used: Ks_NAF=fks(NAF ID, B-TID), where Ks_NAF represents the first key, f can be any algorithm or function in the first calculation method, Ks is the second intermediate key, NAF ID is the identifier of the target service device, and B-TID is identification information. The B-TID can also be replaced with B-KID. The method for obtaining the identification information is the same as that in the previous embodiment and is not repeated here.
[0446] The way in which the core network side device calculates the first key should also be the same as the way in which the aforementioned second device calculates the first key. The difference may be that the core network side device does not need to calculate the first intermediate key, and can directly execute the aforementioned calculation of the second intermediate key based on the first intermediate key and the fourth authentication parameter, and the calculation of the first key based on the second intermediate key, the identification information, and the identification of the target service device. The remaining processing is the same as the aforementioned second device, so it will not be repeated.
[0447] It should be noted that the eighth response message may also carry the validity period of the first key. The eighth response message may also include the updated second random number, and the eighth response message may also carry a message integrity check code (or integrity verification code, or integrity protection code). The integrity check code may be obtained based on a subordinate key further derived from the first key, and the examples are not exhaustive here.
[0448] It should also be noted that in a possible example, the second intermediate key can be directly used as the first key, such as Ks_NAF=Ks.
[0449] The second device can also calculate the lower-level key based on the first key to calculate the integrity protection key and the encryption key, etc., which will not be described in detail.
[0450] In conjunction with Figure 11, the second device is used as a tag, the core network side device includes a first core network element such as a BSF and / or an A-NF (Figure 11 represents the first core network element as a BSF for simplicity), and the core network side device further includes a second core network element. The second core network element may include at least one of an HSS, an HLR, and a KMS (Figure 11 represents the second core network element as HSS / HLR / KMS for simplicity), and the target service device is a NAF. For example, the communication method provided in the aforementioned embodiment is described:
[0451] Step 1100: The Tag and the A-IoT application server NAF (or AF) pre-share a root key K; the root key is the aforementioned first shared key.
[0452] Step 1101: The Tag sends a request message (authentication request or communication request) to the NAF (the proxy can be a UE, IAB node, or access network device; this example uses a UE as the proxy). The request message contains the anonymized Tag's identity DIDi. This request message is the seventh request message in the aforementioned embodiment. N1 is a random number pre-shared between the Tag and the NAF. After establishing the Tag's security context, the NAF can send a new random number to the Tag to update the pseudonym DIDi. The pseudonym is generated using the formula: DIDi = IDi ⊕ N1.
[0453] In step 1102, the NAF performs at least one of the following processes: deanonymization, authorization check, whitelist management, and calculation of Kb (ie, the aforementioned first intermediate key).
[0454] Optionally, the NAF de-anonymizes N1 according to IDi=DIDi⊕N1 or IDi=fn1(DIDi), and checks whether the tag is authorized. If authorized, the NAF can manage the whitelist of tags.
[0455] In step 1103, the NAF provides security credentials to the BSF. Specifically, it may provide the root key K, or K||N1, or K||N1||N2, or K||N2; or the processed key Kb, or Kb||N2 (Kb=K⊕N1), or Kb||N1 (Kb=K⊕N2). N2 (the third random number) may be a tag shared with the NAF or selected by the NAF. Here, the security credentials may be carried in the eighth request message sent to the BSF in the aforementioned embodiment. This message may include an identifier indicating the authentication type, which may be based on the NAF ID, the type based on IDi, or the authentication type Auth_type_ID.
[0456] Step 1104: BSF requests an authentication vector from HSS / HLR / KMS (or AUSF). The authentication request sent includes NAF ID, IDi, security credentials from NAF, and an identifier that can indicate the authentication type.
[0457] Step 1105. HSS / HLR / KMS (or AUSF) performs at least one of the following operations: authorization check, calculation of MAC, XRES, and formation of authentication vector AV.
[0458] Optionally, the subscription credentials of the Tag and UE can be queried through the core network element (such as UDM), and the subscription credentials of the Tag and UE can be checked based on IDi and UE ID to determine whether they are entitled to use the A-IoT service.
[0459] Optionally, the authentication type confirmation may be: determining that the authentication type is A-IoT authentication based on an identifier that can indicate the authentication type.
[0460] Optionally, calculate the authentication vector: if the root key K or K||N1 or K||N1||N2 is received, select the random number RAND, calculate AK=fk(RAND) or AK=K⊕N1, MAC / XRES=fk(RAND,N1,N2), then AV=RAND||AK||MAC||XRES; if Kb or Kb||N1 / N2 is received, MAC / XRES=fkb(RAND) or fkb(RAND,N1 / N2), AV=RAND||MAC||XRES; where the function f can be the functions f1 to f5 defined by 3GPP, or KDF (HMAC-SHA256), or other lightweight functions.
[0461] Step 1106: HSS / HLR / KMS returns an authentication vector AV to BSF. The authentication vector may include IDi, BSF ID, and NAF ID.
[0462] Step 1107. BSF performs lightweight bootstrapping authentication with the Tag and forwards the corresponding authentication message through the proxy.
[0463] This step may include: the BSF returns an authentication response to the Tag, which includes RAND, MAC, and may include AK⊕N2 or Kb⊕N2 (only applicable when N2 is selected by the NAF and N2 is securely delivered), and may include the BSF ID; the Tag verifies the network side by calculating and verifying the MAC. After successful verification, RES is calculated, and Ks = fak(N1, N2, IDi, BSF ID, NAF ID); the Tag sends a response message to the BSF, which includes RES; the BSF verifies the Tag based on the RES and XRES. After successful verification, Ks = fak / kb(N1, N2, IDi, BSF ID, NAF ID) is calculated, and B-TID = DIDi||BSF ID or B-KID = fks(IDi)||BSF ID is generated to prevent the B-TID from being spread on the air interface.
[0464] Step 1108: The BSF provides the NAF with Ks_NAF=fks(NAF ID, IDi, B-TID / B-KID) (or Ks_NAF=Ks), the key validity period, and possibly a newly selected random number N1' for the tag to update the pseudonym. That is, the BSF sends the tenth response message to the NAF.
[0465] Step 1109: The NAF returns a success response to the Tag, which includes the B-TID or B-KID, the key validity period, and may include a newly selected random number N1' and a message integrity check code MIC (the message may be integrity-protected, or integrity-protected and encrypted, using the keys Ks_NAF, Ku1, and derived lower-level keys). The success response may be the eighth response message of the aforementioned embodiment.
[0466] Through the above process, a shared key (such as the aforementioned first key) can be generated for the second device and the target service device. In layer 3, there may only be a security context between the target service device and the second device; the target service device and the second device can obtain the shared first key. For the L2 situation, there may be both a security context between the target service device and the second device and a NAS / AS security context for the second device. Regarding the process of establishing a NAS / AS security context for the second device, after the second device has gone through the solution provided in the aforementioned embodiment, the core network side device and the second device can both obtain the second intermediate key Ks, and the second intermediate key can be used as a shared key. The core network side device can derive a NAS security context based on the second intermediate key. The establishment of the NAS security context can refer to the 5G security mechanism, which is not exhaustive in this embodiment. The core network side device can also provide the second intermediate key to the access network device for the access network device to derive the AS security context.
[0467] For example, the second device is a tag. The core network-side devices specifically include a first core network device and a third core network device. The first core network device can be a BSF, and the third core network device can be an AMF. The BSF and the tag generate a shared second intermediate key Ks. The BSF provides the key Ks to the AMF for deriving a NAS security context. Here, the NAS security context can refer to the existing 5G security mechanism, that is, Ks = Kamf, to derive Knas-int (i.e., the NAS integrity protection key) and Knas-enc (i.e., the NAS encryption key (or security key)). For another example, the access network device is specifically a base station (such as a gNB). The BSF provides the key Ks to the gNB for deriving an AS security context. Here, the AS security context can refer to the existing 5G security mechanism, that is, Ks = Kgnb. The gNB then derives subordinate keys based on Kgnb.
[0468] In some possible implementations, security negotiation may also be performed between the second device and the target service device.
[0469] The processing by the second device may further include: the second device reporting security capability information to the target service device. Accordingly, in the processing by the target service device, the method may further include one of the following: the target service device receiving security capability information from the second device, the security capability information being used to indicate one or more security algorithms supported by the second device, or being used to indicate a target security algorithm specified by the second device; or the target service device receiving the security capability information from the core network side device.
[0470] If the core network side device receives the security capability information, the security capability information of the second device may be further carried in the ninth response message. Correspondingly, the target service device receiving the security capability information from the core network side device may refer to: the target service device receiving the ninth response message from the core network side device, the ninth response message further carrying the security capability information.
[0471] The aforementioned security capability information may be carried in any information and / or message sent by the aforementioned second device to the target service device.
[0472] Optionally, the security capability information may be carried in the seventh request message. Optionally, the security capability information may be sent simultaneously with the second information. For example, the second information may include the security capability information, or the second device may carry the second information and the security capability information as information elements in the same message. It should be understood that this is merely an example, and in other examples, the security capability information may also be carried by other messages or information, and this embodiment is not exhaustive.
[0473] The above-mentioned security capability information can be used to indicate one or more security algorithms supported by the second device, that is, the security capability information can include all security algorithms supported by the second device, or the security capability information can include the preferred security algorithm supported by the second device, etc. The description of the security capability information is the same as that in the aforementioned embodiment and will not be repeated. In this case, the processing of the target service device may also include: the target service device sends security algorithm indication information to the second device, and the security algorithm indication information is used to indicate the target security algorithm. Correspondingly, the processing of the second device may also include: the second device receives security algorithm indication information from the target service device, and the security algorithm indication information is used to indicate the target security algorithm. The way in which the target service device selects the target security algorithm and the description of the target security algorithm are the same as those in the aforementioned embodiment and will not be repeated.
[0474] Optionally, the security capability information may be used to indicate a target security algorithm specified by the second device. In this case, the processing by the target service device may include: if the target service device supports the target security algorithm, directly using the target security algorithm. Furthermore, if the target service device does not support the target security algorithm, sending an indication of a security algorithm negotiation failure to the second device. The indication of a security algorithm negotiation failure may also be included in any information or message sent by the first device to the second device.
[0475] For example, the second device is a tag, and the target service device is a NAF. Reporting of the tag's security capabilities and the selected security algorithm: The tag can be carried in the uplink message of the Bootstrapping initial process and the lightweight Bootstrapping authentication. After receiving the tag's security capabilities, the NAF selects a supported security algorithm based on its own security capabilities; or checks whether it can be supported based on the security algorithm selected by the tag. If it cannot be supported, it selects a supported security algorithm from the tag's security capabilities; otherwise, the NAF will return an indication of negotiation failure. If the security algorithm is successfully determined, the NAF returns the selected security algorithm (i.e., the target security algorithm) based on the tag's security capabilities (anti-price reduction attacks) to the tag; this parameter can be carried in any of the downlink messages in the authentication process, authentication feedback to the tag, and communication responses. Or, considering the tag's lower security and computing capabilities, the tag may directly report its supported security algorithms to the network side (i.e., directly specify the target security algorithm).
[0476] In some possible embodiments, the target security algorithm is available to both the second device and the target service device. The relevant description of each device using the target security algorithm is the same as that in the above embodiment and is not repeated here.
[0477] For example, the second device is a tag. After completing the authentication, the tag directly generates Ks_NAF, and the subordinate key derived from Ks_NAF can be used to enable integrity protection. The target service device sends the message sent by the second device and the MIC it carries to the BSF / A-NF to verify the integrity. If the message also carries the tag's security capabilities, the target service device can further select a target security algorithm and report the tag's security capabilities and the selected target security algorithm to the BSF / A-NF (i.e., the core network side device). Alternatively, after receiving the key Ks_NAF (first key) returned by the BSF (i.e., the core network side device), the target service device verifies the integrity of the message according to the security algorithm selected by the tag. After the security check of any message carrying the integrity check code is successful, integrity protection and encryption protection can be enabled. Correspondingly, after the tag receives the message carrying the integrity check code and the integrity check is successful, encryption protection can be enabled.
[0478] For example, after receiving the eighth response message (step 1109 of Figure 11), the tag can calculate Ks_NAF, generate a lower-level encryption key and integrity protection key based on Ks_NAF, and respond with integrity protection authentication success. After receiving a communication response containing the MIC from the target service device, the tag generates the key Ks_NAF or Ku1, as well as the lower-level encryption key and integrity protection key, verifies the MIC using the integrity protection key, and after successful verification, enables encryption and integrity protection, and returns a response message to the target service device. After receiving the response message, the target service device successfully checks the integrity and can then enable encryption protection.
[0479] In conjunction with Figure 12, the first device is represented as a proxy (including any one of a UE, an IAB node, and a base station), the second device is tagi, the core network side device includes a first network element such as a BSF, an A-NF, and a NAF, and the core network side device also includes a second core network element. The second network element may include at least one of an HSS, a KMS, and an AUSF. In addition, the core network side device also illustrates an NEF network element. The aforementioned various communication methods provided in this embodiment are exemplified. First, according to the zero-power architecture or the different Tag protocol stack designs, they are divided into the following two categories:
[0480] Indirect Mode: The tag does not have to support the application layer protocol. The tag is connected to the first network element (BSF, A-NF, NAF / AF) through a proxy. The proxy helps forward the authentication information. The proxy may be a UE or an IAB node. Alternatively, the tag is directly connected to the base station and accesses the network through the base station for authentication and key negotiation. The proxy or base station can help the tag connect to the first network element, which is carried on the proxy's HTTP message or NAS message. Direct Mode: The tag supports the application layer protocol (HTTP protocol), or the tag can use the MAC layer or PHY layer to support the functions of the upper layer protocol (such as the application layer), thereby supporting the application layer protocol function (HTTP protocol). The tag also needs to pre-store the token "3gpp-gba-tmpi" for accessing the BSF. The tag connects to the BSF or NAF through the application layer protocol.
[0481] Different connection modes of the tag may include different embodiments: (1) Using 3GPP security credentials, Kr is used for authentication. That is, the root key Kr is shared between the tag and the authentication and authorization network element (such as the second network element HSS / HLR, KMS, AUSF in Figure 12). In addition, the authentication and authentication network element needs to manage authorization (based on subscription credentials) and may store authentication results (timestamp of tag authentication, tag ID, tag authentication method, tag security context identifier). (2) Using security credentials provided by a third-party application server, that is, non-3GPP security credentials, the tag shares the root key Kb with the AF / NAF (first network element). The NAF needs to perform authorization management (based on the application layer). In scenarios involving proxy UEs, it is necessary to manage the mapping between the UE and the tag and provide the security credentials Kb to the authentication and authentication network element. (3) The key between the tag and the agent or base station can be used upward (anonymously) or downward (mobility management). The key N1 (which may be a physical layer key or a pre-shared symmetric key) has three uses: used to protect the tag's identity in the tag's uplink message; used for authentication and key negotiation: the network side calculates the authentication vector and shared key Ks; used for mobility management: based on Ks and N1, a key is generated between the tag and the agent / base station. When a tag subsequently uses another agent or base station to access the network, the network side can skip the authentication and key negotiation process and directly generate the key based on the tag's authentication result.
[0482] The following important parameters are used in the tag authentication and key negotiation process: the root key K (or Kr, Kb, etc. as shown in Figure 12 ) may be the security credential between the tag and the authentication and authorization network element, or between the tag and a third-party application server;
[0483] N1: It may be a random number pre-shared between the tag and the authentication and authorization network element or a third-party application server, or a key between the tag and the agent / base station;
[0484] N2: It may be a random number pre-shared between the tag and the authentication and authorization network element or a third-party application server, or it may be a random number selected by the authentication and authorization network element or a third-party application server (in this case, N2 needs to be securely delivered to the tag)
[0485] In scenarios where relay nodes exist, different implementations of key structures and mobility management methods exist for different relay types: If the relay node is a Layer 2 relay (i.e., when a relay is used to transmit messages, only the Layer 2 protocol stack is used, and the tag has a separate context with the core network), the tag has both hop-by-hop and end-to-end secure connections with the network. If the relay node is a Layer 3 relay (i.e., when a relay is used to transmit messages, the relay uses the Layer 3 protocol stack), the tag only needs to establish a secure connection with the relay.
[0486] Figure 12 further illustrates the following processing steps: Step 1201: Tagi sends an authentication request (carrying DIDi) to the proxy node; Step 1202: The proxy node sends an authentication request to the first network element; Step 1203: The first network element provides security credentials, performs authorization management, and performs ID mapping; Step 1204: The first network element sends an authentication request to the second network element; Step 1205: The second network element determines the authorization and authentication type based on the ID and calculates the authentication vector; Step 1206: The second network element and Tagi perform authentication and key negotiation. The detailed processing of each of the above steps can correspond to at least one of the aforementioned embodiments and will not be repeated here.
[0487] In some possible implementations, the first device and the second device will also be authenticated. In the above embodiment where the first device (such as UE) is required to act as an agent, in order to prevent a malicious Tag (i.e., the second device) from using the first device (such as UE) to launch a DDOS attack on the network, affecting the network quality, or a malicious first device (such as UE) from launching a man-in-the-middle attack, stealing the communication data between the Tag (i.e., the second device) and the network, or a third-party application, or the authentication signaling of the Tag (i.e., the second device) is carried on a malicious UE, resulting in failure to successfully authenticate and negotiate keys, the first device and the second device need to be authenticated in advance. Among them, taking the first device as a UE and the second device as a tag as an example, the authentication method includes at least one of the following: pairing, UE activation of the Tag, PUF, and physical layer authentication.
[0488] The length of any key provided above in this embodiment is not limited. In addition, other parameters may be introduced in the generation process of any key, such as number (FC), parameter length, etc., which are not exhaustively listed here.
[0489] Finally, let’s explain it in combination with related technologies:
[0490] The base station and the zero-power terminal communicate directly: the base station provides the zero-power terminal with a wireless power supply signal and a trigger signal. The wireless power supply signal is used to provide energy to the zero-power terminal; the trigger signal can carry control information for the zero-power terminal. The zero-power terminal transmits this information to the base station via backscatter.
[0491] Hybrid zero-power communication system based on cellular and sidelink communication: In the actual deployment of zero-power systems, zero-power communication systems based on cellular and sidelink communication can coexist or be used in combination flexibly to match more potential application scenarios. For example, as shown in Figure 13, Case 1 is zero-power communication triggered by intelligent terminal auxiliary power supply. The zero-power terminal is powered and triggered by an intelligent terminal in the network, and the backscattered signal of the zero-power terminal is received by the base station. The power supply and triggering operations of the intelligent terminal can be controlled by the base station through air interface signaling. Case 2 is zero-power sidelink communication powered / triggered by the network. The base station provides wireless power and sends trigger signaling to the zero-power terminal. The backscattered signal of the zero-power terminal is received by the intelligent terminal, completing the sidelink communication. Furthermore, the intelligent terminal sends air interface data to the base station. Case 3 is zero-power communication with intelligent terminal auxiliary power supply. The intelligent terminal in the network provides auxiliary power to the zero-power terminal. The base station sends trigger information to the zero-power terminal and receives the backscattered signal of the zero-power terminal. The base station can control the process of the smart terminal assisting the zero-power terminal with power supply via air interface signaling. In Case 4, a network-controlled zero-power sidelink communication smart terminal receives air interface signaling and data from the network. The smart terminal provides power and triggers the zero-power terminal and receives the backscattered signal from the zero-power terminal, completing the sidelink communication.
[0492] GBA (Generic Bootstrapping Architecture): When a UE needs to communicate with the NAF, it first makes a GBA request. The UE then executes the GBA mechanism (General Bootstrapping Architecture) with the BSF server (Bootstrapping Server Function) to calculate a session key. Upon successful communication, the UE re-initiates a communication request to the NAF. The NAF connects to the BSF for authentication. The NAF and UE then communicate securely using keys derived from Ks. As shown in Figure 14, the UE initiates a request to the NAF, which then controls the UE to initiate bootstrapping. The BSF and HSS enable secure communication. The BSF, through contact with the HSS / HLR, performs the AKA authentication process with the UE. After authentication is complete, the CK and IK generated by the AKA mechanism are concatenated to form a shared key. The UE uses the B-TID assigned by the BSF and the negotiated Ks to initiate an application request to the NAF. The NAF then initiates an authentication request to the BSF. After the BSF successfully authenticates the UE, it derives the session key for communication on the Ua interface and sends it to the NAF. The NAF then securely communicates with the UE. For example, as shown in Figure 15: In step 1, the UE sends a request to the BSF (carrying the user ID), and then in step 2, the BSF retrieves the AV and user profile from the HSS'HLR (or in step 2', the BSF retrieves the AV), in step 3, the BSF returns a 401 message to the UE (carrying the RAND random number and the AUTN authentication parameter), in step 4, the UE executes the AKA algorithm, verifies the AUTN, and generates a session key, in step 5, the UE requests authorization from the BSF (carrying RES), in step 6, the BSF verifies the RES, in step 7, the BSF calculates Ks = CK||K, in step 8, the BSF returns a 200ok message to the UE, which carries the B-TID and the key validity period, and in step 9, the UE calculates Ks = CK||K. As further shown in Figure 16, the UE and NAF communicate through the Ua interface, and the NAF communicates through the Zn interface. Specifically: after the UE and BSF obtain the B-TID and Ks, the UE generates Ks-NAF based on Ks. In step 1, the UE sends a request to the NAF (carrying B-TID and Msg), where Msg is a specific data set included in the request; in step 2, the NAF sends an authentication request to the BSF (carrying B-TID and NAF id); in step 3, the BSF sends a verification response to the NAF (carrying Ns_NAF, Prof, boot time and key validity period), where Prof is a specific part of the user profile used for the request. The NAF stores Ns_NAF, Prof, boot time and key validity period, and then executes step 4 for the NAF to send a request response to the UE.In addition, as shown in FIG16 , the UE and NAF communicate via the Ua interface, and the NAF and BSF communicate via the Zn interface.
[0493] Figure 17 shows the derived key architecture for NAS and AS security contexts. In the HPLMN, the UDM / ARPF and the UE's USIM derive CK and IK from K (root key). Furthermore, the UDM / ARPF derives KAUSF from CK and IK through the 5G AKA procedure. In the ME, CK' and IK' are derived from CK and IK through the EAP-AKA' procedure, further deriving KAUSF. In the serving network, the SEAF and the UE's ME derive KSEAF from KAUSF. For the NAS security context, the AMF and ME derive KAMf from KSEAF, resulting in the derived lower-level keys Knasint and Knasenc, along with their corresponding key identifiers. For the AS security context, the gNB and the UE's ME derive KgNB and NH from KAMf, respectively, to obtain the derived lower-level keys Krrcint, Krrcenc, Kupint, and Kupenc, along with their corresponding key identifiers. In addition, as shown in FIG17 , the ME of the UE and the N3IWF of the service network will also derive KN3IWF based on Kamf.
[0494] Derivation of confidentiality and integrity protection keys: When using superior keys to derive confidentiality and integrity protection keys for secure communication, the calculation method is as follows: When deriving NAS integrity and NAS encryption algorithm keys from the AMF and UE key Kamf, or when deriving encryption and integrity keys from the gNB and UE key KgNB, the input parameters are as follows: FC = 0x69, P0 = algorithm type distinguisher, L0 = length of algorithm type distinguisher (i.e., 0x00 0x01), P1 = algorithm identity, L1 = length of algorithm identity (i.e., 0x00 0x01). The input algorithm type distinguisher value varies depending on the key generated and is not exhaustive. The input algorithm identity value varies depending on the algorithm used. Encryption algorithms include NIA1, NIA2, and NIA3, and integrity algorithms include EIA1, EIA2, and EIA3.
[0495] Through the above-mentioned related technologies, it can be seen that the security standards for BEST, MTC, and NB-IoT for the Internet of Things are based on authentication and key agreement mechanisms such as AKA, GBA, and AKMA. Such existing technologies are not suitable for zero-power devices and have the disadvantages of high complexity in key architecture, interaction process, and security calculation. For application scenarios with mixed cellular and sideline communications, the existing relay communication U2N relay security is not suitable for zero-power devices because it has the disadvantages of PC5 security, U2N relay security key architecture, interaction process, and high complexity in security calculation. The existing ISO RFID security standard and TRAIS security standard only support authentication and key agreement between tags and readers, but not between tags and the network. Based on the characteristics of zero-power devices being battery-free, ultra-low power consumption, extremely small size, and low cost, this embodiment designs authentication and key agreement mechanisms for zero-power device tags for different zero-power device communication systems (cellular-based zero-power communication systems and zero-power communication systems based on a mixture of cellular and sideline communications) to support mutual authentication between tags and the network, and secure data transmission between tags and the network, application service providers, and proxy nodes. This solution can reduce security computing overhead and signaling interactions, ensuring authentication of zero-power devices and establishment of secure communications without compromising security. This embodiment provides a lightweight authentication and key negotiation mechanism for devices in different zero-power communication systems. It supports mutual authentication between zero-power devices and the network, security negotiation and security mode commands between zero-power devices and the network, and secure data transmission between zero-power devices and the network, application service providers, and UEs.
[0496] It can be seen that by adopting the above scheme, the message authentication code from the core network side can be sent to the second device through the first device, so that the second device authenticates the core network side device, and the first message authentication code is generated based on the shared key of the second device, and then the first device can obtain the first key, which is used for communication between the first device and the second device when the first device acts as a relay or proxy device. In this way, the second device can obtain authentication-related information on the network side through the first device and obtain the key used for communication between the first device and the second device, so as to realize data transmission between the second device and the target service device through the first device. Moreover, in the above scheme, since the first message authentication code is generated based on the shared key of the second device, the second device only needs to use the shared key to achieve authentication, which reduces the process complexity of the second device and is particularly suitable for devices with lower capabilities.
[0497] FIG18 is a schematic diagram of the composition structure of a first device according to an embodiment of the present application, including:
[0498] The first communication unit 1801 is used to send first information from a core network side device to a second device, where the first information includes a first message authentication code, where the first message authentication code is related to a first shared key, where the first shared key is shared between the second device and the core network side device and / or the target service device, and where the first message authentication code is used by the second device to authenticate the core network side device; and receive a first key from the core network side device, where the first key is used for communication between the first device and the second device, and the first device is used to transmit data between the second device and the target service device.
[0499] The first communication unit is configured to send second information from the second device to the core network side device, where the second information includes a first response, and the first response is used by the core network side device to authenticate the second device.
[0500] The first communication unit is configured to receive a first request message from the second device, where the first request message is used to request authentication and carries a first identifier of the second device.
[0501] The first communication unit is used to send a second request message to the core network side device, where the second request message is used to request authentication, and the second request message carries the first identifier of the second device and / or the second identifier of the second device.
[0502] The first communication unit is used to receive a first response message from the core network side device, where the first response message is used to indicate that the authentication of the second device is successful. The first response message carries identification information, and the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device, and the identification of the core network side device.
[0503] The first communication unit is used to forward the third request message sent by the second device to the target service device, where the third request message is used to request communication and carries identification information; receive a second response message from the core network side device, where the second response message carries the first key; and send a third response message to the second device, where the third response message is used to instruct the target service device to obtain the first key.
[0504] The first communication unit is configured to send a fourth request message to the target service device, wherein the fourth request message is used to request authentication, and the fourth request message carries the first identifier of the second device and / or the second identifier of the second device.
[0505] The first communication unit is used to receive a fourth response message from the core network side device, where the fourth response message is used to indicate that the authentication of the second device is successful, and the fourth response message carries identification information and the first key, and the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device and the identification of the core network side device.
[0506] The first communication unit is configured to send a fifth response message to the second device, where the fifth response message is used to indicate that authentication of the second device is successful, and the fifth response message carries the identification information.
[0507] The first communication unit is used to receive security capability information from the second device, where the security capability information is used to indicate one or more security algorithms supported by the second device, or to indicate a target security algorithm specified by the second device.
[0508] The first communication unit is configured to send security algorithm indication information to the second device, where the security algorithm indication information is used to indicate a target security algorithm.
[0509] The second device is one of the following: an environment-enabled Internet of Things A-IoT device, a zero-power device; the first device includes at least one of the following: a first terminal device, a first access network device; the core network side device includes at least one of the following: a bootstrapping service function BSF, an A-IoT network element, a home subscription system HSS, a home location register HLR, a key management service KMS, and an authentication server function AUSF.
[0510] FIG19 is a schematic diagram of the structure of a second device according to an embodiment of the present application, including:
[0511] A second communication unit 1901 is configured to receive first information from a core network side device, where the first information includes a first message authentication code, where the first message authentication code is associated with a first shared key, and the first shared key is shared between the second device and the core network side device and / or the target service device;
[0512] The second processing unit 1902 is used to calculate a second message authentication code based on the first shared key; when the second message authentication code is the same as the first message authentication code, calculate a first key based on the first shared key and the identifier of the target service device, and the first key is used for communication between the second device and the target service device and / or the first device.
[0513] The second processing unit is configured to calculate a first response based on the first shared key, where the first response is used by the core network side device to authenticate the second device;
[0514] The second communication unit is used to send second information to the core network side device, where the second information includes the first response.
[0515] The first information also includes a first random number; the second processing unit is used to calculate a second message authentication code based on the first shared key, the first random number and the first authentication parameter using a first calculation method, wherein the first authentication parameter includes at least one of: a second shared key, a second random number, and a third random number; calculate a first intermediate key based on the first shared key, and calculate the second message authentication code based on the first intermediate key, the first random number and the first authentication parameter using the first calculation method.
[0516] The second processing unit is used to perform one of the following: using a second calculation method to calculate a first response based on the first shared key, the first random number and the second authentication parameter, wherein the second authentication parameter includes at least one of: a second shared key, a second random number, and a third random number; the first calculation method is different from the second calculation method, and / or the first authentication parameter and the second authentication parameter are at least partially different; calculating a first intermediate key based on the first shared key, and using the second calculation method to calculate the first response based on the first intermediate key, the first random number and the second authentication parameter.
[0517] The second processing unit is used to calculate the first key based on the first shared key, the identifier of the target service device and the third authentication parameter, and the third authentication parameter includes at least one of the following: a second shared key, a second random number, a third random number, a second identifier of the second device, an identifier of the core network side device, an identifier of the first device, and identification information.
[0518] The second communication unit is configured to send a first request message to the first device, where the first request message is used to request authentication, and the first request message carries a first identifier of the second device.
[0519] The second communication unit is configured to receive the first information from the core network side device through the first device; and / or send the second information to the core network side device through the first device.
[0520] The second communication unit is used to receive a fifth response message from the first device, where the fifth response message is used to indicate that the authentication of the second device is successful. The fifth response message carries the identification information, and the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device, and the identification of the core network side device.
[0521] The second communication unit is configured to send a third request message to the target service device through the first device, where the third request message is used to request communication and carries the identification information.
[0522] The second communication unit is used to perform at least one of the following: receiving a third response message from the first device, the third response message being used to instruct the target service device to obtain the first key; receiving a sixth response message from the target service device, the sixth response message being used to instruct the target service device to obtain the first key.
[0523] The second communication unit is used to send security capability information to the first device, where the security capability information is used to indicate one or more security algorithms supported by the second device, or to indicate a target security algorithm specified by the second device.
[0524] The second communication unit is configured to receive security algorithm indication information from the first device, where the security algorithm indication information is used to indicate a target security algorithm.
[0525] The second communication unit is used to send a fifth request message to the core network side device, where the fifth request message is used to request authentication and carries the first identifier of the second device; and receive a seventh response message from the core network side device, where the seventh response message is used to indicate that the authentication of the second device is successful and carries the identifier information, where the identifier information is related to at least one of the following: the second identifier of the second device, the first identifier of the second device and the identifier of the core network side device.
[0526] The second communication unit is configured to send a sixth request message to the target service device, the sixth request message being used to request communication and carrying the identification information; and receive a sixth response message from the target service device, the sixth response message being used to instruct the target service device to obtain the first key.
[0527] The second communication unit is used to send a seventh request message to the target service device, where the seventh request message is used to request authentication and carries the first identifier of the second device; and receive an eighth response message from the target service device, where the eighth response message is used to indicate that authentication of the second device is successful and the eighth response message includes identifier information, where the identifier information is related to at least one of the following: the second identifier of the second device, the first identifier of the second device and the identifier of the core network side device.
[0528] The second communication unit is used to perform one of the following: reporting security capability information to the target service device, where the security capability information is used to indicate one or more security algorithms supported by the second device, or to indicate a target security algorithm specified by the second device; reporting the security capability information to the core network side device.
[0529] The second communication unit is configured to receive security algorithm indication information from the target service device, where the security algorithm indication information is used to indicate a target security algorithm.
[0530] The target security algorithm includes a target integrity protection algorithm and / or a target encryption algorithm. The target integrity protection algorithm is used by the second device to calculate the integrity protection code of a message sent based on the integrity protection key and / or to verify the integrity of a message received based on the integrity protection key. The target encryption algorithm is used by the second device to encrypt data sent based on the encryption key and / or to decrypt data received based on the encryption key. The integrity protection key is related to the first key, and the encryption key is related to the first key.
[0531] The second random number is shared by the second device and the core network side device and / or the target service device; and / or, the second shared key is shared by the second device and the first device; and / or, the third random number is configured, or the third random number is shared by the second device and the core network side device and / or the target service device.
[0532] The first device includes at least one of the following: a first terminal device, a first access network device; the second device is one of the following: an environment-enabled Internet of Things A-IoT device, a zero-power device; the core network side device includes at least one of the following: a bootstrapping service function BSF, an A-IoT network element, a home subscription system HSS, a home location register HLR, a key management service KMS, and an authentication server function AUSF.
[0533] FIG20 is a schematic diagram of the structure of a core network side device according to an embodiment of the present application, including:
[0534] The third communication unit 2001 is used to send first information to the second device, wherein the first information includes a first message authentication code, the first message authentication code is related to a first shared key, the first shared key is shared between the second device and the core network side device and / or the target service device, and the first message authentication code is used by the second device to authenticate the core network device; send a first key to the target service device and / or the first device, the first key is used for communication between the second device and the target service device or the first device, and the first device is used to transmit data between the second device and the target service device.
[0535] FIG20 is a schematic diagram of the core network side device structure, which also includes:
[0536] The third processing unit 2002 is configured to determine that authentication of the second device is successful if the first response is identical to the second response;
[0537] The third communication unit is configured to receive second information from the second device, where the second information includes a first response.
[0538] The first information also includes a first random number; the third processing unit is used to perform at least one of the following: using a first calculation method to calculate a first message authentication code based on the first shared key, the first random number and the first authentication parameter, wherein the first authentication parameter includes at least one of: a second shared key, a second random number, and a third random number; based on using the first calculation method to calculate the first message authentication code based on the first intermediate key, the first random number and the first authentication parameter, the first intermediate key is related to the first shared key; using a second calculation method to calculate the second response based on the first shared key, the first random number and the second authentication parameter, wherein the second authentication parameter includes at least one of: a second shared key, a second random number, and a third random number; the first calculation method is different from the second calculation method, and / or the first authentication parameter and the second authentication parameter are at least partially different; using the second calculation method to calculate the second response based on the first intermediate key, the first random number and the second authentication parameter.
[0539] The third communication unit is configured to send the first information to the second device through the first device; and / or receive the second information from the second device through the first device.
[0540] The third communication unit is used to receive a second request message sent by the first device, where the second request message is used to request authentication, and the second request message carries the first identifier of the second device and / or the second identifier of the second device.
[0541] The third communication unit is used to send a first response message to the first device, where the first response message is used to indicate that the authentication of the second device is successful. The first response message carries the identification information, and the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device, and the identification of the core network side device.
[0542] The third communication unit is used to receive a fifth request message sent by the second device, where the fifth request message is used to request authentication and carries the first identifier of the second device; and to send a seventh response message to the second device, where the seventh response message is used to indicate that authentication of the second device is successful and carries identifier information, where the identifier information is related to at least one of the following: the second identifier of the second device, the first identifier of the second device and the identifier of the core network side device.
[0543] The third communication unit is used to receive a key request message from the target service device, wherein the key request message carries identification information; and the third communication unit is also used to perform at least one of the following: sending a second response message to the first device, wherein the second response message responds to the key request message, wherein the second response message carries a first key, wherein the first key is used for communication between the first device and the second device, and the first device is used to transmit data between the second device and the target service device; and sending a ninth response message to the target service device, wherein the ninth response message responds to the key request message, wherein the ninth response message carries the first key, and wherein the first key is used for communication between the second device and the target service device.
[0544] The second response message also carries security capability information of the second device, where the security capability information is used to indicate one or more security algorithms supported by the second device, or to indicate a target security algorithm specified by the second device; and / or, the ninth response message also carries security capability information of the second device.
[0545] The third communication unit is used to receive an eighth request message sent by the target service device, where the eighth request message is used to request authentication. The eighth request message carries the second identifier and security credentials of the second device, where the security credentials include at least one of the following: the first shared key, related information of the first shared key, and a first intermediate key, where the first intermediate key is obtained based on the first shared key.
[0546] The third communication unit is used to perform at least one of the following: sending a tenth response message to the target service device, the tenth response message is used to indicate that the authentication of the second device is successful, and the tenth response message carries identification information and a first key, the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device and the identification of the core network side device, the first key is used for communication between the second device and the target service device, and / or, the first key is used for communication between the first device and the second device, and the first device is used to transmit data between the second device and the target service device; sending a fourth response message to the first device, the fourth response message is used to indicate that the authentication of the second device is successful, and the fourth response message carries the identification information and the first key, the first key is used for communication between the first device and the second device, and the first device is used to transmit data between the second device and the target service device.
[0547] The third processing unit is used to calculate the first key based on the first shared key, the identifier of the target service device and the third authentication parameter, and the third authentication parameter includes at least one of the following: a second shared key, a second random number, a third random number, the second identifier of the second device, the identifier of the core network side device, the identifier of the first device, and identification information.
[0548] The second random number is shared by the second device and the core network side device and / or the target service device; and / or the second shared key is shared by the second device and the first device; and / or the third random number is configured, or the third random number is selected by the core network side device, or the third random number is shared by the second device and the core network side device and / or the target service device.
[0549] The first device includes at least one of the following: a first terminal device, a first access network device; the second device is one of the following: an environment-enabled Internet of Things A-IoT device, a zero-power device; the core network side device includes at least one of the following: a bootstrapping service function BSF, an A-IoT network element, a home subscription system HSS, a home location register HLR, a key management service KMS, and an authentication server function AUSF.
[0550] FIG21 is a schematic diagram of the structure of a target service device according to an embodiment of the present application, including:
[0551] The fourth communication unit 2101 is configured to receive a first key sent by a core network side device, where the first key is used for communication between the target service device and the second device.
[0552] The fourth communication unit is used to perform one of the following: receiving a third request message sent by the second device through the first device, the third request message is used to request communication, and the third request message carries identification information, and the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device and the identification of the core network side device; receiving a sixth request message sent by the second device, the sixth request message is used to request communication, and the sixth request message carries the identification information.
[0553] The fourth communication unit is used to send a key request message to the core network side device, where the key request message carries the identification information; and receive a ninth response message from the core network side device, where the ninth response message responds to the key request message and carries the first key; and send a sixth response message to the second device, where the sixth response message is used to instruct the target service device to obtain the first key.
[0554] The fourth communication unit is used to perform one of the following: receiving a fourth request message sent by the first device, the fourth request message is used to request authentication, and the fourth request message carries the first identifier of the second device and / or the second identifier of the second device; receiving a seventh request message sent by the second device, the seventh request message is used to request authentication, and the seventh request message carries the first identifier of the second device.
[0555] The fourth communication unit is used to send an eighth request message to the core network side device, where the eighth request message is used to request authentication. The eighth request message carries the second identifier and security credentials of the second device, where the security credentials include at least one of the following: a first shared key, related information of the first shared key, and a first intermediate key. The first shared key is shared between the second device and the target service device, and the first intermediate key is obtained based on the first shared key.
[0556] The fourth communication unit is used to receive a tenth response message from the core network side device, the tenth response message is used to indicate that the authentication of the second device is successful, and the tenth response message carries the identification information and the first key, the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device and the identification of the core network side device, the first key is used for communication between the second device and the target service device, and / or, the first key is used for communication between the first device and the second device, and the first device is used to transmit data between the second device and the target service device.
[0557] The fourth communication unit is configured to send an eighth response message to the second device, where the eighth response message is used to indicate that authentication of the second device is successful, and the eighth response message includes identification information.
[0558] The fourth communication unit is used to perform one of the following: receiving security capability information from the second device, the security capability information is used to indicate one or more security algorithms supported by the second device, or to indicate a target security algorithm specified by the second device; receiving the security capability information from the core network side device.
[0559] The fourth communication unit is configured to send security algorithm indication information to the second device, where the security algorithm indication information is used to indicate a target security algorithm.
[0560] The device of the embodiment of the present application can realize the corresponding functions of each device in the aforementioned communication method embodiment. The processes, functions, implementation methods and beneficial effects corresponding to each module (sub-module, unit or component, etc.) in the first device, or the second device, or the core network side device, or the target service device can be found in the corresponding description in the above method embodiment, which will not be repeated here. It should be noted that the functions described in the first device, or the second device, or the core network side device, or each module (sub-module, unit or component, etc.) in the application embodiment can be implemented by different modules (sub-modules, units or components, etc.), or by the same module (sub-module, unit or component, etc.).
[0561] Figure 22 is a schematic structural diagram of a communication device 2200 according to an embodiment of the present application. The communication device 2200 includes a processor 2210, which can call and run a computer program from a memory to enable the communication device 2200 to implement the method in the embodiment of the present application.
[0562] In a possible implementation, the communication device 2200 may further include a memory 2220. The processor 2210 may call and execute a computer program from the memory 2220 to enable the communication device 2200 to implement the method in the embodiment of the present application.
[0563] The memory 2220 may be a separate device independent of the processor 2210 , or may be integrated into the processor 2210 .
[0564] In one possible implementation, the communication device 2200 may further include a transceiver 2230 , and the processor 2210 may control the transceiver 2230 to communicate with other devices. Specifically, it may send information or data to other devices, or receive information or data sent by other devices.
[0565] The transceiver 2230 may include a transmitter and a receiver. The transceiver 2230 may further include an antenna, and the number of...
Claims
1. A communication method, comprising: The first device sends first information from the core network side device to the second device, where the first information includes a first message authentication code, where the first message authentication code is related to a first shared key, where the first shared key is shared between the second device and the core network side device and / or the target service device, and the first message authentication code is used by the second device to authenticate the core network side device; The first device receives a first key from the core network side device, the first key is used for communication between the first device and a second device, and the first device is used to transmit data between the second device and the target service device.
2. The method according to claim 1, wherein: The method further comprises: The first device sends second information from the second device to the core network side device, where the second information includes a first response, and the first response is used by the core network side device to authenticate the second device.
3. The method according to claim 2, wherein: The method further comprises: The first device receives a first request message from the second device, where the first request message is used to request authentication, and the first request message carries a first identifier of the second device.
4. The method according to claim 3, wherein: The method further comprises: The first device sends a second request message to the core network side device, where the second request message is used to request authentication, and the second request message carries the first identifier of the second device and / or the second identifier of the second device.
5. The method according to claim 4, wherein: The method further comprises: The first device receives a first response message from the core network side device, where the first response message is used to indicate that authentication of the second device is successful, and the first response message carries identification information, where the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device, and the identification of the core network side device.
6. The method according to claim 5, wherein: The first device receives a first key from a core network side device, including: the first device forwards a third request message sent by the second device to the target service device, the third request message is used to request communication, and the third request message carries identification information; the first device receives a second response message from the core network side device, and the second response message carries the first key; The method further includes: the first device sending a third response message to the second device, where the third response message is used to instruct the target service device to obtain the first key.
7. The method according to claim 4, wherein: The method further comprises: The first device sends a fourth request message to the target service device, wherein the fourth request message is used to request authentication, and the fourth request message carries the first identifier of the second device and / or the second identifier of the second device.
8. The method according to claim 7, wherein: The first device receives a first key from a core network side device, including: The first device receives a fourth response message from the core network side device, where the fourth response message is used to indicate that the authentication of the second device is successful, and the fourth response message carries identification information and the first key, where the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device, and the identification of the core network side device.
9. The method according to claim 5 or 8, wherein: The method further comprises: The first device sends a fifth response message to the second device, where the fifth response message is used to indicate that authentication of the second device is successful, and the fifth response message carries the identification information.
10. The method according to any one of claims 1 to 9, wherein: The method further comprises: The first device receives security capability information from the second device, where the security capability information is used to indicate one or more security algorithms supported by the second device, or is used to indicate a target security algorithm specified by the second device.
11. The method according to claim 10, wherein: The method further comprises: The first device sends security algorithm indication information to the second device, where the security algorithm indication information is used to indicate a target security algorithm.
12. The method according to any one of claims 1 to 11, wherein: The second device is one of the following: an environment-enabled Internet of Things A-IoT device, a zero-power device; the first device includes at least one of the following: a first terminal device, a first access network device; the core network side device includes at least one of the following: a bootstrap service function BSF, an A-IoT network element, a home subscription system HSS, a home location register HLR, a key management service KMS, and an authentication server function AUSF.
13. A communication method, comprising: The second device receives first information from the core network side device, where the first information includes a first message authentication code, where the first message authentication code is related to a first shared key, and the first shared key is shared between the second device and the core network side device and / or the target service device; The second device calculates a second message authentication code based on the first shared key; When the second message authentication code is the same as the first message authentication code, the second device calculates a first key based on the first shared key and the identifier of the target service device, and the first key is used for communication between the second device and the target service device and / or the first device.
14. The method according to claim 13, wherein: The method further comprises: The second device calculates a first response based on the first shared key, where the first response is used by the core network side device to authenticate the second device; The second device sends second information to the core network side device, where the second information includes the first response.
15. The method according to claim 13, wherein: The first information also includes a first random number; and the second device calculates a second message authentication code based on the first shared key, including: The second device calculates a second message authentication code based on the first shared key, the first random number and the first authentication parameter in a first calculation manner, wherein the first authentication parameter includes at least one of: a second shared key, a second random number and a third random number; The second device calculates a first intermediate key based on the first shared key, and calculates a second message authentication code based on the first intermediate key, a first random number and the first authentication parameter using a first calculation method.
16. The method according to claim 15, wherein: The second device calculates a first response based on the first shared key, including one of the following: The second device calculates the first response based on the first shared key, the first random number and the second authentication parameter using a second calculation method, wherein the second authentication parameter includes at least one of: a second shared key, a second random number and a third random number; the first calculation method is different from the second calculation method, and / or the first authentication parameter and the second authentication parameter are at least partially different; The second device calculates a first intermediate key based on the first shared key, and calculates the first response based on the first intermediate key, the first random number, and a second authentication parameter using a second calculation method.
17. The method according to any one of claims 13 to 16, wherein: The second device calculates a first key based on the first shared key and the identifier of the target service device, including: The second device calculates the first key based on the first shared key, the identifier of the target service device and a third authentication parameter, and the third authentication parameter includes at least one of the following: a second shared key, a second random number, a third random number, a second identifier of the second device, an identifier of the core network side device, an identifier of the first device, and identification information.
18. The method according to claim 17, wherein: The method further comprises: The second device sends a first request message to the first device, where the first request message is used to request authentication, and the first request message carries a first identifier of the second device.
19. The method according to claim 18, wherein: The second device receiving the first information from the core network side device includes: the second device receiving the first information from the core network side device through the first device; And / or, the second device sending the second information to the core network side device includes: the second device sending the second information to the core network side device through the first device.
20. The method according to claim 18 or 19, wherein: The method further comprises: The second device receives a fifth response message from the first device, where the fifth response message is used to indicate that authentication of the second device is successful, and the fifth response message carries the identification information, where the identification information is related to at least one of: the second identification of the second device, the first identification of the second device, the identification of the first device, and the identification of the core network side device.
21. The method according to claim 20, wherein: The method further comprises: The second device sends a third request message to the target service device through the first device, where the third request message is used to request communication and carries the identification information.
22. The method according to claim 21, wherein: The method further comprises at least one of the following: The second device receives a third response message from the first device, where the third response message is used to instruct the target service device to obtain the first key; The second device receives a sixth response message from the target service device, where the sixth response message is used to instruct the target service device to obtain the first key.
23. The method according to any one of claims 18 to 22, wherein: The method further comprises: The second device sends security capability information to the first device, where the security capability information is used to indicate one or more security algorithms supported by the second device, or is used to indicate a target security algorithm specified by the second device.
24. The method according to claim 23, wherein: The method further comprises: The second device receives security algorithm indication information from the first device, where the security algorithm indication information is used to indicate a target security algorithm.
25. The method of claim 17, wherein: The method further includes: the second device sending a fifth request message to the core network side device, the fifth request message is used to request authentication, and the fifth request message carries the first identifier of the second device; The method also includes: the second device receives a seventh response message from the core network side device, the seventh response message is used to indicate that the authentication of the second device is successful, the seventh response message carries the identification information, and the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device and the identification of the core network side device.
26. The method according to claim 25, wherein: The method further includes: the second device sending a sixth request message to the target service device, the sixth request message being used to request communication, the sixth request message carrying the identification information; The method further includes: the second device receiving a sixth response message from the target service device, where the sixth response message is used to instruct the target service device to obtain the first key.
27. The method of claim 17, wherein: The method further includes: the second device sending a seventh request message to the target service device, the seventh request message is used to request authentication, and the seventh request message carries the first identifier of the second device; The method also includes: the second device receives an eighth response message from the target service device, the eighth response message is used to indicate that the authentication of the second device is successful, the eighth response message includes identification information, and the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device and the identification of the core network side device.
28. The method according to any one of claims 25 to 27, wherein: The method further comprises one of the following: The second device reports security capability information to the target service device, where the security capability information is used to indicate one or more security algorithms supported by the second device, or is used to indicate a target security algorithm specified by the second device; The second device reports the security capability information to the core network side device.
29. The method according to claim 28, wherein: The method further comprises: The second device receives security algorithm indication information from the target service device, where the security algorithm indication information is used to indicate a target security algorithm.
30. The method according to any one of claims 23, 24, 28 and 29, wherein: The target security algorithm includes a target integrity protection algorithm and / or a target encryption algorithm. The target integrity protection algorithm is used by the second device to calculate the integrity protection code of a message sent based on an integrity protection key pair and / or to verify the integrity of a message received based on the integrity protection key pair. The target encryption algorithm is used by the second device to encrypt data sent based on an encryption key pair and / or to decrypt data received based on the encryption key pair. The integrity protection key is related to the first key, and the encryption key is related to the first key.
31. The method according to any one of claims 15 to 30, wherein: The second random number is shared by the second device and the core network side device and / or the target service device; and / or, the second shared key is shared by the second device and the first device; and / or, the third random number is configured, or the third random number is shared by the second device and the core network side device and / or the target service device.
32. The method according to any one of claims 13 to 31, wherein: The first device includes at least one of the following: a first terminal device, a first access network device; the second device is one of the following: an environment-enabled Internet of Things A-IoT device, a zero-power device; the core network side device includes at least one of the following: a bootstrap service function BSF, an A-IoT network element, a home subscription system HSS, a home location register HLR, a key management service KMS, and an authentication server function AUSF.
33. A communication method, comprising: The core network side device sends first information to the second device, wherein the first information includes a first message authentication code, the first message authentication code is related to a first shared key, the first shared key is shared between the second device and the core network side device and / or the target service device, and the first message authentication code is used by the second device to authenticate the core network device; The core network side device sends a first key to the target service device and / or the first device, the first key is used for communication between the second device and the target service device or the first device, and the first device is used to transmit data between the second device and the target service device.
34. The method of claim 33, wherein: The method further comprises: The core network side device receives second information from the second device, where the second information includes a first response; When the first response is identical to the second response, the core network side device determines that authentication of the second device is successful.
35. The method of claim 34, wherein: The first information further includes a first random number; and the method further includes at least one of the following: The core network side device calculates a first message authentication code based on the first shared key, the first random number and a first authentication parameter using a first calculation method, wherein the first authentication parameter includes at least one of: a second shared key, a second random number, and a third random number; The core network side device calculates a first message authentication code based on a first intermediate key, a first random number and the first authentication parameter in a first calculation manner, where the first intermediate key is related to the first shared key; The core network side device calculates the second response based on the first shared key, the first random number and the second authentication parameter using a second calculation method, wherein the second authentication parameter includes at least one of: a second shared key, a second random number, and a third random number; the first calculation method is different from the second calculation method, and / or the first authentication parameter and the second authentication parameter are at least partially different; The core network side device calculates the second response based on the first intermediate key, the first random number and the second authentication parameter using a second calculation method.
36. The method of claim 35, wherein: The core network side device sends the first information to the second device, including: the core network side device sends the first information to the second device through the first device; And / or, the core network side device receiving the second information from the second device includes: the core network side device receiving the second information from the second device through the first device.
37. The method of claim 36, wherein: The method further comprises: The core network side device receives a second request message sent by the first device, where the second request message is used to request authentication, and the second request message carries the first identifier of the second device and / or the second identifier of the second device.
38. The method of claim 37, wherein: The method further comprises: The core network side device sends a first response message to the first device, where the first response message is used to indicate that authentication of the second device is successful, and the first response message carries identification information, where the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device, and the identification of the core network side device.
39. The method of claim 35, wherein: The method further includes: the core network side device receiving a fifth request message sent by the second device, the fifth request message being used to request authentication, and the fifth request message carrying a first identifier of the second device; The method also includes: the core network side device sends a seventh response message to the second device, the seventh response message is used to indicate that the authentication of the second device is successful, the seventh response message carries identification information, and the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device and the identification of the core network side device.
40. The method according to claim 37 or 39, wherein: The method further includes: the core network side device receiving a key request message from the target service device, the key request message carrying identification information; The method further includes at least one of the following: the core network side device sends a second response message to the first device, the second response message responds to the key request message, the second response message carries a first key, the first key is used for communication between the first device and the second device, and the first device is used to transmit data between the second device and the target service device; The core network side device sends a ninth response message to the target service device, the ninth response message responds to the key request message, the ninth response message carries the first key, and the first key is used for communication between the second device and the target service device.
41. The method of claim 40, wherein: The second response message also carries security capability information of the second device, where the security capability information is used to indicate one or more security algorithms supported by the second device, or to indicate a target security algorithm specified by the second device; And / or, the ninth response message also carries security capability information of the second device.
42. The method of claim 35, wherein: The method further comprises: The core network side device receives an eighth request message sent by the target service device, where the eighth request message is used to request authentication, and the eighth request message carries a second identifier and security credentials of the second device, where the security credentials include at least one of the following: the first shared key, related information of the first shared key, and a first intermediate key, where the first intermediate key is obtained based on the first shared key.
43. The method of claim 42, wherein: The method further comprises at least one of the following: The core network side device sends a tenth response message to the target service device, where the tenth response message is used to indicate that the authentication of the second device is successful, and the tenth response message carries identification information and a first key, where the identification information is related to at least one of the following: a second identification of the second device, a first identification of the second device, an identification of the first device, and an identification of the core network side device, the first key is used for communication between the second device and the target service device, and / or the first key is used for communication between the first device and the second device, and the first device is used to transmit data between the second device and the target service device; The core network side device sends a fourth response message to the first device, where the fourth response message is used to indicate that the authentication of the second device is successful, and the fourth response message carries the identification information and the first key, where the first key is used for communication between the first device and the second device, and the first device is used to transmit data between the second device and the target service device.
44. The method according to claim 40 or 43, wherein: The method further comprises: The core network side device calculates the first shared key based on the first shared key, the identifier of the target service device and the third authentication parameter A key, the third authentication parameter includes at least one of the following: a second shared key, a second random number, a third random number, a second identifier of the second device, an identifier of the core network side device, an identifier of the first device, and identifier information.
45. The method according to any of claims 35-44, wherein: The second random number is shared by the second device and the core network side device and / or the target service device; and / or, the second shared key is shared by the second device and the first device; and / or, the third random number is configured, or the third random number is selected by the core network side device, or the third random number is shared by the second device and the core network side device and / or the target service device.
46. The method according to any one of claims 33 to 45, wherein: The first device includes at least one of the following: a first terminal device, a first access network device; the second device is one of the following: an environment-enabled Internet of Things A-IoT device, a zero-power device; the core network side device includes at least one of the following: a bootstrap service function BSF, an A-IoT network element, a home subscription system HSS, a home location register HLR, a key management service KMS, and an authentication server function AUSF.
47. A communication method, comprising: The target service device receives a first key sent by a core network side device, where the first key is used for communication between the target service device and a second device.
48. The method of claim 47, wherein: The method further comprises one of the following: The target service device receives, through the first device, a third request message sent by the second device, where the third request message is used to request communication, and the third request message carries identification information, where the identification information is related to at least one of the following: a second identification of the second device, a first identification of the second device, an identification of the first device, and an identification of a core network side device; The target service device receives a sixth request message sent by the second device, where the sixth request message is used to request communication and carries the identification information.
49. The method of claim 48, wherein: The method further includes: the target service device sending a key request message to the core network side device, wherein the key request message carries the identification information; The target service device receives the first key sent by the core network side device, including: the target service device receives a ninth response message from the core network side device, the ninth response message responds to the key request message, and the ninth response message carries the first key; the target service device sends a sixth response message to the second device, and the sixth response message is used to instruct the target service device to obtain the first key.
50. The method of claim 47, wherein: The method further comprises one of the following: The target service device receives a fourth request message sent by the first device, where the fourth request message is used to request authentication, and the fourth request message carries the first identifier of the second device and / or the second identifier of the second device; The target service device receives a seventh request message sent by the second device, where the seventh request message is used to request authentication and carries the first identifier of the second device.
51. The method of claim 50, wherein: The method further comprises: The target service device sends an eighth request message to the core network side device, where the eighth request message is used to request authentication. The eighth request message carries the second identifier and security credentials of the second device, where the security credentials include at least one of the following: a first shared key, related information of the first shared key, and a first intermediate key. The first shared key is shared between the second device and the target service device, and the first intermediate key is obtained based on the first shared key.
52. The method of claim 51, wherein: The target service device receives a first key sent by a core network side device, including: The target service device receives a tenth response message from the core network side device, where the tenth response message is used to indicate that the authentication of the second device is successful, and the tenth response message carries identification information and the first key, where the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device and the identification of the core network side device, the first key is used for communication between the second device and the target service device, and / or the first key is used for communication between the first device and the second device, and the first device is used to transmit data between the second device and the target service device.
53. The method of claim 52, wherein: The method further comprises: The target service device sends an eighth response message to the second device, where the eighth response message is used to indicate that the authentication of the second device is successful, and the eighth response message includes identification information.
54. The method according to any one of claims 47 to 53, wherein: The method further comprises one of the following: The target service device receives security capability information from the second device, where the security capability information is used to indicate one or more security algorithms supported by the second device, or is used to indicate a target security algorithm specified by the second device; The target service device receives the security capability information from the core network side device.
55. The method of claim 54, wherein: The method further comprises: The target service device sends security algorithm indication information to the second device, and the security algorithm indication information is used to indicate the target service device. Security algorithm.
56. A first device, comprising: A first communication unit is used to send first information from a core network side device to a second device, where the first information includes a first message authentication code, where the first message authentication code is related to a first shared key, where the first shared key is shared between the second device and the core network side device and / or a target service device, and where the first message authentication code is used by the second device to authenticate the core network side device; and receive a first key from the core network side device, where the first key is used for communication between the first device and the second device, and the first device is used to transmit data between the second device and the target service device.
57. The first device according to claim 56, wherein The first communication unit is used to send second information from the second device to the core network side device, where the second information includes a first response, and the first response is used by the core network side device to authenticate the second device.
58. The first device according to claim 57, wherein The first communication unit is used to receive a first request message from the second device, where the first request message is used to request authentication, and the first request message carries a first identifier of the second device.
59. The first device according to claim 58, wherein The first communication unit is used to send a second request message to the core network side device, where the second request message is used to request authentication, and the second request message carries the first identifier of the second device and / or the second identifier of the second device.
60. The first device according to claim 59, wherein The first communication unit is used to receive a first response message from the core network side device, the first response message is used to indicate that the authentication of the second device is successful, the first response message carries identification information, and the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device and the identification of the core network side device.
61. The first device according to claim 60, wherein: The first communication unit is configured to forward a third request message sent by the second device to the target service device, wherein the third request message is used to request communication and carries identification information; and receive a second response message from the core network side device, wherein the second response message carries the first key; A third response message is sent to the second device, where the third response message is used to instruct the target service device to obtain the first key.
62. The first device of claim 59, wherein: The first communication unit is used to send a fourth request message to the target service device, wherein the fourth request message is used to request authentication, and the fourth request message carries the first identifier of the second device and / or the second identifier of the second device.
63. The first device according to claim 62, wherein: The first communication unit is used to receive a fourth response message from the core network side device, where the fourth response message is used to indicate that the authentication of the second device is successful, and the fourth response message carries identification information and the first key, and the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device and the identification of the core network side device.
64. The first device according to claim 60 or 63, wherein: The first communication unit is used to send a fifth response message to the second device, where the fifth response message is used to indicate that the authentication of the second device is successful, and the fifth response message carries the identification information.
65. The first device according to any one of claims 56 to 64, wherein: The first communication unit is used to receive security capability information from the second device, where the security capability information is used to indicate one or more security algorithms supported by the second device, or is used to indicate a target security algorithm specified by the second device.
66. The first device according to claim 65, wherein The first communication unit is used to send security algorithm indication information to the second device, where the security algorithm indication information is used to indicate a target security algorithm.
67. The first device according to any one of claims 56 to 66, wherein: The second device is one of the following: an environment-enabled Internet of Things A-IoT device, a zero-power device; the first device includes at least one of the following: a first terminal device, a first access network device; the core network side device includes at least one of the following: a bootstrap service function BSF, an A-IoT network element, a home subscription system HSS, a home location register HLR, a key management service KMS, and an authentication server function AUSF.
68. A second device comprising: A second communication unit, configured to receive first information from a core network side device, where the first information includes a first message authentication code, where the first message authentication code is related to a first shared key, and where the first shared key is shared between the second device and the core network side device and / or a target service device; A second processing unit, configured to calculate a second message authentication code based on the first shared key; When the second message authentication code is the same as the first message authentication code, a first key is calculated based on the first shared key and the identification of the target service device, and the first key is used for communication between the second device and the target service device and / or the first device.
69. The second device according to claim 68, wherein The second processing unit is configured to calculate a first response based on the first shared key, where the first response is used by the core network side device to authenticate the second device; The second communication unit is used to send second information to the core network side device, and the second information includes the first response.
70. The second device according to claim 68, wherein The first information also includes a first random number; the second processing unit is used to calculate a second message authentication code based on the first shared key, the first random number and the first authentication parameter using a first calculation method, wherein the first authentication parameter includes at least one of: a second shared key, a second random number, and a third random number; calculate a first intermediate key based on the first shared key, and calculate the second message authentication code based on the first intermediate key, the first random number and the first authentication parameter using the first calculation method.
71. The second device according to claim 70, wherein: The second processing unit is used to perform one of the following: using a second calculation method to calculate a first response based on the first shared key, the first random number and the second authentication parameter, wherein the second authentication parameter includes at least one of: a second shared key, a second random number, and a third random number; the first calculation method is different from the second calculation method, and / or the first authentication parameter and the second authentication parameter are at least partially different; calculating a first intermediate key based on the first shared key, and using the second calculation method to calculate the first response based on the first intermediate key, the first random number and the second authentication parameter.
72. The second device according to any one of claims 68 to 71, wherein: The second processing unit is used to calculate the first key based on the first shared key, the identifier of the target service device and a third authentication parameter, wherein the third authentication parameter includes at least one of the following: a second shared key, a second random number, a third random number, a second identifier of the second device, an identifier of the core network side device, an identifier of the first device, and identification information.
73. The second device according to claim 72, wherein: The second communication unit is used to send a first request message to the first device, where the first request message is used to request authentication, and the first request message carries a first identifier of the second device.
74. The second device according to claim 73, wherein The second communication unit is used to receive the first information from the core network side device through the first device; and / or send the second information to the core network side device through the first device.
75. The second device according to claim 73 or 74, wherein The second communication unit is used to receive a fifth response message from the first device, where the fifth response message is used to indicate that the authentication of the second device is successful, and the fifth response message carries the identification information, where the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device, and the identification of the core network side device.
76. The second device according to claim 75, wherein The second communication unit is used to send a third request message to the target service device through the first device, where the third request message is used to request communication, and the third request message carries the identification information.
77. The second device according to claim 76, wherein The second communication unit is used to perform at least one of the following: receiving a third response message from the first device, the third response message is used to instruct the target service device to obtain the first key; receiving a sixth response message from the target service device, the sixth response message is used to instruct the target service device to obtain the first key.
78. The second device according to any one of claims 73 to 77, wherein: The second communication unit is used to send security capability information to the first device, where the security capability information is used to indicate one or more security algorithms supported by the second device, or is used to indicate a target security algorithm specified by the second device.
79. The second device according to claim 78, wherein The second communication unit is used to receive security algorithm indication information from the first device, where the security algorithm indication information is used to indicate a target security algorithm.
80. The second device according to claim 72, wherein: The second communication unit is used to send a fifth request message to the core network side device, the fifth request message is used to request authentication, and the fifth request message carries the first identifier of the second device; receive a seventh response message from the core network side device, the seventh response message is used to indicate that the authentication of the second device is successful, and the seventh response message carries the identifier information, and the identifier information is related to at least one of the following: the second identifier of the second device, the first identifier of the second device, and the identifier of the core network side device.
81. The second device according to claim 80, wherein The second communication unit is used to send a sixth request message to the target service device, the sixth request message is used to request communication, and the sixth request message carries the identification information; receive a sixth response message from the target service device, the sixth response message is used to instruct the target service device to obtain the first key.
82. The second device according to claim 72, wherein: The second communication unit is used to send a seventh request message to the target service device, where the seventh request message is used to request authentication, and the seventh request message carries the first identifier of the second device; Receive an eighth response message from the target service device, wherein the eighth response message is used to indicate that authentication of the second device is successful, and the eighth response message includes identification information, wherein the identification information is related to at least one of: the second identification of the second device, the first identification of the second device, and the identification of the core network side device.
83. The second device according to any one of claims 80 to 82, wherein: The second communication unit is used to perform one of the following: reporting security capability information to the target service device, the security capability information is used to indicate one or more security algorithms supported by the second device, or is used to indicate a target security algorithm specified by the second device; reporting the security capability information to the core network side device.
84. The second device according to claim 83, wherein The second communication unit is used to receive security algorithm indication information from the target service device, where the security algorithm indication information is used to indicate a target security algorithm.
85. The second device according to any one of claims 78, 79, 83, and 84, wherein: The target security algorithm includes a target integrity protection algorithm and / or a target encryption algorithm. The target integrity protection algorithm is used by the second device to calculate the integrity protection code of a message sent based on an integrity protection key pair and / or to verify the integrity of a message received based on the integrity protection key pair. The target encryption algorithm is used by the second device to encrypt data sent based on an encryption key pair and / or to decrypt data received based on the encryption key pair. The integrity protection key is related to the first key, and the encryption key is related to the first key.
86. The second device according to any one of claims 70 to 85, wherein: The second random number is shared by the second device and the core network side device and / or the target service device; and / or, the second shared key is shared by the second device and the first device; and / or, the third random number is configured, or the third random number is shared by the second device and the core network side device and / or the target service device.
87. The second device according to any one of claims 68 to 86, wherein: The first device includes at least one of the following: a first terminal device, a first access network device; the second device is one of the following: an environment-enabled Internet of Things A-IoT device, a zero-power device; the core network side device includes at least one of the following: a bootstrap service function BSF, an A-IoT network element, a home subscription system HSS, a home location register HLR, a key management service KMS, and an authentication server function AUSF.
88. A core network side device, comprising: A third communication unit is used to send first information to a second device, wherein the first information includes a first message authentication code, the first message authentication code is related to a first shared key, the first shared key is shared between the second device and a core network side device and / or a target service device, and the first message authentication code is used by the second device to authenticate the core network device; a first key is sent to the target service device and / or the first device, the first key is used for communication between the second device and the target service device or the first device, and the first device is used to transmit data between the second device and the target service device.
89. The core network side device according to claim 88, wherein: Also includes: a third processing unit, configured to determine that authentication of the second device is successful if the first response is the same as the second response; The third communication unit is used to receive second information from the second device, where the second information includes a first response.
90. The core network side device according to claim 89, wherein: The first information also includes a first random number; the third processing unit is used to perform at least one of the following: using a first calculation method to calculate a first message authentication code based on the first shared key, the first random number and the first authentication parameter, wherein the first authentication parameter includes at least one of: a second shared key, a second random number, and a third random number; based on using the first calculation method to calculate the first message authentication code based on a first intermediate key, a first random number and the first authentication parameter, the first intermediate key is related to the first shared key; using a second calculation method to calculate the second response based on the first shared key, the first random number and the second authentication parameter, wherein the second authentication parameter includes at least one of: a second shared key, a second random number, and a third random number; the first calculation method is different from the second calculation method, and / or the first authentication parameter and the second authentication parameter are at least partially different; using the second calculation method to calculate the second response based on the first intermediate key, the first random number and the second authentication parameter.
91. The core network side device according to claim 90, wherein: The third communication unit is configured to send the first information to the second device through the first device; and / or receive the second information from the second device through the first device.
92. The core network side device according to claim 91, wherein: The third communication unit is used to receive a second request message sent by the first device, where the second request message is used to request authentication, and the second request message carries the first identifier of the second device and / or the second identifier of the second device.
93. The core network side device according to claim 92, wherein: The third communication unit is used to send a first response message to the first device, where the first response message is used to indicate that the authentication of the second device is successful, and the first response message carries identification information, where the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device, and the identification of the core network side device.
94. The core network side device according to claim 90, wherein: The third communication unit is configured to receive a fifth request message sent by the second device, where the fifth request message is used to request authentication, and the fifth request message carries the first identifier of the second device; A seventh response message is sent to the second device, where the seventh response message is used to indicate that the authentication of the second device is successful, and the seventh response message carries identification information, where the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, and the identification of the core network side device.
95. The core network side device according to claim 92 or 94, wherein: The third communication unit is configured to receive a key request message from the target service device, wherein the key request message carries identification information; and The third communication unit is further configured to perform at least one of the following: sending a second response message to the first device, the second response message responding to the key request message, the second response message carrying a first key, the first key being used for communication between the first device and the second device, and the first device being used to transmit data between the second device and the target service device; Towards The target service device sends a ninth response message, where the ninth response message responds to the key request message and carries the first key, where the first key is used for communication between the second device and the target service device.
96. The core network side device according to claim 95, wherein: The second response message also carries security capability information of the second device, where the security capability information is used to indicate one or more security algorithms supported by the second device, or to indicate a target security algorithm specified by the second device; and / or, the ninth response message also carries security capability information of the second device.
97. The core network side device according to claim 90, wherein: The third communication unit is used to receive an eighth request message sent by the target service device, where the eighth request message is used to request authentication, and the eighth request message carries a second identifier and security credentials of the second device, where the security credentials include at least one of the following: the first shared key, related information of the first shared key, and a first intermediate key, where the first intermediate key is obtained based on the first shared key.
98. The core network side device according to claim 97, wherein: The third communication unit is used to perform at least one of the following: sending a tenth response message to the target service device, the tenth response message is used to indicate that the authentication of the second device is successful, and the tenth response message carries identification information and a first key, the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device and the identification of the core network side device, the first key is used for communication between the second device and the target service device, and / or the first key is used for communication between the first device and the second device, and the first device is used to transmit data between the second device and the target service device; A fourth response message is sent to the first device, where the fourth response message is used to indicate that the authentication of the second device is successful, and the fourth response message carries the identification information and the first key, where the first key is used for communication between the first device and the second device, and the first device is used to transmit data between the second device and the target service device.
99. The core network side device according to claim 95 or 98, wherein: The third processing unit is used to calculate the first key based on the first shared key, the identifier of the target service device and a third authentication parameter, and the third authentication parameter includes at least one of the following: a second shared key, a second random number, a third random number, a second identifier of the second device, an identifier of the core network side device, an identifier of the first device, and identification information.
100. The core network side device according to any value of claims 90-99, wherein: The second random number is shared by the second device and the core network side device and / or the target service device; and / or, the second shared key is shared by the second device and the first device; and / or, the third random number is configured, or the third random number is selected by the core network side device, or the third random number is shared by the second device and the core network side device and / or the target service device.
101. The core network side device according to any one of claims 88 to 100, wherein: The first device includes at least one of the following: a first terminal device, a first access network device; the second device is one of the following: an environment-enabled Internet of Things A-IoT device, a zero-power device; the core network side device includes at least one of the following: a bootstrap service function BSF, an A-IoT network element, a home subscription system HSS, a home location register HLR, a key management service KMS, and an authentication server function AUSF.
102. A target service device, comprising: The fourth communication unit is used to receive a first key sent by a core network side device, where the first key is used for communication between the target service device and the second device.
103. The target service device according to claim 102, wherein: The fourth communication unit is used to perform one of the following: receiving a third request message sent by the second device through the first device, the third request message is used to request communication, and the third request message carries identification information, and the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device and the identification of the core network side device; receiving a sixth request message sent by the second device, the sixth request message is used to request communication, and the sixth request message carries the identification information.
104. The target service device according to claim 103, wherein: The fourth communication unit is used to send a key request message to the core network side device, where the key request message carries the identification information; and receiving a ninth response message from the core network side device, the ninth response message responding to the key request message, the ninth response message carrying the first key; A sixth response message is sent to the second device, where the sixth response message is used to instruct the target service device to obtain the first key.
105. The target service device according to claim 102, wherein: The fourth communication unit is configured to perform one of the following: receiving a fourth request message sent by the first device, where the fourth request message is used to request authentication, and the fourth request message carries the first identifier of the second device and / or the second identifier of the second device; A seventh request message sent by the second device is received, where the seventh request message is used to request authentication, and the seventh request message carries the first identifier of the second device.
106. The target service device according to claim 105, wherein: The fourth communication unit is used to send an eighth request message to the core network side device, where the eighth request message is used to request authentication, and the eighth request message carries the second identifier and security credentials of the second device, where the security credentials include at least one of the following: a first shared key, related information of the first shared key, and a first intermediate key, where the first shared key is shared between the second device and the target service device, and the first intermediate key is obtained based on the first shared key.
107. The target service device according to claim 106, wherein: The fourth communication unit is used to receive a tenth response message from the core network side device, the tenth response message is used to indicate that the authentication of the second device is successful, and the tenth response message carries the identification information and the first key, the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device and the identification of the core network side device, the first key is used for communication between the second device and the target service device, and / or the first key is used for communication between the first device and the second device, and the first device is used to transmit data between the second device and the target service device.
108. The target service device according to claim 107, wherein: The fourth communication unit is used to send an eighth response message to the second device, where the eighth response message is used to indicate that the authentication of the second device is successful, and the eighth response message includes identification information.
109. The target service device according to any one of claims 102-108, wherein: The fourth communication unit is used to perform one of the following: receiving security capability information from the second device, the security capability information being used to indicate one or more security algorithms supported by the second device, or being used to indicate a target security algorithm specified by the second device; receiving the security capability information from the core network side device.
110. The target service device according to claim 109, wherein: The fourth communication unit is used to send security algorithm indication information to the second device, where the security algorithm indication information is used to indicate a target security algorithm.
111. A first device, comprising: a processor, and a memory in communication with the processor, the memory being configured to store instructions that, when executed by the processor, cause the first device to perform: Sending first information from a core network side device to a second device, the first information including a first message authentication code, the first message authentication code being related to a first shared key, the first shared key being shared between the second device and the core network side device and / or a target service device, the first message authentication code being used by the second device to authenticate the core network side device; receiving a first key from the core network side device, the first key being used for communication between the first device and the second device, and the first device being used to transmit data between the second device and the target service device.
112. The first device according to claim 111, wherein: The instruction further causes the first device to execute: sending second information from the second device to the core network side device, the second information including a first response, and the first response is used by the core network side device to authenticate the second device.
113. The first device according to claim 112, wherein: The instruction further causes the first device to execute: receiving a first request message from the second device, where the first request message is used to request authentication, and the first request message carries a first identifier of the second device.
114. The first device according to claim 113, wherein: The instruction also causes the first device to execute: sending a second request message to the core network side device, where the second request message is used to request authentication, and the second request message carries the first identifier of the second device and / or the second identifier of the second device.
115. The first device according to claim 114, wherein: The instruction also causes the first device to execute: receiving a first response message from the core network side device, the first response message is used to indicate that the authentication of the second device is successful, the first response message carries the identification information, and the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device and the identification of the core network side device.
116. The first device according to claim 115, wherein: The instruction further causes the first device to execute: forwarding a third request message sent by the second device to the target service device, the third request message being used to request communication and carrying identification information; receiving a second response message from the core network side device, the second response message carrying the first key; A third response message is sent to the second device, where the third response message is used to instruct the target service device to obtain the first key.
117. The first device according to claim 114, wherein: The instruction further causes the first device to execute: sending the fourth request message to the target service device, wherein the fourth request message is used to request authentication, and the fourth request message carries the first identifier of the second device and / or the second identifier of the second device.
118. The first device according to claim 117, wherein: The instruction also causes the first device to execute: receiving a fourth response message from the core network side device, the fourth response message being used to indicate successful authentication of the second device, and the fourth response message carrying identification information and the first key, the identification information being related to at least one of: the second identification of the second device, the first identification of the second device, the identification of the first device, and the identification of the core network side device.
119. The first device according to claim 115 or 118, wherein: The instruction further causes the first device to execute: sending a fifth response message to the second device, where the fifth response message is used to indicate that the authentication of the second device is successful, and the fifth response message carries the identification information.
120. The first device according to any one of claims 111-119, wherein: The instructions further cause the first device to execute: receiving security capability information from the second device, where the security capability information is used to indicate one or more security algorithms supported by the second device, or is used to indicate a target security algorithm specified by the second device.
121. The first device according to claim 120, wherein: The instruction further causes the first device to execute: sending security algorithm indication information to the second device, where the security algorithm indication information is used to indicate a target security algorithm.
122. A second device comprising: a processor, and a memory in communication with the processor, the memory being used to store instructions, and when the instructions are executed by the processor, the instructions cause the second device to execute: receiving first information from a core network side device, the first information comprising a first message authentication code, the first message authentication code being related to a first shared key, and the first shared key being shared between the second device and the core network side device and / or a target service device; Calculate a second message authentication code based on the first shared key; When the second message authentication code is the same as the first message authentication code, a first key is calculated based on the first shared key and the identification of the target service device, and the first key is used for communication between the second device and the target service device and / or the first device.
123. The second device according to claim 122, wherein: The instruction also causes the second device to execute: calculate a first response based on the first shared key, the first response is used by the core network side device to authenticate the second device; and send second information to the core network side device, the second information including the first response.
124. The second device according to claim 122, wherein: The first information also includes a first random number; the instruction also causes the second device to execute: using a first calculation method to calculate a second message authentication code based on the first shared key, the first random number and a first authentication parameter, wherein the first authentication parameter includes at least one of: a second shared key, a second random number, and a third random number; calculating a first intermediate key based on the first shared key, and using the first calculation method to calculate a second message authentication code based on the first intermediate key, the first random number and the first authentication parameter.
125. The second device according to claim 124, wherein The instruction also causes the second device to perform one of the following: using a second calculation method to calculate the first response based on the first shared key, the first random number and the second authentication parameter, wherein the second authentication parameter includes at least one of: a second shared key, a second random number, and a third random number; the first calculation method is different from the second calculation method, and / or the first authentication parameter and the second authentication parameter are at least partially different; calculating a first intermediate key based on the first shared key, and using a second calculation method to calculate the first response based on the first intermediate key, the first random number and the second authentication parameter.
126. The second device according to any one of claims 122-125, wherein: The instruction also causes the second device to execute: calculate the first key based on the first shared key, the identifier of the target service device and a third authentication parameter, and the third authentication parameter includes at least one of the following: a second shared key, a second random number, a third random number, a second identifier of the second device, an identifier of the core network side device, an identifier of the first device, and identification information.
127. The second device according to claim 126, wherein The instruction further causes the second device to execute: sending a first request message to the first device, where the first request message is used to request authentication, and the first request message carries a first identifier of the second device.
128. The second device according to claim 127, wherein: The instruction also causes the second device to execute: receiving the first information from the core network side device through the first device; and / or sending the second information to the core network side device through the first device.
129. The second device according to claim 127 or 128, wherein The instruction also causes the second device to execute: receiving a fifth response message from the first device, the fifth response message being used to indicate successful authentication of the second device, the fifth response message carrying the identification information, and the identification information being related to at least one of: the second identification of the second device, the first identification of the second device, the identification of the first device, and the identification of the core network side device.
130. The second device according to claim 129, wherein: The instruction further causes the second device to execute: sending a third request message to the target service device through the first device, where the third request message is used to request communication and carries the identification information.
131. The second device according to claim 130, wherein: The instruction also causes the second device to perform at least one of the following: receiving a third response message from the first device, the third response message being used to instruct the target service device to obtain the first key; receiving a sixth response message from the target service device, the sixth response message being used to instruct the target service device to obtain the first key.
132. The second device according to any one of claims 127 to 131, wherein: The instruction further causes the second device to execute: sending security capability information to the first device, where the security capability information is used to indicate one or more security algorithms supported by the second device, or is used to indicate a target security algorithm specified by the second device.
133. The second device according to claim 132, wherein: The instruction further causes the second device to execute: receiving security algorithm indication information from the first device, where the security algorithm indication information is used to indicate a target security algorithm.
134. The second device according to claim 126, wherein: The instruction also causes the second device to execute: sending a fifth request message to the core network side device, the fifth request message is used to request authentication, and the fifth request message carries the first identifier of the second device; receiving a seventh response message from the core network side device, the seventh response message is used to indicate that authentication of the second device is successful, and the seventh response message carries the identifier information, and the identifier information is related to at least one of the following: the second identifier of the second device, the first identifier of the second device, and the identifier of the core network side device.
135. The second device according to claim 134, wherein The instruction also causes the second device to execute: sending a sixth request message to the target service device, the sixth request message is used to request communication, the sixth request message carries the identification information; receiving a sixth response message from the target service device, the sixth response message is used to instruct the target service device to obtain the first key.
136. The second device according to claim 126, wherein: The instruction also causes the second device to execute: sending a seventh request message to the target service device, the seventh request message is used to request authentication, and the seventh request message carries the first identifier of the second device; receiving an eighth response message from the target service device, the eighth response message is used to indicate that the authentication of the second device is successful, and the eighth response message includes identification information, and the identification information is related to at least one of the following: the second identifier of the second device, the first identifier of the second device, and the identifier of the core network side device.
137. The second device according to any one of claims 134-136, wherein: The instruction also causes the second device to perform one of the following: reporting security capability information to the target service device, the security capability information being used to indicate one or more security algorithms supported by the second device, or being used to indicate a target security algorithm specified by the second device; reporting the security capability information to the core network side device.
138. The second device according to claim 137, wherein: The instruction further causes the second device to execute: receiving security algorithm indication information from the target service device, where the security algorithm indication information is used to indicate a target security algorithm.
139. The second device according to any one of claims 124-138, wherein: The second random number is shared by the second device and the core network side device and / or the target service device; and / or, the second shared key is shared by the second device and the first device; and / or, the third random number is configured, or the third random number is shared by the second device and the core network side device and / or the target service device.
140. A core network side device, comprising: A processor, and a memory communicating with the processor, the memory being used to store instructions, and when the instructions are executed by the processor, the instructions cause the core network side device to execute: sending first information to a second device, wherein the first information includes a first message authentication code, the first message authentication code is related to a first shared key, the first shared key is shared between the second device and the core network side device and / or the target service device, and the first message authentication code is used by the second device to authenticate the core network device; sending a first key to the target service device and / or the first device, the first key is used for communication between the second device and the target service device or the first device, and the first device is used to transmit data between the second device and the target service device.
141. The core network side device according to claim 140, wherein: The instruction further causes the core network side device to execute: when the first response is identical to the second response, determining that authentication of the second device is successful; and receiving second information from the second device, the second information including the first response.
142. The core network side device according to claim 141, wherein: The first information also includes a first random number; the instruction also enables the core network side device to perform at least one of the following: using a first calculation method to calculate a first message authentication code based on the first shared key, the first random number and the first authentication parameter, wherein the first authentication parameter includes at least one of: a second shared key, a second random number, and a third random number; based on using the first calculation method to calculate the first message authentication code based on the first intermediate key, the first random number and the first authentication parameter, the first intermediate key is related to the first shared key; using a second calculation method to calculate the second response based on the first shared key, the first random number and the second authentication parameter, wherein the second authentication parameter includes at least one of: a second shared key, a second random number, and a third random number; the first calculation method is different from the second calculation method, and / or the first authentication parameter and the second authentication parameter are at least partially different; using the second calculation method to calculate the second response based on the first intermediate key, the first random number and the second authentication parameter.
143. The core network side device according to claim 142, wherein: The instruction further causes the core network side device to execute: sending the first information to the second device through the first device; and / or receiving the second information from the second device through the first device.
144. The core network side device according to claim 143, wherein: The instruction also causes the core network side device to execute: receiving a second request message sent by the first device, where the second request message is used to request authentication, and the second request message carries the first identifier of the second device and / or the second identifier of the second device.
145. The core network side device according to claim 144, wherein: The instruction also causes the core network side device to execute: sending a first response message to the first device, the first response message is used to indicate that the authentication of the second device is successful, the first response message carries the identification information, and the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device and the identification of the core network side device.
146. The core network side device according to claim 143, wherein: The instruction further causes the core network side device to execute: receiving a fifth request message sent by the second device, where the fifth request message is used to request authentication, and the fifth request message carries the first identifier of the second device; A seventh response message is sent to the second device, where the seventh response message is used to indicate that the authentication of the second device is successful, and the seventh response message carries identification information, where the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, and the identification of the core network side device.
147. The core network side device according to claim 144 or 146, wherein: The instruction further causes the core network side device to execute: receiving a key request message from the target service device, the key request message carrying the identification information; and Perform at least one of the following: send a second response message to the first device, the second response message responding to the key request message, the second response message carrying a first key, the first key being used for communication between the first device and the second device, and the first device being used to transmit data between the second device and the target service device; A ninth response message is sent to the target service device, where the ninth response message responds to the key request message, and the ninth response message carries the first key, where the first key is used for communication between the second device and the target service device.
148. The core network side device according to claim 147, wherein: The second response message also carries security capability information of the second device, where the security capability information is used to indicate one or more security algorithms supported by the second device, or to indicate a target security algorithm specified by the second device; and / or, the ninth response message also carries security capability information of the second device.
149. The core network side device according to claim 142, wherein: The instruction also causes the core network side device to execute: receiving an eighth request message sent by the target service device, the eighth request message is used to request authentication, the eighth request message carries the second identifier and security credentials of the second device, and the security credentials include at least one of the following: the first shared key, related information of the first shared key, and a first intermediate key, wherein the first intermediate key is obtained based on the first shared key.
150. The core network side device according to claim 149, wherein: The instruction further causes the core network side device to perform at least one of the following: send a tenth response message to the target service device, the tenth response message is used to indicate that the authentication of the second device is successful, and the tenth response message carries the identification information and the first key, the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device and the identification of the core network side device, the first key is used for communication between the second device and the target service device, and / or the first key is used for communication between the first device and the second device, and the first device is used to transmit data between the second device and the target service device; A fourth response message is sent to the first device, where the fourth response message is used to indicate that the authentication of the second device is successful, and the fourth response message carries the identification information and the first key, where the first key is used for communication between the first device and the second device, and the first device is used to transmit data between the second device and the target service device.
151. The core network side device according to claim 147 or 150, wherein: The instruction also causes the core network side device to execute: calculate the first key based on the first shared key, the identifier of the target service device and a third authentication parameter, and the third authentication parameter includes at least one of the following: a second shared key, a second random number, a third random number, a second identifier of the second device, an identifier of the core network side device, an identifier of the first device, and identification information.
152. A target service device, comprising: A processor, and a memory communicating with the processor, the memory being used to store instructions, and when the instructions are executed by the processor, the instructions cause the target service device to execute: receiving a first key sent by a core network side device, the first key being used for communication between the target service device and a second device.
153. The target service device according to claim 152, wherein: The instruction also causes the target service device to perform one of the following: receiving a third request message sent by the second device through the first device, the third request message being used to request communication, the third request message carrying identification information, the identification information being related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device, and the identification of a core network side device; receiving a sixth request message sent by the second device, the sixth request message being used to request communication, the sixth request message carrying the identification information.
154. The target service device according to claim 153, wherein: The instruction further causes the target service device to execute: sending a key request message to the core network side device, wherein the key request message carries the identification information; and receiving a ninth response message from the core network side device, the ninth response message responding to the key request message, the ninth response message carrying the first key; A sixth response message is sent to the second device, where the sixth response message is used to instruct the target service device to obtain the first key.
155. The target service device according to claim 152, wherein: The instruction further causes the target service device to perform one of the following: receiving a fourth request message sent by the first device, the fourth request message being used to request authentication, the fourth request message carrying the first identifier of the second device and / or the second identifier of the second device; A seventh request message sent by the second device is received, where the seventh request message is used to request authentication, and the seventh request message carries the first identifier of the second device.
156. The target service device according to claim 155, wherein: The instruction also causes the target service device to execute: sending an eighth request message to the core network side device, the eighth request message is used to request authentication, the eighth request message carries the second identifier and security credentials of the second device, the security credentials include at least one of the following: a first shared key, related information of the first shared key, and a first intermediate key, the first shared key is shared between the second device and the target service device, and the first intermediate key is obtained based on the first shared key.
157. The target service device according to claim 156, wherein: The instruction also causes the target service device to execute: receiving a tenth response message from the core network side device, the tenth response message is used to indicate that the authentication of the second device is successful, and the tenth response message carries the identification information and the first key, the identification information is related to at least one of the following: the second identification of the second device, the first identification of the second device, the identification of the first device and the identification of the core network side device, the first key is used for communication between the second device and the target service device, and / or the first key is used for communication between the first device and the second device, and the first device is used to transmit data between the second device and the target service device.
158. The target service device according to claim 157, wherein: The instruction further causes the target service device to execute: sending an eighth response message to the second device, where the eighth response message is used to indicate that the authentication of the second device is successful, and the eighth response message includes identification information.
159. The target service device according to any one of claims 152-158, wherein: The instruction also causes the target service device to perform one of the following: receive security capability information from the second device, the security capability information being used to indicate one or more security algorithms supported by the second device, or being used to indicate a target security algorithm specified by the second device; receive the security capability information from the core network side device.
160. The target service device according to claim 159, wherein: The instruction further causes the target service device to execute: sending security algorithm indication information to the second device, where the security algorithm indication information is used to indicate a target security algorithm.
161. A chip, comprising: A processor, configured to call and run a computer program from a memory so that a device equipped with the chip executes a method as described in any one of claims 1 to 12, or claims 13 to 32, or claims 33 to 46, or claims 47 to 55.
162. A computer-readable storage medium for storing a computer program, which, when executed by a device, causes the device to perform the method as described in any one of claims 1 to 12, or claims 13 to 32, or claims 33 to 46, or claims 47 to 55.
163. A computer program product comprising computer program instructions, the computer program instructions causing a computer to perform the method of any one of claims 1 to 12, or claims 13 to 32, or claims 33 to 46, or claims 47 to 55.
164. A computer program causing a computer to perform the method of any one of claims 1 to 12, or claims 13 to 32, or claims 33 to 46, or claims 47 to 55.
Citation Information
Patent Citations
Mobile network authentication method, terminal device, server and network authentication entity
CN107809411A
Authentication certificate generation method and device, and equipment authentication method and device
CN114124394A
Method and system for managing security keys for user and M2M devices in a wireless communication network environment
US20170272944A1
Mobile network authentication method, terminal device, server, and network authentication entity
US20190208417A1
Key establishment using wireless channel information
WO2022234454A1
Cited By
Base station activation method, communication device and storage medium
CN120416846A
Authentication method and device based on environmental Internet of Things
CN120957141A
Communication method and device
WO2026218278A1
