A key generation method and apparatus
By encrypting the identifiers of user terminals and target application functions, and generating and decrypting key identifiers, the problem of user privacy information leakage in UE-AF sessions is solved, and user privacy information is securely protected.
Patent Information
- Application Number
- CN202310911719.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-24
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2043-07-24
AI Technical Summary
When establishing a session between the UE and the AF, the UE's privacy information is easily intercepted and leaked in the existing technology, resulting in insufficient security of user privacy information.
By encrypting the user terminal's identity and the target application function's identifier, a key identifier is generated. This key identifier is then encrypted and decrypted using the public and private keys of the home network. This ensures that only the target application function can generate the shared key and identity information, preventing unauthorized users from obtaining them.
This effectively prevents unauthorized users from obtaining users' private information, ensures the security of users' private information, and avoids information leakage.
Smart Images

Figure CN116866906B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of network security, and particularly relates to a key generation method and device. BACKGROUND
[0002] The 3rd Generation Partnership Project (3GPP) defines an AKMA (authentication and key management for application) mechanism. The AKMA is used to generate a shared key between a UE (User Equipment) and an AF (Application function), and a session between the UE and the AF is established through the shared key.
[0003] However, when the UE initiates a session request to a target AF, the shared key carries a key identifier. At this time, other AFs with AKMA service authorization can intercept the key identifier through intermediate attacks, and forward the key identifier and the AF identifier of the other AFs, so as to obtain the generic public user identifier information and the shared key of the UE from the core network. Therefore, the privacy information such as the generic public user identifier information and the key identifier is leaked, and the user's privacy information is at risk.
[0004] Therefore, when establishing a session between the UE and the AF, it is currently a technical problem to be solved to prevent the leakage of the user's privacy information and to ensure the security of the user's privacy information. SUMMARY
[0005] Embodiments of the present application provide a key generation method and device for preventing other application functions from obtaining the user's privacy information when a target application function requests a shared key, avoiding the leakage of the user's privacy information, and ensuring the security of the user's privacy information.
[0006] In a first aspect, embodiments of the present application provide a key generation method, comprising:
[0007] receiving a key acquisition request sent by an application function; the key acquisition request comprising a first identifier of the application function and a key identifier; the key identifier comprising an encrypted identity of a user terminal and an encrypted second identifier of a target application function;
[0008] decrypting the encrypted identity of the user terminal and the encrypted second identifier of the target application function to obtain a decrypted identity and a decrypted second identifier;
[0009] If it is determined that the first identifier is consistent with the decrypted second identifier, then a shared key and identity information are generated based on the decrypted identity identifier and the decrypted second identifier.
[0010] In the above technical solution, because the key identifier includes an encrypted user terminal identity identifier and an encrypted second identifier for the target application function, binding the second identifier of the target application function to the user terminal identity identifier is equivalent to binding the second identifier of the target application function to the key identifier. This allows for verification of the current application function through the second identifier of the target application function, preventing other application functions from obtaining the user's shared key and identity information, among other private information. Furthermore, encryption prevents unauthorized users from obtaining the user terminal's identity identifier and the second identifier of the target application function, further preventing other application functions from obtaining the user's private information, avoiding leakage of user privacy information, and ensuring the security of user privacy information.
[0011] Optionally, the key identifier is composed of the encrypted user terminal's identity identifier, the encrypted target application function's second identifier, a routing indicator, and a home network identifier; the encrypted identity identifier and the encrypted target application function's second identifier are obtained by the user terminal encrypting the user terminal's identity identifier and the target application function's second identifier according to a preset public key;
[0012] Decrypting the encrypted user terminal identity and the encrypted target application function's second identifier includes:
[0013] The encrypted user terminal identity identifier and the encrypted target application function second identifier are decrypted according to the preset private key; the preset public key and the preset private key are the home network key pair corresponding to the user terminal.
[0014] In the above technical solution, the user terminal's identity identifier and the target application function's second identifier are encrypted by the user terminal according to a preset public key. This encryption mechanism prevents unauthorized users from tampering with the information in the key identifier, such as preventing unauthorized users from tampering with the encrypted target application function's second identifier, thereby ensuring the security of the user's privacy information.
[0015] Optionally, a shared key and identity information are generated based on the decrypted identity identifier and the decrypted second identifier, including:
[0016] The intermediate key and the identity information are retrieved based on the decrypted identity identifier;
[0017] A shared key is generated based on the intermediate key and the decrypted second identifier.
[0018] Optionally, after generating the shared key and identity information based on the decrypted identity identifier and the decrypted second identifier, the method further includes:
[0019] The shared key and identity information are sent to the application function; the shared key and identity information are used by the user terminal and the application function to establish a session.
[0020] Optionally, the method further includes:
[0021] If it is determined that the first identifier and the second identifier are inconsistent, an authentication failure message is sent to the application function.
[0022] In a second aspect, embodiments of the present invention provide a key generation apparatus, comprising:
[0023] The acquisition module is used to receive a key acquisition request sent by an application function; the key acquisition request includes a first identifier of the application function and a key identifier; the key identifier includes an encrypted user terminal identity identifier and an encrypted target application function second identifier;
[0024] The processing module is used to decrypt the encrypted user terminal identity identifier and the encrypted target application function second identifier to obtain the decrypted identity identifier and the decrypted second identifier.
[0025] If it is determined that the first identifier is consistent with the decrypted second identifier, then a shared key and identity information are generated based on the decrypted identity identifier and the decrypted second identifier.
[0026] Optionally, the key identifier is composed of the encrypted user terminal's identity identifier, the encrypted target application function's second identifier, a routing indicator, and a home network identifier; the encrypted identity identifier and the encrypted target application function's second identifier are obtained by the user terminal encrypting the user terminal's identity identifier and the target application function's second identifier according to a preset public key;
[0027] The processing module is specifically used for:
[0028] The encrypted user terminal identity identifier and the encrypted target application function second identifier are decrypted according to the preset private key; the preset public key and the preset private key are the home network key pair corresponding to the user terminal.
[0029] Optionally, the processing module is specifically used for:
[0030] The intermediate key and the identity information are retrieved based on the decrypted identity identifier;
[0031] A shared key is generated based on the intermediate key and the decrypted second identifier.
[0032] Optionally, the processing module is further configured to:
[0033] After generating a shared key and identity information based on the decrypted identity identifier and the decrypted second identifier, the shared key and identity information are sent to the application function; the shared key and identity information are used by the user terminal and the application function to establish a session.
[0034] Optionally, the processing module is further configured to:
[0035] If it is determined that the first identifier and the second identifier are inconsistent, an authentication failure message is sent to the application function.
[0036] Thirdly, embodiments of the present invention also provide a computer device, comprising:
[0037] Memory, used to store program instructions;
[0038] The processor is used to call the program instructions stored in the memory and execute the above key generation method according to the obtained program.
[0039] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions for causing a computer to execute the above-described key generation method. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 A schematic diagram of a system architecture provided for an embodiment of the present invention;
[0042] Figure 2 This is a flowchart illustrating a key generation method provided in an embodiment of the present invention;
[0043] Figure 3 A schematic diagram illustrating a key generation method provided in an embodiment of the present invention;
[0044] Figure 4 This is a flowchart illustrating a key generation method provided in an embodiment of the present invention;
[0045] Figure 5This is a schematic diagram of a key generation device provided in an embodiment of the present invention. Detailed Implementation
[0046] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0047] The AKMA mechanism is defined in 3GPP 33.535. AKMA is used to establish a shared key between the UE and the AF, through which a session is established between the UE and the AF. The AF acts like an application server, interacting with other 5G core network control plane NFs and providing service capabilities. The AF can exist for different application services and can be owned by the operator or a trusted third party.
[0048] Taking the 5G core network as an example, the UE sends a session request to the target AF. This session request includes the AKM A key identifier (hereinafter referred to as A-KID for ease of description). The format of A-KID is username@realm, which includes RID (Router Identity Document), AKMA temporary UE identity identifier (hereinafter referred to as A-TID), and HNI (Home network identifier). Among them, A-TID is the basic part that identifies the UE and the UE's AKMA shared key within the HN.
[0049] Then, the target AF (e.g., AF1) sends a key acquisition request to the 5G core network (hereinafter referred to as 5GC). This key acquisition request includes the A-KID and its own identifier (hereinafter referred to as AF1-ID). 5GC retrieves the KAKMA based on the A-KID and generates a shared key (hereinafter referred to as K) based on the KAKMA and AF1-ID. AF1 ), and K AF1 The UE's GPSI (Generic Public Subscription Identifier) is returned to the target AF. This achieves the goal of using this K... AF1 Establish a session between the UE and AF1.
[0050] However, during the above process, other AFs with AKMA service authorization (such as AF2) can intercept the A-KID through a middleware attack and send a key acquisition request to the 5G core network based on their own identifier (AF2-ID), thus obtaining the K key from the 5G core network based on the A-KID.AF2 And UE's GPSI. Because K AF2 It is generated by 5GC based on KAKMA and AF2-ID, so AF2 cannot be used. However, it obtains the UE's GPSI and A-KID. The A-KID can be used to determine the target AF corresponding to the UE's session establishment, which leads to the leakage of the UE's GPSI and A-KID and other privacy information, which poses a security risk to the user's privacy information.
[0051] Therefore, the present invention provides a key generation method that, when a target application function requests a shared key, binds and encrypts the second identifier of the target application function and the key identifier to prevent other application functions from obtaining the user's private information, avoid the leakage of the user's private information, and ensure the security of the user's private information.
[0052] Figure 1 An exemplary system architecture applicable to an embodiment of the present invention is shown, taking a 5G network scenario as an example, including a user terminal 110, a 5G core network 120, and application functions 130.
[0053] Specifically, user terminal 110 encrypts its own identity and the second identifier of the target application function using a preset public key to obtain encrypted identity and encrypted second identifier. Then, it constructs a key identifier based on the encrypted user terminal identity, the encrypted second identifier of the target application function, a routing indicator, and a home network identifier. The target application function represents the application function with which user terminal 110 wants to establish a session. User terminal 110 is also used to send a session request to application function 130, the session request including the key identifier.
[0054] Application function 130 is used to send a key acquisition request to the 5G core network 120 after receiving a session request from user terminal 110. The key acquisition request includes a first identifier and a key identifier of application function 130. Application function 130 is also used to receive a shared key and identity information sent by the 5G core network 120, and establish a session with user terminal 110 based on the shared key and identity information.
[0055] The 5G core network 120 receives a key acquisition request from application function 130. It then decrypts the encrypted user terminal identifier and the encrypted target application function's second identifier in the request using a preset private key, obtaining the decrypted identifier and the decrypted second identifier. When the first identifier matches the decrypted second identifier, it indicates that application function 130 is the target application function. Therefore, it generates a shared key and identity information based on the decrypted identifier and the decrypted second identifier, and sends the shared key and identity information to the application function.
[0056] It should be noted that the above Figure 1 The structure shown is only an example, and in some embodiments it can also be implemented in 4G network scenarios. This embodiment of the invention does not limit this.
[0057] Based on the above description Figure 2 An exemplary flowchart of a key generation method provided by an embodiment of the present invention is shown, such as... Figure 2 As shown, the process specifically includes:
[0058] Step 210: Receive the key acquisition request sent by the application function.
[0059] In this embodiment of the invention, the key acquisition request is triggered by the application function (AF) based on a session request sent by the user terminal. The session request is triggered based on user operations on the user terminal, such as clicking the user terminal's display screen, sending voice commands to the user terminal, etc., which are not limited here. The user terminal is the user's terminal device; for ease of description, the user terminal will be referred to as UE (User Equipment) below. The user terminal can be a mobile phone, tablet computer, laptop computer, netbook, in-vehicle device, as well as a business intelligent terminal (including: videophone, conference desktop intelligent terminal, etc.), personal digital assistant (PDA), augmented reality (AR) / virtual reality (VR) device, etc. This application embodiment does not limit the specific form of the user terminal.
[0060] When a user wants to establish a session with an AF through the UE, the user sends a session request to that AF. In this embodiment of the invention, the session request includes a key identifier. That is, the UE generates a key identifier (hereinafter referred to as A-KID for ease of description) before sending the session request to the AF.
[0061] In one possible implementation, the UE applies a function (hereinafter referred to as AF) to the target based on a preset public key. T The second identifier (hereinafter referred to as AF) T Encrypt the ID to obtain the encrypted AF. T -ID. Then the UE uses the encrypted AF. T The A-KID is composed of the User Terminal Identity Identifier (hereinafter referred to as A-TID), the Routing Indicator (hereinafter referred to as RID), and the Home Network Identifier (hereinafter referred to as NHI). The A-TID represents the temporary identity identifier of the UE in the AKMA.
[0062] In another possible implementation, the UE encrypts the second identifier of the target application function according to a preset public key to obtain the encrypted AF. T -ID, encrypts the user terminal's identity identifier to obtain the encrypted A-TID. Then the UE uses the encrypted AF... T -ID, encrypted A-TID, RID and NHI constitute A-KID as shown in Table 1 below.
[0063] Table 1
[0064]
[0065] As shown in Table 1 above, the format of A-KID is: username@realme. That is, the key identifier A-KID consists of two parts: one part is the username, which includes the RID, the encrypted A-TID, and the encrypted AF. T -ID; the other part is realme, including NHI. That is, the key identifier includes the encrypted identity of the user terminal and the encrypted second identifier of the target application function.
[0066] In this embodiment of the invention, the preset public key and preset private key can be the home network key pair corresponding to the user terminal, such as the preset public key being the NH public key and the preset private key being the NH private key. In some embodiments, the UE can also use other encryption algorithms to encrypt the second identifier of the target application function and the identity identifier of the user terminal, such as RSA, SM2, etc., which are not specifically limited in this application embodiment.
[0067] Based on the above description, when a UE sends a session request to the AF, it will carry the aforementioned key identifier. After receiving the session request, the AF determines whether it has stored the shared key corresponding to the UE. If not, it sends a key acquisition request to the 5G core network, which includes the AF's first identifier and the key identifier. If yes, the AF directly establishes a session with the UE based on the shared key corresponding to the UE.
[0068] Step 220: Decrypt the encrypted user terminal identity identifier and the encrypted target application function second identifier to obtain the decrypted identity identifier and the decrypted second identifier.
[0069] In this embodiment of the invention, the 5G core network includes an authentication module (AAnf) and a decryption module (UDM). The authentication module sends a key acquisition request received from an application function to the decryption module. The decryption module decrypts the encrypted user terminal's identity identifier and the encrypted target application function's second identifier using a preset private key, obtaining the decrypted identity identifier and the decrypted second identifier, and then sends the decrypted identity identifier and the decrypted second identifier to the authentication module (AAnf).
[0070] Step 230: If it is determined that the first identifier is consistent with the decrypted second identifier, then a shared key and identity information are generated based on the decrypted identity identifier and the decrypted second identifier.
[0071] In this embodiment of the invention, after obtaining the decrypted identity identifier and the decrypted second identifier, the authentication module determines whether the decrypted second identifier matches the first identifier in the key acquisition request. If they match, it indicates that the AF sending the key acquisition request is the UE's target AF, i.e., the AF with which the UE needs to establish a session, and then generates a shared key and identity information for establishing the session. Further, the intermediate key and identity information are retrieved based on the decrypted identity identifier, and then a shared key is generated based on the intermediate key and the decrypted second identifier. The intermediate key is K. AKMA The key and identity information are GPSI information; in 4G network scenarios, the identity information is MSISDN.
[0072] Based on the above technical solution, before the UE requests the AF to establish a session, the second identifier of the target application function is encrypted to obtain the encrypted AF. T -ID, encrypts the user terminal's identity identifier to obtain the encrypted A-TID, and then uses the encrypted AF... T -ID and the encrypted A-TID form A-KID, and A-KID is associated with the encrypted AF T Binding is done via -ID, enabling encryption of AF. T The A-TID verifies the AF sending the key acquisition request, preventing other applications from obtaining the user's shared key and identity information, ensuring that the AF sending the key acquisition request is the AF the UE wants to establish a session with, and preventing unauthorized users from obtaining the UE's GPSI information and the AF service information accessed by the UE. Furthermore, the home network HN public key is used to verify the A-TID and AF. T -ID is encrypted to prevent A-TID and AF from being detected. T -ID malicious tampering ensures the accuracy of verification.
[0073] See Figure 3 , Figure 3This is a schematic diagram illustrating a key generation method provided as an example of an embodiment of the present invention. The process is as follows: In AKMA technology, if a UE subscribes to the AKMA service between a base station and the 5G core network, the 5G core network will generate an intermediate key K corresponding to the UE. AKMA And save it.
[0074] User terminal UE to target AF ( Figure 3 Before sending a session request, AF1 encrypts the UE's identity identifier A-TID and AF1's first identifier AF1-ID using the home network public key to obtain encrypted A-TID and encrypted AF1-ID. The UE generates a key identifier A-KID based on RID, HNI, encrypted A-TID, and encrypted AF1-ID.
[0075] The UE sends a session request to AF1, which includes the key identifier A-KID. Assume AF1 obtains the key identifier A-KID, and other AFs ( Figure 3 The AF2 shown also obtains the key identifier A-KID through a middleware attack. The two AFs are explained below:
[0076] AF1 sends a key acquisition request Q1 to the 5G core network. This request Q1 includes AF1's first identifier, AF1-ID, and A-KID. Upon receiving the key acquisition request Q1, the authentication module in the 5G core network forwards it to the decryption module. The decryption module decrypts the encrypted A-TID and AF1-ID within A-KID using the home network's private key, obtaining the decrypted A-TID and AF1-ID. The authentication module then verifies that the decrypted AF1-ID matches the AF1-ID in the key acquisition request Q1. If the decrypted AF1-ID matches the AF1-ID in Q1, the key is retrieved based on the decrypted A-TID. AKMA and the UE's GPSI information, and according to K AKMA Generate a shared key with AF1-ID.
[0077] AF2 sends a key acquisition request Q2 to the 5G core network. This request Q2 includes AF2's first identifier, AF2-ID, and A-KID. Upon receiving Q2, the authentication module in the 5G core network forwards it to the decryption module. The decryption module decrypts the encrypted A-TID and AF1-ID within A-KID using the home network's private key, obtaining the decrypted A-TID and AF1-ID. The authentication module then verifies that the decrypted AF1-ID matches the AF2-ID in Q2. If the decrypted AF1-ID does not match the AF2-ID in Q2, no shared key or identity information is generated.
[0078] Based on the above technical solution, 5GC uses the HN private key to decrypt A-KID, obtaining the decrypted AF-ID and A-TID that the UE wants to access. Then, it compares and authenticates AF1-ID and AF2-ID according to the AF-ID that the UE wants to access. If the authentication is the same, the AF is the AF that the UE wants to access. If the authentication fails, the AF is an unauthorized user. This prevents unauthorized users from obtaining the user's shared key and identity information and other private information, and ensures the security of the user's privacy information.
[0079] In some embodiments, after generating a shared key and identity information, the 5G core network sends the shared key and identity information to the application function, enabling the application function to establish a session with the user terminal based on the shared key and identity information. That is, the 5G core network returns a success response to the application function, which includes the shared key K. AF SUPI (including UE's GPSI information), shared key K AF The lifecycle, etc. Furthermore, if it is determined that the first identifier and the second identifier are inconsistent, it indicates that the application function AF is an unauthorized user, constituting a man-in-the-middle attack. An authentication failure message is sent to the application function, i.e., a failure response is returned, indicating a denial of service.
[0080] To better explain the above technical solution, Figure 4 This is a schematic flowchart illustrating a key generation method as exemplified by an embodiment of the present invention. Figure 4 As shown, this process is executed by the user terminal (UE), the 5G core network, and the application function (AF). The 5G core network includes the authentication module (AAnf) and the decryption module (UDM). The process includes:
[0081] Step 401: The user terminal (i.e., UE) encrypts the UE's A-TID (i.e., its own identity identifier) and the target AF's AF1-ID (i.e., the unique identifier of the target application function AF1).
[0082] The UE performs network master authentication and AKMA key derivation related services. The generation module set up inside the UE encrypts the UE's A-TID and the target AF's AF1-ID based on the public key in the preset key pair (such as a public-private key pair based on RSA, SM2, or the home network NH).
[0083] Step 402: The user terminal generates A-KID based on the encrypted UE A-TID and the encrypted AF1-ID.
[0084] The UE constructs an A-KID based on the encrypted AF1-ID, encrypted A-TID, RID, and NHI. Among them, RID and NHI are used to realize communication between the UE and application functions. For example, the UE routes session requests to application functions based on RID and NHI.
[0085] Step 403: The user terminal sends a session request carrying the A-KID to the application function.
[0086] Step 404: The application function sends a key acquisition request carrying the A-KID and its own AF3-ID to the AAnf of the 5G core network.
[0087] When the application function (AF3) determines that it has stored the shared key corresponding to the UE, it sends a key acquisition request carrying A-KID and its own identifier (AF3-ID) to AAnf.
[0088] Step 405, AAnf sends the encrypted A-TID and encrypted AF1-ID to UDM.
[0089] After receiving A-KID, AAnF parses A-KID to obtain the encrypted A-TID and encrypted AF1-ID, and then sends the encrypted A-TID and encrypted AF1-ID to UDM.
[0090] Step 406: UDM determines the decrypted A-TID and the decrypted AF1-ID.
[0091] UDM decrypts the encrypted A-TID and AF1-ID using the private key in the preset key pair, obtaining the decrypted A-TID and AF1-ID.
[0092] Step 407: UDM sends the decrypted A-TID and decrypted AF1-ID to AAnF.
[0093] Step 408: The AF1-ID and AF3-ID after AAnF authentication decryption are consistent.
[0094] After obtaining the decrypted AF1-ID, AAnF compares and verifies it with the AF3-ID in the key acquisition request. If the AF1-ID and AF3-ID match, it means that the application function is the one that the UE wants to use for the session.
[0095] Step 409: AAnF sends the shared key and identity information back to the application function.
[0096] After AAnF confirms that the AF1-ID and AF3-ID match after authentication and decryption, it retrieves the intermediate key K corresponding to the UE based on the decrypted A-TID. AKMA and identity information GPSI, then according to K AKMA Generate a shared key K with AF1-ID (or AF3-ID). AF1 Finally, the shared key K AF1 The function of sending GPS identification information to the application.
[0097] Step 410: Establish a session.
[0098] The application function obtains the shared key K AF1 Then, based on the shared key K AF1 Establish a session with the UE.
[0099] Based on the above technical solution, the security of the UE's GPSI and other privacy information is ensured during the AKMA service process, preventing unauthorized users from obtaining the UE's privacy information. Furthermore, the implementation is simple and does not require changes to the 5G core network interface.
[0100] Furthermore, the UE uses the home network HN public key to encrypt the UE's A-TID and AF-ID (the identifier of the AF that the UE wants to access), thereby binding and encrypting the UE's A-TID and AF-ID to prevent unauthorized users from obtaining the UE's A-TID and the information of the AF application that the user wants to access.
[0101] 5GC uses the home network's (HN) private key to decrypt the encrypted A-TID and AF-ID, and compares the received AF-ID (i.e., the identifier of the AF that sent the key acquisition request) with the decrypted AF-ID for authentication. If authentication is successful, a KAF key and the UE's GPSI are generated and returned. If authentication fails, an authentication failure message is returned. This process determines whether the AF that sent the key acquisition request is the AF that the UE wants to access, thereby preventing unauthorized user attacks and ensuring the security of the user's privacy information.
[0102] Based on the same technological concept Figure 5 An exemplary schematic diagram of a key generation device provided in an embodiment of the present invention is shown, which can execute the process of the above-described key generation method.
[0103] like Figure 5 As shown, the device specifically includes:
[0104] The acquisition module 510 is used to receive a key acquisition request sent by an application function; the key acquisition request includes a first identifier of the application function and a key identifier; the key identifier includes an encrypted user terminal identity identifier and an encrypted target application function second identifier;
[0105] Processing module 520 is used to decrypt the encrypted user terminal identity identifier and the encrypted target application function second identifier to obtain the decrypted identity identifier and the decrypted second identifier.
[0106] If it is determined that the first identifier is consistent with the decrypted second identifier, then a shared key and identity information are generated based on the decrypted identity identifier and the decrypted second identifier.
[0107] Optionally, the key identifier is composed of the encrypted user terminal's identity identifier, the encrypted target application function's second identifier, a routing indicator, and a home network identifier; the encrypted identity identifier and the encrypted target application function's second identifier are obtained by the user terminal encrypting the user terminal's identity identifier and the target application function's second identifier according to a preset public key;
[0108] The processing module 520 is specifically used for:
[0109] The encrypted user terminal identity identifier and the encrypted target application function second identifier are decrypted according to the preset private key; the preset public key and the preset private key are the home network key pair corresponding to the user terminal.
[0110] Optionally, the processing module 520 is specifically used for:
[0111] The intermediate key and the identity information are retrieved based on the decrypted identity identifier;
[0112] A shared key is generated based on the intermediate key and the decrypted second identifier.
[0113] Optionally, the processing module 520 is further configured to:
[0114] After generating a shared key and identity information based on the decrypted identity identifier and the decrypted second identifier, the shared key and identity information are sent to the application function; the shared key and identity information are used by the user terminal and the application function to establish a session.
[0115] Optionally, the processing module 520 is further configured to:
[0116] If it is determined that the first identifier and the second identifier are inconsistent, an authentication failure message is sent to the application function.
[0117] Based on the same technical concept, embodiments of the present invention also provide a computer device, including:
[0118] Memory, used to store program instructions;
[0119] The processor is used to call the program instructions stored in the memory and execute the above key generation method according to the obtained program.
[0120] Based on the same technical concept, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions for causing a computer to execute the above-described key generation method.
[0121] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0122] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0123] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0124] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0125] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method of key generation, characterized by, The method is applied to a core network, the core network comprises an authentication module and a decryption module, and the method comprises: The authentication module receives a key acquisition request sent by an application function; the key acquisition request comprises a first identifier of the application function and a key identifier; the key identifier comprises an encrypted identity of a user terminal and an encrypted second identifier of a target application function; The decryption module decrypts the encrypted identity of the user terminal and the encrypted second identifier of the target application function to obtain a decrypted identity and a decrypted second identifier; If the authentication module determines that the first identifier is consistent with the decrypted second identifier, the authentication module generates a shared key and identity information according to the decrypted identity and the decrypted second identifier.
2. The method of claim 1, wherein, The key identifier is composed of the encrypted identity of the user terminal, the encrypted second identifier of the target application function, a routing indicator and a home network identifier; the encrypted identity and the encrypted second identifier of the target application function are obtained by encrypting the identity of the user terminal and the second identifier of the target application function according to a preset public key by the user terminal; Decrypting the encrypted identity of the user terminal and the encrypted second identifier of the target application function comprises: The decryption module decrypts the encrypted identity of the user terminal and the encrypted second identifier of the target application function according to a preset private key; The preset public key and the preset private key are a home network key pair corresponding to the user terminal.
3. The method of claim 1, wherein, Generating a shared key and identity information according to the decrypted identity and the decrypted second identifier comprises: The authentication module retrieves an intermediate key and the identity information according to the decrypted identity; The authentication module generates a shared key according to the intermediate key and the decrypted second identifier.
4. The method according to any one of claims 1 to 3, characterized in that, After generating a shared key and identity information according to the decrypted identity and the decrypted second identifier, the method further comprises: The authentication module sends the shared key and the identity information to the application function; the shared key and the identity information are used for establishing a session between the user terminal and the application function.
5. The method of claim 1, wherein, The method further comprises: If the authentication module determines that the first identifier is inconsistent with the decrypted second identifier, the authentication module sends an authentication failure message to the application function.
6. A key generation apparatus characterized by comprising: The device is a core network device, comprising: An acquisition module, configured to receive a key acquisition request sent by an application function; the key acquisition request comprises a first identifier of the application function and a key identifier; the key identifier comprises an encrypted identity of a user terminal and an encrypted second identifier of a target application function; A processing module, configured to decrypt the encrypted identity of the user terminal and the encrypted second identifier of the target application function to obtain a decrypted identity and a decrypted second identifier; If it is determined that the first identifier is consistent with the decrypted second identifier, a shared key and identity information are generated according to the decrypted identity and the decrypted second identifier.
7. The apparatus of claim 6, wherein, The key identifier is composed of the encrypted identity of the user terminal, the encrypted second identity of the target application function, a routing indicator and a home network identifier; the encrypted identity and the encrypted second identity of the target application function are obtained by encrypting the identity of the user terminal and the second identity of the target application function according to a preset public key by the user terminal; The processing module is specifically configured to: decrypt the encrypted identity of the user terminal and the encrypted second identity of the target application function according to a preset private key; the preset public key and the preset private key are a home network key pair corresponding to the user terminal.
8. The apparatus of claim 6, wherein, The processing module is specifically configured to: retrieve an intermediate key and the identity information according to the decrypted identity; generate a shared key according to the intermediate key and the decrypted second identity.
9. A computer device, comprising: comprise: a memory for storing program instructions; a processor for invoking the program instructions stored in the memory to execute the method according to any one of claims 1 to 5 according to the obtained program execution right.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer executable instructions, and the computer executable instructions are used to make the computer execute the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method and system for ensuring key consistency of SRNC (Serving Radio Network Controller) and core network node
CN101938744A
Terminal application authentication method, device and system and computer readable storage medium
CN112995090A