CN116866906A - Key generation method and device - Google Patents

Key generation method and device Download PDF

Info

Publication number
CN116866906A
CN116866906A CN202310911719.XA CN202310911719A CN116866906A CN 116866906 A CN116866906 A CN 116866906A CN 202310911719 A CN202310911719 A CN 202310911719A CN 116866906 A CN116866906 A CN 116866906A
Authority
CN
China
Prior art keywords
identity
key
encrypted
identifier
decrypted
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310911719.XA
Other languages
Chinese (zh)
Inventor
李金慧
黄铖斌
王锦华
张越
王骞然
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Technology Innovation Center
China Telecom Corp Ltd
Original Assignee
China Telecom Technology Innovation Center
China Telecom Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Technology Innovation Center, China Telecom Corp Ltd filed Critical China Telecom Technology Innovation Center
Priority to CN202310911719.XA priority Critical patent/CN116866906A/en
Publication of CN116866906A publication Critical patent/CN116866906A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • H04W12/041Key generation or derivation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/03Protecting confidentiality, e.g. by encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • H04W12/043Key management, e.g. using generic bootstrapping architecture [GBA] using a trusted network node as an anchor
    • H04W12/0433Key management protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • H04W12/068Authentication using credential vaults, e.g. password manager applications or one time password [OTP] applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • H04W12/069Authentication using certificates or pre-shared keys

Landscapes

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

Abstract

The application discloses a key generation method and a device, comprising the following steps: and receiving a key acquisition request which is sent by the application function and carries a first identifier and a key identifier of the application function. The key acquisition request comprises an encrypted identity of the user terminal and an encrypted second identity of the target application function. Decrypting the encrypted identity of the user terminal and the encrypted second identity of the target application function to obtain the decrypted identity and the decrypted second identity; if the first identifier is consistent with the decrypted second identifier, the application function is the application function which the user terminal wants to establish a session, and then the shared secret key and the identity information are generated according to the decrypted identity identifier and the decrypted second identifier. And further, the attack is verified, the attack of illegal users is prevented, the disclosure of private information of the users is avoided, and the security of the private information of the users is ensured.

Description

