Authentication method and device, communication equipment, storage medium and program product
By using the obfuscated fourth random number in the authentication information response of the 5G communication network, the problem of potential security risks of terminal authentication data is solved, the security of terminal location information is improved, and location information tracking attacks are resisted.
Patent Information
- Application Number
- CN202410889370.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-03
- Publication Date
- 2024-10-22
AI Technical Summary
In the existing 5G communication network authentication scheme, the authentication data of the terminal has security risks and is easily stolen, leading to the leakage of terminal location information.
By carrying the fourth random number in the authentication information response, the fourth random number is obtained by obfuscation of the first random number based on the second random number. The second random number is only secretly stored on the terminal side and the first network element side. , thereby improving the security of the first random number and making it difficult to crack, thereby resisting tracking attacks on terminal location information.
It effectively improves the security of authentication data, prevents the leakage of terminal location information, and enhances the ability to resist attacks.
Smart Images

Figure CN118828501A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network security technology, and in particular to an authentication method and apparatus, communication equipment, storage medium, and program product. Background Art
[0002] With the rapid development of Internet technology, the network security risks of information systems continue to increase, and the threat challenges are becoming increasingly severe. Cryptographic security is an important foundation for information security and can be used to effectively protect the data security of network information systems. Cryptographic technology is the core technology and important means to protect network information systems.
[0003] At present, 5G communication networks use the Authentication and Key Agreement (AKA) protocol to complete two-way authentication between the terminal and the network. In the current authentication scheme, the terminal's authentication data has security risks and is easy to be stolen, which in turn leads to the leakage of terminal location information. Summary of the invention
[0004] To solve the above technical problems, the present application provides an authentication method and apparatus, a communication device, a computer storage medium, and a computer program product.
[0005] The authentication methods provided by this application include:
[0006] After receiving the authentication information request, the first network element generates a first random number, and uses the second random number to confuse the first random number to obtain a third random number;
[0007] The first network element generates a first message authentication code (MAC) based on the second random number, the third random number and the first authentication token, and generates a fourth random number based on the third random number and the first MAC;
[0008] The first network element sends an authentication information response, where the authentication information response carries the fourth random number and the first authentication token.
[0009] The authentication methods provided by this application include:
[0010] The terminal receives an authentication request, wherein the authentication request carries a fourth random number and a first authentication token;
[0011] The terminal obtains a third random number and a first MAC based on the fourth random number, calculates a third MAC based on the second random number, the third random number and the first authentication token, and verifies the integrity of the authentication request based on the third MAC and the first MAC;
[0012] The terminal performs a deobfuscation process on the acquired third random number based on the second random number to obtain a first random number;
[0013] The terminal verifies the first authentication token based on the obtained first random number.
[0014] The authentication device provided in this application includes:
[0015] A first receiving unit, configured to receive an authentication information request;
[0016] A first processing unit is configured to generate a first random number, and use a second random number to confuse the first random number to obtain a third random number; generate a first MAC based on the second random number, the third random number and a first authentication token, and generate a fourth random number based on the third random number and the first MAC;
[0017] The first sending unit is used to send an authentication information response, where the authentication information response carries the fourth random number and the first authentication token.
[0018] The authentication device provided in this application includes:
[0019] A second receiving unit, configured to receive an authentication request, wherein the authentication request carries a fourth random number and a first authentication token;
[0020] A second processing unit is used to obtain a third random number and a first MAC based on the fourth random number, calculate a third MAC based on the second random number, the third random number and the first authentication token, and verify the integrity of the authentication request based on the third MAC and the first MAC; perform deobfuscation processing on the obtained third random number based on the second random number to obtain a first random number; and verify the first authentication token based on the obtained first random number.
[0021] The communication device provided in the present application includes: a processor and a memory, the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute any one of the above-mentioned authentication methods.
[0022] The computer-readable storage medium provided in the present application is used to store a computer program, and the computer program enables a computer to execute any one of the above-mentioned authentication methods.
[0023] The computer program product provided in the present application includes computer program instructions, which enable a computer to execute any one of the above-mentioned authentication methods.
[0024] In the technical solution of the present application, the first network element does not carry the real first random number in the authentication information response, but carries a fourth random number in the authentication information response. Since the "generation of the fourth random number" is based on the "obfuscation of the first random number by the second random number", and the second random number is only secretly stored on the terminal side and the first network element side, it is extremely difficult to crack the first random number from the fourth random number, which improves the security of the first random number as authentication data, and can further resist tracking attacks on terminal location information. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 This is a schematic diagram of the authentication method provided in the embodiment of the present application. Figure 1 ;
[0026] Figure 2 This is a schematic diagram of the authentication method provided in the embodiment of the present application. Figure 2 ;
[0027] Figure 3 This is a flowchart of primary authentication initiation and identity submission provided by an embodiment of the present application;
[0028] Figure 4 It is a main authentication flow chart provided in an embodiment of the present application;
[0029] Figure 5 The parameter calculation principle provided in the embodiment of this application is Figure 1 ;
[0030] Figure 6 The parameter calculation principle provided in the embodiment of this application is Figure 2 ;
[0031] Figure 7 This is a flowchart of authentication synchronization failure recovery provided by an embodiment of the present application;
[0032] Figure 8 This is a schematic diagram of the structure of the authentication device provided in the embodiment of the present application. Figure 1 ;
[0033] Fig. 9 This is a schematic diagram of the structure of the authentication device provided in the embodiment of the present application. Figure 2 ;
[0034] Fig.10 is a schematic structural diagram of a communication device provided in an embodiment of the present application;
[0035] Fig.11 It is a schematic structural diagram of the chip of an embodiment of the present application. DETAILED DESCRIPTION
[0036] In the current authentication scheme, there are security risks in the authentication data of the terminal, which are easily stolen, leading to the leakage of the terminal location information. The main problems are as follows:
[0037] 1) Attack scenario 1: Replaying the authentication request leads to the leakage of the terminal location information.
[0038] In the eavesdropping stage, the attacker uses a sniffer tool to perform air interface eavesdropping near the target UE and saves the authentication data of the target UE.
[0039] In the active attack stage, if the attacker wants to determine whether the target UE is in a certain area, the attacker broadcasts an authentication request (carrying authentication data such as random number (RAND) and authentication token (AUTN)) through a fake base station in the area where the target UE may appear. The UE that receives the authentication request near the fake base station will process the authentication data, and there will be two types of return messages:
[0040] a) Target UE: After receiving the authentication data, since the key K for generating the authentication data is the same as the key K of the target UE, the integrity verification of AUTN can be passed. However, since the authentication data is old, SQN_HN in AUTN < SQN_UE, so the target UE will return a synchronization failure (Syn_failure) error message.
[0041] b) Other UEs: After receiving the authentication data, since the K for generating the authentication data is different from the K of this UE, the integrity verification of AUTN cannot be passed, and this UE will return a message authentication code failure (Mac_failure) error message.
[0042] The attacker determines whether the target UE is nearby by judging the error type of the return message.
[0043] 2) Attack scenario 2: Replaying the Subscription Concealed Identifier (SUCI) leads to the leakage of the terminal location information.
[0044] In the eavesdropping stage, the attacker uses a sniffer tool to perform air interface eavesdropping near the target UE and saves the SUCI sent by the target UE during the initial registration process.
[0045] In the active attack phase, the attacker wants to determine whether the target UE is in a certain area. Then, in the area where the target UE may appear, the attacker sends a strong signal through a fake base station, causing nearby UEs to attach to the fake base station. The attacker then sends a deregistration request to the nearby UEs, causing the UEs to initiate a new registration request, thereby sending a new SUCI (SUCI_new) to the network side. After receiving the SUCI_new, the fake base station replaces the SUCI_new with the old SUCI and submits it to a nearby normal base station. After receiving the SUCI, the network side returns an authentication request (carrying authentication data such as RAND and AUTN). The fake base station forwards the authentication request to the nearby UEs. The UEs near the fake base station that receive the authentication request will process the authentication data and there will be two types of return messages:
[0046] a) Target UE: After receiving the authentication data, since the key K used to generate the authentication data is the same as the key K of the target UE, the integrity verification of AUTN can be passed. However, since the authentication data is old, SQN_HN in AUTN < SQN_UE, so the target UE will return a synchronization failure (Syn_failure) error message.
[0047] b) Other UEs: After receiving the authentication data, since the K used to generate the authentication data is different from the K of this UE, the integrity verification of AUTN cannot be passed, and this UE will return a message authentication code failure (Mac_failure) error message.
[0048] The attacker determines whether the target UE is nearby by judging the error type of the return message.
[0049] To solve the above problems, the following technical solutions of the embodiments of the present application are proposed. Next, the technical solutions in the embodiments of the present application will be described with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, rather than all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0050] It should be noted that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three kinds of relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects associated before and after are in an "or" relationship. It should also be understood that the "indication" mentioned in the embodiments of the present application can be a direct indication, an indirect indication, or an indication of an association relationship. For example, A indicates B, which can mean that A directly indicates B, for example, B can be obtained through A; it can also mean that A indirectly indicates B, for example, A indicates C, and B can be obtained through C; it can also mean that there is an association relationship between A and B. It should also be understood that the "correspondence" mentioned in the embodiments of the present application can mean that there is a direct or indirect correspondence relationship between the two, or it can mean that there is an association relationship between the two, or it can mean a relationship between indication and indication, configuration and configuration, etc.
[0051] To facilitate understanding of the technical solutions of the embodiments of the present application, the relevant technologies of the embodiments of the present application are first described below. The following related technologies can be arbitrarily combined with the technical solutions of the embodiments of the present application as optional solutions, and they all belong to the protection scope of the embodiments of the present application.
[0052] 1) USIM: Universal Subscriber Identity Module, which stores the user's core key K and identifier data.
[0053] 2) ME: Mobile Equipment, works with USIM to complete network authentication.
[0054] 3) UE: User Equipment, a general term for ME and USIM.
[0055] 4) SEAF: Secure Anchor Function, used to authenticate the UE to the access network.
[0056] 5)AUSF: Authentication Server Function, used to authenticate the UE by the home network.
[0057] 6) UDM / ARPF: Unified Data Manage / Authentication credential Repository and Processing Function, which stores user contract information, authentication data K, etc.
[0058] 7)HN: Home Network.
[0059] 8)SN: Service network.
[0060] 9) KEM: Key Encapsulation Mechanism, mainly including the following algorithms:
[0061] a. KeyGen(pp)→(SK, PK): Generate a public-private key pair. The input pp is the public parameter used to generate the key pair. The output is the generated public-private key pair.
[0062] b. Encap(PK)→(sk, csk): Generate a temporary symmetric key based on the public key. The input is the public key, and the output is the temporary symmetric key sk and the encrypted sk, i.e. csk.
[0063] c. Decap(SK, csk)→(sk): Decrypts the temporary symmetric key based on the private key. The input is the private key and csk, and the output is the temporary symmetric key sk.
[0064] 10) DEM: Data Encapsulation Mechanism, mainly including the following algorithms:
[0065] a. SEnc(sk, M)→C: The input is the symmetric key sk and the plaintext M, which are encrypted using a symmetric encryption algorithm and the output is the ciphertext C.
[0066] b. SDec(sk, C)→M: The input is the symmetric key sk and the ciphertext C, which is decrypted using the symmetric encryption algorithm and the output is the plaintext M.
[0067] 11) ECIES: Elliptic Curve Integrate Encrypt Scheme. 5GAKA uses ECIES to encrypt SUPI to generate SUCI, which mainly includes two algorithms:
[0068] a. ECIES_ENC (encryption): input public key PK and plaintext M, output C:
[0069] Encap_ECIES(PK): Use KeyGen(pp) to generate a temporary public-private key pair (eSK, ePK), generate a temporary symmetric key sk based on PK and eSK, and output (sk, ePK).
[0070] SEnc_ECIES(sk, M): Use the temporary key sk to encrypt and integrity protect M to obtain C1 and C2, and output C = (ePK, C1, C2).
[0071] b. ECIES_DEC (decryption): Input private key SK and ciphertext C, output plaintext M:
[0072] Decap_ECIES(SK): Generates a temporary key sk based on SK and ePK, and outputs sk.
[0073] SDec_ECIES(sk, C): Use the temporary key sk to decrypt and verify the integrity of C, and output M.
[0074] 12) PQC_KEM: Post Quantum Cryptography-based Key Encapsulation Scheme. The KEM scheme based on the post-quantum public key cryptography algorithm, that is, the public key cryptography algorithm in KEM adopts the post-quantum public key cryptography algorithm.
[0075] 13) KEM_ENC: encryption mechanism based on key encapsulation. Input the public key PK and the message M, use the KEM technology to generate a temporary symmetric key, and then protect M to output the ciphertext C. The KEM technology here can use traditional public key cryptographic algorithms such as ECC, RSA, and PQC. ECIES encryption is an implementation of KEM_ENC.
[0076] 14) KEM_DEC: Decryption mechanism based on key encapsulation. Input the private key SK and ciphertext C, use KEM technology to decrypt to obtain a temporary symmetric key, and then decrypt the ciphertext C to output the plaintext M. The KEM technology here can use traditional public key cryptographic algorithms such as ECC, RSA, and PQC. ECIES decryption is an implementation of KEM_DEC.
[0077] 15) Symmetric encryption function: C = E(K, M), using the symmetric key K to symmetrically encrypt M, E is a quantum-safe symmetric encryption algorithm.
[0078] 16) Symmetric decryption function: M = D(K, C), using the symmetric key K to symmetrically decrypt C, D is a quantum-safe symmetric decryption algorithm.
[0079] 17) Asymmetric encryption function: C = E_PUB (PK, M), M is asymmetrically encrypted using the public key PK. E_PUB is a quantum-safe public key encryption algorithm.
[0080] 18) Asymmetric decryption function: M = D_PUB(SK, C), using the private key SK to asymmetric decrypt C. D_PUB is a quantum-safe public key decryption algorithm.
[0081] 19) Signature function: S=SIGN(K, M), use the private key K to sign M.
[0082] 20) Verification function: VERIFY(K, M, S), use the public key K to verify the signature of S.
[0083] 21) Digest function: H = HASH(M), using a quantum-safe digest algorithm to calculate the digest value of M.
[0084] To facilitate understanding of the technical solutions of the embodiments of the present application, the technical solutions of the present application are described in detail below through specific embodiments. The above related technologies can be combined arbitrarily with the technical solutions of the embodiments of the present application as optional solutions, and they all belong to the protection scope of the embodiments of the present application. The embodiments of the present application include at least part of the following contents.
[0085] It should be noted that the technical solution of the embodiment of the present application is not only applicable to the AKA protocols of 3G, 4G and 5G, but also to other types of AKA protocols (such as EAP-AKA protocol).
[0086] It should be noted that the "authentication" and "authorization" described in the embodiments of the present application can be described interchangeably.
[0087] Figure 1 This is a schematic diagram of the authentication method provided in the embodiment of the present application. Figure 1 ,like Figure 1 As shown, the authentication method includes the following steps:
[0088] Step 101: After receiving the authentication information request, the first network element generates a first random number, and uses a second random number to confuse the first random number to obtain a third random number.
[0089] In the embodiment of the present application, the first network element refers to a network element on the HN side.
[0090] In some implementations, taking 5G AKA as an example, the first network element is UDM / ARPF. UDM / ARPF receives the authentication information request (ie, Nudm_Authenticate_Get Request) sent by AUSF.
[0091] In some implementations, the authentication information request carries a Subscription Concealed Identifier (SUCI) of the terminal; the first network element decrypts the SUCI based on the first private key to obtain a Subscription Permanent Identifier (SUPI) of the terminal and a second random number.
[0092] Here, the first private key is the private key of HN.
[0093] Specifically, the first network element may decrypt the SUCI by using the following formula (0):
[0094] SUPI||R=KEM_DEC(SUCI,SK_HN) (0)
[0095] Among them, KEM_DEC represents a decryption algorithm based on key encapsulation, SK_H represents a first private key (ie, the private key of HN), || represents a concatenation symbol, and R represents a second random number.
[0096] In an embodiment of the present application, after receiving the authentication information request, the first network element generates a first random number. In addition, the first network element generates a first sequence number (Sequence Number, SQN); the first network element generates a second MAC based on the first SQN, the authentication management field (Authentication Management Field, AMF) and the first random number, and generates a first anonymous key (Anonymity Key, AK) based on the first random number; the first network element generates a first authentication token based on the first SQN, the first AK, AMF and the second MAC.
[0097] Specifically, the second MAC may be generated by the following formula (1):
[0098] MAC1=f1 K (SQN||RAND||AMF) (1)
[0099] Among them, MAC1 represents the second MAC, SQN represents the first SQN, RAND represents the first random number, K represents the core key of the terminal, f1 is a message authentication function, and || represents the concatenation symbol.
[0100] Specifically, the first AK can be generated by the following formula (2):
[0101] AK=f5 K (RAND) (2)
[0102] Among them, AK represents the first AK, RAND represents the first random number, K represents the core key of the terminal, and f5 is a key generation function.
[0103] Specifically, the first authentication token can be generated by the following formula (3):
[0104] AUTN=SQN⊕AK||AMF||MAC1 (3)
[0105] Among them, AUTN represents the first authentication token, SQN represents the first SQN, AK represents the first AK, MAC1 represents the second MAC, ⊕ represents the XOR symbol, and || represents the concatenation symbol.
[0106] In the embodiment of the present application, the first network element also generates a first expected response, a first encryption key, and a first integrity key based on the first random number.
[0107] Specifically, the first expected response can be generated by the following formula (4):
[0108] XRES=f2 K (RAND) (4)
[0109] Among them, XRES represents the first expected response, RAND represents the first random number, K represents the core key of the terminal, and f2 is a message authentication function.
[0110] Specifically, the first encryption key can be generated by the following formula (5):
[0111] CK1=f3 K (RAND) (5)
[0112] Among them, CK1 represents the first encryption key, RAND represents the first random number, K represents the core key of the terminal, and f3 is a key generation function.
[0113] Specifically, the first integrity key can be generated by the following formula (6):
[0114] IK1=f4 K (RAND) (6)
[0115] Among them, IK1 represents the first integrity key, RAND represents the first random number, K represents the core key of the terminal, and f4 is a key generation function.
[0116] Through the above formulas (1) to (6), we can get the authentication vector (AV), AV = RAND||XRES||CK1||IK1||AUTN, where || represents the concatenation symbol.
[0117] In the embodiment of the present application, the first random number is obfuscated using the second random number to obtain a third random number.
[0118] In some implementations, obfuscating the first random number using the second random number may be achieved in the following manner: performing an XOR operation on the second random number and the first random number.
[0119] Specifically, the third random number can be generated by the following formula (7):
[0120] RAND_R=RAND⊕R (7)
[0121] Wherein, RAND_R represents the third random number, RAND represents the first random number, R represents the second random number, and ⊕ represents the XOR symbol. It should be noted that the lengths of RAND and R need to be the same, for example, 128 bits.
[0122] Step 102: The first network element generates a first MAC based on the second random number, the third random number, and the first authentication token, and generates a fourth random number based on the third random number and the first MAC.
[0123] Specifically, the first MAC can be generated by the following formula (8):
[0124] MAC2=Hash(R,RAND_R,AUTN) (8)
[0125] Among them, MAC2 represents the second MAC, R represents the second random number, RAND_R represents the third random number, AUTN represents the first authentication token, and Hash represents the hash operation.
[0126] Specifically, the fourth random number can be generated by the following formula (9):
[0127] RAND*=RAND_R||MAC2 (9)
[0128] Among them, RAND* represents the fourth random number, RAND_R represents the third random number, and MAC2 represents the first MAC.
[0129] In some implementations, the first network element further uses the fourth random number (RAND*), the first expected response (XRES), the first encryption key (CK1), and the first integrity key (IK1) to derive the AUSF key (K AUSF ) and the second expected response (XRES*), and then 5G HE AV = RAND*||AUTN||XRES*||K AUSF , || represents the concatenation symbol.
[0130] Step 103: The first network element sends an authentication information response, where the authentication information response carries a fourth random number and a first authentication token.
[0131] In some implementations, taking 5G AKA as an example, UDM / ARPF sends an authentication information response (ie, Nudm_UEAuthentication_Get Response) to AUSF.
[0132] In an embodiment of the present application, the authentication information response carries a fourth random number and a first authentication token. In addition, the authentication information response may also carry an AUSF key and a second expected response. The AUSF key and the second expected response here can be obtained by referring to the relevant description in the above step 102.
[0133] If the authentication request (Nudm_UEAuthentication_Get) received by UDM / ARPF contains SUCI, UDM / ARPF will include SUPI in the authentication information response (Nudm_UEAuthentication_Get Response).
[0134] Specifically, the authentication information response carries 5G HE AV and indicates that 5G HE AV is used for 5G AKA. Here, 5G HEAV=RAND*||AUTN||XRES*||K AUSF , || represents the concatenation symbol. Among them, RAND* represents the fourth random number, AUTN represents the first authentication token, XRES* represents the second expected response, K AUSF Represents the AUSF key.
[0135] It should be noted that after receiving the 5G HE AV, AUSF derives the third expected response (HXRES*) from XRES* and the third expected response (HXRES*) from K AUSF Derived SEAF key (K SEAF ), then replace the XRES* in the 5G HE AV received from UDM / ARPF with HXRES*, and replace K AUSF Replace with K SEAF , generate 5G AV, where 5G AV=RAND*||AUTN||HXRES*||K SEAF , || represents the concatenation symbol.
[0136] In some embodiments, if the first SQN is confirmed by the terminal as not being within a specific range, the first network element receives an authentication failure message, which carries a synchronization failure parameter (AUTS) and a fourth random number; the first network element obtains a third random number and a first MAC based on the fourth random number, and de-obfuscates the obtained third random number based on the second random number to obtain a first random number; the first network element verifies the legitimacy of AUTS based on the obtained first random number.
[0137] Specifically, according to the above formula (9), the third random number (RAND_R) and the first MAC (MAC2) can be obtained from the fourth random number (RAND*), and then the first random number is generated by the following formula (10):
[0138] RAND=RAND_R⊕R (10)
[0139] Among them, RAND represents the first random number, RAND_R represents the third random number, R represents the second random number, and ⊕ represents an exclusive-OR operation.
[0140] After the first network element obtains the first random number (RAND), it can verify the legitimacy of AUTS according to the first random number, and then synchronize the SQN.
[0141] In the technical solution of the present application, the first network element does not carry the real first random number in the authentication information response, but carries a fourth random number in the authentication information response. Since the "generation of the fourth random number" is based on the "obfuscation of the first random number by the second random number", and the second random number is only secretly stored on the terminal side and the first network element side, it is extremely difficult to crack the first random number from the fourth random number, which improves the security of the first random number as authentication data, and can further resist tracking attacks on terminal location information.
[0142] Figure 2 This is a schematic diagram of the authentication method provided in the embodiment of the present application. Figure 2 ,like Figure 2 As shown, the authentication method includes the following steps:
[0143] Step 201: The terminal receives an authentication request, where the authentication request carries a fourth random number and a first authentication token.
[0144] Here, the authentication request can be recorded as Authentication Request.
[0145] In some implementations, before the terminal receives the authentication request, the terminal generates a second random number; the terminal encrypts the SUPI of the terminal and the second random number based on the first public key to obtain the SUCI of the terminal; and the terminal sends an initialization registration request, where the initialization registration request carries the SUCI of the terminal.
[0146] Here, the first public key is the public key of HN.
[0147] Specifically, the terminal has an ME and a USIM, the ME reads the SUPI of the USIM, and encrypts the SUPI using the following formula (11):
[0148] SUCI=KEM_ENC(SUPI||R,PK_HN) (11)
[0149] Among them, KEM_ENC represents an encryption algorithm based on key encapsulation, PK_HN represents a first public key (ie, the public key of HN), || represents a concatenation symbol, and R represents a second random number.
[0150] Here, the ME generates a second random number (R) and synchronizes it to the first network element (such as UDM / ARPF) through the encryption process of SUCI, so that the first network element can subsequently perform obfuscation processing on the first random number (RAND).
[0151] In some implementations, taking 5G AKA as an example, the terminal receives an authentication request sent by SEAF, where SEAF is a network element on the SN side.
[0152] It should be noted that before SEAF sends an authentication request to the terminal, there is also the following interaction process: UDM / ARPF sends an authentication information response (also known as Nudm_UEAuthentication_Get Response) to AUSF, and the authentication information response carries the fourth random number and the first authentication token; AUSF sends an authentication response (also known as Nausf_UEAuthentication_Authenticate Response) to SEAF, and the authentication response carries the fourth random number and the first authentication token.
[0153] Here, the specific generation method of the fourth random number and the first authentication token can refer to the aforementioned Figure 1 Related description.
[0154] Step 202: The terminal obtains a third random number and a first MAC based on the fourth random number, calculates a third MAC based on the second random number, the third random number and the first authentication token, and verifies the integrity of the authentication request based on the third MAC and the first MAC.
[0155] Here, the terminal has an ME and a USIM, the ME obtains a third random number and a first MAC based on a fourth random number, calculates a third MAC based on the second random number, the third random number and the first authentication token, and verifies the integrity of the authentication request based on the third MAC and the first MAC.
[0156] Specifically, the fourth random number can be expressed as RAND*=RAND_R||MAC2, where RAND* represents the fourth random number, RAND_R represents the third random number, and MAC2 represents the first MAC. The ME can obtain RAND_R and MAC2 from RAND* and calculate the third MAC using the following formula (12):
[0157] MAC3=Hash(R,RAND_R,AUTN) (12)
[0158] Among them, MAC3 represents the third MAC, R represents the second random number, RAND_R represents the third random number, AUTN represents the first authentication token, and Hash represents hash operation.
[0159] ME compares the calculated third MAC (MAC3) with the first MAC (MAC2) obtained from the fourth random number (RAND*). If they are consistent, the integrity verification passes; if they are inconsistent, the integrity verification fails.
[0160] Step 203: The terminal performs a deobfuscation process on the acquired third random number based on the second random number to obtain a first random number.
[0161] Here, the ME of the terminal performs a deobfuscation process on the acquired third random number based on the second random number to obtain a first random number.
[0162] Specifically, the ME may generate the first random number using the following formula (14):
[0163] RAND=RAND_R⊕R (13)
[0164] Among them, RAND represents the first random number, RAND_R represents the third random number, R represents the second random number, and ⊕ represents an exclusive-OR operation.
[0165] After calculating the first random number (RAND), the ME sends the first random number (RAND) and the first authentication token (AUTN) to the USIM.
[0166] Step 204: The terminal verifies the first authentication token based on the obtained first random number.
[0167] Here, after the USIM of the terminal receives the first random number (RAND) and the first authentication token (AUTN) from the ME, it verifies the first authentication token based on the obtained first random number. Specifically, after the USIM receives the first random number (RAND) and the first authentication token (AUTN) from the ME, it checks whether the AUTN is accepted according to RAND, so as to verify whether the 5G AV is the latest.
[0168] In addition, the USIM calculates the expected message authentication code (XMAC) based on RAND and AUTN, and verifies the consistency of XMAC and MAC1 in AUTN. If the verification is successful, the USIM calculates the first response (RES), the second encryption key (CK2), and the second integrity key (IK2) based on AUTN, and returns the first response (RES), the second encryption key (CK2), and the second integrity key (IK2) to the ME; the ME derives the second response (RES*) from the first response (RES), and derives K based on CK2||IK2. AUSF , further from K AUSF Derived K SEAF .
[0169] Specifically, the USIM can obtain SQN⊕AK, AMF and MAC1 from AUTN, and then calculate AK according to the following formula (14) and calculate SQN according to the following formula (15):
[0170] AK=f5 K (RAND) (14)
[0171] SQN=(SQN⊕AK)⊕AK (15)
[0172] Among them, RAND represents the first random number, K represents the core key of the terminal, f5 is a key generation function, and ⊕ represents the XOR symbol.
[0173] Furthermore, XMAC can be generated by the following formula (16):
[0174] XMAC=f1 K (SQN||RAND||AMF) (16)
[0175] Wherein, SQN can be obtained by the above formula (15), AMF is the authentication management domain, K represents the core key of the terminal, f1 is a message authentication function, and || represents the concatenation symbol.
[0176] RES, CK2, and IK2 can be generated by the following formulas (17), (18), and (19), respectively:
[0177] RES=f2 K (RAND) (17)
[0178] CK2=f3 K (RAND) (18)
[0179] IK2=f4 K (RAND) (19)
[0180] Among them, K represents the core key of the terminal, f2 is a message authentication function, f3 is a key generation function, and f4 is a key generation function.
[0181] Furthermore, the terminal sends an authentication response (Authentication Response) to SEAF, which carries RES*. After receiving the authentication response sent by the terminal, SEAF derives the third response (HRES*) based on RES*, and then compares HRES* with HXRES* in 5G AV for consistency. If the comparison passes, the authentication is considered successful from the perspective of SEAF (that is, the perspective of SN).
[0182] Further, SEAF sends an authentication request (Nausf_UEAuthentication_AuthenticateRequest) to AUSF, which carries RES*. After receiving the authentication request sent by SEAF, AUSF first determines whether the 5G HE AV is expired. If it is expired, the authentication is considered to have failed. Otherwise, RES* and XRES* in 5G HE AV are compared for consistency. If the comparison passes, the authentication is considered to be successful from the perspective of AUSF (that is, the perspective of HN). AUSF sends an authentication response (Nausf_UEAuthentication_Authenticate Response) to SEAF, and tells SEAF the authentication result of the terminal through the authentication response.
[0183] The following is an example of the technical solution of the embodiment of the present application in combination with a specific application example. It should be noted that the following application examples are all described using 5G AKA as an example, but are not limited to this. The technical solution of the embodiment of the present application can be applied to other types of AKA. It should be noted that the meaning and generation method of each parameter name in the following application example can refer to the description of the aforementioned related solution.
[0184] Application Example 1
[0185] This application example describes the main authentication startup and identity submission process, such as Figure 3 As shown, the process includes the following steps:
[0186] Step 301: 1) ME randomly generates and secretly stores R; 2) uses KEM_ENC to encrypt SUPI||R to obtain SUCI.
[0187] Specifically, the UE generates and secretly stores a random number R, and uses KEM_ENC to encrypt SUPI||R to obtain SUCI=KEM_ENC(SUPI||R, PK_HN), where PK_HN is the public key of HN.
[0188] Step 302: The UE sends an initial registration request to the SEAF, where the initial registration request carries the SUCI.
[0189] Step 303: SEAF sends an authentication information request to UDM / ARPF. The authentication information request carries SUCI.
[0190] Here, SEAF may also send an authentication request to AUSF, where the authentication request carries SUCI. Then, AUSF sends an authentication information request to UDM / ARPF, where the authentication information request carries SUCI.
[0191] Step 304: 1) UDM / ARPF uses KEM_DEC to decrypt SUPI||R from SUCI; 2) R is kept secret.
[0192] Specifically, UDM / ARPF decrypts SUPI||R=KEM_DEC(SUCI, SK_HN) according to SUCI through KEM_DEC, where SK_HN is the private key of HN.
[0193] It should be noted that since ECIES uses a public key cryptography (ECC) algorithm based on elliptic curves, in order to cope with quantum attacks, the post-quantum cryptography algorithm (PQC) can be used to replace the ECC algorithm in ECIES. Therefore, KEM_ENC or KEM_DEC described in this solution can also support ECIES_KEM or PQC_KEM and other algorithms.
[0194] Application Example 2
[0195] This application example describes the main authentication process, such as Figure 4 As shown, the process includes the following steps:
[0196] Step 401: 1) UDM / ARPF generates RAND and SQN; 2) Calculate AV=RAND||XRES||CK1||IK1||AUTN based on RAND and SQN; 3) Use R to confuse RAND to obtain RAND_R; 4) Calculate MAC2 and RAND*.
[0197] Specifically, refer to Figure 5 , Figure 5 The calculation principle diagram of MAC1, XRES, CK1, IK1, AK, AUTN and AV is given. The calculation of MAC1 can refer to the aforementioned formula (1), the calculation of XRES can refer to the aforementioned formula (4), the calculation of CK1 can refer to the aforementioned formula (5), the calculation of IK1 can refer to the aforementioned formula (6), the calculation of AK can refer to the aforementioned formula (2), and the calculation of AUTN can refer to the aforementioned formula (3).
[0198] Here, UDM / ARPF uses R (UDM / ARPF can be Figure 3 The process shown in FIG. 1 obtains R) and performs obfuscation processing on RAND to obtain RAND_R = RAND⊕R. Here, the length of R should be the same as that of RAND, both of which are 128 bits.
[0199] To verify the integrity of the authentication request, UDM / ARPF calculates MAC2=Hash(R, RAND_R, AUTN), RAND*=RAND_R||MAC2.
[0200] Furthermore, UDM / ARPF uses RAND*, XRES, CK1 and IK1 to derive K through the KDF one-way function. AUSF and XRES*, and then we get 5G HE AV=RAND*||AUTN||XRES*||K AUSF .
[0201] Step 402: UDM / ARPF sends an authentication information response to SEAF, where the authentication information response carries RAND* and AUTN.
[0202] Here, UDM / ARPF may also send an authentication information response to AUSF, and the authentication information response carries RAND* and AUTN. Then, AUSF sends an authentication response to SEAF, and the authentication response carries RAND* and AUTN.
[0203] Specifically, 1) UDM / ARPF returns the requested 5G HE AV (RAND*||AUTN||XRES*||K to AUSF in the authentication information response (Nudm_UEAuthentication_Get Response). AUSF ), and indicates that 5G HE AV is used for 5G AKA. If the authentication request (Nudm_UEAuthentication_Get) received by UDM / ARPF contains SUCI, UDM / ARPF will include SUPI in the authentication information response (Nudm_UEAuthentication_Get Response). 2) AUSF temporarily saves XRES* and the received SUCI or SUPI. AUSF can also save K AUSF 3) AUSF generates 5G AV based on 5G HE AV. Specifically, AUSF calculates HXRES* from RAND* and XRES*, and AUSF Derived K SEAF Then use HXRES* and K SEAF Replace XRES* and K in 5G HE AV respectively AUSF , we get 5G AV(RAND*||AUTN||HXRES*||K SEAF ). It should be noted that the RAND used by AUSF for calculation is actually RAND*. 3) AUSF removes K from 5G AV SEAF , get 5G SE AV (RAND*||AUTN||HXRES*), AUSF sends 5G SE AV to SEAF through authentication response (Nausf_UEAuthentication_Authenticate Response).
[0204] Step 403: SEAF sends an authentication request to the UE, and the authentication request carries RAND* and AUTN.
[0205] Specifically, SEAF sends RAND* and AUTN to UE via NAS message (i.e. authentication request). Furthermore, the message may also include ngKSI and ABBA parameters, where ngKSI refers to the K AMF and some parameters of the native security context.
[0206] Step 404: 1) ME obtains RAND_R and MAC2 from RAND*; 2) calculates MAC3 and compares MAC3 with MAC2 to verify the integrity of the authentication request; 3) calculates RAND based on R and RAND_R.
[0207] Specifically, 1) ME obtains RAND_R and MAC2 from RAND*; 2) Calculates MAC3 = Hash(R, RAND_R, AUTN), and verifies the integrity of the authentication request by comparing whether MAC3 and MAC2 are consistent; 3) Uses the secretly stored R and calculates RAND_R to obtain RAND = RAND_R⊕R.
[0208] Step 405: ME forwards RAND and AUTN to USIM.
[0209] Step 406: 1) USIM verifies AUTN according to RAND; 2) calculates RES, CK2, IK2 according to AUTN.
[0210] Here, after receiving RAND and AUTN, USIM checks whether AUTN is accepted according to RAND to verify whether the 5G AV is the latest. In addition, USIM calculates XMAC according to RAND and AUTN, and verifies the consistency of XMAC and MAC1 in AUTN. If the verification is successful, USIM calculates RES, CK2, and IK2 according to AUTN.
[0211] Specifically, refer to Figure 6 , Figure 6 The calculation principle diagram of XMAC, RES, CK2 and IK2 is given. The calculation of XMAC can refer to the aforementioned formula (16), the calculation of RES can refer to the aforementioned formula (17), the calculation of CK2 can refer to the aforementioned formula (18), and the calculation of IK2 can refer to the aforementioned formula (19).
[0212] It should be noted that the ME shall check during authentication whether the "separation bit" in the AMF in AUTN is set to 1. The "separation bit" is bit 0 in the AMF in AUTN. This "separation bit" in the AMF in AUTN can no longer be used for operator-specific purposes.
[0213] Step 407: USIM sends RES, CK2, and IK2 to ME.
[0214] Step 408: ME calculates RES* according to RES.
[0215] In addition, ME deduced K based on CK2||IK2 AUSF , further from K AUSF Derived K SEAF .
[0216] Step 409: ME sends an authentication response (Authentication Response) to SEAF, and the authentication response carries RES*.
[0217] After SEAF receives the authentication response sent by the terminal, it derives the third response (HRES*) based on RES*, and then compares HRES* with HXRES* in 5G AV for consistency. If the comparison passes, the authentication is considered successful from the perspective of SEAF (that is, the perspective of SN).
[0218] Further, SEAF sends an authentication request (Nausf_UEAuthentication_AuthenticateRequest) to AUSF, which carries RES*. In addition, the authentication request may also carry the UE's SUCI or SUPI. After receiving the authentication request sent by SEAF, AUSF first determines whether the 5G HE AV is expired. If it is expired, the authentication is considered to have failed. Otherwise, RES* and XRES* in the 5G HE AV are compared for consistency. If the comparison passes, the authentication is considered to be successful from the perspective of AUSF (that is, the perspective of HN). AUSF sends an authentication response (Nausf_UEAuthentication_AuthenticateResponse) to SEAF, and tells SEAF the authentication result of the terminal through the authentication response. If the authentication is successful, AUSF sends K SEAF If the AUSF receives SUCI from SEAF when starting authentication and the authentication is successful, the AUSF shall also carry SUPI in the authentication response. Furthermore, if the authentication is successful, SEAF shall send the K SEAF As the anchor key, SEAF then uses KSEAF , ABBA parameters and SUPI to derive the AMF key (K AMF ) and provide AMF with ngKSI and K AMF It should be noted that if SUCI is used for this authentication, SEAF shall provide ngKSI and K to AMF only after receiving the authentication response containing SUPI. AMF ; No communication service will be provided to the UE until the service network learns the SUPI.
[0219] Application Example 3
[0220] This application example describes the authentication synchronization failure recovery process, such as Figure 7 As shown, the process includes the following steps:
[0221] Step 701: ME sends RAND and AUTN to USIM.
[0222] Step 702: 1) USIM verifies that synchronization error occurs in AUTN; 2) USIM generates AUTS.
[0223] Here, the USIM can derive the SQN from the AUTN, and then determine whether the SQN is within a correct range (a specified range). If so, it is determined that no synchronization error has occurred. If not, it is determined that a synchronization error has occurred. In the event of a synchronization error, the USIM generates an AUTS.
[0224] Step 703: USIM sends AUTS to ME.
[0225] Step 704: The UE sends an authentication failure message to the SEAF. The authentication failure message carries AUTS and optionally also carries a synchronization failure indication.
[0226] Step 705: SEAF sends an authentication failure message to UDM / ARPF. The authentication failure message carries RAND* and AUTS, and optionally also carries a synchronization failure indication.
[0227] Step 706: 1) UDM / ARPF obtains RAND_R and MAC2 from RAND*; 2) RAND is calculated using the secret R, specifically, RAND=RAND_R⊕R, where ⊕ represents an XOR operation; 3) The legitimacy of AUTS is verified based on RAND, and SQN is synchronized.
[0228] In the technical solution of the embodiment of the present application, the first network element does not carry the real first random number in the authentication information response, but carries the fourth random number in the authentication information response. Since the "generation of the fourth random number" is based on the "obfuscation of the first random number by the second random number", and the second random number is only kept secret on the terminal side and the first network element side, it is extremely difficult to crack the first random number from the fourth random number, thereby improving the security of the first random number as authentication data, and thus can resist tracking attacks on terminal location information. In addition, no new cryptographic algorithms and keys are introduced, and it is compatible with existing USIM cards. After deployment and implementation, it can support not changing the card. The service network does not need to be modified, and is not aware of the new protocol modification. The technical solution of the embodiment of the present application is compatible with the existing 3GPP protocol. Compared with the original 3GPP AKA authentication protocol, only the ME, UDM, and SUCI definitions need to be modified, and there is no need to modify other network elements and related interfaces. The modification cost is low and the compatibility with the original protocol is high.
[0229] Figure 8 This is a schematic diagram of the structure of the authentication device provided in the embodiment of the present application. Figure 1 , applied to the first network element (such as UDM / ARPF), such as Figure 8 As shown, the authentication device includes:
[0230] The first receiving unit 801 is used to receive an authentication information request;
[0231] The first processing unit 802 is configured to generate a first random number, and use a second random number to confuse the first random number to obtain a third random number; generate a first MAC based on the second random number, the third random number and the first authentication token, and generate a fourth random number based on the third random number and the first MAC;
[0232] The first sending unit 803 is configured to send an authentication information response, where the authentication information response carries the fourth random number and the first authentication token.
[0233] In some implementations, the authentication information request carries a SUCI of the terminal; and the first processing unit 802 is configured to decrypt the SUCI based on a first private key to obtain the SUPI of the terminal and the second random number.
[0234] In some embodiments, the first processing unit 802 is used to generate a first SQN; generate a second MAC based on the first SQN, AMF and the first random number, and generate a first AK based on the first random number; generate the first authentication token based on the first SQN, the first AK, the AMF and the second MAC.
[0235] In some implementations, if the first SQN is confirmed by the terminal as not being within a specific range, the first receiving unit 801 receives an authentication failure message, where the authentication failure message carries a synchronization failure parameter AUTS and the fourth random number;
[0236] The first processing unit 802 is used to obtain the third random number and the first MAC based on the fourth random number, and perform deobfuscation processing on the obtained third random number based on the second random number to obtain the first random number; and verify the legitimacy of the AUTS based on the obtained first random number.
[0237] Those skilled in the art should understand that Figure 8 The implementation functions of each unit in the authentication device shown can be understood by referring to the relevant description of the aforementioned method. Figure 8 The functions of each unit in the authentication device shown can be implemented by a program running on a processor, or by a specific logic circuit.
[0238] Fig. 9 This is a schematic diagram of the structure of the authentication device provided in the embodiment of the present application. Figure 2 , applied to terminals, such as Fig. 9 As shown, the authentication device includes:
[0239] The second receiving unit 901 is used to receive an authentication request, where the authentication request carries a fourth random number and a first authentication token;
[0240] The second processing unit 902 is used to obtain a third random number and a first MAC based on the fourth random number, calculate a third MAC based on the second random number, the third random number and the first authentication token, and verify the integrity of the authentication request based on the third MAC and the first MAC; perform deobfuscation processing on the obtained third random number based on the second random number to obtain a first random number; and verify the first authentication token based on the obtained first random number.
[0241] In some implementations, the second processing unit 902 is configured to generate the second random number; encrypt the SUPI of the terminal and the second random number based on the first public key to obtain the SUCI of the terminal;
[0242] The apparatus further includes: a second sending unit 903, configured to send an initialization registration request, where the initialization registration request carries the SUCI of the terminal.
[0243] Those skilled in the art should understand that Fig. 9 The implementation functions of each unit in the authentication device shown can be understood by referring to the relevant description of the aforementioned method. Fig. 9The functions of each unit in the authentication device shown can be implemented by a program running on a processor, or by a specific logic circuit.
[0244] Fig.10 It is a schematic structural diagram of a communication device 1000 provided in an embodiment of the present application. Fig.10 The communication device 1000 shown includes a processor 1010, and the processor 1010 can call and run a computer program from a memory to implement the method in the embodiment of the present application.
[0245] Alternatively, if Fig.10 As shown, the communication device 1000 may further include a memory 1020. The processor 1010 may call and run a computer program from the memory 1020 to implement the method in the embodiment of the present application.
[0246] The memory 1020 may be a separate device independent of the processor 1010 , or may be integrated into the processor 1010 .
[0247] Alternatively, if Fig.10 As shown, the communication device 1000 may further include a transceiver 1030, and the processor 1010 may control the transceiver 1030 to communicate with other devices, specifically, may send information or data to other devices, or receive information or data sent by other devices.
[0248] The transceiver 1030 may include a transmitter and a receiver. The transceiver 1030 may further include an antenna, and the number of antennas may be one or more.
[0249] Optionally, the communication device 1000 may specifically be the first network element of the embodiment of the present application, and the communication device 1000 may implement the corresponding processes implemented by the first network element in each method of the embodiment of the present application, which will not be described again for the sake of brevity.
[0250] Optionally, the communication device 1000 may specifically be a terminal of an embodiment of the present application, and the communication device 1000 may implement corresponding processes implemented by the terminal in various methods of the embodiment of the present application, which will not be described in detail here for the sake of brevity.
[0251] Fig.11 It is a schematic structural diagram of the chip of an embodiment of the present application. Fig.11 The chip 1100 shown includes a processor 1110, which can call and run a computer program from a memory to implement the method in the embodiment of the present application.
[0252] Alternatively, if Fig.11As shown, the chip 1100 may further include a memory 1120. The processor 1110 may call and run a computer program from the memory 1120 to implement the method in the embodiment of the present application.
[0253] The memory 1120 may be a separate device independent of the processor 1110 , or may be integrated into the processor 1110 .
[0254] Optionally, the chip 1100 may further include an input interface 1130. The processor 1110 may control the input interface 1130 to communicate with other devices or chips, and specifically, may obtain information or data sent by other devices or chips.
[0255] Optionally, the chip 1100 may further include an output interface 1140. The processor 1110 may control the output interface 1140 to communicate with other devices or chips, and specifically, may output information or data to other devices or chips.
[0256] Optionally, the chip can be applied to the first network element in the embodiment of the present application, and the chip can implement the corresponding processes implemented by the first network element in each method of the embodiment of the present application. For the sake of brevity, they will not be repeated here.
[0257] Optionally, the chip can be applied to the terminal in the embodiments of the present application, and the chip can implement the corresponding processes implemented by the terminal in the various methods in the embodiments of the present application. For the sake of brevity, they will not be repeated here.
[0258] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0259] It should be understood that the processor of the embodiment of the present application may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor are combined and performed. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, and other mature storage media in the art. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0260] It can be understood that the memory in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0261] It should be understood that the above-mentioned memory is exemplary but not restrictive. For example, the memory in the embodiments of the present application may also be static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (synch link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM), etc. That is to say, the memory in the embodiments of the present application is intended to include but not limited to these and any other suitable types of memory.
[0262] An embodiment of the present application also provides a computer-readable storage medium for storing a computer program.
[0263] Optionally, the computer-readable storage medium can be applied to the first network element in the embodiment of the present application, and the computer program enables the computer to execute the corresponding processes implemented by the first network element in the various methods of the embodiment of the present application. For the sake of brevity, they are not repeated here.
[0264] Optionally, the computer-readable storage medium can be applied to the terminal in the embodiments of the present application, and the computer program enables the computer to execute the corresponding processes implemented by the terminal in the various methods of the embodiments of the present application. For the sake of brevity, they are not repeated here.
[0265] An embodiment of the present application also provides a computer program product, including computer program instructions.
[0266] Optionally, the computer program product can be applied to the first network element in the embodiment of the present application, and the computer program instructions enable the computer to execute the corresponding processes implemented by the first network element in the various methods of the embodiment of the present application. For the sake of brevity, they are not repeated here.
[0267] Optionally, the computer program product can be applied to the terminal in the embodiments of the present application, and the computer program instructions enable the computer to execute the corresponding processes implemented by the terminal in the various methods of the embodiments of the present application. For the sake of brevity, they are not repeated here.
[0268] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0269] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0270] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0271] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0272] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0273] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0274] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. An authentication method, It is characterized in that The method comprises: After receiving the authentication information request, the first network element generates a first random number, and uses the second random number to confuse the first random number to obtain a third random number; The first network element generates a first message authentication code MAC based on the second random number, the third random number and the first authentication token, and generates a fourth random number based on the third random number and the first MAC; The first network element sends an authentication information response, where the authentication information response carries the fourth random number and the first authentication token.
2. The method according to claim 1, It is characterized in that The authentication information request carries a user hidden identifier SUCI of the terminal; the method further comprises: The first network element decrypts the SUCI based on the first private key to obtain the user permanent identity SUPI of the terminal and the second random number.
3. The method according to claim 1, It is characterized in that The method further comprises: The first network element generates a first sequence number SQN; The first network element generates a second MAC based on the first SQN, the authentication management domain AMF and the first random number, and generates a first anonymous key AK based on the first random number; The first network element generates the first authentication token based on the first SQN, the first AK, the AMF and the second MAC.
4. The method according to claim 3, It is characterized in that The method further comprises: If the first SQN is confirmed by the terminal as not being within a specific range, the first network element receives an authentication failure message, where the authentication failure message carries a synchronization failure parameter AUTS and the fourth random number; The first network element obtains the third random number and the first MAC based on the fourth random number, and performs deobfuscation processing on the obtained third random number based on the second random number to obtain the first random number; The first network element verifies the legitimacy of the AUTS based on the obtained first random number.
5. An authentication method, It is characterized in that The method comprises: The terminal receives an authentication request, wherein the authentication request carries a fourth random number and a first authentication token; The terminal obtains a third random number and a first MAC based on the fourth random number, calculates a third MAC based on the second random number, the third random number and the first authentication token, and verifies the integrity of the authentication request based on the third MAC and the first MAC; The terminal performs a deobfuscation process on the acquired third random number based on the second random number to obtain a first random number; The terminal verifies the first authentication token based on the obtained first random number.
6. The method according to claim 5, It is characterized in that The terminal obtains a third random number and a first MAC based on the fourth random number, calculates a third MAC based on the second random number, the third random number and the first authentication token, and verifies the integrity of the authentication request based on the third MAC and the first MAC; The terminal performs a deobfuscation process on the acquired third random number based on the second random number to obtain a first random number, including: The mobile equipment ME of the terminal obtains a third random number and a first MAC based on the fourth random number, calculates a third MAC based on the second random number, the third random number and the first authentication token, and verifies the integrity of the authentication request based on the third MAC and the first MAC; The ME of the terminal performs deobfuscation processing on the acquired third random number based on the second random number to obtain a first random number.
7. The method according to claim 6, It is characterized in that The method further comprises: the ME of the terminal sending the first random number and the first authentication token to a universal user identity module USIM of the terminal; The terminal verifies the first authentication token based on the obtained first random number, comprising: a USIM of the terminal verifies the first authentication token based on the obtained first random number.
8. The method according to any one of claims 5 to 7, It is characterized in that Before the terminal receives the authentication request, the method further includes: The terminal generates the second random number; The terminal encrypts the SUPI of the terminal and the second random number based on the first public key to obtain the SUCI of the terminal; The terminal sends an initialization registration request, where the initialization registration request carries the SUCI of the terminal.
9. An authentication device, It is characterized in that The device comprises: A first receiving unit, configured to receive an authentication information request; A first processing unit is configured to generate a first random number, and use a second random number to confuse the first random number to obtain a third random number; generate a first MAC based on the second random number, the third random number and a first authentication token, and generate a fourth random number based on the third random number and the first MAC; The first sending unit is used to send an authentication information response, where the authentication information response carries the fourth random number and the first authentication token.
10. An authentication device, It is characterized in that The device comprises: A second receiving unit, configured to receive an authentication request, wherein the authentication request carries a fourth random number and a first authentication token; A second processing unit is used to obtain a third random number and a first MAC based on the fourth random number, calculate a third MAC based on the second random number, the third random number and the first authentication token, and verify the integrity of the authentication request based on the third MAC and the first MAC; perform deobfuscation processing on the obtained third random number based on the second random number to obtain a first random number; and verify the first authentication token based on the obtained first random number.
11. A communication device, It is characterized in that include: A processor and a memory, the memory being used to store a computer program, the processor being used to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 8.
12. A computer-readable storage medium, It is characterized in that Used to store a computer program, wherein the computer program causes a computer to execute the method according to any one of claims 1 to 8.
13. A computer program product, It is characterized in that The method comprises computer program instructions which cause a computer to execute the method as claimed in any one of claims 1 to 8.
