Communication method and device, equipment and storage medium

By directly updating the GBA application layer session key in the GBA system, the problem of long reboot process in the key refresh mechanism in the GBA system is solved, the cost of key refresh and the impact on the business are reduced, and the equipment of the operator network is improved. Utilization and operation and maintenance efficiency.

CN118632246APending Publication Date: 2024-09-10CHINA MOBILE COMM LTD RES INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310254782.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-07
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

In the existing Enhanced General Boot Architecture (GBA) system, the GBA application layer session key Ks*_NAF refresh mechanism has the problem of a long and costly reboot process, which affects the operation and maintenance costs and business stability of the operator's network.

Method used

In the GBA system, the first device sends a message to the second device to request key update, and determines the new key based on the session key, string, boot transaction identifier, terminal and server identifiers and parameters to avoid triggering a reboot. process, directly update the key and notify the terminal.

Benefits of technology

It realizes the key update without triggering the reboot process, reduces the cost of key refresh and the impact on the business, and improves the equipment utilization and operation and maintenance efficiency of the operator's network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118632246A
    Figure CN118632246A
Patent Text Reader

Abstract

Disclosed are a communication method, apparatus and device, and a storage medium, the method comprising: a first device sending a first message to a second device; the first message is used for requesting a second device to determine a first key; a first key from the second device is received.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of wireless communications, and in particular to a communication method, apparatus, device and storage medium. Background Art

[0002] In the prior art, in an enhanced Generic Bootstrapping Architecture (GBA) system, after the security processing process is completed, the network service side and the terminal (UE, User Equipment) can communicate through a shared GBA application layer session key Ks*_NAF.

[0003] However, after the GBA application layer session key Ks*_NAF is generated, a new session key must be regenerated by triggering the reboot process. Summary of the invention

[0004] In view of this, the main purpose of the present invention is to provide a communication method, apparatus, device and storage medium.

[0005] To achieve the above object, the technical solution of the present invention is achieved as follows:

[0006] In a first aspect, an embodiment of the present invention provides a communication method, which is applied to a first device, and the method includes:

[0007] Sending a first message to a second device; the first message is used to request the second device to determine a first key;

[0008] A first key is received from the second device.

[0009] In the above solution, the sending the first message to the second device includes:

[0010] When the used key cannot satisfy the key validity condition set by the first device according to the security policy, or when it is necessary to trigger the update of the used key, a first message is sent to the second device.

[0011] In the above solution, the used key cannot satisfy the key validity condition set by the first device according to the security policy, including at least one of the following:

[0012] The key has reached the upper limit of the number of times it can be reused;

[0013] The key has reached the usage time allowed by the application;

[0014] The key has been exposed externally.

[0015] In the above solution, when the method is applied to a GBA system, the first device is a server, and the second device is a network application function (NAF, Network Application Function).

[0016] In a second aspect, an embodiment of the present invention provides a communication method, which is applied to a second device, and the method includes:

[0017] Receiving a first message from a first device; the first message is used to request a second device to determine a first key;

[0018] Sending a first key to the first device; and / or sending a second message to the terminal, where the second message is used to instruct the terminal to determine the first key.

[0019] In the above scheme, the method further comprises:

[0020] The first key is determined according to at least one of the following:

[0021] session key, character string, bootstrapping transaction identifier (B-TID, Bootstrapping Transaction Identifier), identifier of the terminal, identifier of the first device, and first parameter;

[0022] The first parameter includes at least one of the following:

[0023] first value;

[0024] Random numbers.

[0025] In the above scheme, the method further comprises:

[0026] The first parameter is sent to the terminal.

[0027] In the above solution, the second device and the terminal use the same mechanism to determine the first value.

[0028] In the above solution, the mechanism is to use a timer to determine the first value; the method further includes:

[0029] After determining the first key, the timer is updated.

[0030] In the above solution, when the second device communicates with the terminal, at least one of the following communication protocols is adopted:

[0031] Hyper Text Transfer Protocol (HTTP), Constrained Application Protocol (CoAP), Message Queuing Telemetry Transport (MQTT) protocol, and preset private protocols.

[0032] In the above solution, when the method is applied to a GBA system, the first device is a server and the second device is a NAF.

[0033] In a third aspect, an embodiment of the present invention provides a communication method, applied to a terminal, the method comprising:

[0034] receiving a second message from a second device; the second message is used to instruct the terminal to determine a first key;

[0035] The first key is determined.

[0036] In the above solution, the first key is determined according to at least one of the following:

[0037] session key, character string, B-TID, identifier of the terminal, identifier of the first device, and first parameter;

[0038] The first parameter includes at least one of the following:

[0039] first value;

[0040] Random numbers.

[0041] In the above scheme, the method further comprises:

[0042] A first parameter is received from the second device.

[0043] In the above solution, the second device and the terminal use the same mechanism to determine the first value.

[0044] In the above solution, the mechanism is to use a timer to determine the first value; the method further includes:

[0045] After determining the first key, the timer is updated.

[0046] In the above solution, when the first device communicates with the terminal, at least one of the following communication protocols is adopted:

[0047] HTTP, CoAP, MQTT, preset private protocols.

[0048] In the above solution, when the method is applied to the GBA system, the second device is the NAF.

[0049] In a fourth aspect, an embodiment of the present invention provides a communication device, applied to a first device, the device comprising:

[0050] A first sending module, configured to send a first message to a second device; the first message is used to request the second device to determine a first key;

[0051] The first receiving module is used to receive a first key from the second device.

[0052] In the above solution, the first sending module is used to send a first message to the second device when the key in use cannot meet the key validity condition set by the first device according to the security policy, or when it is necessary to trigger the update of the key in use.

[0053] In the above solution, the used key cannot satisfy the key validity condition set by the first device according to the security policy, including at least one of the following:

[0054] The key has reached the upper limit of the number of times it can be reused;

[0055] The key has reached the usage time allowed by the application;

[0056] The key has been exposed externally.

[0057] In the above solution, when the apparatus is applied to a GBA system, the first device is a server and the second device is a NAF.

[0058] In a fifth aspect, an embodiment of the present invention provides a communication device, applied to a second device, the device comprising:

[0059] A second receiving module, configured to receive a first message from a first device; the first message is used to request the second device to determine a first key;

[0060] The second sending module is used to send the first key to the first device; and / or send a second message to the terminal, where the second message is used to instruct the terminal to determine the first key.

[0061] In the above solution, the device further includes: a second determining module, configured to determine the first key according to at least one of the following:

[0062] session key, character string, B-TID, identifier of the terminal, identifier of the first device, and first parameter;

[0063] The first parameter includes at least one of the following:

[0064] first value;

[0065] Random numbers.

[0066] In the above solution, the second sending module is further used to send the first parameter to the terminal.

[0067] In the above solution, the second device and the terminal use the same mechanism to determine the first value.

[0068] In the above scheme, the mechanism is to use a timer to determine the first value; the second determination module is also used to update the timer after determining the first key.

[0069] In the above solution, when the second device communicates with the terminal, at least one of the following communication protocols is adopted:

[0070] HTTP, CoAP, MQTT, preset private protocols.

[0071] In the above solution, when the apparatus is applied to a GBA system, the first device is a server and the second device is a NAF.

[0072] In a sixth aspect, an embodiment of the present invention provides a communication device, applied to a terminal, the device comprising:

[0073] A third receiving module, configured to receive a second message from a second device; the second message is used to instruct the terminal to determine the first key;

[0074] The third determining module is used to determine the first key.

[0075] In the above solution, the third determination module is used to determine the first key according to at least one of the following:

[0076] session key, character string, B-TID, identifier of the terminal, identifier of the first device, and first parameter;

[0077] The first parameter includes at least one of the following:

[0078] first value;

[0079] Random numbers.

[0080] In the above solution, the third receiving module is also used to receive the first parameter from the second device.

[0081] In the above solution, the second device and the terminal use the same mechanism to determine the first value.

[0082] In the above scheme, the mechanism is to use a timer to determine the first value; the third determination module is also used to update the timer after determining the first key.

[0083] In the above solution, when the first device communicates with the terminal, at least one of the following communication protocols is adopted:

[0084] HTTP, CoAP, MQTT, preset private protocols.

[0085] In the above solution, when the apparatus is applied to a GBA system, the second device is a NAF.

[0086] In the seventh aspect, an embodiment of the present invention provides a communication device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any one of the methods described are performed on the first device side; or, when the processor executes the program, the steps of any one of the methods described are performed on the second device side; or, when the processor executes the program, the steps of any one of the methods described are performed on the terminal side.

[0087] In the eighth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the computer program implements the steps of any one of the methods performed on the first device side; or, when the computer program is executed by a processor, the computer program implements the steps of any one of the methods performed on the second device side; or, when the computer program is executed by a processor, the computer program implements the steps of any one of the methods performed on the terminal side.

[0088] The embodiments of the present invention provide a communication method, apparatus, device and storage medium, the method comprising: a first device sends a first message to a second device; the first message is used to request the second device to determine a first key; the first key from the second device is received; the second device receives the first message from the first device; sends the first key to the first device; and / or sends a second message to a terminal, the second message is used to instruct the terminal to determine the first key; accordingly, the terminal receives the second message from the second device; and determines the first key. In this way, the first device can request to update the key without triggering the reboot process, and inform the terminal of the updated key. BRIEF DESCRIPTION OF THE DRAWINGS

[0089] Figure 1 This is a GBA system networking architecture diagram in a 4G network environment;

[0090] Figure 2 It is an enhanced GBA system architecture diagram;

[0091] Figure 3 A flow chart of a communication method provided by an embodiment of the present invention;

[0092] Figure 4A schematic diagram of a flow chart of another communication method provided by an embodiment of the present invention;

[0093] Figure 5 A flowchart of another communication method provided by an embodiment of the present invention;

[0094] Figure 6 A schematic diagram of a flow chart of a key updating method for an enhanced GBA system provided by an embodiment of the present invention;

[0095] Figure 7 A schematic diagram of the structure of a communication device provided by an embodiment of the present invention;

[0096] Figure 8 A schematic diagram of the structure of another communication device provided by an embodiment of the present invention;

[0097] Fig. 9 A schematic diagram of the structure of another communication device provided by an embodiment of the present invention;

[0098] Fig.10 A schematic diagram of the structure of a communication device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0099] Before describing the present invention in detail, the related art method is described first.