Key generation method and device
Technical Field
The present application relates to the field of network security technologies, and in particular, to a method and an apparatus for generating a key.
Background
AKMA (authentication and key management for application, authentication and key management) mechanisms are defined in 3GPP (3 rd Generation Partnership Project, third generation partnership project). AKMA is used to generate a shared key between a UE (User Equipment) and an AF (Applic ation function ) by which a session between the UE and the AF is established.
But the UE carries the key identification of the shared key when initiating a session request to the target AF, other AF with AKMA service authorization can intercept the key identification through intermediate attack and forward the key identification and the AF identification thereof, thereby acquiring the common public user identification information of the UE and the shared key from a core network. Therefore, the disclosure of private information such as general public user identification information and key identification is caused, so that the private information of the user has potential safety hazards.
Therefore, when a session between the UE and the AF is established, disclosure of private information of the user is prevented, and ensuring security of the private information of the user is a technical problem that needs to be solved at present.
Disclosure of Invention
The embodiment of the application provides a key generation method and device, which are used for preventing other application functions from acquiring private information of a user when a target application function requests a shared key, avoiding disclosure of the private information of the user and ensuring safety of the private information of the user.
In a first aspect, an embodiment of the present application provides a key generating method, including:
receiving 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 identification comprises an encrypted user terminal identity identification and an encrypted target application function second identification;
decrypting the encrypted identity of the user terminal and the encrypted second identity of the target application function to obtain a decrypted identity and a decrypted second identity;
and if the first identifier is determined to be consistent with the decrypted second identifier, generating a shared key and identity information according to the decrypted identity identifier and the decrypted second identifier.
In the above technical solution, because the key identifier includes the encrypted identity identifier of the user terminal and the encrypted second identifier of the target application function, the second identifier of the target application function is bound with the identity identifier of the user terminal, which is also equivalent to binding the second identifier of the target application function with the key identifier, so that the current application function can be verified through the second identifier of the target application function, and other application functions are prevented from acquiring privacy information such as the shared key and the identity information of the user. And the illegal user is prevented from acquiring the identity of the user terminal and the second identity of the target application function through encryption processing, so that other application functions are further prevented from acquiring the privacy information of the user, the privacy information disclosure of the user is avoided, and the security of the privacy information of the user is ensured.
Optionally, the key identifier is composed of an identity identifier of the encrypted user terminal, a second identifier of the encrypted 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 the user terminal encrypting the identity of the user terminal and the second identity of the target application function according to a preset public key;
decrypting the encrypted identity of the user terminal and the encrypted second identity of the target application function, including:
decrypting 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 home network key pairs corresponding to the user terminal.
In the technical scheme, the identity of the user terminal and the second identifier of the target application function are encrypted by the user terminal according to the preset public key, so that the information in the key identifier is prevented from being tampered by an illegal user through an encryption mechanism, for example, the encrypted second identifier of the target application function is prevented from being tampered by the illegal user, and the security of the privacy information of the user is further ensured.
Optionally, generating the shared key and the identity information according to the decrypted identity and the decrypted second identity includes:
retrieving the intermediate key and the identity information according to the decrypted identity;
and generating a shared key according to the intermediate key and the decrypted second identifier.
Optionally, after generating the shared key and the identity information according to the decrypted identity and the decrypted second identity, the method further includes:
sending the shared key and identity information to the application function; the shared key and identity information are used for the user terminal and the application function to establish a session.
Optionally, the method further comprises:
and if the first identifier is not consistent with the second identifier, sending an authentication failure message to the application function.
In a second aspect, an embodiment of the present application provides a key generating apparatus, including:
the acquisition module is used for receiving a key acquisition request sent by the application function; the key acquisition request comprises a first identifier of the application function and a key identifier; the key identification comprises an encrypted user terminal identity identification and an encrypted target application function second identification;
the processing module is used for decrypting the encrypted identity of the user terminal and the encrypted second identity of the target application function to obtain the decrypted identity and the decrypted second identity;
and if the first identifier is determined to be consistent with the decrypted second identifier, generating a shared key and identity information according to the decrypted identity identifier and the decrypted second identifier.
Optionally, the key identifier is composed of an identity identifier of the encrypted user terminal, a second identifier of the encrypted 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 the user terminal encrypting the identity of the user terminal and the second identity of the target application function according to a preset public key;
the processing module is specifically configured to:
decrypting 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 home network key pairs corresponding to the user terminal.
Optionally, the processing module is specifically configured to:
retrieving the intermediate key and the identity information according to the decrypted identity;
and generating a shared key according to the intermediate key and the decrypted second identifier.
Optionally, the processing module is further configured to:
after generating a shared key and identity information according to the decrypted identity and the decrypted second identity, sending the shared key and the identity information to the application function; the shared key and identity information are used for the user terminal and the application function to establish a session.
Optionally, the processing module is further configured to:
and if the first identifier is not consistent with the second identifier, sending an authentication failure message to the application function.
In a third aspect, an embodiment of the present application further provides a computer apparatus, including:
a memory for storing program instructions;
and the processor is used for calling the program instructions stored in the memory and executing the key generation method according to the obtained program.
In a fourth aspect, embodiments of the present application also provide a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the above-described key generation method.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a system architecture according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a key generation method according to an embodiment of the present application;
fig. 3 is a schematic diagram of a key generating method according to an embodiment of the present application;
fig. 4 is a schematic flow chart of a key generation method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a key generating device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described in further detail below with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
AKMA mechanisms are defined in 3gpp 33.535. AKMA is used to establish a shared key between the UE and the AF, through which a session between the UE and the AF is established. The AF is similar to an application server, interacts with other 5G core network control planes NF, and provides business services. The AF may exist for different application services, and may be owned by an operator or a trusted third party.
Taking the 5G core network as an example, the UE sends a session request to the target AF, where the session request includes an AKM a key identification (hereinafter referred to as a-KID for convenience of description). The A-KID is in the format of username@r area, and includes RID (Router Identity Document, routing indicator), AKMA's temporary U E identity (hereinafter referred to as A-TID) and HNI (Home network identifier ). Wherein, A-TID is the basic part of the AKMA shared key that identifies the UE and the UE within the HN.
The target AF (e.g., AF 1) then sends a key acquisition request to the 5G core network (hereinafter referred to as 5 GC), the key acquisition request including the A-KID and its own identity (hereinafter referred to as AF 1-ID). The 5GC retrieves KAKMA from A-KID, and generates a shared key (hereinafter referred to as K) based on KAKMA and AF1-ID AF1 ) And K is taken up AF1 And the UE's GPSI (Generic Public Subs cription Identifier, generic public user identity) is returned to the target AF. Thereby realizing passing through the K AF1 A session between the UE and AF1 is established.
However, in the above process, other AFs (such as AF 2) with AKMA service authorization may intercept the a-KID through an intermediate attack, and send a key acquisition request to the 5G core network according to its own identifier (AF 2-ID), so as to obtain K fed back by the 5G core network according to the a-KID AF2 And GPSI of the UE. Because of K AF2 The 5GC is generated based on the KAKMA and the AF2-ID, so that the AF2 cannot be used, however, GPSI and A-KID of the UE are obtained, and the target AF corresponding to the session established by the UE can be determined through the A-KID, so that the privacy of the GPSI, the A-KID and the like of the UE is causedAnd information leakage causes potential safety hazards to privacy information of a user.
Therefore, the application provides a key generation method, when the target application function requests the shared key, the second identifier of the target application function and the key identifier are bound and encrypted, so that other application functions are prevented from acquiring the private information of the user, the private information of the user is prevented from being revealed, and the security of the private information of the user is ensured.
Fig. 1 schematically illustrates a system architecture to which an embodiment of the present application is applied, where the system architecture is applied to a 5G network scenario, and includes a user terminal 110, a 5G core network 120, and application functions 130.
The user terminal 110 is configured to encrypt the identity of the user terminal 110 and the second identity of the target application function according to a preset public key, so as to obtain an encrypted identity and an encrypted second identity. Then forming a key identifier according to the encrypted identity of the user terminal, the encrypted second identifier of the target application function, the routing indicator and the home network identifier; the target application function represents an application function with which the user terminal 110 wants to establish a session. The user terminal 110 is further configured to send a session request to the application function 130, the session request comprising the key identification.
An application function 130 for sending a key acquisition request to the 5G core network 120 after receiving the session request sent by the user terminal 110, the key acquisition request including a first identification and a key identification of the application function 130. The application function 130 is further configured to receive the shared key and the identity information sent by the 5G core network 120, and establish a session with the user terminal 110 according to the shared key and the identity information.
The 5G core network 120 receives the key obtaining request sent by the application function 130, and then decrypts the encrypted identity of the user terminal and the encrypted second identity of the target application function in the key obtaining request according to the preset private key, so as to obtain the decrypted identity and the decrypted second identity. When it is determined that the first identifier is consistent with the decrypted second identifier, the application function 130 is indicated as a target application function, so that a shared key and identity information are generated according to the decrypted identity identifier and the decrypted second identifier, and the shared key and the identity information are sent to the application function.
It should be noted that the structure shown in fig. 1 is only an example, and in some embodiments, the structure may be implemented in a 4G network scenario, which is not limited by the embodiment of the present application.
Based on the above description, fig. 2 schematically illustrates a flow chart of a key generation method provided by an embodiment of the present application, as shown in fig. 2, where the flow specifically includes:
step 210, a key acquisition request sent by an application function is received.
In the embodiment of the application, the key acquisition request is triggered by an Application Function (AF) based on a session request sent by the user terminal. The session request is triggered based on a user operation on the user terminal, such as, but not limited to, clicking a display screen of the user terminal, sending a voice command to the user terminal, and the like. A User terminal is a terminal device of a User, and for convenience of description, the User terminal will be referred to as UE (User Equipment) hereinafter. The user terminal may be a mobile phone, a tablet computer, a notebook computer, a netbook, a vehicle-mounted device, a business intelligent terminal (including a video phone, a conference desktop intelligent terminal, etc.), a personal digital assistant (personal digital assistant, PDA), an augmented reality (augmented reality, AR) \virtual reality (VR) device, etc., and the embodiment of the present application does not limit the specific form of the user terminal.
When a user wants to establish a session with a certain AF through the UE, a session request is sent to the AF. In an embodiment of the application, the session request includes a key identification. That is, the UE generates a key identification (hereinafter, abbreviated as a-KID for convenience of description) before transmitting a session request to the AF.
In a possible implementation manner, the UE applies a function (hereinafter referred to as AF) to a target according to a preset public key T ) (hereinafter abbreviated as AF) T -ID) to obtain an encrypted AF T -an ID. Then the UE performs AF according to the encrypted AF T -ID, userThe identity of the terminal (hereinafter abbreviated as a-TID), the routing indicator (hereinafter abbreviated as RID) and the home network identifier (hereinafter abbreviated as NHI) constitute a-KID. The A-TID represents the temporary identity of the UE in AKMA.
In another possible implementation manner, the UE encrypts the second identifier of the target application function according to the preset public key to obtain the encrypted AF T -ID, encrypting the identity of the user terminal, obtaining an encrypted a-TID. Then the UE performs AF according to the encrypted AF T The ID, encrypted A-TID, RID and NHI constitute A-KID as shown in Table 1 below.
TABLE 1
As can be seen from Table 1 above, the format of A-KID is: the username@realme, namely the key identification A-KID, consists of two parts, wherein one part is username and comprises RID, encrypted A-TID and encrypted AF T -ID; the other part is realme, including NHI. I.e. the key identification comprises the encrypted identity of the user terminal and the encrypted second identification of the target application function.
In the embodiment of the application, the preset public key and the preset private key can be a home network key pair corresponding to the user terminal, for example, the preset public key is an NH public key, and the preset private key is an NH private key. In some embodiments, the UE may further encrypt the second identifier of the target application function and the identity identifier of the user terminal by using other encryption algorithms, for example, encryption modes such as RSA, SM2, etc., which are not limited in particular.
Based on the above description, when the UE sends a session request to the AF, the UE will carry the key identifier. And after receiving the session request, the AF judges whether the shared key corresponding to the UE is stored or not, if not, a key acquisition request is sent to the 5G core network, wherein the key acquisition request comprises a first identifier of the AF and a key identifier. If yes, the AF establishes a session with the UE directly according to the shared key corresponding to the UE.
And 220, decrypting the encrypted identity of the user terminal and the encrypted second identity of the target application function to obtain a decrypted identity and a decrypted second identity.
In the embodiment of the application, the 5G core network comprises an authentication module (AAnf) and a decryption module (UDM). The authentication module is used for sending a key acquisition request sent by the received application function to the decryption module, decrypting the encrypted identity of the user terminal and the encrypted second identity of the target application function by the decryption module according to a preset private key to obtain the decrypted identity and the decrypted second identity, and sending the decrypted identity and the decrypted second identity to the authentication module (AAnf).
Step 230, if it is determined that the first identifier is consistent with the decrypted second identifier, generating a shared key and identity information according to the decrypted identity identifier and the decrypted second identifier.
In the embodiment of the application, after obtaining the decrypted identity and the decrypted second identity, the authentication module judges whether the decrypted second identity is consistent with the first identity in the key acquisition request, if so, the AF for sending the key acquisition request is the target AF of the UE, namely the AF with which the UE needs to establish a session, and then the shared secret key and the identity information for establishing the session are generated. Further, the intermediate key and the identity information are retrieved according to the decrypted identity, and then the shared key is generated according to the intermediate key and the decrypted second identity. Wherein the intermediate key is K AKMA The key, the identity information is GPSI information, and in the 4G network scenario, the identity information is MSISDN.
Based on the technical scheme, before the UE establishes a session to the AF application, the second identifier of the target application function is encrypted to obtain the encrypted AF T -ID, encrypting the identity of the user terminal, obtaining an encrypted a-TID, further according to the encrypted AF T -ID and encrypted A-TID constitute A-KID, such that A-KID is associated with encrypted AF T Binding of ID to achieve AF by encrypted AF T -ID verifies the AF sending the key acquisition request, preventing other application functions from acquiring the user's shared keyAnd privacy information such as identity information, and the like, ensures that the AF sending the key acquisition request is the AF of the UE which wants to establish a session, and prevents illegal users from acquiring GPSI information of the UE and AF service information accessed by the UE. And also employs home network HN public key pairs a-TID and AF T -ID encryption avoiding A-TID and AF T ID malicious tampering, guaranteeing the accuracy of verification.
Referring to fig. 3, fig. 3 is a schematic diagram of a key generation method according to an embodiment of the present application. The process is as follows: in the AKMA technology, if a UE subscribes to an AKMA service between a base station and a 5G core network, the 5G core network generates an intermediate key K corresponding to the UE AKMA And storing.
Before the user terminal UE sends a session request to the target AF (AF 1 shown in fig. 3), the identity of the UE a-TID and the first identity AF1-ID of AF1 are encrypted by using the home network public key, so as to obtain an encrypted a-TID and an encrypted AF1-ID. And the UE generates a key identifier A-KID according to the RID, the HNI, the encrypted A-TID and the encrypted AF1-ID.
The UE sends a session request to AF1, the session request comprising a key identification a-KID. Suppose that AF1 obtains the key identification A-KID, and that other AF (AF 2 shown in FIG. 3) also obtains the key identification A-KID by way of an intermediate attack. Two AFs are described below:
the AF1 sends a key acquisition request Q1 to the 5G core network, the key acquisition request Q1 comprising a first identification AF1-ID and A-KID of the AF 1. After receiving the key obtaining request Q1, the authentication module in the 5G core network sends the key obtaining request Q1 to a decryption module, and the decryption module decrypts the encrypted A-TID and the encrypted AF1-ID in the A-KID according to the private key of the home network to obtain the decrypted A-TID and the decrypted AF1-ID. The decrypted AF1-ID is then verified by the authentication module with the AF1-ID in the key acquisition request Q1. At this time, if it is determined that the decrypted AF1-ID is identical to the AF1-ID in the key acquisition request Q1, K is retrieved based on the decrypted A-TID AKMA And GPSI information of UE, and according to K AKMA And AF1-ID generates a shared key.
The AF2 sends a key acquisition request Q2 to the 5G core network, the key acquisition request Q2 comprising a first identification AF2-ID and A-KID of the AF 2. After receiving the key obtaining request Q2, the authentication module in the 5G core network sends the key obtaining request Q2 to a decryption module, and the decryption module decrypts the encrypted A-TID and the encrypted AF1-ID in the A-KID according to the private key of the home network to obtain the decrypted A-TID and the decrypted AF1-ID. The decrypted AF1-ID is then verified by the authentication module with the AF2-ID in the key acquisition request Q2. At this time, if it is determined that the decrypted AF1-ID does not match the AF2-ID in the key acquisition request Q2, the shared key and the identity information are not generated.
Based on the technical scheme, the 5GC decrypts the A-KID by adopting the HN private key to obtain the AF-ID and the A-TID which are required to be accessed by the decrypted UE, and performs comparison authentication on the AF1-ID and the AF2-ID according to the AF-ID which are required to be accessed, wherein the AF with the same authentication is the AF which is required to be accessed by the UE, and the AF with the failure authentication is an illegal user, so that the illegal user is prevented from acquiring the private information such as the shared key and the identity information of the user, and the security of the private information of the user is ensured.
In some embodiments, after the 5G core network generates the shared key and the identity information, the shared key and the identity information are sent to the application function, so that the application function establishes a session with the user terminal according to the shared key and the identity information. That is, the 5G core network returns a success response to the application function, the success response including the shared key K AF SUPI (including GPSI information of UE), shared key K AF Life cycle of (c) and the like. In addition, if the first identifier is inconsistent with the second identifier, the application function AF is indicated to be an illegal user, belongs to man-in-the-middle attack, and sends an authentication failure message to the application function, namely returns a failure response to indicate denial of service.
In order to better explain the above technical solution, fig. 4 is a schematic flow chart of a key generation method according to an exemplary embodiment of the present application. As shown in fig. 4, the process is performed by a user terminal UE, a 5G core network and an application function AF, the 5G core network includes an authentication module AAnf and a decryption module UDM, and the process includes:
in step 401, the user terminal (i.e. UE) encrypts the a-TID of the UE (i.e. its own identity) and the AF1-ID of the target AF (i.e. the unique identity of the target application function AF 1).
And the UE performs network master authentication and AKMA key derivation related services. The generating module arranged inside the UE encrypts the A-TID of the UE and the AF1-ID of the target AF according to the public key in a preset key pair (such as public and private key pairs based on RSA, SM2 and a home network NH).
Step 402, the user terminal generates A-KID according to the encrypted A-TID of the UE and the encrypted AF1-ID.
The UE composes an A-KID according to the encrypted AF1-ID, the encrypted A-TID, the RID and NHI. Wherein the RID and NHI are used to enable communication between the UE and the application function, such as the UE routing session requests to the application function according to the RID and NHI.
Step 403, the user terminal sends a session request carrying the a-KID to the application function.
Step 404, the application function sends a key acquisition request carrying the a-KID and its AF3-ID to AAnf of the 5G core network.
And the application function (namely AF 3) sends a key acquisition request carrying the A-KID and the self identification (AF 3-ID) to AAnf when determining that the application function is the shared key corresponding to the UE.
Step 405, AAnf sends the encrypted A-TID and the encrypted AF1-ID to the UDM.
After the AAnF receives the A-KID, the A-KID is analyzed to obtain encrypted A-TID and encrypted AF1-ID in the A-KID, and the encrypted A-TID and the encrypted AF1-ID are sent to the UDM.
In step 406, the UDM determines the decrypted A-TID and the decrypted AF1-ID.
And decrypting the encrypted A-TID and the encrypted AF1-ID by the UDM according to a private key in the preset key pair to obtain the decrypted A-TID and the decrypted AF1-ID.
In step 407, the UDM sends the decrypted A-TID and the decrypted AF1-ID to the AAnF.
In step 408, the AAnF authenticates that the decrypted AF1-ID is consistent with the AF 3-ID.
After the decrypted AF1-ID is obtained by the AAnF, the decrypted AF1-ID is compared with the AF3-ID in the key acquisition request in a verification mode, and if the AF1-ID is consistent with the AF3-ID, the application function is the application function of the UE which wants to carry out the session.
Step 409, aanf feeds back the shared key and identity information to the application function.
After the AAnF authenticates that the decrypted AF1-ID is consistent with the AF3-ID, the intermediate key K corresponding to the UE is searched out according to the decrypted A-TID AKMA And identity information GPSI, then according to K AKMA And AF1-ID (or and AF 3-ID) to generate shared key K AF1 . Finally, the shared key K AF1 And the identity information GPSI is sent to the application function.
In step 410, a session is established.
The application function is acquiring the shared secret key K AF1 Thereafter, according to the shared key K AF1 A session is established with the UE.
Based on the technical scheme, in the AKMA service flow, the security of privacy information such as GPSI of the UE is ensured, and illegal users are prevented from acquiring the privacy information of the UE. And the realization is simple, and the interface of the 5G core network does not need to be changed.
Further, the UE encrypts the A-TID and the AF-ID (the identification of the AF which the UE wants to access) of the UE by using the home network HN public key, so that the A-TID and the AF-ID of the UE are bound and encrypted, and illegal users are prevented from acquiring the A-TID of the UE and the information of the AF application which the user wants to access.
The 5GC uses the home network HN private key to decrypt the encrypted A-TID and AF-ID, and compares and authenticates the received AF-ID (namely the AF identifier for sending the key acquisition request) with the decrypted AF-ID, and generates and returns a KAF key and the GPSI of the UE when the authentication passes. If the authentication is not passed, returning authentication failure, so as to determine whether the AF sending the key acquisition request is the AF which the UE wants to access, further preventing illegal user attack and ensuring the security of the privacy information of the user.
Based on the same technical concept, fig. 5 schematically illustrates a structural diagram of a key generating device according to an embodiment of the present application, where the device may perform the flow of the key generating method.
As shown in fig. 5, the apparatus specifically includes:
an obtaining module 510, configured to receive a key obtaining request sent by an application function; the key acquisition request comprises a first identifier of the application function and a key identifier; the key identification comprises an encrypted user terminal identity identification and an encrypted target application function second identification;
the processing module 520 is configured to decrypt the encrypted identity of the user terminal and the encrypted second identity of the target application function, to obtain a decrypted identity and a decrypted second identity;
and if the first identifier is determined to be consistent with the decrypted second identifier, generating a shared key and identity information according to the decrypted identity identifier and the decrypted second identifier.
Optionally, the key identifier is composed of an identity identifier of the encrypted user terminal, a second identifier of the encrypted 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 the user terminal encrypting the identity of the user terminal and the second identity of the target application function according to a preset public key;
the processing module 520 is specifically configured to:
decrypting 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 home network key pairs corresponding to the user terminal.
Optionally, the processing module 520 is specifically configured to:
retrieving the intermediate key and the identity information according to the decrypted identity;
and generating a shared key according to the intermediate key and the decrypted second identifier.
Optionally, the processing module 520 is further configured to:
after generating a shared key and identity information according to the decrypted identity and the decrypted second identity, sending the shared key and the identity information to the application function; the shared key and identity information are used for the user terminal and the application function to establish a session.
Optionally, the processing module 520 is further configured to:
and if the first identifier is not consistent with the second identifier, sending an authentication failure message to the application function.
Based on the same technical concept, the embodiment of the application further provides a computer device, including:
a memory for storing program instructions;
and the processor is used for calling the program instructions stored in the memory and executing the key generation method according to the obtained program.
Based on the same technical idea, the embodiments of the present application also provide a computer-readable storage medium storing computer-executable instructions for causing a computer to execute the above-described key generation method.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may 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, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may 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, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (10)

