Authentication and authorization method and apparatus
By generating random identifiers and symmetric keys between terminal devices and network devices, the problem of resource-constrained devices being unable to deploy PKI systems is solved, and the privacy protection of identity information and communication security are achieved. It is suitable for authentication and authorization of IoT devices.
Patent Information
- Application Number
- PCT/CN2025/085802
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-07
- Filing Date
- 2025-03-28
- Publication Date
- 2025-10-16
AI Technical Summary
Existing public key infrastructure (PKI) systems cannot be deployed in resource-constrained IoT devices, resulting in these devices being unable to ensure the security of information transmission, and shared key and identity-based authentication schemes have the risk of leaking user privacy.
The terminal device and network device each generate a random identifier and communicate through symmetric keys to ensure the privacy of identity information and communication security. A lightweight pseudo-random function is used to generate a shared key to achieve authentication between the terminal device and the network device.
It effectively protects user privacy, ensures the identity security of both communicating parties, simplifies the operation process, and is suitable for terminal devices with limited resources.
Smart Images

Figure CN2025085802_16102025_PF_FP_ABST
Abstract
Description
A method and apparatus for authentication and authorization
[0001] The present application claims priority to the Chinese patent application No. 202410411566.7, filed on April 7, 2024, with the State Intellectual Property Office of China, and entitled "A method and apparatus for authentication and authorization", the whole content of which is incorporated herein by reference. TECHNICAL FIELD
[0002] The present application relates to the field of information security, and more particularly, to a method and apparatus for authentication and authorization. BACKGROUND
[0003] Due to the complexity of the certificate system, the public key infrastructure (PKI) system cannot be deployed in all execution environments. For example, the PKI system cannot be deployed in Internet of Things devices with limited physical resources, because the asymmetric cryptography of public key / private key in the PKI system cannot be supported by some terminal devices (e.g., narrow band Internet of Things (NB-IoT)) due to their low power consumption. Therefore, in general, the security of information transmission cannot be guaranteed for such terminal devices by using the PKI system.
[0004] In the execution environment without the PKI system, the security of information transmission needs to be guaranteed for both parties of communication, and the pre-shared key (PSK) scheme and the identity-based authentication scheme, but these schemes will have the risk of leaking user privacy, for example, the identity information of the user may be exposed.
[0005] Therefore, there is a need for a method for authentication and authorization, which can protect the privacy of the user and ensure the identity security of both parties of communication in the network. SUMMARY
[0006] The present application provides a method for authentication and authorization, in which a terminal device and a first network device each generate a random identifier corresponding to a real identifier of the terminal device, and then the terminal device and the first network device can communicate based on the random identifier, so as to ensure the privacy of the identity information of the terminal device and guarantee the security of communication.
[0007] In a first aspect, a method for authentication and authorization is provided, which can be executed by a terminal device (e.g., a user equipment) or a component (e.g., a chip or a circuit) of the terminal device, and no limitation is made in this regard.
[0008] The method comprises: the terminal device sending a first request message to the first network device, the first request message carrying a real identity of the terminal device, a first random number and first authentication information, the first authentication information being used for the first network device to verify the terminal device, the real identity and the first random number being used to generate a first random identity corresponding to the terminal device; the terminal device receiving a first response message from the first network device, the first response message carrying a second random number and second authentication information, the second authentication information being used for the terminal device to verify the first network device; in a case where the terminal device verifies that the second authentication information is correct, the terminal device generates the first random identity corresponding to the terminal device according to a first shared key K_i corresponding to the real identity of the terminal device, the first random number and the second random number; and the terminal device communicates with the first network device according to the first random identity.
[0009] In a possible scenario, the first network device can be a core network device, and the second network device can be a base station; in another possible scenario, the first network device can be a base station, and the second network device can be a relay device. The first network device and the second network device are not limited in the present application.
[0010] For example, the terminal device sends the first request message to the first network device through the second network device, and the terminal device receives the first response message from the first network device through the second network device.
[0011] In a possible implementation, the real identity of the terminal device can be used by the first network device to generate the first shared key K_i, and the first shared key K_i, the first random number and the second random number can be used by the first network device to generate the random identity corresponding to the terminal device. The first random identity is generated by the terminal device, and the second random identity is generated by the first network device.
[0012] In the present application, the real identity of the terminal device can include a global unique identity of the terminal device and an assigned identity. For example, the global unique identity of the terminal device can be a client hardware address, a chip number, etc. For example, the assigned identity can be an identity assigned to the terminal device by some operator.
[0013] In the present application, the first shared key K_i can be pre-stored in the terminal device before the terminal device is shipped, or can be sent to the terminal device by a manufacturer / operator. For example, the manufacturer / operator calculates the first shared key K_i = PRF(MK, global unique identity of the terminal device). Wherein, "PRF" can be a lightweight pseudo-random function, for example, AES-CMAC-PRF-128; and "MK" is a master key. The master key MK can be assigned to the first network device.
[0014] With reference to the first aspect, in a possible implementation manner, the method further includes: generating, by the terminal device, a second shared key K* according to the first shared key K_i, the first random number, the real identity of the terminal device, and the identity of the first network device; and generating, by the terminal device, the first authentication information according to the second shared key K* and the first random number.
[0015] With reference to the first aspect, in a possible implementation manner, the real identity of the terminal device includes a global unique identity of the terminal device, and the first shared key K_i is generated according to a master key MK and the global unique identity.
[0016] Based on the above scheme, in the present application, the terminal device and the first network device each generate a random identity corresponding to the real identity of the terminal device, and then the terminal device and the first network device can communicate based on the random identity, so as to guarantee the privacy of the identity information of the terminal device and the security of the communication.
[0017] With reference to the first aspect, in a possible implementation manner, the terminal device communicates with the first network device according to the first random identity, including: sending, by the terminal device, a second request message to the first network device, the second request message being used to request to access the first network device, the second request message carrying the first random identity and a third random number; receiving, by the terminal device, a second response message from the first network device, the second response message carrying a fourth random number and third authentication information, wherein the third authentication information is used for the terminal device to verify the first network device; in a case where the terminal device verifies that the third authentication information is correct, generating, by the terminal device according to the first shared key K_i, fourth authentication information, a third shared key K_session, and a second random identity corresponding to the terminal device, wherein the third shared key K_session is a shared key between the terminal device and the first network device, and the fourth authentication information is used for the first network device to verify the terminal device; sending, by the terminal device, the fourth authentication information to the first network device; and communicating, by the terminal device, with the first network device according to the third shared key K_session and the second random identity.
[0018] For example, the terminal device sends the second request message to the first network device through the second network device, and receives the second response message from the first network device through the second network device.
[0019] In a possible implementation manner of the first aspect, the terminal generates, according to the first shared key K_i, the third shared key K_session, fourth authentication information, and a second random identifier corresponding to the terminal device, including: the terminal device generates a temporary shared key K1 according to the first shared key K_i, the first random identifier, the identifier of the first network device, a third random number, and a fourth random number; the terminal device generates the fourth authentication information according to the temporary shared key K1, the third random number, the fourth random number, and a first string; the terminal device generates the third shared key K_session according to the first shared key K_i, the real identifier of the terminal device, the identifier of the first network device, the third random number, and the fourth random number; and the terminal device generates the second random identifier according to the third shared key, the third random number, and the fourth random number.
[0020] As can be seen from the above two implementation manners, the third shared key K_session and the second random identifier corresponding to the terminal device are generated between the terminal device and the first network device, and the subsequent communication between the two can be based on this. Optionally, in the present application, the terminal device and the second network device can also perform mutual authentication, and after the authentication is passed, the communication between the two can be based on the shared key therebetween.
[0021] In a possible implementation manner of the first aspect, the method further includes: the terminal device receives fifth authentication information from the second network device, the fifth authentication information being used for the terminal device to verify the second network device; in a case where the terminal device verifies that the fifth authentication information is correct, the terminal device generates sixth authentication information according to the first random identifier, the sixth authentication information being used for the second network device to verify the terminal device; the terminal device sends the sixth authentication information to the second network device; and the terminal device communicates with the second network device according to a fourth shared key K**, the fourth shared key K** being a shared key between the terminal device and the second network device.
[0022] In a possible implementation manner of the first aspect, the terminal device generates the sixth authentication information according to the first random identifier, including: the terminal device generates a fourth shared key K** according to the first random identifier, the identifier of the second network device, the identifier of the first network device, the third random number, and the fourth random number; and the terminal device generates the sixth authentication information according to the fourth shared key K**, the identifier of the second network device, the third random number, the fourth random number, and a second string.
[0023] As can be seen from the above scheme, the symmetric key used between the terminal device and the first network device is the third shared key, and the symmetric key used between the terminal device and the second network device is the fourth shared key. The symmetric key is used to communicate with the network device, which is more convenient to operate and more suitable for the terminal device with a simple structure.
[0024] The above-mentioned various implementations introduce a technical solution in which a terminal device actively requests to access a first network device. The following introduces a technical solution in which the first network device actively invites various terminal devices to access through a broadcast message.
[0025] With reference to the first aspect, in a possible implementation, the terminal device communicates with the first network device according to the first random identifier, including: the terminal device receives a broadcast message from the first network device, the broadcast message being used to trigger the terminal device to access the first network device, the broadcast message carrying a fourth random number; the terminal device generates fourth authentication information according to the first random identifier, the fourth authentication information being used for the first network device to verify the terminal device; the terminal device sends a third request message to the first network device, the third request message being used to request to access the first network device, the third request message carrying the first random identifier, the third random number, and the fourth authentication information; the terminal device receives a third response message from the first network device, the third response message carrying third authentication information, the third authentication information being used for the terminal device to verify the first network device; in a case where the terminal device verifies that the third authentication message is correct, the terminal device generates a third shared key K_session and a second random identifier corresponding to the terminal device according to the first shared key K_i, where the third shared key K_session is a shared key between the terminal device and the first network device; and the terminal device communicates with the first network device according to the third shared key and the second random identifier.
[0026] In this application, the third random number is generated by the first network device, and the fourth random number is generated by the terminal device.
[0027] With reference to the first aspect, in a possible implementation, the terminal device generates the fourth authentication information according to the first random identifier. This includes: the terminal device generates the fourth authentication information according to the first random identifier, the first shared key K_i, an identifier of the first network device, the third random number, the fourth random number, and a first string.
[0028] With reference to the first aspect, in a possible implementation, the terminal device generates the third shared key K_session and the second random identifier corresponding to the terminal device according to the first shared key K_i, including: the terminal device generates the third shared key K_session according to the first shared key K_i, a real identifier of the terminal device, an identifier of the first network device, the third random number, and the fourth random number. The terminal device generates the second random identifier according to the third shared key, the third random number, and the fourth random number.
[0029] As can be seen from the above two implementation manners, the third shared key K_session and the second random identifier corresponding to the terminal device are generated between the terminal device and the first network device, and the terminal device and the second network device can communicate based on the third shared key K_session and the second random identifier.
[0030] With reference to the first aspect, in a possible implementation manner, the method further includes: receiving, by the terminal device, fifth authentication information from the second network device, the fifth authentication information being used for the terminal device to verify the second network device; in a case where the terminal device verifies that the fifth authentication information is correct, generating, by the terminal device, sixth authentication information according to the first random identifier, the sixth authentication information being used for the second network device to verify the terminal device; sending, by the terminal device, the sixth authentication information to the second network device; and communicating, by the terminal device, with the second network device according to a fourth shared key K**, the fourth shared key K** being a shared key between the terminal device and the second network device.
[0031] With reference to the first aspect, in a possible implementation manner, the terminal device generates the sixth authentication information according to the first random identifier, and the method further includes: generating, by the terminal device, a fourth shared key K** according to the first random identifier, an identifier of the second network device, an identifier of the first network device, a third random number, and a fourth random number; and generating, by the terminal device, the sixth authentication information according to the fourth shared key K**, the identifier of the second network device, the third random number, the fourth random number, and a second string.
[0032] In the second scenario, the first network device can trigger access of multiple terminal devices at a time by sending a broadcast message to the terminal devices, which is more efficient and saves signaling overhead compared with the first scenario.
[0033] The second aspect provides a method for authentication and authorization, which can be executed by the first network device, or can be executed by a component (for example, a chip or a circuit) of the first network device, and the component is not limited.
[0034] The technical effects achieved by the technical solution of the second aspect can be understood with reference to the technical effects achieved by the corresponding solution of the first aspect, which will not be repeated.
[0035] The method comprises: a first network device receiving a first request message from a terminal device, the first request message carrying a real identity of the terminal device, a first random number and first authentication information, the first authentication information being used for the first network device to verify the terminal device; in a case where the first network device verifies that the first authentication information is correct, the first network device generating second authentication information corresponding to the terminal device and a first random identifier corresponding to the terminal device according to a first shared key K_i corresponding to the real identity of the terminal device, the first random number and a second random number, the second authentication information being used for the terminal device to verify the first network device; the first network device sending a first response message to the terminal device, the first response message carrying the second authentication information and the second random number; and the first network device communicating with the terminal device according to the first random identifier.
[0036] With reference to the second aspect, in a possible implementation manner, the method further comprises: the first network device generating the first shared key K_i according to the real identity of the terminal device; generating a second shared key K* according to the first shared key K_i, the first random number, the real identity of the terminal device and an identity of the first network device; and the terminal device generating the first authentication information according to the second shared key K* and the first random number.
[0037] With reference to the second aspect, in a possible implementation manner, the real identity of the terminal device comprises a globally unique identifier of the terminal device, and the first shared key K_i is generated according to a master key MK and the globally unique identifier.
[0038] With reference to the second aspect, in a possible implementation manner, the first network device receiving the first request message from the terminal device comprises: the first network device receiving a second request message from the terminal device through a second network device; and the first network device sending the first response message to the terminal device comprises: the first network device sending a second response message to the terminal device through the second network device.
[0039] With reference to the second aspect, in a possible implementation manner, the first network device communicates with the terminal device according to the first random identifier, including: the first network device receives a second request message from the terminal device, the second request message being used for requesting to access the first network device, the second request message carrying the first random identifier, and a third random number; the first network device generates third authentication information according to the first random identifier, the third authentication information being used for the terminal device to verify the first network device; the first network device sends a second response message to the terminal device, the second response message carrying a fourth random number and the third authentication information; the first network device receives fourth authentication information from the terminal device, the fourth authentication information being used for the first network device to verify the terminal device; in a case where the first network device verifies that the third authentication information is correct, the first network device generates a third shared key K_session and a second random identifier corresponding to the terminal device according to the first shared key K_i, where the third shared key K_session is a shared key between the terminal device and the first network device; and the first network device communicates with the terminal device according to the third shared key K_session and the second random identifier.
[0040] With reference to the second aspect, in a possible implementation manner, the first network device generates the third authentication information according to the first random identifier, including: the first network device determines a real identifier of the terminal device according to the first random identifier; the first network device generates a temporary shared key K1 according to the first shared key K_i corresponding to the real identifier of the terminal device, the first random identifier, an identifier of the first network device, a third random number, and a generated fourth random number; and the first network device generates the third authentication information according to the temporary shared key K1, the third random number, the fourth random number, and a third string.
[0041] With reference to the second aspect, in a possible implementation manner, the first network device generates the third shared key K_session and the second random identifier corresponding to the terminal device according to the first shared key K_i, including: the first network device generates the third shared key K_session according to the first shared key K_i, a real identifier of the terminal device, an identifier of the first network device, a third random number, and a fourth random number; and the terminal device generates the second random identifier according to the third shared key K_session, the third random number, and the fourth random number.
[0042] With reference to the second aspect, in a possible implementation manner, the method further includes: the first network device generates a fourth shared key K** according to the first shared key K_i, an identifier of the second network device, an identifier of the first network device, a third random number, and a fourth random number, where the fourth shared key K** is a shared key between the terminal device and the second network device; and the first network device sends the fourth shared key K** to the second network device.
[0043] With reference to the second aspect, in a possible implementation manner, the first network device communicates with the terminal device according to the first random identity, including: the first network device sends a broadcast message to the terminal device, the broadcast message being used for triggering the terminal device to access the first network device, the broadcast message carrying a fourth random number; the first network device receives a third request message from the terminal device, the third request message being used for requesting to access the first network device, the third request message carrying the first random identity, the third random number and fourth authentication information, the fourth authentication information being used for the first network device to verify the terminal device; in a case where the first network device verifies that the fourth authentication information is correct, the first network device generates, according to the first random identity, third authentication information, a third shared key K_session and a second random identity corresponding to the terminal device; the first network device sends a third response message to the terminal device, the third response message carrying the third authentication information; and the first network device communicates with the terminal device according to the third shared key and the second random identity.
[0044] With reference to the second aspect, in a possible implementation manner, the first network device generates, according to the first random identity, third authentication information, a third shared key K_session and a second random identity corresponding to the terminal device, including: the first network device determines a real identity corresponding to the terminal device according to the first random identity, and determines a first shared key K_i according to the real identity corresponding to the terminal device; the first network device generates a temporary shared key K1 according to the first shared key K_i, the first random identity, an identity of the first network device, a third random number and the fourth random number; the first network device generates the third authentication information according to the temporary shared key K1, the third random number, the fourth random number and a third string; the first network device generates the third shared key K_session according to the first shared key K_i, the real identity of the terminal device, the identity of the first network device, the third random number and the fourth random number; and the first network device generates the second random identity according to the third shared key K_session, the third random number and the fourth random number.
[0045] With reference to the second aspect, in a possible implementation manner, the method further includes: the first network device generates a fourth shared key K** according to the first shared key K_i, an identity of the second network device, an identity of the first network device, the third random number and the fourth random number, the fourth shared key K** being a shared key between the terminal device and the second network device; and the first network device sends the fourth shared key K** to the second network device.
[0046] In a third aspect, an apparatus for authentication and authorization is provided, which is configured to perform the method in any possible implementation of the first aspect. Specifically, the apparatus can include units and / or modules for performing the method in any possible implementation of the first aspect, such as a transceiver and / or a processing unit.
[0047] In an implementation, the apparatus is a terminal device. When the apparatus is a communication device, the communication unit can be a transceiver, or an input / output interface; the processing unit can be at least one processor. Optionally, the transceiver can be a transceiver circuit. Optionally, the input / output interface can be an input / output circuit.
[0048] In another implementation, the apparatus is a chip, chip system or circuit for a terminal device. When the apparatus is a chip, chip system or circuit for a communication device, the communication unit can be an input / output interface, interface circuit, output circuit, input circuit, pin or related circuitry, etc. on the chip, chip system or circuit; the processing unit can be at least one processor, processing circuit or logic circuit, etc.
[0049] In a fourth aspect, an apparatus for authentication and authorization is provided, which is configured to perform the method in any possible implementation of the second aspect. Specifically, the apparatus can include units and / or modules for performing the method in any possible implementation of the second aspect, such as a transceiver and / or a processing unit.
[0050] In an implementation, the apparatus is a first network device. When the apparatus is a communication device, the communication unit can be a transceiver, or an input / output interface; the processing unit can be at least one processor. Optionally, the transceiver can be a transceiver circuit. Optionally, the input / output interface can be an input / output circuit.
[0051] In another implementation, the apparatus is a chip, chip system or circuit for a first network device. When the apparatus is a chip, chip system or circuit for a communication device, the communication unit can be an input / output interface, interface circuit, output circuit, input circuit, pin or related circuitry, etc. on the chip, chip system or circuit; the processing unit can be at least one processor, processing circuit or logic circuit, etc.
[0052] In a fifth aspect, a communication apparatus is provided, which includes at least one processor configured to execute computer programs or instructions stored in a memory to perform the method in any possible implementation of any aspect of the first aspect. Optionally, the apparatus further includes the memory configured to store the computer programs or instructions. Optionally, the apparatus further includes a communication interface through which the processor reads the computer programs or instructions stored in the memory.
[0053] In an implementation form, the apparatus is a terminal device.
[0054] In another implementation form, the apparatus is a chip, chip system or circuit for a terminal device.
[0055] In a sixth aspect, a communication apparatus is provided, which comprises at least one processor configured to execute computer programs or instructions stored in a memory to perform the method in any possible implementation of any of the second aspect. Optionally, the apparatus further comprises the memory configured to store the computer programs or instructions. Optionally, the apparatus further comprises a communication interface through which the processor reads the computer programs or instructions stored in the memory.
[0056] In an implementation form, the apparatus is a first network device.
[0057] In another implementation form, the apparatus is a chip, chip system or circuit for a first network device.
[0058] In a seventh aspect, a processor is provided, which comprises an input circuit, an output circuit and a processing circuit. The processing circuit is configured to receive signals through the input circuit and transmit signals through the output circuit, so that the processor performs the method in any possible implementation of any of the first aspect to the second aspect.
[0059] In the implementation process, the processor mentioned above can be one or more chips, the input circuit can be an input pin, the output circuit can be an output pin, and the processing circuit can be a transistor, a gate circuit, a flip-flop and various logic circuits, etc. The input signals received by the input circuit can be received and input by, for example but not limited to, a transceiver, the output signals output by the output circuit can be output to and transmitted by, for example but not limited to, a transmitter, and the input circuit and the output circuit can be the same circuit which is used as the input circuit and the output circuit at different times. The embodiments of the present application do not limit the specific implementation of the processor and various circuits.
[0060] For the sending and obtaining / receiving operations of the processor, if there is no special description, or if it does not contradict the actual role or internal logic in the related description, it can be understood as the processor output and receive, input, etc. operations, and also can be understood as the sending and receiving operations performed by the radio frequency circuit and the antenna, and the present application does not limit this.
[0061] In an eighth aspect, a processing device is provided, which comprises a processor and a memory. The processor is configured to read instructions stored in the memory, and can receive signals through a transceiver and transmit signals through a transmitter, to perform the method in any possible implementation of any of the first aspect to the second aspect.
[0062] Optionally, the processor is one or more, and the memory is one or more.
[0063] Optionally, the memory can be integrated with the processor, or the memory and the processor are separately arranged.
[0064] In the implementation process, the memory can be a non-transitory memory, such as a read only memory (ROM), which can be integrated on the same chip with the processor, or arranged separately on different chips. The embodiments of the present application do not limit the type of memory and the arrangement of the memory and the processor.
[0065] It should be understood that the related data interaction process, such as sending indication information, can be the process of outputting indication information from the processor, and receiving capability information can be the process of receiving input capability information by the processor. Specifically, the data output by the processor can be output to the transmitter, and the input data received by the processor can come from the transceiver. Wherein, the transmitter and the transceiver can be collectively referred to as the transceiver.
[0066] The processing device in the above eighth aspect can be one or more chips. The processor in the processing device can be implemented by hardware or software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented by software, the processor can be a general-purpose processor, which realizes by reading software code stored in the memory. The memory can be integrated in the processor, or can exist independently outside the processor.
[0067] In the ninth aspect, a computer readable storage medium is provided, which stores program code for execution by a device, and the program code includes instructions for executing the method in any possible implementation manner of the first aspect to the second aspect.
[0068] In the tenth aspect, a computer program product containing instructions is provided, which, when the computer program product is run on a computer, causes the computer to execute the method in any possible implementation manner of the first aspect to the second aspect.
[0069] In the eleventh aspect, a chip system is provided, which includes a processor for calling and running a computer program from a memory, so that the device installed with the chip system executes the method in any implementation manner of the first aspect to the second aspect.
[0070] In a twelfth aspect, a communication system is provided, which includes the terminal device and the first network device. The terminal device is configured to perform any of the possible implementation methods in any of the first aspects, and the first network device is configured to perform any of the possible implementation methods in any of the second aspects. Optionally, the communication system further includes a second network device. BRIEF DESCRIPTION OF DRAWINGS
[0071] FIG. 1 is a schematic flow chart of a system architecture to which the present application is applicable.
[0072] FIG. 2 is a schematic flow chart of a method 200 for authentication and authorization provided by the present application.
[0073] FIG. 3 is a schematic flow chart of a method 300 for authentication and authorization provided by the present application.
[0074] FIG. 4 is a schematic flow chart of a method 400 for authentication and authorization provided by the present application.
[0075] FIG. 5 is a schematic flow chart of an apparatus 100 for authentication and authorization provided by the present application.
[0076] FIG. 6 is a schematic flow chart of an apparatus 200 for authentication and authorization provided by the present application. DETAILED DESCRIPTION
[0077] The technical solutions provided by the present application will be described in detail below in conjunction with the various drawings.
[0078] The technical solutions provided by the present application can be applied to various communication systems, such as a universal mobile telecommunications system (UMTS), a wireless local area network (WLAN), a wireless fidelity (Wi-Fi) system, a 4th generation (4G) mobile communication system such as a long term evolution (LTE) system, a 5th generation (5G) mobile communication system such as a new radio (NR) system, and a future evolved communication system.
[0079] The terminal device can be a device providing voice / data to a user, for example, a handheld device with wireless connection function, a vehicle-mounted device, etc. At present, some examples of the terminal are: a mobile phone, a tablet computer, a notebook computer, a palm computer, a mobile internet device (MID), a virtual reality (VR) device, an augmented reality (AR) device, a wireless terminal in industrial control, a wireless terminal in self driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home (for example, a game console, a smart television, a smart speaker, a smart refrigerator, and fitness equipment, etc.), a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a transport vehicle with wireless communication function, a communication module, a roadside unit (RSU) with terminal function, a terminal device in a 5G network, or a terminal device in a future evolved public land mobile network (PLMN), etc., and the embodiments of the present application are not limited thereto.
[0080] By way of example and not limitation, in embodiments of the present application, the terminal device can also be a wearable device. The wearable device can also be referred to as a wearable smart device, which is a general term for devices that are designed and developed by applying wearable technology to daily wear, such as glasses, gloves, watches, clothing, and shoes. The wearable device is a portable device that is directly worn on the body or integrated into the clothes or accessories of the user. The wearable device is not only a hardware device, but also has powerful functions through software support and data interaction and cloud interaction. The general wearable smart device includes devices with full functions, large size, and the ability to realize complete or partial functions without relying on a smart phone, such as smart watches or smart glasses, and devices that focus on a certain application function and need to be used in cooperation with other devices, such as smart phones, such as various smart wristbands and smart jewelry for monitoring vital signs.
[0081] In addition, in embodiments of the present application, the terminal device can also be a terminal device in an IoT system. IoT is an important part of future information technology development, and its main technical feature is to connect objects to the network through communication technology, thereby realizing the intelligent network of man-machine interconnection and object interconnection.
[0082] It should be noted that the terminal device and the access network device can communicate with each other using a certain air interface technology (such as NR or LTE technology). The terminal device and the terminal device can also communicate with each other using a certain air interface technology (such as NR or LTE technology).
[0083] In embodiments of the present application, the device for implementing the function of the terminal device can be a terminal device, or a device capable of supporting the terminal device to implement the function, such as a chip system or a chip, which can be installed in the terminal device. In embodiments of the present application, the chip system can be composed of a chip, or can include a chip and other discrete devices.
[0084] The "base station" in the present application can also be understood as a radio access network (RAN), which is used to provide network access functions for authorized users in a certain area, and can use different quality transmission tunnels according to the level of the user, the demand of the service, etc. The RAN network element can manage radio resources and provide access services for terminal devices, thereby completing the forwarding of control signals and user data between the terminal device and the core network. The "base station" in the present application can also be a wireless controller in a cloud radio access network (CRAN) scenario. The network device can also be a base station device in a future 5G network or a network device in a future evolved PLMN network.
[0085] The base station can also be a transmission and reception point (TRP), wherein the TRP is a device or a module with corresponding communication functions. The TRP is usually provided with a communication module, circuit or chip for performing corresponding communication functions. The TRP is also provided with program instructions configured to perform corresponding communication functions and corresponding program instructions.
[0086] Exemplarily, the TRP in the embodiments of the present application can be a radio access network (RAN) device or a network element deployed in a RAN. For example, the TRP can be a RAN device or a device capable of supporting the RAN device to implement the function, such as a chip system or a combined device or component that can implement the function of an access network device, which can be installed in the RAN device. For another example, the TRP can be an access point (AP) in a Wi-Fi system, such as a home gateway, a router, a server, a switch, a bridge, etc., a base station, a base station controller (BSC), a base transceiver station (BTS), a home base station, a baseband unit (BBU), a wireless relay node, a wireless backhaul node, an evolved node B (eNB) in a 4G system, or a next-generation eNB (ng-eNB) during the transition from a 4G system to a 5G system, or a next-generation NodeB (gNB) in a 5G system, or a RAN node implementing a (partial) function of a gNB, which can be a central unit (CU), a distributed unit (DU), a CU-control plane (CP), a CU-user plane (UP), or a radio unit (RU), etc. The CU and the DU can be separately provided or included in the same network element, such as a baseband unit (BBU). The RU can be included in a radio frequency device or a radio frequency unit, such as a remote radio unit (RRU), an active antenna unit (AAU) or a remote radio head (RRH). Alternatively, the TRP can also be a satellite or various forms of base stations in the future. In addition, the TRP can be a macro base station, a micro base station or an indoor station, or a relay node or a donor node, etc.
[0087] The "core network" in this application may be, for example, a 5G core network. The 5G core network refers to the network part of the 5G system responsible for controlling and transmitting data. It cooperates with the wireless access network to form a complete 5G communication network. The 5G core network not only has the characteristics of high speed and low delay, but also has a flexible architecture and strong scalability to meet the needs of various applications in the future. The 5G core network plays a crucial role in the 5G communication system. It is responsible for managing and controlling network resources, supporting data transmission and communication services between users, and also provides many innovative service capabilities such as network slicing and edge computing, bringing huge development opportunities to various industries.
[0088] The 5G core network mainly consists of two main parts: the user plane (User Plane) and the control plane (Control Plane). The user plane is responsible for carrying data traffic and achieving fast and efficient data transmission; while the control plane is responsible for processing network control information to ensure network security and stable operation. The 5G core network contains multiple key nodes, some of which include: access and mobility management function (AMF), user plane function (UPF), session management function (SMF), policy control function (PCF), etc. The specific functions of each network element in the core network can be referred to the description in the protocol, which will not be introduced in detail in this application.
[0089] In order to facilitate the understanding of the technical solutions of the present application, the following first briefly introduces some individual professional terms involved in the present application.
[0090] 1. PKI system
[0091] In the field of information security, PKI is responsible for providing key management services, including key update, recovery and delegation functions, as well as generating encryption keys and managing digital certificates, including certificate generation and revocation. In the PKI system, asymmetric keys, i.e. public and private key pairs, are usually used to ensure the transmission of communication data on the Internet, to build a secure and reliable network data transmission environment for enterprises and individual users, so that they can conveniently use encryption technology and digital signature technology in various daily applications and production environments to ensure the authenticity, integrity, confidentiality and validity of communication data. Therefore, in fact, all platforms that can provide asymmetric encryption and digital signature services can be considered as part of the PKI system itself.
[0092] 2. The Internet of Things (IOT)
[0093] The IoT refers to the real-time collection of any object or process that requires monitoring, connection, and interaction, using various devices and technologies, including information sensors, radio frequency identification (RFID), global positioning systems (GPS), infrared sensors, and laser scanners. This information includes acoustic, optical, thermal, electrical, mechanical, chemical, biological, and location information. Through various possible network accesses, this allows for ubiquitous connectivity between objects and between objects and people, enabling intelligent perception, identification, and management of objects and processes. The IoT is an information carrier based on the internet and traditional telecommunications networks, enabling all independently addressable, ordinary physical objects to form an interconnected network.
[0094] 3. IoT devices
[0095] IoT devices have widespread applications in a variety of fields, including smart homes, industrial control, healthcare, transportation, and agriculture. In the smart home sector, they connect home devices and appliances to enable remote control and intelligent management. In industrial control, they enable remote monitoring of equipment and fault warnings, improving production efficiency and reducing costs. In healthcare, they analyze the generated data to more closely monitor patient health. In transportation, they improve road efficiency and reduce traffic accidents through intelligent traffic lights and vehicle communication technologies. In agriculture, they use sensors to collect information such as soil composition, temperature, humidity, and rainfall, helping farmers automate their agricultural practices.
[0096] 4. Contributive protocol
[0097] The "contribution protocol" means that all group members participate in the establishment of the session key. No member can decide the final session key in advance, and each member can confirm the share of his or her contribution to the session key.
[0098] FIG1 is a schematic diagram of a system architecture applicable to the present application. As shown in FIG1 , the system architecture includes terminal devices, a first network device, and a second network device. For example, the system architecture may include terminal device #1, terminal device #2, terminal device #3, ..., terminal device #N, and so on. Each terminal device can connect to the second network device, and then connect to the first network device through the second network device.
[0099] In a possible scenario, the second network device can be a core network device, and the first network device can be a base station. In another possible scenario, the second network device can be a relay device, and the first network device can be a base station. In this application, the first network device and the second network device are not limited. The terminal device in this application can be, for example, an IOT device, but is not limited to an IOT device.
[0100] FIG. 2 is a schematic flowchart of a method 200 of authentication and authorization provided in this application. As shown in FIG. 2, the method includes the following steps.
[0101] 201. The terminal device sends a first request message to the first network device, where the first request message carries a real identity of the terminal device, a first random number, and first authentication information.
[0102] Correspondingly, the first network device receives the first request message from the terminal device.
[0103] For example, the terminal device sends the first request message to the first network device through the second network device, and the terminal device receives the first response message from the first network device through the second network device.
[0104] For example, the first network device receives the first request message from the terminal device through the second network device, and the first network device sends the first response message to the terminal device through the second network device.
[0105] The first authentication information is used by the first network device to verify the terminal device, and the real identity and the first random number are used by the first network device to generate a random identity corresponding to the terminal device. For example, the real identity is used to generate a first shared key K_i, and the first shared key K_i, the first random number, and a second random number are used by the first network device to generate the random identity corresponding to the terminal device. The first random identity is generated by the terminal device, and the second random identity is generated by the first network device.
[0106] In this application, the real identity of the terminal device can include a global unique identity of the terminal device and an assigned identity. For example, the global unique identity of the terminal device can be a client hardware address, a chip number, etc. For example, the assigned identity can be an identity privately assigned to the terminal device by some operator.
[0107] In the present application, the first shared key K_i can be pre-stored in the terminal device before the terminal device is shipped, or can be sent to the terminal device by the manufacturer / operator. For example, the manufacturer / operator calculates the first shared key K_i = PRF(MK, globally unique identifier of the terminal device). Wherein, "PRF" can be a lightweight pseudo-random function, for example, AES-CMAC-PRF-128; "MK" is a master key. Wherein, the master key MK can be assigned to the first network device.
[0108] In a possible implementation, the terminal device generates a second shared key K* according to the first shared key K_i, the first random number, the real identifier of the terminal device, and the identifier of the first network device, and then generates the first authentication information according to the second shared key K* and the first random number. For example, the terminal device generates a random number r_c#1, and then calculates the second shared key K* = PRF(K_i, real identifier of the terminal device || identifier of the first network device || r_c#1 || "string"). For example, the first authentication information = MAC(K*, r_c#1). Wherein, "||" is a connector indicating splicing; for example, the "string" can be "Initial".
[0109] 202, in the case that the first network device verifies that the first authentication information is correct, the first network device generates the second authentication information according to the first shared key K_i corresponding to the real identifier, the first random number and the second random number, and the first random identifier and the second authentication information corresponding to the terminal device, and the second authentication information is used for the terminal device to verify the first network device.
[0110] For example, the first network device generates K_i based on the real identifier of the terminal device, and calculates K* = PRF(K_i, real identifier of the terminal device || identifier of the first network device || r_c#1 || "string").
[0111] Then, the correctness of the first authentication information (i.e., the first authentication information = MAC(K*, r_c#1)) is verified. If the first network device verifies that the first authentication information is incorrect, the reject instruction is sent to the terminal device; if the first network device verifies that the first authentication information is correct, a random number r_s#1 is generated, and the second authentication information and the first random identifier are calculated. Wherein, the second authentication information = MAC(K*, r_s#1 || r_c#1), and the first random identifier = PRF(K_i, r_c#1 || r_s#1).
[0112] In a possible implementation, the first network device can construct the mapping relationship between the real identifier of the terminal device and the first random identifier.
[0113] 203, the first network device sends a first response message to the terminal device, the first response message carrying the second random number and the second authentication information, the second authentication information being used by the terminal device to verify the first network device.
[0114] Correspondingly, the terminal device receives the first response message from the first network device.
[0115] 204, in a case where the terminal device verifies that the second authentication information is correct, the terminal device generates the first random identifier corresponding to the terminal device according to the first shared key K_i corresponding to the real identifier, the first random number and the second random number.
[0116] Illustratively, the terminal device can verify the correctness of the second authentication information (second authentication information = MAC(K*, r_s#1||r_c#1)) based on the calculated K*, if not, send a reject instruction to the first network device; if the terminal device verifies that the second authentication information is correct, calculate the first random identifier = PRF(K_i, r_c#1||r_s#1).
[0117] In a possible implementation, the terminal device can construct the mapping relationship between its real identifier and the first random identifier.
[0118] 205, the terminal device and the first network device communicate according to the first random identifier.
[0119] For example, the terminal device can communicate with the first network device according to the first random identifier, and the first network device can also communicate with the terminal device based on the first random identifier.
[0120] The steps 201-205 in the method 200 can be understood as a registration and pairing process between the terminal device and the first network device.
[0121] Based on the above scheme, in this application, the terminal device and the first network device each generate a random identifier corresponding to the real identifier of the terminal device, and then the terminal device and the first network device can communicate based on the random identifier, thereby ensuring the privacy of the identity information of the terminal device and ensuring the security of the communication.
[0122] As can be seen, through the steps 201-205 in the above method 200, the terminal device and the first network device each generate a first random identifier corresponding to the real identifier of the terminal device, so that the terminal device and the first network device can communicate based on the first random identifier subsequently.
[0123] In the present application, the terminal device accessing the first network device can be in two scenarios, which are the terminal device actively requesting to access the first network device and the first network device actively inviting each terminal device to access the first network device by sending a broadcast message to the terminal device. The technical solutions of the above two scenarios will be introduced in detail below.
[0124] Scenario one
[0125] FIG. 3 shows a schematic flow chart of a method 300 of terminal device accessing the first network device and performing service transmission with the first network device in scenario one. As shown in FIG. 3, the method comprises:
[0126] 301. The terminal device sends a second request message to the first network device, the second request message being used to request to access the first network device, the second request message carrying a first random identifier, a third random number.
[0127] Correspondingly, the first network device receives the second request message from the terminal device.
[0128] Illustratively, the terminal device generates a random number r_c#2, and sends the first random identifier and the third random number r_c#2 to the second network device, and then the second network device transmits the request to the first network device.
[0129] In the present application, the third random number is generated by the first network device, and the fourth random number is generated by the terminal device.
[0130] 302. The first network device generates third authentication information according to the first random identifier, the third authentication information being used for the terminal device to verify the first network device.
[0131] In a possible implementation manner, the first network device can determine the real identifier of the terminal device according to the first random identifier; the terminal device generates a temporary shared key K1 according to the first shared key K_i corresponding to the real identifier of the terminal device, the first random identifier, the identifier of the first network device, the third random number and the generated fourth random number; and the first network device generates the third authentication information according to the temporary shared key K1, the third random number, the fourth random number and the third string.
[0132] Illustratively, the first network device can determine the real identifier of the terminal device according to the first random identifier, generate the first shared key K_i, and calculate a random session key K1 = PRF(K_i, first random identifier || identifier of first network device || r_c || r_s || "1") based on the third random number r_c#2 and the generated fourth random number r_s#2. According to K1, the third authentication information = MAC(K1, r_c#2 || r_s#2 || "third string") is calculated.
[0133] Optionally, the first network device can further generate a fourth shared key K** according to the first shared key K_i, the identity of the second network device, the identity of the first network device, the third random number, and the fourth random number, where the fourth shared key K** is a shared key between the terminal device and the second network device. For example, K** = PRF(K_i, identity of the second network device || identity of the first network device || r_c#2 || r_s#2 || "2").
[0134] In this application, the media access control (MAC) or medium access control (MAC) MAC mechanism can be used to protect the integrity and authenticity of all interactive information, thereby achieving secure authentication.
[0135] 303. The first network device sends a second response message to the terminal device, where the second response message carries the fourth random number and the third authentication information.
[0136] Correspondingly, the terminal device receives the second response message from the first network device.
[0137] For example, the first network device sends the second response message to the terminal device through the second network device.
[0138] Optionally, the first network device further sends the fourth shared key K** to the second network device. At this time, the second network device can generate fifth authentication information according to the fourth shared key K**, the identity of the second network device, the third random number, the fourth random number, and a fourth string, where the fifth authentication information is used for the client to verify the second network device. For example, the fifth authentication information = MAC(PRF(K**, r_c#2 || r_s#2), identity of the second network device || r_c#2 || r_s#2 || "1"). For example, the second network device can send the fifth authentication information and the second response message together in the same signaling to the terminal device, or the second network device can send the fifth authentication information and the second response message separately in different signaling to the terminal device.
[0139] 304. In the case where the terminal device verifies that the third authentication information is correct, the terminal device generates the fourth authentication information, the third shared key K_session, and the second random identifier corresponding to the terminal device according to the first shared key K_i.
[0140] Exemplarily, the terminal device can first calculate the temporary shared key K1, and verify the third authentication information based on the temporary shared key, the third authentication information = correctness of MAC(K1, r_c||r_s||“1”), if the third authentication information is incorrect, the terminal device sends a reject instruction to the first network device; if the verification is correct, the terminal device can generate the fourth authentication information, the third shared key K_session, and the second random identifier corresponding to the terminal device.
[0141] In a possible implementation, the terminal device generates the temporary shared key K1 according to the first shared key K_i, the first random identifier, the identifier of the first network device, the third random number, and the fourth random number; and generates the fourth authentication information according to the temporary shared key, the third random number, the fourth random number, and the first string. Exemplarily, the terminal device calculates K1 = PRF(K_i, the first random identifier||the identifier of the first network device||r_c#2||r_s#2||“1”), and the fourth authentication information = MAC(K1, r_c#2||r_s#2||“the first string”).
[0142] In a possible implementation, the terminal device generates the third shared key K_session = PRF(K_i, the real identifier of the terminal device||the identifier of the first network device||r_c#2||r_s#2||“SessionKey”) according to the first shared key K_i, the real identifier of the terminal device, the identifier of the first network device, the third random number, and the fourth random number. For example, K_session contains K_mac||K_enc. Wherein, “K_enc” can be understood as a key of an authentication function, and K_mac can be understood as a key of an encryption function.
[0143] In a possible implementation, the terminal device generates the second random identifier according to the third shared key, the third random number, and the fourth random number. Exemplarily, the second random identifier = PRF(PRF(K_session, r_c#2||r_s#2), r_c#2||r_s#2).
[0144] Exemplarily, the terminal device can update the mapping relationship between the real identifier and the first random identifier to the mapping relationship between the real identifier and the second random identifier.
[0145] As can be seen from the above scheme, in the present application, the random identifier corresponding to the terminal device is also updated and changed, or can be understood as that the random identifier corresponding to the terminal device is also one-time, thereby realizing the protection of user identity privacy.
[0146] Optionally, the terminal device can receive fifth authentication information from the second network device, and in a case where the terminal device verifies that the fifth authentication information is correct, the terminal device generates sixth authentication information according to the first random identifier, the sixth authentication information being used for the second network device to verify the terminal device, and the terminal device sends the sixth authentication information to the second network device. Illustratively, the second network device can send the sixth authentication information to the terminal device together when forwarding the information of the first network device to the terminal device, in other words, the sixth authentication information and the second response message can be sent to the terminal device together in the same signaling, of course, the sixth authentication information and the second response message can also be sent to the terminal device device respectively in two signalings.
[0147] Illustratively, the terminal device verifies the correctness of the fifth authentication information = MAC(PRF(K**, r_c#2||r_s#2), second network device's table||r_c#2||r_s#2||“1”) according to the fourth shared key K**, and if it is incorrect, sends a reject instruction to the second network device, otherwise, calculates the fourth shared key K**.
[0148] Optionally, the terminal device generates a fourth shared key K** according to the first random identifier, the identifier of the second network device, the identifier of the first network device, the third random number and the fourth random number, and generates the sixth authentication information according to the fourth shared key K**, the identifier of the second network device, the third random number, the fourth random number, and the second string. Illustratively, the fourth shared key K** = PRF(K_i, second network device's identifier||first network device's identifier||r_c#2||r_s#2||“2”), and the sixth authentication information = MAC(PRF(K**, r_c#2||r_s#2), second network device's identifier||r_c#2||r_s#2||“2”).
[0149] 305, the terminal device sends fourth authentication information to the first network device.
[0150] Correspondingly, the first network device receives the fourth authentication information from the terminal device.
[0151] Illustratively, the terminal device sends the fourth authentication information to the second network device, and the second network device forwards the fourth authentication information to the first network device.
[0152] Optionally, the terminal device can further send sixth authentication information to the second network device, the second network device receives the sixth authentication information from the terminal device, and verifies the correctness of the sixth authentication information, if the sixth authentication information is incorrect, sends a reject instruction to the client; if the verification is passed, the terminal device and the second network device communicate according to the fourth shared key K**, the fourth shared key K** is the shared key between the terminal device and the second network device. For example, the service transmission can be performed according to the fourth shared key K** thereafter. Illustratively, the terminal device can send the fourth authentication information and the sixth authentication information to the second network device in the same signaling, and the terminal device can also send the fourth authentication information and the sixth authentication information to the second network device in different signaling respectively.
[0153] 306, in the case where the first network device verifies that the third authentication information is correct, the first network device generates a third shared key K_session and a second random identifier corresponding to the terminal device according to the first shared key K_i, wherein the third shared key K_session is a shared key between the terminal device and the first network device.
[0154] Illustratively, the first network device can verify the third authentication information according to K1, if the third authentication information is incorrect, sends a reject load to the terminal device; if the third authentication information is correct, generates a third shared key K_session and a second random identifier corresponding to the terminal device according to the first shared key K_i.
[0155] In a possible implementation, the first network device generates a third shared key K_session according to the first shared key K_i, the real identifier of the terminal device, the identifier of the first network device, the third random number and the fourth random number; the terminal device generates a second random identifier according to the third shared key K_session, the third random number and the fourth random number.
[0156] Illustratively, the third shared key K_session = PRF(K_i, real identifier of the terminal device || identifier of the first network device || r_c#2 || r_s#2 || "SessionKey"). For example, K_session contains K_mac || K_enc.
[0157] Illustratively, the second random identifier = PRF(PRF(K_session, r_c#2 || r_s#2), r_c#2 || r_s#2).
[0158] Illustratively, the first network device can update the mapping relationship between the real identifier of the terminal device and the first random identifier to the mapping relationship between the real identifier of the terminal device and the second random identifier.
[0159] 307, the terminal device communicates with the first network device according to the second random identity and the third shared key K_session.
[0160] For example, the first network device can calculate C = MAC (K_Mac, the inactivation instruction T) by using K_mac in the third key K_session, and send C to the terminal device; the terminal device verifies C by using K_mac in the third shared key K_session, and executes the instruction if it is correct. Assuming that the inactivation instruction T is used to instruct the terminal device to sleep, at this time, the terminal device will sleep based on the received instruction.
[0161] For example, the second random identity and the third shared key K_session can be used when the terminal device and the first network device establish a session for service transmission. For example, after the session ends, the terminal device and the first network device can generate a new shared key and a random identity corresponding to the terminal device, respectively, for example, the shared key between the terminal device and the first network device is updated to K_session', and the random identity corresponding to the terminal device is updated to the third random identity.
[0162] Optionally, the terminal device communicates with the second network device according to the fourth shared key K**. For example, the message transmitted between the terminal device and the second network device can be encrypted by K**, so as to ensure the security of the communication.
[0163] As can be seen from the above scheme, the symmetric key used between the terminal device and the first network device is the third shared key, and the symmetric key used between the terminal device and the second network device is the fourth shared key. The symmetric key is used to communicate with the network device, which is more convenient to operate, and is more suitable for the terminal device with simple structure.
[0164] It should be understood that in specific implementation, the method 200 and the method 300 can be used in combination. For example, the method 200 can be executed first, and then the method 300 can be executed.
[0165] Scenario two
[0166] FIG. 4 shows a schematic flow chart of a method 400 for the terminal device to access the first network device and perform service transmission with the first network device in scenario two, as shown in FIG. 4, the method includes:
[0167] 401, the first network device sends a broadcast message to the terminal device, the broadcast message is used to trigger the terminal device to access the first network device, and the broadcast message carries a fourth random number.
[0168] Correspondingly, the terminal device receives the broadcast message from the first network device.
[0169] Illustratively, the first network device generates a fourth random number r_s#2 and broadcasts it to all terminal devices through the second network device.
[0170] 402. The terminal device generates fourth authentication information according to the first random identifier, the fourth authentication information being used for the first network device to verify the terminal device.
[0171] In a possible implementation, the terminal device generates the fourth authentication information according to the first random identifier, the first shared key K_i, the identifier of the first network device, the third random number, the fourth random number, and a first string. Illustratively, the terminal device calculates a temporary shared key K11=PRF(K_i, the first random identifier||the identifier of the first network device||r_c#2||r_s#2||“1”) according to the first random identifier and a random number r_c#2, and the fourth authentication information=MAC(K1, r_c#2||r_s#2||“1”).
[0172] Optionally, the terminal device generates fifth authentication information according to the first random identifier, the fifth authentication information being used for the second network device to verify the terminal device.
[0173] Optionally, in a possible implementation, the terminal device generates a fourth shared key K** according to the first random identifier, the identifier of the second network device, the identifier of the first network device, the third random number, and the fourth random number, and generates the fifth authentication information according to the fourth shared key K**, the identifier of the second network device, the third random number, the fourth random number, and a second string. Illustratively, the fourth shared key K**=PRF(K_i, the identifier of the second network device||the identifier of the first network device||r_c#2||r_s#2||“2”), and the fifth authentication information=MAC(PRF(K**, r_c#2||r_s#2), the identifier of the second network device||r_c#2||r_s#2||“1”).
[0174] 403. The terminal device sends a third request message to the first network device, the third request message being used for requesting to access the first network device, and the third request message carrying the first random identifier, the third random number, and the fourth authentication information.
[0175] Correspondingly, the first network device receives the third request message from the terminal device.
[0176] Illustratively, the terminal device sends the third request message to the second network device, and the second network device forwards the third request message to the core.
[0177] Optionally, the terminal device can send the fifth authentication information and the fourth shared key K** to the second network device.
[0178] It should be noted that the present application does not limit different information to be sent together in the same signaling or to be sent separately in different signaling. Whether different information is sent in the same signaling or in different signaling can be referred to the description of the related content in the method 300, and will not be described again.
[0179] 404, in the case that the first network device verifies that the fourth authentication information is correct, the first network device generates the third authentication information, the third shared key K_session and the second random identifier corresponding to the terminal device according to the first shared key K_i.
[0180] For example, the first network device determines the real identifier corresponding to the terminal device according to the first random identifier, generates the first shared key K_i, calculates the temporary session key K1=PRF(K_i,RID_i||ID_S||r_c||r_s||“1”), and verifies the fourth authentication information based on the temporary session key K1. If the fourth authentication information is not correct, the first network device sends a reject instruction to the terminal device; if the fourth authentication information is correct, the first network device generates the third authentication information, the third shared key K_session and the second random identifier corresponding to the terminal device.
[0181] In a possible implementation, the first network device determines the real identifier corresponding to the terminal device according to the first random identifier, and determines the first shared key K_i according to the real identifier corresponding to the terminal device; the first network device generates the temporary shared key K1 according to the first shared key K_i, the first random identifier, the identifier of the first network device, the third random number and the fourth random number; the first network device generates the third authentication information according to the temporary shared key K1, the third random number, the fourth random number and the third string. For example, the temporary session key K1=PRF(K_i,RID_i||ID_S||r_c||r_s||“1”), and the third authentication information=MAC(K1,r_c||r_s||“2”).
[0182] In a possible implementation, the first network device generates the third shared key K_session according to the first shared key K_i, the real identifier of the terminal device, the identifier of the first network device, the third random number and the fourth random number. For example, K_session=PRF(K_i, the real identifier of the terminal device||the identifier of the first network device||r_c#2||r_s#2||“SessionKey”). Wherein, K_session contains K_mac||K_enc.
[0183] In a possible implementation, the first network device generates the second random identifier according to the third shared key K_session, the third random number and the fourth random number. For example, the second random identifier = PRF(PRF(K_session, r_c#2||r_s#2), r_c#2||r_s#2).
[0184] Optionally, the first network device generates a fourth shared key K** according to the first shared key K_i, the identifier of the second network device, the identifier of the first network device, the third random number and the fourth random number, where the fourth shared key K** is a shared key between the terminal device and the second network device. For example, the fourth shared key K** = PRF(K_i, the identifier of the second network device||the identifier of the first network device||r_c||r_s||“2”).
[0185] 405. The first network device sends a third response message to the terminal device, where the third response message carries the third authentication information.
[0186] For example, the first network device can send the third response message to the second network device, and the second network device forwards the third response message to the terminal device.
[0187] Optionally, the first network device also sends the fourth shared key K** to the second network device. Correspondingly, after receiving the fourth shared key K**, the second network device can verify the fifth authentication information by using K**, and if the verification is incorrect, the second network device sends a reject instruction to the terminal device; in the case that the second network device verifies that the sixth authentication information is correct, the second network device calculates the sixth authentication information according to the fourth shared key, the third random number, the fourth random number and the fourth string. For example, the sixth authentication information = MAC(PRF(K*, r_c#2||r_s#2), the identifier of the second network device||r_c#2||r_s#2||“2”).
[0188] Optionally, the second network device can send the sixth authentication information to the terminal device.
[0189] 406. In the case that the terminal device verifies that the third authentication information is correct, the terminal device generates a third shared key K_session and a second random identifier corresponding to the terminal device according to the first shared key K_i, where the third shared key K_session is a shared key between the terminal device and the first network device.
[0190] For example, the terminal device can verify the correctness of the third authentication information, and if the verification is incorrect, the terminal device sends a reject instruction to the first network device; if the verification is correct, the terminal device generates a third shared key K_session and a second random identifier corresponding to the terminal device.
[0191] In a possible implementation, the terminal device generates a third shared key K_session according to the first shared key K_i, the real identity of the terminal device, the identity of the first network device, the third random number and the fourth random number. For example, the third shared key K_session = PRF(K_i, the real identity of the terminal device || the identity of the first network device || r_c#2 || r_s#2 || "SessionKey"). For example, K_session includes K_mac || K_enc.
[0192] In a possible implementation, the terminal device generates the second random identity according to the third shared key, the third random number and the fourth random number. For example, the second random identity = PRF(PRF(K_session, r_c#2 || r_s#2), r_c#2 || r_s#2).
[0193] 407, the terminal device communicates with the first network device according to the third shared key K_session.
[0194] For example, the first network device can calculate C = MAC(K_Mac, the deactivation instruction T) by using K_mac in the third key K_session, and send C to the terminal device; the terminal device verifies C by using K_mac in the third shared key K_session, and executes the instruction if it is correct. Assuming that the deactivation instruction T is used to instruct the terminal device to sleep, at this time, the terminal device will sleep based on the received instruction.
[0195] Optionally, the terminal device receives sixth authentication information from the second network device, and the terminal device can verify the correctness of the sixth authentication information, and sends a reject instruction to the second network device if it is incorrect; in the case that the terminal device verifies that the sixth authentication information is correct, the terminal device communicates with the terminal device according to the fourth shared key K**.
[0196] It should be noted that the technical effects achieved by the method 400 are similar to those of the method 300, and details can be referred to the description of the method 300. The difference is that in scenario two, the first network device can trigger the access of multiple terminal devices at a time by sending a broadcast message to the terminal device, which is more efficient and saves signaling overhead compared with scenario one.
[0197] It should be understood that in the specific implementation, the method 200 and the method 400 can be used in combination. For example, the method 200 can be executed first, and then the method 400 can be executed.
[0198] It can be understood that the examples in the methods 200-400 in the embodiments of the present application are only for the convenience of those skilled in the art to understand the embodiments of the present application, and are not intended to limit the embodiments of the present application to the specific scenarios exemplified. Those skilled in the art can obviously make various equivalent modifications or changes according to the examples in the methods 200-400, and such modifications or changes also fall within the scope of the embodiments of the present application.
[0199] It can also be understood that some optional features in the embodiments of the present application can not depend on other features in some scenarios, or can be combined with other features in some scenarios, without limitation.
[0200] It can also be understood that the various embodiments described in the present application can be independent solutions, or can be combined according to the inherent logic, and these solutions fall within the protection scope of the present application. The explanation or description of each term appearing in the embodiments can be mutually referenced or explained in each embodiment, without limitation.
[0201] It should be understood that the predefinition in the present application can be understood as definition, predefinition, storage, pre-storage, pre-negotiation, pre-configuration, solidification, or pre-burning.
[0202] It can be understood that in the present application, "in the case of", "if" and "if" all refer to the device making corresponding processing under certain objective circumstances, not limited to time, and also does not require the device to have a judgment action when implemented, nor does it mean that there are other limitations.
[0203] The above mainly introduces the solutions provided by the embodiments of the present application from the perspective of interaction between nodes. It can be understood that each node, such as a terminal device and a network device, contains a corresponding hardware structure and / or software module for executing each function in order to achieve the above functions. Those skilled in the art should realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in the present application can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in hardware or computer software driven hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0204] The embodiments of the present application can divide the functional modules of the terminal device and the network device according to the above method examples. For example, each functional module can be divided according to each function, or two or more functions can be integrated in one processing module. The integrated module can be realized in the form of hardware or in the form of a software functional module. It should be noted that the division of the modules in the embodiments of the present application is illustrative, and is only a logical functional division. In actual implementation, another division manner can be used. The following will be described taking the example of dividing each functional module according to each function.
[0205] FIG. 5 is a schematic block diagram of an authentication and authorization apparatus 100 provided by the embodiments of the present application. As shown in the figure, the apparatus 100 can include a transceiver unit 110 and a processing unit 120.
[0206] In a possible design, the apparatus 100 can be the terminal device in the above method embodiments, or can be a chip for implementing the functions of the terminal device in the above method embodiments. It should be understood that the apparatus 100 can correspond to the terminal device in the methods 200-400 according to the embodiments of the present application, and the apparatus 100 can perform the steps corresponding to the terminal device in the methods 200-400 according to the embodiments of the present application.
[0207] In a possible design, the apparatus 100 can be the network device in the above method embodiments, or can be a chip for implementing the functions of the network device in the above method embodiments. It should be understood that the apparatus 100 can correspond to the network device in the methods 200-400 according to the embodiments of the present application, and the apparatus 100 can perform the steps corresponding to the network device in the methods 200-400 according to the embodiments of the present application.
[0208] The network device can be the first network device or the second network device.
[0209] It should also be understood that the apparatus 100 herein is embodied in the form of functional units. The term "unit" herein can refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (for example, a shared processor, a dedicated processor or a group processor and the like) and a memory for executing one or more software or firmware programs, a combination logic circuit and / or other suitable components that support the described functions. In an optional example, those skilled in the art can understand that the apparatus 100 can be specifically the terminal device or the network device in the above embodiments, and can be used to execute each process and / or step corresponding to the terminal device in each method embodiment. To avoid repetition, details are not described here.
[0210] The apparatus 100 of each of the above solutions has a function of implementing the corresponding steps performed by the terminal device or the network device in the above method. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions; for example, the transceiver unit can be replaced by a transceiver (for example, the transmitting unit in the transceiver unit can be replaced by a transmitter, and the receiving unit in the transceiver unit can be replaced by a receiver), and other units such as the processing unit can be replaced by a processor, which respectively performs the transceiving operation and the related processing operation in each method embodiment.
[0211] In addition, the transceiver unit 110 described above can also be a transceiver circuit (for example, can include a receiving circuit and a transmitting circuit), and the processing unit can be a processing circuit.
[0212] It should be noted that the apparatus in FIG. 5 can be a terminal device or a network device in the foregoing embodiments, or can be a chip or a chip system, for example, a system on chip (SoC). The transceiver unit can be an input / output circuit or a communication interface, and the processing unit can be a processor or a microprocessor integrated on the chip or an integrated circuit. In this regard, no limitation is made.
[0213] FIG. 6 is a schematic block diagram of an authentication and authorization apparatus 200 according to an embodiment of the present application. As shown in the figure, the apparatus 200 includes at least one processor 220. The processor 220 is coupled with a memory and is configured to execute instructions stored in the memory to send and / or receive signals. Optionally, the apparatus 200 further includes a memory 230 for storing instructions. Optionally, the apparatus 200 further includes a transceiver 210, and the processor 220 controls the transceiver 210 to send and / or receive signals.
[0214] It should be understood that the processor 220 and the memory 230 described above can be combined into one processing device, and the processor 220 is configured to execute program codes stored in the memory 230 to implement the above functions. In a specific implementation, the memory 230 can also be integrated in the processor 220, or independent of the processor 220.
[0215] It should also be understood that the transceiver 210 can include a transceiver (also referred to as a receiver) and a transmitter (also referred to as a transmitter). The transceiver can further include an antenna, and the number of antennas can be one or more. The transceiver 210 can be a communication interface or an interface circuit.
[0216] Specifically, the transceiver 210 in the apparatus 200 can correspond to the transceiver unit 110 in the apparatus 100, and the processor 220 in the apparatus 200 can correspond to the processing unit 120 in the apparatus 200.
[0217] As an implementation, the apparatus 200 is configured to implement operations performed by a terminal device in the above method embodiments.
[0218] For example, the processor 220 is configured to execute computer programs or instructions stored in the memory 230 to implement the related operations of the wireless access network device in the above method embodiments. For example, the method performed by the terminal device in the embodiment shown in any one of the methods 200-400.
[0219] As another implementation, the apparatus 200 is configured to implement operations performed by a network device in the above method embodiments.
[0220] For example, the processor 220 is configured to execute computer programs or instructions stored in the memory 230 to implement the related operations of the network device in the above method embodiments. For example, the method performed by the network device in the embodiment shown in any one of the methods 200-500.
[0221] For example, the network device can be a first network device or a second network device.
[0222] It should be understood that the specific process of each transceiver and processor performing the above corresponding steps has been described in detail in the above method embodiments, and for the sake of brevity, will not be repeated here.
[0223] In the implementation process, each step of the above method can be completed by integrated logic circuits of hardware in the processor or instructions in the form of software. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as completed by a hardware processor, or completed by a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, register, etc. The storage medium is located in the memory, and the processor reads the information in the memory, and combines the hardware to complete the steps of the above method. To avoid repetition, it will not be described in detail here.
[0224] It should be noted that the processor in the embodiments of the present application can be an integrated circuit chip with a signal processing capability. In the implementation process, each step of the method embodiments described above can be completed by the integrated logic circuit or the instruction in the form of software in the processor. The processor described above can be a general processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. Each method, step and logic block diagram disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the memory, and the processor reads the information in the memory, and combines the hardware to complete the steps of the above method.
[0225] It is to be appreciated that the memory in the embodiments of the application can be a volatile or non-volatile memory, or can include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically EPROM (EEPROM), or flash memory. The volatile memory can be random access memory (RAM) used as external cache. By way of example, and not limitation, many forms of RAM are available, for example, static RAM (SRAM), dynamic RAM (DRAM), synchronous dynamic RAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synch-link DRAM (SLDRAM), and direct ram-bus RAM (DR RAM). It is to be appreciated that the memory described herein is intended to include, without being limited to, these and any other suitable types of memory.
[0226] According to the method provided in the embodiments of the application, the application further provides a computer program product, which has computer program codes stored thereon, and when the computer program codes run on a computer, the computer is caused to perform the method executed by the terminal device or the network device in any one of the embodiments of the method 200 to the method 400.
[0227] According to the method provided in the embodiments of the application, the application further provides a computer readable medium, which has program codes stored thereon, and when the program codes run on a computer, the computer is caused to perform the method executed by the terminal device or the network device in the above embodiments.
[0228] According to the method provided in the embodiments of the application, the application further provides a communication system, which includes a terminal device and a network device. The terminal device is configured to perform the steps corresponding to the terminal device in the above method 200 to 400, and the network device is configured to perform the steps corresponding to the network device in the above method 200 to 400.
[0229] The explanations and beneficial effects of the related content in any of the above-provided devices can refer to the corresponding method embodiments provided above, and will not be repeated here.
[0230] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media sets. The available media can be magnetic media (such as floppy disk, hard disk, magnetic tape), optical media (such as high-density digital video disc (digital video disc, DVD)), or semiconductor media (such as solid state disc (solid state disc, SSD)) and the like.
[0231] In each of the above device embodiments, the corresponding steps are performed by the corresponding modules or units, for example, the transceiver unit (transceiver) performs the steps of receiving or transmitting in the method embodiments, and the other steps except for transmitting and receiving can be performed by the processing unit (processor). The functions of the specific units can refer to the corresponding method embodiments. The processor can be one or more.
[0232] As used in this description, the terms "component," "module," "system", and the like are intended to refer to a computer-related entity, either hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to being, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and / or a computer. By way of illustration, both an application running on a computing device and the computing device can be a component. One or more components can reside within a process and / or thread of execution and a component can be localized, partially localized, or distributed across several computers or pieces of equipment. Also, these components can execute from various computer readable media having various data structures stored thereon. The components can communicate by way of local and / or remote processes such as in accordance with a signal having one or more data packets (e.g., data from one component interacting with another component in a local system, distributed system, and / or across a network such as the Internet with other systems via the signal).
[0233] Those skilled in the art can clearly understand that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software mode depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0234] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
[0235] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be realized by other ways. For example, the device embodiments described above are merely illustrative, for example, the division of the units is only a logical function division, and actual implementation can have another division mode, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed units can be through some interface, indirect coupling or communication connection between devices or units, which can be electrical, mechanical or other forms.
[0236] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e. they can be located in one place or distributed on multiple network units. Part or all of the units can be selected to achieve the purpose of the embodiment scheme according to actual needs.
[0237] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit.
[0238] If the functions are realized in the form of software functional units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0239] It should be understood that the "embodiments" mentioned throughout the specification mean that the specific features, structures or characteristics related to the embodiments are included in at least one embodiment of the present application. Therefore, the various embodiments throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner.
[0240] It should also be understood that the present application refers to "first", "second" and the like ordinal numbers are used to distinguish a plurality of objects, and are not used to limit the size, content, order, timing, priority or importance of the plurality of objects. For example, the first PDSCH and the second PDSCH can be the same physical channel or different physical channels, and such names do not mean that the information amount, content, priority or importance of the two physical channels are different.
[0241] It should also be understood that in the present application, "at least one" means one or more, and "multiple" means two or more. "At least one" or the like means one or more, that is, any combination of these items, including any combination of single item or multiple items. For example, at least one of a, b, or c means: a, b, c, a and b, a and c, b and c, or a and b and c.
[0242] It should also be understood that, in the embodiments of the present application, "A corresponds to B" means that B is associated with A, and B can be determined according to A. However, it should also be understood that the determination of B according to A does not mean that B is determined only according to A, but B can also be determined according to A and / or other information.
[0243] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of the changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for authentication, characterized in that: include: The terminal device sends a first request message to the first network device, where the first request message carries the real identifier of the terminal device, a first random number, and first authentication information, where the first authentication information is used by the first network device to verify the terminal device, and the real identifier and the first random number are used to generate a first random identifier corresponding to the terminal device; The terminal device receives a first response message from the first network device, where the first response message carries a second random number and second authentication information, and the second authentication information is used by the terminal device to verify the first network device; When the terminal device verifies that the second authentication information is correct, the terminal device generates the first random identifier corresponding to the terminal device according to the first shared key K_i corresponding to the real identifier, the first random number, and the second random number; The terminal device communicates with the first network device according to the first random identifier.
2. The method according to claim 1, characterized in that The method further comprises: The terminal device generates a second shared key K* according to the first shared key K_i, the first random number, the real identifier of the terminal device, and the identifier of the first network device; The terminal device generates the first authentication information according to the second shared key K* and the first random number.
3. The method according to claim 1 or 2, characterized in that The real identification of the terminal device includes the globally unique identification of the terminal device, and the first shared key K_i is generated according to the master key MK and the globally unique identification.
4. The method according to any one of claims 1 to 3, characterized in that The terminal device communicates with the first network device according to the first random identifier, including: The terminal device sends a second request message to the first network device, where the second request message is used to request access to the first network device, and the second request message carries the first random identifier and a third random number; The terminal device receives a second response message from the first network device, where the second response message carries a fourth random number and third authentication information, wherein the third authentication information is used by the terminal device to verify the first network device; When the terminal device verifies that the third authentication information is correct, the terminal device generates fourth authentication information, a third shared key K_session, and a second random identifier corresponding to the terminal device based on the first shared key K_i, wherein the third shared key K_session is a shared key between the terminal device and the first network device, and the fourth authentication information is used by the first network device to verify the terminal device; The terminal device sends the fourth authentication information to the first network device; The terminal device communicates with the first network device according to the third shared key K_session and the second random identifier.
5. The method according to claim 4, characterized in that The terminal generates a third shared key K_session, fourth authentication information, and a second random identifier corresponding to the terminal device based on the first shared key K_i, including: The terminal device generates a temporary shared key K1 according to the first shared key K_i, the first random identifier, the identifier of the first network device, the third random number, and the fourth random number; The terminal device generates the fourth authentication information according to the temporary shared key K1, the third random number, the fourth random number, and the first character string; The terminal device generates the third shared key K_session according to the first shared key K_i, the real identifier of the terminal device, the identifier of the first network device, the third random number and the fourth random number; The terminal device generates the second random identifier according to the third shared key, the third random number and the fourth random number.
6. The method according to claim 4 or 5, characterized in that The terminal device sending a second request message to the first network device includes: The terminal device sends the second request message to the first network device through the second network device; The terminal device receives a second response message from the first network device, including: The terminal device receives a second response message from the first network device through the second network device.
7. The method according to claim 6, characterized in that The method further comprises: The terminal device receives fifth authentication information from the second network device, where the fifth authentication information is used by the terminal device to verify the second network device; When the terminal device verifies that the fifth authentication information is correct, the terminal device generates sixth authentication information according to the first random identifier, and the sixth authentication information is used by the second network device to verify the terminal device; The terminal device sends the sixth authentication information to the second network device; The terminal device communicates with the second network device according to a fourth shared key K**, where the fourth shared key K** is a shared key between the terminal device and the second network device.
8. The method according to claim 7, characterized in that The terminal device generates sixth authentication information according to the first random identifier, including: The terminal device generates the fourth shared key K** according to the first random identifier, the identifier of the second network device, the identifier of the first network device, the third random number, and the fourth random number; The terminal device generates the sixth authentication information according to the four shared keys K**, the identifier of the second network device, the third random number, the fourth random number, and the second character string.
9. The method according to claim 8, characterized in that The terminal device communicates with the first network device according to the first random identifier, including: The terminal device receives a broadcast message from the first network device, where the broadcast message is used to trigger the terminal device to access the first network device, and the broadcast message carries a fourth random number; The terminal device generates fourth authentication information according to the first random identifier, where the fourth authentication information is used by the first network device to verify the terminal device; The terminal device sends a third request message to the first network device, where the third request message is used to request access to the first network device, and the third request message carries the first random identifier, the third random number, and the fourth authentication information; The terminal device receives a third response message from the first network device, where the third response message carries third authentication information, and the third authentication information is used by the terminal device to verify the first network device; When the terminal device verifies that the third verification message is correct, the terminal device generates a third shared key K_session and a second random identifier corresponding to the terminal device based on the first shared key K_i, wherein the third shared key K_session is a shared key between the terminal device and the first network device; The terminal device communicates with the first network device according to the third shared key and the second random identifier.
10. The method according to claim 9, characterized in that The terminal device generates fourth authentication information according to the first random identifier, including: The terminal device generates the fourth authentication information according to the first random identifier, the first shared key K_i, the identifier of the first network device, the third random number, the fourth random number, and the first character string.
11. The method according to claim 9 or 10, characterized in that The terminal device generates a third shared key K_session and a second random identifier corresponding to the terminal device according to the first shared key K_i, including: The terminal device generates the third shared key K_session according to the first shared key K_i, the real identifier of the terminal device, the identifier of the first network device, the third random number and the fourth random number; The terminal device generates the second random identifier according to the third shared key, the third random number and the fourth random number.
12. The method according to any one of claims 9 to 11, characterized in that The method further comprises: The terminal device generates fifth authentication information according to the first random identifier, where the fifth authentication information is used by the second network device to verify the terminal device; The terminal device sends the fifth authentication information to the second network device; The terminal device receives sixth authentication information from the second network device, where the sixth authentication information is used by the terminal device to verify the second network device; When the terminal device verifies that the sixth authentication information is correct, the terminal device communicates with the second network device according to a fourth shared key K**, where the fourth shared key is a shared key between the terminal device and the second network device.
13. The method according to claim 12, characterized in that The terminal device generates sixth authentication information according to the first random identifier, including: The terminal device generates the fourth shared key K** according to the first random identifier, the identifier of the second network device, the identifier of the first network device, the third random number, and the fourth random number; The terminal device generates the sixth authentication information according to the four shared keys K**, the identifier of the second network device, the third random number, the fourth random number, and the second character string.
14. A method for authentication, characterized in that: include: The first network device receives a first request message from the terminal device, where the first request message carries a real identifier of the terminal device, a first random number, and first authentication information, where the first authentication information is used by the first network device to verify the terminal device; When the first network device verifies that the first authentication information is correct, the first network device generates second authentication information and a first random identifier corresponding to the terminal device according to the first shared key K_i corresponding to the real identifier, the first random number, and the second random number, wherein the second authentication information is used by the terminal device to verify the first network device; The first network device sends a first response message to the terminal device, where the first response message carries the second authentication information and the second random number; The first network device communicates with the terminal device according to the first random identifier.
15. The method according to claim 14, characterized in that The method further comprises: The first network device generates the first shared key K_i according to the real identifier of the terminal device; Generate a second shared key K* according to the first shared key K_i, the first random number, the real identifier of the terminal device, and the identifier of the first network device; The terminal device generates the first authentication information according to the second shared key K* and the first random number.
16. The method according to claim 14 or 15, characterized in that The real identification of the terminal device includes the globally unique identification of the terminal device, and the first shared key K_i is generated according to the master key MK and the globally unique identification.
17. The method according to any one of claims 14 to 16, characterized in that The first network device communicating with the terminal device according to the first random identifier includes: The first network device receives a second request message from the terminal device, where the second request message is used to request access to the first network device, and the second request message carries the first random identifier and a third random number; The first network device generates third authentication information according to the first random identifier, where the third authentication information is used by the terminal device to verify the first network device; The first network device sends a second response message to the terminal device, where the second response message carries a fourth random number and third authentication information; The first network device receives fourth authentication information from the terminal device, where the fourth authentication information is used by the first network device to verify the terminal device; When the first network device verifies that the third authentication information is correct, the first network device generates a third shared key K_session and a second random identifier corresponding to the terminal device based on the first shared key K_i, wherein the third shared key K_session is a shared key between the terminal device and the first network device; The first network device communicates with the terminal device according to the third shared key K_session and the second random identifier.
18. The method according to claim 17, characterized in that The first network device generates third authentication information according to the first random identifier, including: The first network device determines the real identifier of the terminal device according to the first random identifier; The first network device generates a temporary shared key K1 according to the first shared key K_i corresponding to the real identifier of the terminal device, the first random identifier, the identifier of the first network device, the third random number and the generated fourth random number; The first network device generates the third authentication information according to the temporary shared key K1, the third random number, the fourth random number, and a third character string.
19. The method according to claim 17 or 18, characterized in that The first network device generates a third shared key K_session and a second random identifier corresponding to the terminal device according to the first shared key K_i, including: The first network device generates the third shared key K_session according to the first shared key K_i, the real identifier of the terminal device, the identifier of the first network device, the third random number and the fourth random number; The terminal device generates the second random identifier according to the third shared key K_session, the third random number and the fourth random number.
20. The method according to any one of claims 17 to 19, characterized in that The first network device receiving a first request message from a terminal device includes: The first network device receives a second request message from the terminal device through the second network device; The first network device sending a first response message to the terminal device includes: The first network device sends a second response message to the terminal device through the second network device.
21. The method according to claim 20, characterized in that The method further comprises: The first network device generates a fourth shared key K** based on the first shared key K_i, the identifier of the second network device, the identifier of the first network device, the third random number, and the fourth random number, where the fourth shared key K** is a shared key between the terminal device and the second network device; The first network device sends the fourth shared key K** to the second network device.
22. The method according to claim 21, characterized in that The first network device communicating with the terminal device according to the first random identifier includes: The first network device sends a broadcast message to the terminal device, where the broadcast message is used to trigger the terminal device to access the first network device, and the broadcast message carries a fourth random number; The first network device receives a third request message from the terminal device, where the third request message is used to request access to the first network device, and the third request message carries the first random identifier, the third random number, and fourth authentication information, where the fourth authentication information is used by the first network device to verify the terminal device; When the first network device verifies that the fourth authentication information is correct, the first network device generates third authentication information, a third shared key K_session, and a second random identifier corresponding to the terminal device according to the first random identifier; The first network device sends the third response message to the terminal device, where the third response message carries the third authentication information; The first network device communicates with the terminal device according to the third shared key and the second random identifier.
23. The method according to claim 22, characterized in that The first network device generates, according to the first random identifier, third authentication information, a third shared key K_session, and a second random identifier corresponding to the terminal device, including: The first network device determines the real identifier corresponding to the terminal device based on the first random identifier, and determines the first shared key K_i according to the real identifier corresponding to the terminal device; The first network device generates a temporary shared key K1 according to the first shared key K_i, the first random identifier, the identifier of the first network device, the third random number, and the fourth random number; The first network device generates the third authentication information according to the temporary shared key K1, the third random number, the fourth random number, and the third character string; The first network device generates the third shared key K_session according to the first shared key K_i, the real identifier of the terminal device, the identifier of the first network device, the third random number and the fourth random number; The first network device generates the second random identifier according to the third shared key K_session, the third random number, and the fourth random number.
24. The method according to claim 22 or 23, characterized in that The method further comprises: The first network device generates a fourth shared key K** based on the first shared key K_i, the identifier of the second network device, the identifier of the first network device, the third random number, and the fourth random number, where the fourth shared key K** is a shared key between the terminal device and the second network device; The first network device sends the fourth shared key K** to the second network device.
25. A communication device, characterized in that: The communication device includes a processor and a memory, wherein the memory is used to store computer programs or instructions, and the processor is used to execute the computer programs or instructions in the memory, so that the method of any one of claims 1 to 13 or claims 14 to 24 is executed.
26. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 13 or claims 14 to 24.
27. A computer program product, characterized in that The computer program product comprises means for executing the method according to any one of claims 1 to 13 or claims 14 to 24.
Citation Information
Patent Citations
Data transmission method and device by use of Wi-Fi network
CN105307160A
Authentication method and device for terminal equipment
CN114025352A
Communication method and device
CN116684865A
Cross-network switching authentication method and device
CN117296373A
Shared service establishment method and related product
WO2022227587A1