[0100] Generic Bootstrapping Architecture (GBA) is a universal authentication and session key negotiation method based on mobile communication networks and Universal Subscriber Identity Module (USIM) defined by the 3rd Generation Partnership Project (3GPP). It can provide complete security authentication and application layer session channel encryption services for application layer services. The GBA system can be built on the 4th generation mobile communication technology (4G) or the 5th generation mobile communication technology (5G). The GBA system networking architecture in the 4G network environment is as follows: Figure 1 The system architecture under the 5G network is similar to that of the 5G network, except that the Home Subscriber Server (HSS) is replaced by the Unified Data Management (UDM).

[0101] Under the standard GBA architecture, the Network Application Function (NAF) network element is integrated with the server (also called application server) and deployed externally on the service provider side. The NAF network element uses the 4G / 5G cellular network GBA security mechanism to authenticate the terminal device accessing the server and perform key negotiation (AKA) identity authentication. After successful authentication, it obtains the GBA session key Ks_NAF shared with the terminal from the Bootstrapping Server Function (BSF) network element, establishes a security association, and implements secure communication between the terminal and the server based on Ks_NAF.

[0102] However, under the 3GPP standard GBA architecture, NAF network elements are deployed externally and integrated with external servers on the service provider side. One NAF network element can only provide GBA security services for application services associated with it, and cannot serve multiple applications. Therefore, this deployment method has high GBA application costs and is not conducive to large-scale deployment and promotion of GBA technology.

[0103] In order to improve the utilization rate of NAF network element equipment and reduce the operation and maintenance costs of operator networks, an enhanced GBA system architecture has been proposed, such as Figure 2 As shown. In this system, the NAF network element is deployed on the operator network side, not on the service provider side, so that the operator can build a GBA service platform based on the NAF network element and provide security services for multiple different servers. The server interacts with the NAF network element by integrating a streamlined NAF' service function processing module to implement an enhanced GBA security authentication and key negotiation mechanism, so that after performing GBA AKA identity authentication on the terminal (UE, User ELquipment), it can obtain the GBA application layer session key Ks*_NAF derived from Ks_NAF from the NAF network element, establish an application layer security association, and communicate securely with the terminal based on Ks*_NAF. Figure 2 In the figure, Zh, Ub, Zn, Ua and Zn' are all interfaces involved in the communication process.

[0104] In the enhanced GBA system, after the enhanced GBA security process is completed and the server and the UE already have a shared GBA application layer session key Ks*_NAF, there is a situation where the server actively requests to refresh the GBA application layer session key Ks*_NAF for security reasons.

[0105] Currently, there is no effective mechanism to solve the Ks*_NAF refresh for the enhanced GBA system. One possible way is to trigger the reboot process by the server, that is, to trigger the UE to re-execute AKA authentication and generate new Ks and GBA session keys, and then generate a new Ks*_NAF. This solution has the following disadvantages:

[0106] 1) Re-triggering the GBA bootstrapping process will cause the UE to re-execute AKA, which results in a long and costly key refresh process;

[0107] 2) The key refresh process triggered by a server will cause the upper-layer key to change, thereby affecting other services using the upper-layer key.

[0108] Based on this, in the method provided by the embodiment of the present invention, the first device sends a first message to the second device; the first message is used to request the second device to determine the first key; and the first key from the second device is received. The second device receives the first message from the first device; sends the first key to the first device; and / or sends a second message to the terminal, the second message is used to instruct the terminal to determine the first key; accordingly, the terminal receives the second message from the second device; and determines the first key.

[0109] The present invention will be further described in detail below in conjunction with the embodiments.

[0110] Figure 3 A flow chart of a communication method provided by an embodiment of the present invention; Figure 3 As shown, applied to a first device, the method includes:

[0111] Step 301: Send a first message to a second device; the first message is used to request the second device to determine a first key;

[0112] Step 302: Receive a first key from the second device.

[0113] Here, the first message requests the second device to determine the first key, which can also be described as requesting the second device to update the currently used key, obtain the updated key, and use the updated key as the first key. The first message can achieve the corresponding function, and the description is not limited.

[0114] In some embodiments, sending the first message to the second device includes:

[0115] When the used key cannot satisfy the key validity condition set by the first device according to the security policy, or when it is necessary to trigger the update of the used key, a first message is sent to the second device.

[0116] The used key cannot satisfy the key validity condition set by the first device according to the security policy, including at least one of the following:

[0117] The key has reached the upper limit of the number of times it can be reused;

[0118] The key has reached the usage time allowed by the application;

[0119] The key has been exposed externally.

[0120] Here, the first device may actively send a first message to the second device to request the second device to update the key used, and feed back the updated key to the first device.

[0121] When the method is applied to a GBA system, the key to be updated may be a GBA application layer session key, and the first key is the updated GBA application layer session key.

[0122] For example, in the initial state, the key that needs to be updated may be a shared GBA application layer session key (such as the above-mentioned Ks*_NAF) owned by the first device (such as the server) and the terminal after the enhanced GBA security processing procedure is completed.

[0123] For another example, if the key has been updated before using the method provided by the embodiment of the present invention, the key that needs to be updated is the key currently in use, that is, the GBA application layer session key obtained by the last update.

[0124] In one example, the first device is a server, and the server considers that the used key has reached the usage time allowed by the application, such as: Ks*_NAF has exceeded the key lifetime, Ks*_NAF is about to exceed the key lifetime (or the remaining lifetime of Ks*_NAF is lower than a set threshold), etc. The length of the key lifetime can be limited based on the actual application scenario, and the specific value is not limited.

[0125] In another example, the server considers that the used key has reached the upper limit of the number of reuses, such as: the number of times Ks*_NAF is used exceeds the preset reuse threshold, etc. The reuse threshold can be defined based on the actual application scenario, and the specific value is not limited.

[0126] In another example, the server believes that the key in use has been exposed to the outside, such as: determining through detection means that the key has been known by other devices, and so on.

[0127] In another example, the server may also consider that a key update needs to be triggered due to other circumstances, for example, after recovering from an abnormal situation, the server needs to actively re-establish an application layer security association with the terminal, the Ks*_NAF shared between the server and the terminal is inconsistent, etc. For another example, Ks*_NAF acquisition fails because the B-TID for acquiring Ks*_NAF is invalid, resulting in the server failing to acquire Ks*_NAF from NAF, etc.

[0128] In actual application, other conditions that can characterize whether the key is secure and valid can also be set as judgment conditions, and the examples provided here are not limiting.

[0129] In some embodiments, when the method is applied to a GBA system, the first device is a server (Server, which may also be called an application server), and the second device includes a network application function (NAF, Network Application Function) and / or an authentication proxy (AP, Authentication Proxy).

[0130] It should be noted that the embodiment of the present invention does not limit the names of the first device and the second device, as long as the functions of the first device and the second device can be realized.

[0131] For example, when the method is applied to a GBA system, the first device is a server and the second device is a NAF. After the enhanced GBA security processing flow is executed, the server and the terminal (UE) already have a shared GBA application layer session key Ks*_NAF. During the application process, for security reasons, the server actively requests to re-authenticate the terminal identity and regenerate a new GBA application layer session key Ks*_NAF so that the server can re-establish a GBA application layer security association with the terminal. In this case, the server can send a first message to the NAF to request the NAF to update the GBA application layer session key, obtain the updated GBA application layer session key, and determine the first key.

[0132] Figure 4 A flow chart of another communication method provided by an embodiment of the present invention; Figure 4 As shown, applied to a second device, the method includes:

[0133] Step 401: Receive a first message from a first device; the first message is used to request a second device to determine a first key;

[0134] Step 402: Send a first key to the first device; and / or send a second message to the terminal, where the second message is used to instruct the terminal to determine the first key.

[0135] Here, the first message is used to request the second device to determine the first key, which can also be described as requesting the second device to update the currently used key, obtain the updated key, and use the updated key as the first key. The first message can achieve the corresponding function, and the description is not limited.

[0136] Correspondingly, the second message is used to instruct the terminal to determine the first key, and can also be described as instructing the terminal to update the currently used key, obtain the updated key, and use the updated key as the first key. The second message can achieve the corresponding function, and the description is not limited.

[0137] In some embodiments, the method further comprises:

[0138] The first key is determined according to at least one of the following:

[0139] session key, character string, B-TID, identifier of the terminal, identifier of the first device, and first parameter;

[0140] The first parameter includes at least one of the following:

[0141] first value;

[0142] Random numbers.

[0143] In one example, the method is applied in a GBA system, the first key is a GBA application layer session key (remembered as Ks*_NAF), and the session key is a GBA session key (remembered as Ks_NAF);

[0144] The second device can derive the key according to the following formula:

[0145] Ks*_NAF=KDF(GBA session key, string, B-TID, UE identifier, Server_ID, counter).

[0146] The Ks*_NAF is a first key, which represents a new GBA application layer session key (such as the updated Ks*_NAF) derived and updated based on an existing GBA session key (such as the existing Ks_NAF).

[0147] KDF is a key generation algorithm. In GBA_terminal (GBA_ME, Generic Bootstrapping Architecture_Mobile Equipment) mode, the GBA session key can be recorded as Ks_NAF; in GBA_card (GBA_U, Generic Bootstrapping_USIM) mode, the GBA session key can be recorded as Ks_int_NAF.

[0148] The GBA session key is an existing GBA session key (such as an existing Ks_NAF). When the method is applied to the GBA system, the GBA session key can be pre-agreed by the terminal and the second device based on a certain protocol, or can be determined by the terminal and the second device through negotiation through certain processes (such as the GBA boot process, the GBA boot security association use process), and of course can also be determined in other ways. The method for determining the GBA session key is not limited here.

[0149] The character string is a character representing the application service type, which is used to distinguish different services provided by the service provider and is allocated by the operator. For example, the Internet of Vehicles service can be "V2X", and the Internet of Things service can be "IoT".

[0150] B-TID is the GBA bootstrapping transaction identifier.

[0151] The UE identity is the private identity of the user terminal (IMPI, IM Private Identity).

[0152] Server_ID is the identifier of the server. It uses the fully qualified domain name (FQDN) of the server and should be globally unique.

[0153] Counter is a variable parameter, which is used by the terminal (UE) and the second device (NAF) to derive a new GBA application layer session key (Ks*_NAF) based on the existing GBA session key (such as Ks_NAF). For example, counter is a counter synchronously maintained by the UE and NAF respectively, with an initial value of "0". Each time a new GBA application layer session key (Ks*_NAF) is derived based on the current GBA session key (Ks_NAF), the counter value increases. If the GBA session key (Ks_NAF) is updated, the counter value is reset to zero.

[0154] In another example, the second device may derive the key according to the following formula:

[0155] Ks*_NAF=KDF(GBA session key, string, B-TID, UE identity, Server_ID, Random).

[0156] Among them, Random is a random number.

[0157] When the random number is used when the second device performs key derivation, the method may further include: sending the used random number to the terminal.

[0158] In some embodiments, the method further comprises:

[0159] The first parameter is sent to the terminal.

[0160] In some embodiments, the second device and the terminal use the same mechanism to determine the first value.

[0161] In some embodiments, the mechanism is to use a timer to determine the first value; the method further includes:

[0162] After determining the first key, the timer is updated.

[0163] Here, in order to ensure that the counter value maintained by the terminal and the second device (NAF) is always synchronized, the terminal shall update the counter value after receiving the key update notification (i.e., the second message) sent by the second device (NAF), regardless of whether the derivation is successful or not. Similarly, the second device (NAF) needs to update the counter value as long as it initiates a key update notification request to the terminal (i.e., after sending the second message).

[0164] In some embodiments, when the second device communicates with the terminal, at least one of the following communication protocols is adopted:

[0165] Hyper Text Transfer Protocol (HTTP), Constrained Application Protocol (CoAP), Message Queuing Telemetry Transport (MQTT) protocol, and preset private protocols.

[0166] Here, the communication protocol used between the second device and the terminal is not limited. That is, the terminal and the second device can use any application layer communication protocol for data exchange without limitation, and HTTP, CoAP, MQTT, private protocol, etc. are only used as examples.

[0167] In some embodiments, when the method is applied to a GBA system, the first device is a server, and the second device includes a NAF and / or an AP.

[0168] Figure 5 A flow chart of another communication method provided by an embodiment of the present invention; Figure 5 As shown, applied to a terminal, the method includes:

[0169] Step 501: Receive a second message from a second device; the second message is used to instruct the terminal to determine a first key;

[0170] Step 502: Determine the first key.

[0171] In some embodiments, the first key is determined according to at least one of the following:

[0172] A session key, a character string, a boot transaction identifier (B-TID), an identifier of the terminal, an identifier of the first device, and a first parameter;

[0173] The first parameter includes at least one of the following:

[0174] first value;

[0175] Random numbers.

[0176] In some embodiments, the method further comprises:

[0177] A first parameter is received from the second device.

[0178] In one example, the terminal may derive the key according to the following formula:

[0179] Ks*_NAF=KDF(GBA session key, string, B-TID, UE identifier, Server_ID, counter).

[0180] The Ks*_NAF is a first key, which represents a new GBA application layer session key (such as the updated Ks*_NAF) derived and updated based on an existing GBA session key (such as Ks_NAF).

[0181] KDF is a key generation algorithm. In GBA_ME mode, the GBA session key is recorded as Ks_NAF; in GBA_U mode, the GBA session key is recorded as Ks_int_NAF.

[0182] The GBA session key is an existing GBA session key (such as an existing Ks_NAF). When the method is applied to the GBA system, the GBA session key can be pre-agreed by the terminal and the second device based on a certain protocol, or can be negotiated and determined by the terminal and the second device through certain processes (such as the GBA boot process, the GBA boot security association use process), and of course can also be determined in other ways. The method for determining the GBA session key is not limited here.

[0183] The character string is a character representing the application service type, which is used to distinguish different services provided by the service provider and is allocated by the operator. For example, the Internet of Vehicles service can be "V2X", and the Internet of Things service can be "IoT".

[0184] B-TID is the GBA bootstrapping transaction identifier.

[0185] The UE identity is the IMPI of the user terminal.

[0186] Server_ID is the identifier of the server. It uses the FQDN of the server and must be globally unique.

[0187] Counter is a variable parameter, which is used by the terminal and the second device (NAF) to derive a new GBA application layer session key (Ks*_NAF) based on the existing GBA session key (such as Ks_NAF). For example, counter is a counter synchronously maintained by the UE and NAF respectively, with an initial value of "0". Every time a new GBA application layer session key (Ks*_NAF) is derived based on the current GBA session key (Ks_NAF), the counter value increases. If the GBA session key (Ks_NAF) is updated, the counter value is reset to zero.

[0188] In another example, the terminal may derive the key according to the following formula:

[0189] Ks*_NAF=KDF(GBA session key, string, B-TID, UE identity, Server_ID, Random).

[0190] Among them, Random is a random number.

[0191] The same formula used on the above terminal side and the second device side is used to derive the key based on the same parameters, thereby obtaining an updated key, namely the first key.

[0192] In some embodiments, the second device and the terminal use the same mechanism to determine the first value.

[0193] In some embodiments, the mechanism is to use a timer to determine the first value; the method further includes:

[0194] After determining the first key, the timer is updated.

[0195] In some embodiments, when the first device communicates with the terminal, at least one of the following communication protocols is used:

[0196] HTTP, CoAP, MQTT, preset private protocols.

[0197] In some embodiments, when the method is applied to a GBA system, the second device includes a NAF and / or an AP.

[0198] The method provided by the embodiment of the present invention can be applied to the enhanced GBA system, so that the server can actively trigger the key refresh mechanism as needed, without triggering the GBA reboot process, and obtain a new application layer session key Ks*_NAF. This avoids the AKA process of re-authentication and also avoids the impact of the reboot process on other services.

[0199] Figure 6 A schematic diagram of a key update method for an enhanced GBA system provided by an embodiment of the present invention; Figure 6 As shown, the method is applied to the enhanced GBA system. After the enhanced GBA security processing flow is completed, the server ( Figure 6 Server) and Terminal ( Figure 6 The method comprises:

[0200] Step 601: During the process of the UE and the server completing the GBA security authentication and securely exchanging data based on the GBA application layer session key obtained through negotiation, the server determines that a key Ks*_NAF update mechanism needs to be triggered for some reason.

[0201] For example, the server may determine that the key Ks*_NAF update mechanism needs to be triggered due to at least one of the following reasons:

[0202] Ks*_NAF is invalid or no longer fresh, for example, Ks*_NAF has exceeded the key lifetime or is about to exceed the key lifetime, etc.;

[0203] Ks*_NAF cannot satisfy the key validity condition set by the server according to the security policy, for example, Ks*_NAF has reached the upper limit of the number of reuses, etc.;

[0204] In other cases, for example, after recovering from an abnormal situation, the server needs to actively re-establish an application layer security association with the terminal, the Ks*_NAF shared between the server and the terminal is inconsistent, and so on.

[0205] Here, Ks*_NAF may represent the GBA application layer session key currently in use, such as the GBA application layer session key Ks*_NAF obtained based on the negotiation described above.

[0206] Step 602: The Server initiates a key update request to the NAF.

[0207] Step 603: After receiving the key update request, the NAF performs key derivation.

[0208] In one example, the NAF performs key derivation based on the following formula:

[0209] Ks*_NAF = KDF (GBA session key, string, B-TID, UE identifier, Server_ID, counter)

[0210] Among them, counter is a newly added parameter, which is used for UE and NAF to derive a new GBA application layer session key (Ks*_NAF) based on the existing GBA session key (Ks_NAF). Counter is a counter synchronously maintained by UE and NAF respectively, with an initial value of "0". Every time Ks*_NAF is derived based on the current GBA session key, the counter value increases. If the GBA session key is updated, the counter value is reset to zero.

[0211] KDF indicates the key generation algorithm. The string is a character string indicating the application service type, which is used to distinguish different services provided by the service provider and is allocated by the operator. B-TID is the GBA boot transaction identifier. UE identifier is the IMPI of the user terminal. Server_ID is the identifier of the server, which uses the FQDN of the server and should be globally unique.

[0212] In another example, the NAF performs key derivation based on the following formula:

[0213] Ks*_NAF=KDF(GBA session key, string, B-TID, UE identity, Server_ID, Random).

[0214] Among them, Random is a random number or other parameters.

[0215] It should be noted that when a random number or other parameter is used as an input of the KDF, the NAF needs to send the random number or other parameter to the UE, and the specific method of sending is not limited.

[0216] Step 604: NAF initiates a key update notification to the UE.

[0217] Step 605: After receiving the key update notification from the NAF, the UE synchronously performs key derivation according to the formula in step 603, and synchronously increments the counter value after the derivation is completed.

[0218] It should be noted that, in order to ensure that the counter values ​​maintained by the UE and the NAF are always synchronized, the UE must update the counter value after receiving the key update notification sent by the NAF, regardless of whether the derivation is successful. Similarly, as long as the NAF initiates a key update notification request to the UE, the counter value needs to be updated. In addition, the counter value can also be sent by the NAF to the UE at step 604.

[0219] In addition, the UE and the NAF may use any application layer communication protocol for data exchange without limitation, for example, HTTP, CoAP, MQTT, private protocols, etc.

[0220] Figure 7 A schematic diagram of the structure of a communication device provided in an embodiment of the present invention; Figure 7 As shown, the apparatus is applied to a first device, and the apparatus includes:

[0221] A first sending module, configured to send a first message to a second device; the first message is used to request the second device to determine a first key;

[0222] The first receiving module is used to receive a first key from the second device.

[0223] In some embodiments, the first sending module is used to send a first message to the second device when the key in use cannot meet the key validity condition set by the first device according to the security policy, or when it is necessary to trigger the update of the key in use.

[0224] The used key cannot satisfy the key validity condition set by the first device according to the security policy, including at least one of the following:

[0225] The key has reached the upper limit of the number of times it can be reused;

[0226] The key has reached the usage time allowed by the application;

[0227] The key has been exposed externally.

[0228] In some embodiments, when the apparatus is applied to a GBA system, the first device is a server and the second device is a NAF.

[0229] It should be noted that: when the communication device provided in the above embodiment implements the corresponding communication method, only the division of the above program modules is used as an example. In actual application, the above processing can be assigned to different program modules as needed, that is, the internal structure of the first device is divided into different program modules to complete all or part of the above-described processing. Figure 3 The embodiments of the method shown belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be repeated here.

[0230] Figure 8 A schematic diagram of the structure of another communication device provided in an embodiment of the present invention; Figure 8 As shown, the device is applied to a second device, and the device includes:

[0231] A second receiving module, configured to receive a first message from a first device; the first message is used to request the second device to determine a first key;

[0232] The second sending module is used to send the first key to the first device; and / or send a second message to the terminal, where the second message is used to instruct the terminal to determine the first key.

[0233] In some embodiments, the apparatus further includes: a second determining module, configured to determine the first key according to at least one of the following:

[0234] session key, character string, B-TID, identifier of the terminal, identifier of the first device, and first parameter;

[0235] The first parameter includes at least one of the following:

[0236] first value;

[0237] Random numbers.

[0238] In some embodiments, the second sending module is further used to send the first parameter to the terminal.

[0239] In some embodiments, the second device and the terminal use the same mechanism to determine the first value.

[0240] In some embodiments, the mechanism is to use a timer to determine the first value;

[0241] The second determination module is further configured to update the timer after determining the first key.

[0242] In some embodiments, when the second device communicates with the terminal, at least one of the following communication protocols is adopted:

[0243] HTTP, CoAP, MQTT, preset private protocols.

[0244] In some embodiments, when the apparatus is applied to a GBA system, the first device is a server and the second device is a NAF.

[0245] It should be noted that: when the communication device provided in the above embodiment implements the corresponding communication method, only the division of the above program modules is used as an example. In actual application, the above processing can be assigned to different program modules as needed, that is, the internal structure of the second device is divided into different program modules to complete all or part of the above-described processing. Figure 4 The embodiments of the method shown belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be repeated here.

[0246] Fig. 9 A schematic diagram of the structure of another communication device provided in an embodiment of the present invention; Fig. 9 As shown, the device is applied to a terminal, and the device includes:

[0247] A third receiving module, configured to receive a second message from a second device; the second message is used to instruct the terminal to determine the first key;

[0248] The third determining module is used to determine the first key.

[0249] In some embodiments, the third determination module is configured to determine the first key according to at least one of the following:

[0250] session key, character string, B-TID, identifier of the terminal, identifier of the first device, and first parameter;

[0251] The first parameter includes at least one of the following:

[0252] first value;

[0253] Random numbers.

[0254] In some embodiments, the third receiving module is further used to receive the first parameter from the second device.

[0255] In some embodiments, the second device and the terminal use the same mechanism to determine the first value.

[0256] In some embodiments, the mechanism is to use a timer to determine the first value;

[0257] The third determination module is further configured to update the timer after determining the first key.

[0258] In some embodiments, when the first device communicates with the terminal, at least one of the following communication protocols is used:

[0259] HTTP, CoAP, MQTT, preset private protocols.

[0260] In some embodiments, when the apparatus is applied to a GBA system, the second device is a NAF.

[0261] It should be noted that: when the communication device provided in the above embodiment implements the corresponding communication method, only the division of the above program modules is used as an example. In actual application, the above processing can be assigned to different program modules as needed, that is, the internal structure of the terminal is divided into different program modules to complete all or part of the above-described processing. Figure 5The embodiments of the method shown belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be repeated here.

[0262] Fig.10 A schematic diagram of the structure of a communication device provided by an embodiment of the present invention, such as Fig.10 As shown, the communication device 100 includes: a processor 1001 and a memory 1002 for storing a computer program that can be run on the processor;

[0263] When the communication device is a first device, the processor 1001 is used to execute the computer program to: send a first message to a second device; the first message is used to request the second device to determine a first key; receive the first key from the second device. Specifically, the communication device may also execute the following Figure 3 The method shown, and Figure 3 The method embodiments shown belong to the same concept, and their specific implementation processes are detailed in the method embodiments, which will not be repeated here.

[0264] When the communication device is a second device, the processor 1001 is used to execute the computer program to: receive a first message from a first device; the first message is used to request the second device to determine a first key; send the first key to the first device; and / or send a second message to a terminal, the second message is used to instruct the terminal to determine the first key. Specifically, the communication device may also execute the following Figure 4 The method shown, and Figure 4 The method embodiments shown belong to the same concept, and their specific implementation processes are detailed in the method embodiments, which will not be repeated here.

[0265] When the communication device is applied to a terminal, the processor 1001 is used to execute the computer program to: receive a second message from a second device; the second message is used to instruct the terminal to determine a first key; determine the first key. Specifically, the communication device may also execute the following Figure 5 The method shown, and Figure 5 The method embodiments shown belong to the same concept, and their specific implementation processes are detailed in the method embodiments, which will not be repeated here.

[0266] In actual application, the communication device 100 may further include: at least one network interface 1003. The various components in the communication device 100 are coupled together via a bus system 1004. It is understood that the bus system 1004 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 1004 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Fig.10In the figure, various buses are marked as bus system 1004. There may be at least one processor 1001. The network interface 1003 is used for wired or wireless communication between the communication device 100 and other devices.

[0267] The memory 1002 in the embodiment of the present invention is used to store various types of data to support the operation of the communication device 100 .

[0268] The method disclosed in the above embodiment of the present invention can be applied to the processor 1001, or implemented by the processor 1001. The processor 1001 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 1001 or the instruction in the form of software. The above processor 1001 may be a general processor, a digital signal processor (DSP, DiGital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 1001 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiment of the present invention. The general processor can be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present invention, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in the memory 1002. The processor 1001 reads the information in the memory 1002 and completes the steps of the above method in combination with its hardware.

[0269] In an exemplary embodiment, the communication device 100 may be implemented by one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to execute the aforementioned method.

[0270] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon;

[0271] When the computer-readable storage medium is applied to a first device, the computer program, when executed by a processor, executes: sending a first message to a second device; the first message is used to request the second device to determine a first key; receiving the first key from the second device. Specifically, the computer program may also execute the following: Figure 3 The method shown, and Figure 3 The method embodiments shown belong to the same concept, and their specific implementation processes are detailed in the method embodiments, which will not be repeated here.

[0272] When the computer-readable storage medium is applied to the second device, the computer program is executed by the processor to perform: receiving a first message from the first device; the first message is used to request the second device to determine the first key; sending the first key to the first device; and / or sending a second message to the terminal, the second message is used to instruct the terminal to determine the first key. Specifically, the computer program can also perform the following steps: Figure 4 The method shown, and Figure 4 The method embodiments shown belong to the same concept, and their specific implementation processes are detailed in the method embodiments, which will not be repeated here.

[0273] When the computer-readable storage medium is applied to a terminal, the computer program is executed by a processor to perform: receiving a second message from a second device; the second message is used to instruct the terminal to determine a first key; and determining the first key. Specifically, the computer program may also perform the following steps: Figure 5 The method shown, and Figure 5 The method embodiments shown belong to the same concept, and their specific implementation processes are detailed in the method embodiments, which will not be repeated here.

[0274] In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0275] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0276] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0277] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), disks or optical disks, etc. Various media that can store program codes.

[0278] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.

[0279] It should be noted that: "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0280] In addition, the technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict.

[0281] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A communication method, characterized in that: Applied to a first device, the method includes: Sending a first message to a second device; the first message is used to request the second device to determine a first key; A first key is received from the second device.

2. The method according to claim 1, characterized in that The sending the first message to the second device includes: When the used key cannot satisfy the key validity condition set by the first device according to the security policy, or when it is necessary to trigger the update of the used key, a first message is sent to the second device.

3. The method according to claim 2, characterized in that The used key cannot satisfy the key validity condition set by the first device according to the security policy, including at least one of the following: The key has reached the upper limit of the number of times it can be reused; The key has reached the usage time allowed by the application; The key has been exposed externally.

4. The method according to claim 1, characterized in that When the method is applied to a GBA system, the first device is a server, and the second device is a network application function NAF.

5. A communication method, characterized in that: Applied to the second device, the method includes: Receiving a first message from a first device; the first message is used to request a second device to determine a first key; Sending a first key to the first device; and / or sending a second message to the terminal, where the second message is used to instruct the terminal to determine the first key.

6. The method according to claim 5, characterized in that The method further comprises: The first key is determined according to at least one of the following: A session key, a character string, a boot transaction identifier B-TID, an identifier of the terminal, an identifier of the first device, and a first parameter; The first parameter includes at least one of the following: first value; Random numbers.

7. The method according to claim 6, characterized in that The method further comprises: The first parameter is sent to the terminal.

8. The method according to claim 6, characterized in that The second device and the terminal use the same mechanism to determine the first value.

9. The method according to claim 8, characterized in that The mechanism is to use a timer to determine the first value; the method also includes: After determining the first key, the timer is updated.

10. The method according to claim 5 or 7, characterized in that: When the second device communicates with the terminal, at least one of the following communication protocols is used: Hypertext Transfer Protocol HTTP, Restricted Application Protocol CoAP, Message Queue Telemetry Transmission MQTT Protocol, and preset private protocols.

11. The method according to claim 5, characterized in that When the method is applied to a GBA system, the first device is a server and the second device is a NAF.

12. A communication method, characterized in that: Applied to a terminal, the method comprises: receiving a second message from a second device; the second message is used to instruct the terminal to determine a first key; The first key is determined.

13. The method according to claim 12, characterized in that The first key is determined according to at least one of the following: A session key, a character string, a boot transaction identifier B-TID, an identifier of the terminal, an identifier of the first device, and a first parameter; The first parameter includes at least one of the following: first value; Random numbers.

14. The method according to claim 13, characterized in that The method further comprises: A first parameter is received from the second device.

15. The method according to claim 13, characterized in that The second device and the terminal use the same mechanism to determine the first value.

16. The method according to claim 15, characterized in that The mechanism is to use a timer to determine the first value; the method also includes: After determining the first key, the timer is updated.

17. The method according to claim 12 or 14, characterized in that When the first device communicates with the terminal, at least one of the following communication protocols is used: HTTP, CoAP, MQTT, preset private protocols.

18. The method according to claim 12, characterized in that When the method is applied to a GBA system, the second device is a NAF.

19. A communication device, characterized in that: Applied to a first device, the apparatus comprises: A first sending module, configured to send a first message to a second device; the first message is used to request the second device to determine a first key; The first receiving module is used to receive a first key from the second device.

20. A communication device, characterized in that: Applied to a second device, the apparatus comprises: A second receiving module, configured to receive a first message from a first device; the first message is used to request the second device to determine a first key; The second sending module is used to send the first key to the first device; and / or send a second message to the terminal, where the second message is used to instruct the terminal to determine the first key.

21. A communication device, characterized in that: Applied to a terminal, the device comprises: A third receiving module is used to receive a second message from a second device; the second message is used to instruct the terminal to determine the first key; The third determining module is used to determine the first key.

22. A communication device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method described in any one of claims 1 to 4 are implemented; or, when the processor executes the program, the steps of the method described in any one of claims 5 to 11 are implemented; or, when the processor executes the program, the steps of the method described in any one of claims 12 to 18 are implemented.

23. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the steps of the method described in any one of claims 1 to 4; or, when the computer program is executed by a processor, it implements the steps of the method described in any one of claims 5 to 11; or, when the computer program is executed by a processor, it implements the steps of the method described in any one of claims 12 to 18.