1. A key generation method, comprising:
receiving 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 identification comprises an encrypted user terminal identity identification and an encrypted target application function second identification;
decrypting the encrypted identity of the user terminal and the encrypted second identity of the target application function to obtain a decrypted identity and a decrypted second identity;
and if the first identifier is determined to be consistent with the decrypted second identifier, generating a shared key and identity information according to the decrypted identity identifier and the decrypted second identifier.
2. The method of claim 1, wherein the key identification is comprised of an identity of the encrypted user terminal, a second identification of the encrypted 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 the user terminal encrypting the identity of the user terminal and the second identity of the target application function according to a preset public key;
decrypting the encrypted identity of the user terminal and the encrypted second identity of the target application function, including:
decrypting 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 home network key pairs corresponding to the user terminal.
3. The method of claim 1, wherein generating a shared key and identity information from the decrypted identity and the decrypted second identity comprises:
retrieving the intermediate key and the identity information according to the decrypted identity;
and generating a shared key according to the intermediate key and the decrypted second identifier.
4. A method according to any one of claims 1 to 3, further comprising, after generating a shared key and identity information from the decrypted identity and the decrypted second identity:
sending the shared key and identity information to the application function; the shared key and identity information are used for the user terminal and the application function to establish a session.
5. The method of claim 1, wherein the method further comprises:
and if the first identifier is not consistent with the second identifier, sending an authentication failure message to the application function.
6. A key generation apparatus, comprising:
the acquisition module is used for receiving a key acquisition request sent by the application function; the key acquisition request comprises a first identifier of the application function and a key identifier; the key identification comprises an encrypted user terminal identity identification and an encrypted target application function second identification;
the processing module is used for decrypting the encrypted identity of the user terminal and the encrypted second identity of the target application function to obtain the decrypted identity and the decrypted second identity;
and if the first identifier is determined to be consistent with the decrypted second identifier, generating a shared key and identity information according to the decrypted identity identifier and the decrypted second identifier.
7. The apparatus of claim 6, wherein the key identification is comprised of an identity of the encrypted user terminal, a second identification of the encrypted 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 the user terminal encrypting the identity of the user terminal and the second identity of the target application function according to a preset public key;
the processing module is specifically configured to:
decrypting 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 home network key pairs corresponding to the user terminal.
8. The apparatus of claim 6, wherein the processing module is specifically configured to:
retrieving the intermediate key and the identity information according to the decrypted identity;
and generating a shared key according to the intermediate key and the decrypted second identifier.
9. A computer device, comprising:
a memory for storing program instructions;
a processor for invoking program instructions stored in said memory to perform the method of any of claims 1-5 in accordance with the obtained program.
10. A computer-readable storage medium storing computer-executable instructions for causing a computer to perform the method of any one of claims 1 to 5.
CN202310911719.XA 2023-07-24 2023-07-24 Key generation method and device Pending CN116866906A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310911719.XA CN116866906A (en) 2023-07-24 2023-07-24 Key generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310911719.XA CN116866906A (en) 2023-07-24 2023-07-24 Key generation method and device

Publications (1)

Publication Number Publication Date
CN116866906A true CN116866906A (en) 2023-10-10

Family

ID=88226755

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310911719.XA Pending CN116866906A (en) 2023-07-24 2023-07-24 Key generation method and device

Country Status (1)

Country Link
CN (1) CN116866906A (en)

Similar Documents

Publication Publication Date Title
US8122250B2 (en) Authentication in data communication
WO2017028593A1 (en) Method for making a network access device access a wireless network access point, network access device, application server, and non-volatile computer readable storage medium
US20100135491A1 (en) Authentication method
EP2767029B1 (en) Secure communication
EP3337088B1 (en) Data encryption method, decryption method, apparatus, and system
KR101632946B1 (en) Manipulation and restoration of authentication challenge parameters in network authentication procedures
US20200412554A1 (en) Id as service based on blockchain
CN102761870B (en) Terminal authentication and service authentication method, system and terminal
EP2633716A1 (en) Data processing for securing local resources in a mobile device
CN107026824A (en) A kind of message encryption, decryption method and device
EP1530315A1 (en) System and method for authentication of applications in a non-trusted network environment
WO2008006312A1 (en) A realizing method for push service of gaa and a device
EP1700444A1 (en) Method and system for protection data, related communication network and computer program product
EP3556070B1 (en) Use of personal device for convenient and secure authentication
CN113556227A (en) Network connection management method and device, computer readable medium and electronic equipment
WO2005064430A1 (en) Method and system for the cipher key controlled exploitation of data resources, related network and computer program products
CN112566119A (en) Terminal authentication method and device, computer equipment and storage medium
CN103024735A (en) Method and equipment for service access of card-free terminal
CN111132149B (en) Registration method of 5G user terminal, user terminal equipment and medium
WO2017005962A1 (en) Two-user authentication
KR102269753B1 (en) Method for performing backup and recovery private key in consortium blockchain network, and device using them
CN115473655B (en) Terminal authentication method, device and storage medium for access network
CN112769759B (en) Information processing method, information gateway, server and medium
CN116866906A (en) Key generation method and device
CN112769783A (en) Data transmission method, cloud server, receiving end and sending end

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination