Authentication method and communication device
The authentication method enables terminal devices to indicate their supported security algorithms, ensuring compatibility and successful authentication by using SHA256 or SHA512 for devices capable of these algorithms, while defaulting to MD5 for others, thus addressing authentication failures in the IMS system.
Patent Information
- Application Number
- JP2023544403
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-01-22
- Filing Date
- 2022-01-12
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2042-01-12
AI Technical Summary
The challenge lies in authenticating terminal devices that support different security algorithms, particularly those that support either SHA256 or SHA512, while others do not, within the Internet Protocol Multimedia Subsystem (IMS) using the insecure MD5 algorithm, leading to authentication failures.
An authentication method that allows terminal devices to indicate their supported security algorithms, enabling the use of either SHA256 or SHA512 for authentication, while devices lacking these algorithms default to MD5, ensuring compatibility and successful authentication across varying security capabilities.
This method ensures seamless authentication of terminal devices with diverse security algorithms, preventing authentication failures by aligning the authentication process with the device's capabilities, thereby enhancing security performance and simplifying the authentication process for both devices and network elements.
Smart Images

Figure 0007618825000001 
Figure 0007618825000002 
Figure 0007618825000003
Abstract
Description
[Technical field]
[0001] This application claims priority to Chinese Patent Application No. 202110090637.4, filed with the China National Intellectual Property Office on January 22, 2021, and entitled "Authentication Method and Communication Apparatus," which is incorporated herein by reference in its entirety.
[0002] This application relates to the field of communication technologies, and in particular to authentication methods and communication devices. [Background technology]
[0003] Currently, internet protocol multimedia subsystem (IMS) usually authenticates a terminal device in session initiation protocol (SIP) digest authentication mode. A serving call session control function (S-CSCF) network element indicates to the terminal device that the security algorithm is message digest 5 (MD5) algorithm. The terminal device performs calculation by using the MD5 algorithm to obtain an authentication response. Then, the terminal device sends the authentication response to the S-CSCF network element, so that the S-CSCF network element authenticates the terminal device based on the authentication response. Because the MD5 algorithm is an insecure algorithm, one solution is to allow some terminal devices to support new security algorithms such as secure hash algorithm (SHA) 256 or SHA512, and complete the authentication through an authentication response calculated using SHA256 or SHA512.
[0004] It is obvious that this solution will result in the following situation: some terminal devices support SHA256 or SHA512, so some terminal devices need to use SHA256 or SHA512 to calculate the authentication response, and other terminal devices do not support SHA256 or SHA512 and still use the MD5 algorithm to calculate the authentication response. In this case, how to enable terminal devices that support different security algorithms to complete the authentication is an urgent problem to be solved. Summary of the Invention [Means for solving the problem]
[0005] The embodiments of this application provide an authentication method and a communication apparatus for authenticating terminal devices that support different security algorithms.
[0006] According to a first aspect, an embodiment of this application provides an authentication method. The method may be executed by a terminal device or may be a chip applied to the terminal device. The following provides an explanation by using an example in which the method is executed by the terminal device. The method includes: The terminal device sends a first registration request message to a serving call session control function network element. The first registration request message carries information about a security algorithm that can be supported by the terminal device, and the security algorithm includes at least one of the following, namely a first security algorithm or a second security algorithm. The terminal device receives an authentication challenge message from the serving call session control function network element. The authentication challenge message includes information about a third security algorithm, and the third security algorithm is one of the security algorithms that can be supported by the terminal device. The terminal device calculates a hash value of a security parameter based on the third security algorithm, the terminal device calculates an authentication response based on the third security algorithm and the hash value, and the terminal device sends a second registration request message to the serving call session control function network element. The second registration request message carries an authentication response, which is used to authenticate the terminal device.
[0007] In this way, for a terminal device that supports a new security algorithm (e.g., a first security algorithm and / or a second security algorithm), the terminal device adds information about the security algorithm to the first registration request message to indicate to the serving call session control function network element the security algorithm that can be supported by the terminal device, so that the terminal device and the serving call session control function network element calculate an authentication response based on the same security algorithm. Thus, the terminal device that supports the "first security algorithm and / or the second security algorithm" can be authenticated. In addition, for a terminal device that does not support a new security algorithm (e.g., a first security algorithm and / or a second security algorithm), the terminal device does not need to add information about the security algorithm to the first registration request message. In this case, the serving call session control function network element may determine that the security algorithm is the MD5 algorithm, and then calculate an authentication response by using the MD5 algorithm to authenticate the terminal device that does not support the new security algorithm (e.g., a first security algorithm and / or a second security algorithm).
[0008] In one possible design, the first security algorithm is a secure hash algorithm SHA256, and the second security algorithm is a secure hash algorithm SHA512. SHA256 and SHA512 are new security algorithms. Therefore, when SHA256 or SHA512 is used to authenticate a terminal device, the security performance of the authentication process is improved.
[0009] According to a second aspect, an embodiment of this application provides an authentication method. The method may be executed by a serving call session control function network element, or may be a chip applied to the serving call session control function network element. The following provides an explanation by using an example in which the method is executed by the serving call session control function network element. The method includes: The serving call session control function network element receives a first registration request message from a terminal device. The first registration request message includes information about a security algorithm that can be supported by the terminal device, and the security algorithm includes at least one of the following: a first security algorithm or a second security algorithm. The serving call session control function network element sends an authentication vector request message to a home subscriber server. The authentication vector request message includes information about a security algorithm that can be supported by the terminal device. The serving call session control function network element receives an authentication vector request response returned by the home subscriber server. The authentication vector request response includes a hash value and information about a third security algorithm, where the hash value is obtained through a calculation based on the third security algorithm, and the third security algorithm is one of the security algorithms that can be supported by the terminal device. The serving call session control function network element sends an authentication challenge message to the terminal device. The authentication challenge message includes information about the third security algorithm. The serving call session control function network element receives a second registration request message from the terminal device. The second registration request message carries a first authentication response. The serving call session control function network element calculates a second authentication response based on the third security algorithm and the hash value. The serving call session control function network element checks the first authentication response by using the second authentication response to obtain an authentication result of the terminal device.
[0010] In this way, for a terminal device that supports a new security algorithm (e.g., the first security algorithm and / or the second security algorithm), the serving call session control function network element can know the security algorithm supported by the terminal device by using the first registration request message. Then, the serving call session control function network element provides information about the security algorithm supported by the terminal device to the home subscriber server, and obtains information about the third security algorithm and a hash value calculated by using the third security algorithm from the home subscriber server. Then, the serving call session control function network element determines a second authentication response based on the information in the authentication vector request response, so that the serving call session control function network element checks the first authentication response by using the second authentication response to authenticate the terminal device that supports the "first security algorithm and / or the second security algorithm". In addition, for a terminal device that does not support a new security algorithm (e.g., the first security algorithm and / or the second security algorithm), the terminal device does not need to add information about the security algorithm to the first registration request message. In this case, the serving call session control function network element may determine that the security algorithm is the MD5 algorithm and calculate an authentication response using the MD5 algorithm to authenticate a terminal device that does not support the new security algorithm (e.g., the first security algorithm and / or the second security algorithm).
[0011] In one possible design, the first security algorithm is a Secure Hash Algorithm SHA256, and the second security algorithm is a Secure Hash Algorithm SHA512.
[0012] According to a third aspect, an embodiment of this application provides an authentication method. The method may be executed by a home subscriber server or may be a chip applied to the home subscriber server. The following provides an explanation by using an example in which the method is executed by the home subscriber server. The method includes: the home subscriber server receives an authentication vector request message from a serving call session control function network element; the authentication vector request message includes information about a security algorithm that can be supported by the terminal device, and the security algorithm includes at least one of the following: a first security algorithm or a second security algorithm; the home subscriber server calculates a hash value of a security parameter based on a third security algorithm, and the third security algorithm is one of the security algorithms that can be supported by the terminal device; the home subscriber server returns an authentication vector request response to the serving call session control function network element, and the authentication vector request response carries the hash value and information about the third security algorithm.
[0013] That is, the home subscriber server learns the security algorithms supported by the terminal device by using the authentication vector request message, then the home subscriber server determines a security algorithm as the third security algorithm from the security algorithms supported by the terminal device, and the home subscriber server provides the serving call session control function network element with information about the third security algorithm and a hash value calculated by using the third security algorithm by using the authentication vector request response, so that the serving call session control function network element calculates a second authentication response. Thus, the terminal device that supports the "first security algorithm and / or the second security algorithm" can be authenticated. In addition, for a terminal device that does not support a new security algorithm (e.g., the first security algorithm and / or the second security algorithm), the authentication vector request message does not carry information about the security algorithms supported by the terminal device, and the home subscriber server still provides the serving call session control function network element with a hash value calculated by using the MD5 algorithm, so that the serving call session control function network element calculates an authentication response by using the MD5 algorithm to authenticate the terminal device that does not support the new security algorithm (e.g., the first security algorithm and / or the second security algorithm).
[0014] In one possible design, the first security algorithm is a Secure Hash Algorithm SHA256, and the second security algorithm is a Secure Hash Algorithm SHA512.
[0015] According to a fourth aspect, an embodiment of this application provides an authentication method. The method may be executed by a home subscriber server, or may be a chip applied to the home subscriber server. The following provides an explanation by using an example in which the method is executed by the home subscriber server. The method includes: the home subscriber server receives an authentication vector request message from a serving call session control function network element, the home subscriber server calculates a first hash value of a security parameter based on a first security algorithm, and the home subscriber server calculates a second hash value of the security parameter based on a second security algorithm. The home subscriber server returns an authentication vector request response to the serving call session control function network element. The authentication vector request response carries the first hash value and the second hash value.
[0016] That is, the home subscriber server calculates hash values of at least two security algorithms, for example, a first hash value calculated by the home subscriber server by using a first security algorithm and a second hash value calculated by using a second security algorithm. Then, after the home subscriber server provides the hash value determined for the security algorithm to the serving call session control function network element by using the authentication vector request response, the serving call session control function network element knows the security algorithm supported by the terminal device, and then selects a hash value from the multiple hash values provided in the authentication vector request response and calculates a second authentication response. Thus, the terminal device can be authenticated.
[0017] In one possible design, the authentication vector request response includes the first hash value and the second hash value conveyed in a preset order, the preset order being determined based on a priority of the first security algorithm and a priority of the second security algorithm, such that the serving call session control function network element can distinguish between the first hash value and the second hash value based on the preset order.
[0018] In one possible design, the authentication vector request response further carries information about the first security algorithm and information about the second security algorithm, where there is a correspondence between the information about the first security algorithm and the first hash value, and there is a correspondence between the information about the second security algorithm and the second hash value, so that the serving call session control function network element can distinguish between the first hash value and the second hash value based on the correspondence.
[0019] In one possible design, the first security algorithm is a secure hash algorithm SHA256 or SHA512, and the second security algorithm is a message digest MD5 algorithm. In other words, regardless of which security algorithm of SHA256, SHA512, or MD5 algorithm is supported by the terminal device, the authentication method in this embodiment of this application can be used to authenticate the terminal device.
[0020] In one possible design, the first security algorithm is SHA256 and the second security algorithm is SHA512.
[0021] In one possible design, the authentication method in this embodiment of the present application further includes: the home subscriber server calculates a third hash value of the security parameters based on a fourth security algorithm; the authentication vector request response further carries the third hash value; the fourth security algorithm is an MD5 algorithm.
[0022] That is, when the first security algorithm is SHA256 and the second security algorithm is SHA512, the home subscriber server further calculates a third hash value of the security parameters by using a fourth security algorithm, and provides the calculated hash value by using the fourth security algorithm to the serving call session control function network element. Regardless of which security algorithm among the first security algorithm, the second security algorithm, and the fourth security algorithm is supported by the terminal device, the terminal device and the serving call session control function network element can calculate an authentication response based on the same security algorithm (i.e., the third security algorithm) to authenticate the terminal device.
[0023] According to a fifth aspect, an embodiment of this application provides an authentication method. The method may be executed by a serving call session control function network element, or may be a chip applied to the serving call session control function network element. The following provides an explanation by using an example in which the method is executed by the serving call session control function network element. The method includes: The serving call session control function network element receives a first registration request message from a terminal device. The serving call session control function network element sends an authentication vector request message to a home subscriber server. The serving call session control function network element receives an authentication vector request response returned by the home subscriber server. The authentication vector request response carries a first hash value and a second hash value, where the first hash value is calculated based on a first security algorithm, and the second hash value is calculated based on a second security algorithm. The serving call session control function network element sends an authentication challenge request message to the terminal device. The authentication challenge request message carries information about the first security algorithm and information about the second security algorithm. The serving call session control function network element receives a second registration request message from the terminal device. The second registration request message includes a first authentication response and information about a third security algorithm, where the first authentication response is calculated based on the third security algorithm, and the third security algorithm is the first security algorithm or the second security algorithm. The serving call session control function network element selects a hash value corresponding to the third security algorithm from the first hash value and the second hash value. The serving call session control function network element calculates a second authentication response based on the third security algorithm and the hash value corresponding to the third security algorithm. The serving call session control function network element checks the first authentication response by using the second authentication response to obtain an authentication result of the terminal device.
[0024] In other words, the serving call session control function network element can obtain hash values calculated by using at least two security algorithms, for example, a first hash value calculated by using a first security algorithm and a second hash value calculated by using a second security algorithm, from the home subscriber server by using the authentication vector request response. Then, the serving call session control function network element adds information about the first security algorithm and information about the second security algorithm to the authentication challenge request message, so that the terminal device can determine the security algorithm (i.e., the third security algorithm) from the security algorithm in the authentication challenge request message. The serving call session control function network element knows the security algorithm supported by the terminal device, i.e., the third security algorithm, by using the second registration request message, then determines the hash value corresponding to the third security algorithm from the hash value provided in the authentication vector request response by using the third security algorithm, and calculates a second authentication response based on the third security algorithm and the hash value corresponding to the third security algorithm to authenticate the terminal device. For the serving call session control function network element, the serving call session control function network element does not need to identify whether the terminal device supports new security algorithms (such as SHA256 and / or SHA512). Therefore, the processing process is simplified.
[0025] In one possible design, the authentication vector request response includes the first hash value and the second hash value conveyed in a preset order, the preset order being determined based on a priority of the first security algorithm and a priority of the second security algorithm. The serving call session control function network element selecting a hash value corresponding to a third security algorithm from the first hash value and the second hash value includes: the serving call session control function network element selecting a hash value corresponding to a third security algorithm from the first hash value and the second hash value based on the preset order.
[0026] In other words, the serving call session control function network element can determine a hash value corresponding to a third security algorithm from a plurality of hash values provided in the authentication vector request response based on a preset order, and calculate a second authentication response based on the hash value corresponding to the third security algorithm.
[0027] In one possible design, the authentication vector request response further carries information about the first security algorithm and information about the second security algorithm, where there is a correspondence between the information about the first security algorithm and the first hash value, and there is a correspondence between the information about the second security algorithm and the second hash value. The serving call session control function network element selecting a hash value corresponding to a third security algorithm from the first hash value and the second hash value includes: the serving call session control function network element selecting a hash value corresponding to a third security algorithm from the first hash value and the second hash value based on the correspondence.
[0028] In other words, the serving call session control function network element can determine a hash value corresponding to a third security algorithm from the multiple hash values provided in the authentication vector request response based on the above-mentioned correspondence relationship, and calculate a second authentication response based on the hash value corresponding to the third security algorithm.
[0029] In one possible design, the authentication challenge request message includes information about a first security algorithm and information about a second security algorithm carried in a preset order, where the preset order is determined based on a priority of the first security algorithm and a priority of the second security algorithm, and when the priority of the first security algorithm is higher than the priority of the second security algorithm, the information about the first security algorithm is placed before the information about the second security algorithm, so that the terminal device preferentially reads the information about the security algorithm with a higher priority.
[0030] In one possible design, the first security algorithm is a Secure Hash Algorithm SHA256 or SHA512, and the second security algorithm is a Message Digest MD5 algorithm.
[0031] In one possible design, the first security algorithm is SHA256 and the second security algorithm is SHA512.
[0032] In one possible design, the authentication vector request response further carries a third hash value, where the third hash value is calculated based on a fourth security algorithm. The fourth security algorithm is an MD5 algorithm. The serving call session control function network element selecting a hash value corresponding to the third security algorithm from the first hash value and the second hash value includes: the serving call session control function network element selecting a hash value corresponding to the third security algorithm from the first hash value, the second hash value, and the third hash value. The authentication challenge request message further carries information regarding the fourth security algorithm, where the third security algorithm is the first security algorithm, the second security algorithm, or the fourth security algorithm.
[0033] In other words, when the first security algorithm is SHA256 and the second security algorithm is SHA512, the serving call session control function network element can further provide information about a fourth security algorithm for the terminal device by using the authentication challenge request message, so that the terminal device determines a security algorithm as a third security algorithm from the first security algorithm, the second security algorithm, and the fourth security algorithm. The serving call session control function network element can further obtain a third hash value calculated by using the fourth security algorithm from the home subscriber server by using the authentication vector request response. After determining the third security algorithm, the serving call session control function network element determines a hash value corresponding to the third security algorithm from the first hash value, the second hash value, and the third hash value, and calculates a second authentication response by using the third security algorithm and the hash value corresponding to the third security algorithm. In other words, regardless of which security algorithm among the first security algorithm, the second security algorithm, and the fourth security algorithm is supported by the terminal device, the terminal device and the serving call session control function network element can calculate an authentication response based on the same security algorithm (i.e., the third security algorithm) to authenticate the terminal device.
[0034] According to a sixth aspect, an embodiment of this application provides an authentication method. The method may be executed by a terminal device or may be a chip applied to the terminal device. The following provides an explanation by using an example in which the method is executed by the terminal device. The method includes: The terminal device receives an authentication challenge request message from a serving call session control function network element. The authentication challenge request message carries information about a first security algorithm and information about a second security algorithm. The terminal device determines a third security algorithm, where the third security algorithm is the first security algorithm or the second security algorithm. The terminal device calculates a hash value of security parameters based on the third security algorithm. The terminal device calculates an authentication response based on the third security algorithm and the hash value. The terminal device sends a registration request message to the serving call session control function network element. The registration request message carries an authentication response, where the authentication response is used to authenticate the terminal device.
[0035] In other words, the terminal device can determine the security algorithm, i.e., the third security algorithm, from the information about the security algorithm in the authentication challenge request message. Then, the terminal device indicates the security algorithm supported by the terminal device, i.e., the third security algorithm, to the serving call session control function network element by using the second registration request message, so that the serving call session control function network element calculates the second authentication response by using the third security algorithm. Thus, the terminal device can be authenticated.
[0036] In one possible design, the authentication challenge request message includes information regarding a first security algorithm and information regarding a second security algorithm conveyed in a preset order, the preset order being determined based on a priority of the first security algorithm and a priority of the second security algorithm.
[0037] In one possible design, the terminal device determining the third security algorithm includes: the terminal device determining a first security algorithm, which can be identified by the terminal device as the third security algorithm, in the authentication challenge request message.
[0038] The authentication challenge request message carries information about security algorithms in a preset order, so that the terminal device preferentially identifies information about security algorithms with higher priorities, and ensures that the terminal device calculates an authentication response by using the security algorithms that have higher priorities and are supported by the terminal device, thus ensuring the security performance of the authentication process.
[0039] In one possible design, the terminal device determining the third security algorithm includes: the terminal device determines a security algorithm with a higher priority from the first security algorithm and the second security algorithm as the third security algorithm. In other words, the terminal device determines a security algorithm, i.e., the third security algorithm, from the security algorithms in the authentication challenge request message based on the priority of the security algorithm in the authentication challenge request message. Because the priority of the security algorithm affects the security performance of the authentication process to a certain extent, the terminal device determines the third security algorithm based on the priority of the security algorithm to ensure the security performance of the authentication process.
[0040] In one possible design, the first security algorithm is a Secure Hash Algorithm SHA256 or SHA512, and the second security algorithm is a Message Digest MD5 algorithm.
[0041] In one possible design, the first security algorithm is SHA256 and the second security algorithm is SHA512.
[0042] In one possible design, the authentication challenge request message carries information about the first security algorithm, information about the second security algorithm, and information about the fourth security algorithm. The terminal device determining a third security algorithm includes: the terminal device determining a third security algorithm from the first security algorithm, the second security algorithm, and the fourth security algorithm. The third security algorithm is the first security algorithm, the second security algorithm, or the fourth security algorithm.
[0043] In other words, when the first security algorithm is SHA256 and the second security algorithm is SHA512, the serving call session control function network element can further provide information about the fourth security algorithm for the terminal device by using the authentication challenge request message, so that the terminal device determines a security algorithm as the third security algorithm from the first security algorithm, the second security algorithm, and the fourth security algorithm. In other words, regardless of which security algorithm among the first security algorithm, the second security algorithm, and the fourth security algorithm is supported by the terminal device, the terminal device and the serving call session control function network element can calculate an authentication response based on the same security algorithm (i.e., the third security algorithm) to realize the authentication process of the terminal device.
[0044] According to a seventh aspect, an embodiment of this application provides a communication device. The communication device may be a terminal device in the first aspect or any one of the possible designs of the first aspect, a device installed in the terminal device, or a chip implementing the functions of the terminal device. The communication device includes corresponding modules, units, or means for implementing the aforementioned method. The modules, units, or means may be implemented by hardware, software, or hardware executing the corresponding software. The hardware or software includes one or more modules or units corresponding to the aforementioned functions.
[0045] The communication device includes a sending unit, a receiving unit, and a processing unit. The sending unit is configured to send a first registration request message to a serving call session control function network element. The first registration request message carries information about a security algorithm that can be supported by the communication device, the security algorithm includes at least one of the following: a first security algorithm or a second security algorithm. The receiving unit is configured to receive an authentication challenge message from the serving call session control function network element. The authentication challenge message includes information about a third security algorithm, the third security algorithm being one of the security algorithms that can be supported by the communication device. The processing unit is configured to calculate a hash value of the security parameters based on the third security algorithm. The processing unit is further configured to calculate an authentication response based on the third security algorithm and the hash value. The sending unit is further configured to send a second registration request message to the serving call session control function network element. The second registration request message carries an authentication response, the authentication response is used to authenticate the communication device.
[0046] In one possible design, the first security algorithm is a Secure Hash Algorithm SHA256, and the second security algorithm is a Secure Hash Algorithm SHA512.
[0047] According to an eighth aspect, an embodiment of this application provides a communication device. The communication device may be a serving call session control function network element in the second aspect or any one of the possible designs of the second aspect, a device installed in the serving call session control function network element, or a chip implementing the functions of the serving call session control function network element. The communication device includes corresponding modules, units, or means for implementing the aforementioned method. The modules, units, or means may be implemented by hardware, software, or hardware executing the corresponding software. The hardware or software includes one or more modules or units corresponding to the aforementioned functions.
[0048] The communication apparatus includes a sending unit, a receiving unit, and a processing unit. The receiving unit is configured to receive a first registration request message from a terminal device. The first registration request message includes information about a security algorithm that can be supported by the terminal device, and the security algorithm includes at least one of the following: a first security algorithm or a second security algorithm. The sending unit is configured to send an authentication vector request message to a home subscriber server. The authentication vector request message includes information about a security algorithm that can be supported by the terminal device. The receiving unit is further configured to receive an authentication vector request response returned by the home subscriber server. The authentication vector request response includes a hash value and information about a third security algorithm, the hash value is obtained through a calculation based on the third security algorithm, and the third security algorithm is one of the security algorithms that can be supported by the terminal device. The sending unit is further configured to send an authentication challenge message to the terminal device, and the authentication challenge message includes information about the third security algorithm. The receiving unit is further configured to receive a second registration request message from the terminal device, where the second registration request message carries the first authentication response. The processing unit is configured to calculate the second authentication response based on a third security algorithm and a hash value. The processing unit is further configured to check the first authentication response by using the second authentication response to obtain an authentication result of the terminal device.
[0049] In one possible design, the first security algorithm is a Secure Hash Algorithm SHA256, and the second security algorithm is a Secure Hash Algorithm SHA512.
[0050] According to a ninth aspect, an embodiment of this application provides a communication device. The communication device may be a home subscriber server in the third aspect or any one of the possible designs of the third aspect, a device installed in the home subscriber server, or a chip implementing the functionality of the home subscriber server. The communication device includes corresponding modules, units, or means for implementing the aforementioned method. The modules, units, or means may be implemented by hardware, software, or hardware executing the corresponding software. The hardware or software includes one or more modules or units corresponding to the aforementioned functionality.
[0051] The communication device includes a sending unit, a receiving unit, and a processing unit. The receiving unit is configured to receive an authentication vector request message from a serving call session control function network element. The authentication vector request message includes information about a security algorithm that can be supported by the terminal device, the security algorithm includes at least one of the following: a first security algorithm or a second security algorithm. The processing unit is configured to calculate a hash value of the security parameters based on a third security algorithm, the third security algorithm being one of the security algorithms that can be supported by the terminal device. The sending unit is configured to return an authentication vector request response to the serving call session control function network element, the authentication vector request response carrying the hash value and the information about the third security algorithm.
[0052] In one possible design, the first security algorithm is a Secure Hash Algorithm SHA256, and the second security algorithm is a Secure Hash Algorithm SHA512.
[0053] According to a tenth aspect, an embodiment of this application provides a communication device. The communication device may be a home subscriber server in the fourth aspect or any one of the possible designs of the fourth aspect, a device installed in the home subscriber server, or a chip implementing the functionality of the home subscriber server. The communication device includes corresponding modules, units, or means for implementing the aforementioned methods. The modules, units, or means may be implemented by hardware, software, or hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the aforementioned functions.
[0054] The communication device includes a sending unit, a receiving unit, and a processing unit. The receiving unit is configured to receive an authentication vector request message from a serving call session control function network element. The processing unit is configured to calculate a first hash value of the security parameters based on a first security algorithm. The processing unit is further configured to calculate a second hash value of the security parameters based on a second security algorithm. The sending unit is configured to return an authentication vector request response to the serving call session control function network element, where the authentication vector request response carries the first hash value and the second hash value.
[0055] In one possible design, the authentication vector request response includes a first hash value and a second hash value conveyed in a preset order, the preset order being determined based on a priority of the first security algorithm and a priority of the second security algorithm.
[0056] In one possible design, the first security algorithm is a Secure Hash Algorithm SHA256 or a Secure Hash Algorithm SHA512, and the second security algorithm is a Message Digest MD5 algorithm.
[0057] According to an eleventh aspect, an embodiment of this application provides a communication device. The communication device may be a serving call session control function network element in the fifth aspect or any one of the possible designs of the fifth aspect, a device installed in the serving call session control function network element, or a chip implementing the functions of the serving call session control function network element. The communication device includes corresponding modules, units, or means for implementing the aforementioned method. The modules, units, or means may be implemented by hardware, software, or hardware executing the corresponding software. The hardware or software includes one or more modules or units corresponding to the aforementioned functions.
[0058] The communication apparatus includes a transmitting unit, a receiving unit, and a processing unit. The receiving unit is configured to receive a first registration request message from the terminal device. The transmitting unit is configured to send an authentication vector request message to a home subscriber server. The receiving unit is further configured to receive an authentication vector request response returned by the home subscriber server, the authentication vector request response carrying a first hash value and a second hash value, the first hash value being calculated based on a first security algorithm, and the second hash value being calculated based on a second security algorithm. The transmitting unit is further configured to send an authentication challenge request message to the terminal device, the authentication challenge request message carrying information about the first security algorithm and information about the second security algorithm. The receiving unit is further configured to receive a second registration request message from the terminal device, the second registration request message including the first authentication response and information about a third security algorithm, the first authentication response being calculated based on the third security algorithm, and the third security algorithm being the first security algorithm or the second security algorithm. The processing unit is configured to select a hash value corresponding to a third security algorithm from the first hash value and the second hash value. The processing unit is further configured to calculate a second authentication response based on the third security algorithm and the hash value corresponding to the third security algorithm. The processing unit is further configured to check the first authentication response by using the second authentication response to obtain an authentication result of the terminal device.
[0059] In one possible design, the authentication vector request response includes the first hash value and the second hash value conveyed in a preset order, the preset order being determined based on a priority of the first security algorithm and a priority of the second security algorithm, and the processing unit is specifically configured to select a hash value corresponding to the third security algorithm from the first hash value and the second hash value based on the preset order.
[0060] In one possible design, the authentication challenge request message includes information regarding a first security algorithm and information regarding a second security algorithm conveyed in a preset order, the preset order being determined based on a priority of the first security algorithm and a priority of the second security algorithm.
[0061] In one possible design, the first security algorithm is a Secure Hash Algorithm SHA256 or a Secure Hash Algorithm SHA512, and the second security algorithm is a Message Digest MD5 algorithm.
[0062] According to a twelfth aspect, an embodiment of this application provides a communication device. The communication device may be a terminal device in the sixth aspect or any one of the possible designs of the sixth aspect, a device installed in the terminal device, or a chip implementing the functions of the terminal device. The communication device includes corresponding modules, units, or means for implementing the aforementioned methods. The modules, units, or means may be implemented by hardware, software, or hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the aforementioned functions.
[0063] The communication device includes a sending unit, a receiving unit, and a processing unit. The receiving unit is configured to receive an authentication challenge request message from a serving call session control function network element, where the authentication challenge request message carries information about a first security algorithm and information about a second security algorithm. The processing unit is configured to determine a third security algorithm, where the third security algorithm is the first security algorithm or the second security algorithm. The processing unit is further configured to calculate a hash value of the security parameters based on the third security algorithm. The processing unit is further configured to calculate an authentication response based on the third security algorithm and the hash value. The sending unit is configured to send a registration request message to the serving call session control function network element, where the registration request message carries the authentication response, where the authentication response is used to authenticate the communication device.
[0064] In one possible design, the authentication challenge request message includes information regarding a first security algorithm and information regarding a second security algorithm conveyed in a preset order, the preset order being determined based on a priority of the first security algorithm and a priority of the second security algorithm.
[0065] In one possible design, the processing unit is specifically configured to determine a first security algorithm that may be identified by the processing unit as a third security algorithm and that is within the authentication challenge request message.
[0066] In one possible design, the first security algorithm is a Secure Hash Algorithm SHA256 or a Secure Hash Algorithm SHA512, and the second security algorithm is a Message Digest MD5 algorithm.
[0067] According to a thirteenth aspect, an embodiment of the present application provides a communication device, including a processor and a memory. The memory is configured to store computer instructions. When the processor executes the instructions, the communication device is enabled to execute the method performed by the terminal device in any one of the above aspects or possible designs of the above aspects. The communication device may be a terminal device in the first aspect or any one of the possible designs of the first aspect, or a chip implementing the functionality of the terminal device. Alternatively, the communication device may be a terminal device in the sixth aspect or any one of the possible designs of the sixth aspect, or a chip implementing the functionality of the terminal device.
[0068] According to a fourteenth aspect, an embodiment of the present application provides a communication device, including a processor. The processor is coupled to a memory and configured to read and execute instructions in the memory to enable the communication device to perform a method performed by a terminal device in any one of the above aspects or possible designs of the above aspects. The communication device may be a terminal device in the first aspect or any one of the possible designs of the first aspect, or a chip implementing the functionality of the terminal device. Alternatively, the communication device may be a terminal device in the sixth aspect or any one of the possible designs of the sixth aspect, or a chip implementing the functionality of the terminal device.
[0069] According to a fifteenth aspect, an embodiment of the present application provides a chip, including a logic circuit and an input / output interface. The input / output interface is configured to communicate with a module other than the chip. For example, the chip may be a chip that realizes the function of the terminal device in the first aspect or any one of the possible designs of the first aspect. The input / output interface outputs a first registration request message and a second registration request message. The input / output interface inputs an authentication challenge request message. The logic circuit is configured to execute a computer program or instruction to realize the method in the first aspect or any one of the possible designs of the first aspect. Alternatively, the chip may be a chip that realizes the function of the terminal device in the sixth aspect or any one of the possible designs of the sixth aspect. The input / output interface outputs a registration request message and the input / output interface inputs an authentication challenge request message. The logic circuit is configured to execute a computer program or instruction to realize the method in the sixth aspect or any one of the possible designs of the sixth aspect.
[0070] According to a sixteenth aspect, an embodiment of the present application provides a communication device, including a processor and a memory. The memory is configured to store computer instructions. When the processor executes the instructions, the communication device is enabled to execute the method performed by the serving call session control function network element in any one of the above-mentioned aspects or possible designs of the above-mentioned aspects. The communication device may be the serving call session control function network element in the second aspect or any one of the possible designs of the second aspect, or a chip that realizes the functionality of the serving call session control function network element. Alternatively, the communication device may be the serving call session control function network element in the fifth aspect or any one of the possible designs of the fifth aspect, or a chip that realizes the functionality of the serving call session control function network element.
[0071] According to a seventeenth aspect, an embodiment of the present application provides a communication device including a processor. The processor is coupled to a memory and configured to read and execute instructions in the memory to enable the communication device to perform a method performed by a serving call session control function network element in any one of the above-mentioned aspects or possible designs of the above-mentioned aspects. The communication device may be a serving call session control function network element in the second aspect or any one of the possible designs of the second aspect, or a chip that realizes the functionality of the serving call session control function network element. Alternatively, the communication device may be a serving call session control function network element in the fifth aspect or any one of the possible designs of the fifth aspect, or a chip that realizes the functionality of the serving call session control function network element.
[0072] According to an eighteenth aspect, an embodiment of the present application provides a chip, including a logic circuit and an input / output interface. The input / output interface is configured to communicate with a module other than the chip. For example, the chip may be a chip implementing the functionality of a serving call session control function network element in the second aspect or any one of the possible designs of the second aspect. The input / output interface inputs a first registration request message, an authentication vector request response, and a second registration request message. The input / output interface outputs an authentication vector request message and an authentication challenge request message. The logic circuit is configured to execute a computer program or instruction to implement the method in the second aspect or any one of the possible designs of the second aspect. Alternatively, the chip may be a chip implementing the functionality of a serving call session control function network element in the fifth aspect or any one of the possible designs of the fifth aspect. The input / output interface inputs a first registration request message, an authentication vector request response, and a second registration request message, and the input / output interface outputs an authentication vector request message and an authentication challenge request message. The logic circuitry is configured to execute a computer program or instructions to implement the method of the fifth aspect or any one of its possible designs.
[0073] According to a nineteenth aspect, an embodiment of the present application provides a communication device, including a processor and a memory. The memory is configured to store computer instructions. When the processor executes the instructions, the communication device is enabled to execute a method performed by a home subscriber server in any one of the above aspects or possible designs of the above aspects. The communication device may be a home subscriber server in the third aspect or any one of the possible designs of the third aspect, or a chip implementing the functionality of a home subscriber server. Alternatively, the communication device may be a home subscriber server in the fourth aspect or any one of the possible designs of the fourth aspect, or a chip implementing the functionality of a home subscriber server.
[0074] According to a twentieth aspect, an embodiment of the present application provides a communication device including a processor. The processor is coupled to a memory and configured to read and execute instructions in the memory to enable the communication device to perform a method performed by a home subscriber server in any one of the preceding aspects or possible designs of the preceding aspects. The communication device may be a home subscriber server in the third aspect or any one of the possible designs of the third aspect, or a chip implementing the functionality of a home subscriber server. Alternatively, the communication device may be a home subscriber server in the fourth aspect or any one of the possible designs of the fourth aspect, or a chip implementing the functionality of a home subscriber server.
[0075] According to a twenty-first aspect, an embodiment of the present application provides a chip, including a logic circuit and an input / output interface. The input / output interface is configured to communicate with a module other than the chip. For example, the chip may be a chip implementing a function of a home subscriber server in the third aspect or any one of the possible designs of the third aspect. The input / output interface outputs an authentication vector request response. The input / output interface inputs an authentication vector request message. The logic circuit is configured to execute a computer program or instruction to implement the method in the third aspect or any one of the possible designs of the third aspect. Alternatively, the chip may be a chip implementing a function of a home subscriber server in the fourth aspect or any one of the possible designs of the fourth aspect. The input / output interface outputs an authentication vector request response and the input / output interface inputs an authentication vector request message. The logic circuit is configured to execute a computer program or instruction to implement the method in the fourth aspect or any one of the possible designs of the fourth aspect.
[0076] According to a twenty-second aspect, an embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium storing instructions, which, when executed on a computer, enable the computer to perform the authentication method in any one of the preceding aspects.
[0077] According to a twenty-third aspect, an embodiment of the present application provides a computer program product comprising instructions, which when the computer program product runs on a computer, enables the computer to perform the authentication method in any one of the preceding aspects.
[0078] According to a twenty-fourth aspect, an embodiment of the present application provides a circuit system, the circuit system including a processing circuit, the processing circuit configured to perform an authentication method according to any one of the preceding aspects.
[0079] According to a twenty-fifth aspect, an embodiment of the present application provides a communication system, the communication system including a terminal device according to any one of the preceding aspects, a Serving Call Session Control Function network element, and a Home Subscriber Server.
[0080] For the technical effects brought about by the design of any of the second to twenty-fifth aspects, please refer to the beneficial effects in the corresponding methods provided above, and the details will not be described again here. [Brief description of the drawings]
[0081] [Figure 1] 1 is a schematic flowchart of an authentication method according to an embodiment of the present application. [Diagram 2] FIG. 1 is a schematic diagram of a network architecture according to an embodiment of the present application. [Diagram 3] 4 is a schematic flowchart of another authentication method according to an embodiment of the present application. [Figure 4a] 4 is a schematic flowchart of yet another authentication method according to an embodiment of the present application. [Figure 4b] 4 is a schematic flowchart of yet another authentication method according to an embodiment of the present application. [Diagram 5] 4 is a schematic flowchart of yet another authentication method according to an embodiment of the present application. [Figure 6] 1 is a schematic diagram of the structure of a communication device according to an embodiment of this application; [Figure 7] 1 is a schematic diagram of the structure of another communication device according to an embodiment of this application; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0082] In the specification and accompanying drawings of this application, the terms "first", "second", and the like are intended to distinguish between different objects or between different processing of the same object, but do not indicate a particular order of objects. In addition, the terms "comprise", "have", or any other variations thereof in the description of this application are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the recited steps or units, but optionally further includes other unrecited steps or units, or optionally further includes another inherent step or unit of the process, method, product, or device. In the embodiments of this application, "plurality" includes two or more. In the embodiments of this application, the words "example", "for example", or the like are used to express giving an example, illustration, or explanation. Any embodiment or design scheme described as "example" or "for example" in the embodiments of this application should not be described as being preferred or having more advantages than another embodiment or design scheme. Rather, the use of the words "example", "for example", or the like is intended to present the related concept in a concrete manner. In the embodiments of this application, "transmission" includes "sending" or "receiving."
[0083] First, the session initiation protocol (SIP) digest authentication mode in this application is described.
[0084] The protocol digest authentication mode is a mode commonly used by the Internet Protocol Multimedia Subsystem (IMS) to authenticate terminal devices. Figure 1 shows the processing steps of the protocol digest authentication mode.
[0085] S111: The terminal device sends a first registration request message to a proxy call session control function (P-CSCF) network element. In response, the proxy call session control function (P-CSCF) network element receives the first registration request message from the terminal device.
[0086] The first registration request message includes an identifier of the terminal device, for example, an IP multimedia private identity (IMPI).
[0087] S112: The P-CSCF network element sends a first registration request message to an interrogating call session control function (I-CSCF) network element. In response, the I-CSCF network element receives the first registration request message from the P-CSCF network element.
[0088] S113: The I-CSCF network element sends a first registration request message to a serving call session control function (S-CSCF) network element. In response, the S-CSCF network element receives the first registration request message from the I-CSCF network element.
[0089] The S-CSCF network element is a network element determined by the HSS. For example, after the I-CSCF network element executes S112, the I-CSCF network element sends a request to a home subscriber server (HSS) to request the HSS to determine which S-CSCF network element processes the first registration request message. After receiving the request from the I-CSCF network element, the HSS determines which S-CSCF network element processes the first registration request message. Then, the HSS sends a Cx-Selection-Info message to the I-CSCF network element. In response, the I-CSCF network element receives a Cx-Selection-Info message from the HSS. The Cx-Selection-Info message indicates the S-CSCF network element that processes the first registration request message.
[0090] S121: The S-CSCF network element sends an authentication vector request message to the HSS. In response, the HSS receives an authentication vector request message from the S-CSCF network element.
[0091] The authentication vector request message includes an identifier of the terminal device, for example, an IMPI.
[0092] S122: The HSS sends an authentication vector request response to the S-CSCF network element. In response, the S-CSCF network element receives an authentication vector request response from the HSS.
[0093] The authentication vector request response may include, but is not limited to, the following parameters:
[0094] The first parameter is the IMPI, which is used to identify the terminal device.
[0095] The second parameter is realm information, which indicates information about the realm in which the terminal performs authentication.
[0096] The third parameter is a security algorithm, for example the name of a message digest 5 (MD5) algorithm or an MD5 algorithm identifier.
[0097] The fourth parameter is qop. If qop is set to "auth", it indicates that only user authentication is performed. If qop is set to "auth-int", it indicates that user authentication and message body integrity protection are performed simultaneously.
[0098] The fifth parameter is a hash value HA1. The hash value HA1 is a hash value obtained by calculating the username, realm information, and password by using the aforementioned MD5 algorithm. For example, the hash value HA1 is a hash value obtained by combining the following three parameters: HA1=MD5 value of username:realm:password
[0099] HA1 indicates a hash value, username indicates a user name, realm indicates realm information, password indicates a password, and ":" indicates a combination. That is, a combination of the three parameters of username, realm information, and password is first determined, and then a hash value of the entire parameters obtained through the combination is determined.
[0100] S131: The S-CSCF network element sends an authentication challenge request message to an I-CSCF network element. In response, the I-CSCF network element receives an authentication challenge request message from the S-CSCF network element.
[0101] The authentication challenge request message may include, but is not limited to, the following parameters:
[0102] The first parameter is the IMPI, which is used to identify the terminal device.
[0103] The second parameter is region information, where the region information is the same as the "region information" in S122.
[0104] The third parameter is a security algorithm, for example, the name of an MD5 algorithm or an identifier for an MD5 algorithm.
[0105] The fourth parameter is qop, where qop is the same as "qop" in S122.
[0106] The fifth parameter is the nonce, which is a random number generated by the S-CSCF network element.
[0107] S132: The I-CSCF network element sends an authentication challenge request message to the P-CSCF network element. In response, the P-CSCF network element receives an authentication challenge request message from the I-CSCF network element.
[0108] S133: The P-CSCF network element sends an authentication challenge request message to the terminal device. In response, the terminal device receives an authentication challenge request message from the P-CSCF network element.
[0109] S141: The terminal device sends a second registration request message to the P-CSCF network element. In response, the P-CSCF network element receives the second registration request message from the terminal device.
[0110] The second registration request message includes at least an authentication response. The authentication response is used to authenticate the terminal device. The authentication response is a value obtained by calculating the username, realm information, password, nonce, digest-uri, and other parameters by using the MD5 algorithm. The authentication response is a hash value obtained by combining the following parameters: response=HA1:nonce:nc:cnonce:qop:MD5 value of HA2
[0111] response indicates the authentication response, HA1 indicates a hash value obtained by performing an MD5 calculation on the username, realm information, and password, nonce indicates a random number generated by the S-CSCF network element, nc indicates the nonce-count, i.e., the count value of the counter used by the terminal device to send the second registration request message by using the same nonce, cnonce is a random number generated by the terminal device, and the value of qop indicates that the authentication response is used for authentication only or for both authentication and message body integrity protection. The hash value HA2 is a hash value obtained by calculating the method and digest-uri by using the MD5 algorithm. That is, the combination of HA1, nonce, nc, cnonce, qop, and HA2 is first determined, and then a hash value of the entire parameters obtained through the combination is determined. The hash value HA1 is a hash value obtained by combining the following parameters: HA2=method:MD5 value of digest-uri
[0112] The method indicates the hypertext transfer protocol (HTTP) request method, the digest-uri indicates information about the uniform resource identifier (URI), and the ":" indicates a combination.
[0113] Optionally, the second registration request message further includes one or more of the following parameters:
[0114] The first parameter is the IMPI, which is used to identify the terminal device.
[0115] The second parameter is region information, where the region information is the same as the "region information" in S122.
[0116] The third parameter is a security algorithm, for example, the name of an MD5 algorithm or an identifier for an MD5 algorithm.
[0117] The fourth parameter is qop, where qop is the same as "qop" in S122.
[0118] The fifth parameter is a nonce, where the nonce is the same as the "nonce" in S131.
[0119] The sixth parameter is the cnonce, which is a random number generated by the terminal device.
[0120] The seventh parameter is nonce-count, which indicates the count value of the counter used by the terminal device to send a second registration request message by using the same nonce.
[0121] The eighth parameter is the digest-uri, which indicates information about the URI.
[0122] S142: The P-CSCF network element sends a second registration request message to the I-CSCF network element. In response, the I-CSCF network element receives a second registration request message from the P-CSCF network element.
[0123] S143: The I-CSCF network element sends a second registration request message to the S-CSCF network element. In response, the S-CSCF network element receives a second registration request message from the I-CSCF network element.
[0124] After the S-CSCF network element receives the second registration request message, the S-CSCF network element calculates an authentication response based on the hash value HA1 and the security algorithm in the authentication vector request response. When the S-CSCF network element determines that the authentication response calculated by the S-CSCF network element is different from the authentication response in the second registration request message, the S-CSCF network element determines that the authentication has failed. Conversely, when the S-CSCF network element determines that the authentication response calculated by the S-CSCF network element is the same as the authentication response in the second registration request message, the S-CSCF network element determines that the authentication has succeeded, and executes S151.
[0125] S151: The S-CSCF network element sends an authentication success message to the I-CSCF network element. In response, the S-CSCF network element receives an authentication success message from the I-CSCF network element.
[0126] S152: The I-CSCF network element sends an authentication success message to the P-CSCF network element. In response, the P-CSCF network element receives an authentication success message from the I-CSCF network element.
[0127] S153: The P-CSCF network element sends an authentication success message to the terminal device. In response, the terminal device receives an authentication success message from the P-CSCF network element.
[0128] Since the MD5 algorithm is an insecure algorithm, one solution is to enable some terminal devices to support new security algorithms such as secure hash algorithm (SHA) 256 or SHA512, and complete the authentication through an authentication response calculated by using SHA256 or SHA512.
[0129] Obviously, this solution results in the following situation: some terminal devices support SHA256 or SHA512, so some terminal devices need to use SHA256 or SHA512 to calculate the authentication response, and other terminal devices do not support SHA256 or SHA512 and still use the MD5 algorithm to calculate the authentication response. In this case, how to enable terminal devices that support different security algorithms to complete the authentication is an urgent problem to be solved.
[0130] In consideration of this, an embodiment of this application provides an authentication method. The authentication method in this embodiment of this application may be applied to an IMS network. As shown in Fig. 2, a communication system may include a terminal device 20 and a network device 21. The terminal device 20 is communicatively connected to the network device 21. Fig. 2 is merely a schematic diagram and does not constitute a limitation on the application scenario of the authentication method in this embodiment of this application.
[0131] Terminal device 20 may also be referred to as user equipment (UE), e.g., a mobile phone or a computer, or may be a cellular telephone, a cordless telephone, a session initiation protocol (SIP) telephone, a wireless local loop (WLL) station, a personal digital assistant (PDA) device, a laptop computer, a handheld communications device, a handheld computing device, a satellite wireless device, a wireless modem card, a set top box (STB), a customer premise equipment (CPE), and / or other device configured to communicate over a wireless system.
[0132] The network device 21 includes the following network elements: a P-CSCF network element, an I-CSCF network element, an S-CSCF network element connection, an HSS, and an application server (AS). The connection relationships between the network elements are as follows: the terminal device is connected to the S-CSCF network element through a P-CSCF network element and an I-CSCF network element, as shown in FIG. 2, the S-CSCF network element is further separately connected to an HSS and an AS, and the I-CSCF network element is further connected to an HSS. The P-CSCF network element is used to complete the access of the terminal device, i.e., the terminal device accesses the IMS by using the P-CSCF network element. The I-CSCF network element is used to select an S-CSCF network element for interoperating between different carriers or local area networks to realize functions such as network shielding. The S-CSCF network element is used to provide core functions such as session control and routing. The P-CSCF, I-CSCF, and S-CSCF network elements realize the call session control function (CSCF) and complete functions such as call, session control, and routing. The HSS is configured to store security algorithms, such as subscription data and configuration data, of terminal devices. The AS is a server that provides application services for terminal devices.
[0133] It should be noted that the terminal device shown in FIG. 2 may access the IMS by using a fourth generation (4G) network, or may access the IMS by using a fifth generation (5G) network. This is not limited in this embodiment of this application. In addition, FIG. 2 is just an example framework diagram. In addition to the functional network elements shown in FIG. 2, the IMS may further include another functional network element. This is not limited in this embodiment of this application.
[0134] The communication systems and service scenarios described in the embodiments of this application are intended to more clearly explain the technical solutions in the embodiments of this application, but do not constitute limitations on the technical solutions provided in the embodiments of this application. Those skilled in the art may know that the technical solutions provided in the embodiments of this application are also applicable to similar technical problems when network architectures evolve and new service scenarios emerge.
[0135] The following describes in detail the authentication method provided in the embodiment of this application.
[0136] It should be noted that in the following embodiments of this application, the names of messages between network elements, the names of parameters in messages, or the like are merely examples, and there may be other names during specific implementation. In the embodiments of this application, the information about the Xth security algorithm may be, but is not limited to, one of the following: the name of the Xth security algorithm, the identifier of the Xth security algorithm, or the like. The Xth security algorithm may be a first security algorithm, a second security algorithm, a third security algorithm, a fourth security algorithm, or the like. A unified description is provided here. The details will not be described again below.
[0137] An embodiment of this application provides an authentication method 300. The authentication method 300 is applied to an authentication process. See Fig. 3. The authentication method 300 includes the following steps:
[0138] S301: A terminal device sends a first registration request message to an S-CSCF network element. In response, the S-CSCF network element receives the first registration request message from the terminal device.
[0139] The first registration request message includes an identifier (e.g., an IMPI) of the terminal device. In addition, the first registration request message may further include at least one of the following information:
[0140] 1. Information about security algorithms that may be supported by the terminal device. The information about the security algorithm includes a name of the security algorithm, an identifier of the security algorithm, or the like. The security algorithm includes at least one of the following: a first security algorithm or a second security algorithm. The first security algorithm is SHA256, and the second security algorithm is SHA512. For example, the information about the security algorithm may be carried in a "capability information" field in the first registration request message.
[0141] 2. Indication information. The indication information may be at least one of the following: information indicating "MD5 algorithm is deprecated", information indicating "MD5 algorithm is not supported", information indicating "new security algorithm is supported", information indicating "terminal device is a new version terminal device", or the like. A new version terminal device is a terminal device that supports a first security algorithm and / or a second security algorithm. In this way, the S-CSCF network element may explicitly know that the terminal device supports a new security algorithm, for example, the first security algorithm or the second security algorithm.
[0142] For the specific implementation process of S301, please refer to the relevant descriptions of S111, S112, and S113. The details will not be described again here.
[0143] S302: The S-CSCF network element sends an authentication vector request message to the HSS. In response, the HSS receives an authentication vector request message from the S-CSCF network element.
[0144] The authentication vector request message includes an identifier (IMPI) of the terminal device. In addition, the authentication vector request message further includes at least one of the following: information on a security algorithm that can be supported by the terminal device, and instruction information. The instruction information in S302 is the same as the instruction information in S301. When the authentication vector request message includes "information on a security algorithm that can be supported by the terminal device", the information on the security algorithm in the authentication vector request message is consistent with the information on the security algorithm in the first registration request message. For example, when the first registration request message includes an identifier of SHA256, the authentication vector request message includes an identifier of SHA256. When the first registration request message includes an identifier of SHA512, the authentication vector request message includes an identifier of SHA512. When the first registration request message includes an identifier of SHA256 and an identifier of SHA512, the authentication vector request message includes an identifier of SHA256 and an identifier of SHA512.
[0145] S303: The HSS calculates a hash value HA1 of the security parameters based on the third security algorithm.
[0146] The third security algorithm is one of the security algorithms that can be supported by the terminal device.
[0147] When the authentication vector request message received by the HSS includes "information about security algorithms that can be supported by the terminal device", the process by which the HSS determines the third security algorithm is as follows: When the authentication vector request message includes an identifier of SHA256, the third security algorithm is SHA256; When the authentication vector request message includes an identifier of SHA512, the third security algorithm is SHA512; When the authentication vector request message includes an identifier of SHA256 and an identifier of SHA512, the HSS determines an algorithm from SHA256 and SHA512 as the third security algorithm. For example, the HSS selects a security algorithm with a higher priority as the third security algorithm based on a locally configured priority of SHA256 and a locally configured priority of SHA512.
[0148] When the authentication vector request message received by the HSS includes "indication information", the process of the HSS determining the third security algorithm is as follows: The HSS determines the third security algorithm based on the indication information. For example, the HSS knows that the terminal device supports a new security algorithm based on the indication information. Then, the HSS determines an algorithm from SHA256 and SHA512 as the third security algorithm. Alternatively, when SHA256 is configured in the HSS and SHA512 is not configured, the HSS uses SHA256 as the third security algorithm. Alternatively, when SHA256 is not configured in the HSS and SHA512 is configured, the HSS uses SHA512 as the third security algorithm.
[0149] The security parameters are configuration parameters of the terminal device identified by the IMPI, for example, the security parameters include the username, password, and realm name for logging in to the terminal device.
[0150] For example, the HSS calculates three parameters, namely, the username, the password, and the realm information, by using a third security algorithm to obtain a hash value HA1 corresponding to the third security algorithm. For example, the third security algorithm is SHA256, and the hash value HA1 is a hash value obtained by combining the following parameters: HA1=SHA256 value of username:realm:password
[0151] HA1 indicates a hash value corresponding to the third security algorithm, username indicates a user name, realm indicates realm information, password indicates a password, and ":" indicates a combination.
[0152] S304: The HSS sends an authentication vector request response to the S-CSCF network element. In response, the S-CSCF network element receives an authentication vector request response from the HSS.
[0153] The authentication vector request response carries the hash value HA1 and information about the third security algorithm. HA1 is the value calculated by the HSS in S303. The third security algorithm is the security algorithm used by the HSS to calculate the hash value HA1 in S303, and the information about the third security algorithm includes the name of the third security algorithm, the identifier of the third security algorithm, and the like. Of course, the authentication vector request response may further include another parameter. For details, please refer to the related description of S122. The details will not be described again here.
[0154] S305: The S-CSCF network element sends an authentication challenge request message to the terminal device. In response, the terminal device receives an authentication challenge request message from the S-CSCF network element.
[0155] The authentication challenge request message includes information about the third security algorithm, such as the name of the third security algorithm and the identifier of the third security algorithm. The third security algorithm in the authentication challenge request message is consistent with the third security algorithm in the authentication vector request response. For example, when the authentication vector request response includes the identifier of SHA256, the authentication challenge request message includes the identifier of SHA256. Of course, the authentication challenge request message may further include another parameter. For details, please refer to the relevant description of S131. The details will not be described again here.
[0156] For the implementation process of S305, please refer to the relevant explanations of S131, S132 and S133. The details will not be described again here.
[0157] It should be noted that when the terminal device supports one kind of security algorithm (such as SHA256 or SHA512), the authentication challenge request message does not need to carry information about the third security algorithm. Since the terminal device supports one kind of security algorithm, the terminal device can determine which security algorithm is used to calculate the hash value HA1, and the S-CSCF network element does not need to indicate the security algorithm by using the authentication challenge request message. Thus, the signaling overhead is reduced.
[0158] S306: The terminal device calculates a hash value HA1 of the security parameters based on a third security algorithm.
[0159] The third security algorithm is a security algorithm indicated by the authentication challenge request message. For example, when the authentication challenge request message includes an identifier of SHA256, the third security algorithm is SHA256. Alternatively, the third security algorithm is determined by the terminal device by using a security algorithm that can be supported by the terminal device. For example, when the terminal device supports only SHA256, the third security algorithm is SHA256.
[0160] Security parameters are configuration parameters of a terminal device, including a username, password, and realm information for logging into the terminal device.
[0161] For example, the terminal device calculates three parameters, namely, username, password, and realm information, by using SHA256 (i.e., the third security algorithm) to obtain a hash value HA1 corresponding to SHA256 (i.e., the third security algorithm).
[0162] S307: The terminal device calculates a first authentication response based on the third security algorithm and the hash value HA1.
[0163] For example, the third security algorithm is still SHA256, and the calculation process of the first authentication response is as follows:
[0164] First, the terminal device calculates the method and digest-uri by using SHA256 to obtain a hash value HA2. For example, the hash value HA2 is a hash value obtained by combining the following parameters: HA2=SHA256 value of method:digest-uri
[0165] The method indicates the HTTP request method, the digest-uri indicates information about the URI, and ":" indicates a combination.
[0166] Then, the terminal device calculates HA1, nonce, nc, cnonce, qop, and HA2 by using SHA256 to obtain a first authentication response. For example, the first authentication response is a hash value obtained by combining the following parameters: response=HA1:nonce:nc:cnonce:qop:SHA256 value of HA2
[0167] response indicates the first authentication response, HA1 indicates a hash value obtained by performing a SHA256 calculation on the username, realm information, and password, nonce indicates a random number generated by the S-CSCF network element, nc indicates the nonce-count, i.e., the count value of the counter used by the terminal device to send the second registration request message by using the same nonce, cnonce is a random number generated by the terminal device, and the value of qop indicates that the first authentication response is used for authentication only or for both authentication and message body integrity protection. The hash value HA2 is a hash value obtained by calculating the method and digest-uri by using the SHA256 algorithm. The hash value HA2 is a hash value obtained by combining the following parameters: HA2=SHA256 value of method:digest-uri
[0168] The method indicates the HTTP request method, the digest-uri indicates information about the URI, and ":" indicates a combination.
[0169] S308: The terminal device sends a second registration request message to the S-CSCF network element. In response, the S-CSCF network element receives a second registration request message from the terminal device.
[0170] The second registration request message carries the first authentication response. The first authentication response carried in the second registration request message is the authentication response obtained by the terminal device through the calculation in S307. Of course, the second registration request message may further include another parameter. For details, please refer to the relevant description of S141. The details will not be described again here.
[0171] For the implementation process of S308, please refer to the relevant explanations of S141, S142 and S143. The details will not be described again here.
[0172] S309: The S-CSCF network element calculates a second authentication response based on the third security algorithm and the hash value HA1.
[0173] The third security algorithm is determined by the S-CSCF network element based on the authentication vector request response in S303 and matches the security algorithm in the authentication vector request response. The hash value HA1 is the hash value carried in the authentication vector request response in S303. Alternatively, the third security algorithm may be determined by the S-CSCF network element based on the second registration request message in S308 and matches the security algorithm carried by the terminal device in the second registration request message.
[0174] For example, the third security algorithm is SHA256, and the calculation process of the second authentication response is as follows:
[0175] First, the S-CSCF network element calculates the method and digest-uri by using SHA256 to obtain a hash value HA2.
[0176] The S-CSCF network element then calculates HA1, nonce, nc, cnonce, qop, and HA2 by using SHA256 to obtain a second authentication response.
[0177] S310: The S-CSCF network element checks the first authentication response by using the second authentication response to obtain an authentication result of the terminal device.
[0178] The first authentication response is the first authentication response carried in the second registration request message at S308. The second authentication response is the second authentication response obtained by the S-CSCF network element through calculation at S309.
[0179] For example, when the S-CSCF network element determines that the first authentication response is different from the second authentication response, the S-CSCF network element determines that the authentication for the terminal device has failed. Conversely, when the S-CSCF network element determines that the first authentication response is the same as the second authentication response, the S-CSCF network element determines that the authentication for the terminal device has succeeded, and the S-CSCF network element sends an authentication success message to the terminal device. For details, please refer to the relevant descriptions of S151, S152, and S153. The details will not be described again here.
[0180] It should be noted that for a terminal device that supports the MD5 algorithm, the authentication process of the terminal device can be completed by performing the processing procedure depicted in Figure 1. For an S-CSCF network element, the S-CSCF network element determines that the first registration request message does not carry information about a security algorithm. Thus, the S-CSCF network element may determine that the terminal device does not support a new security algorithm, for example, the first security algorithm or the second security algorithm. The S-CSCF network element still uses the processing procedure depicted in Figure 1 to authenticate the terminal device. The interaction process between the S-CSCF network element and the HSS is still depicted in Figure 1.
[0181] In this way, for a terminal device that supports a new security algorithm (e.g., a first security algorithm and / or a second security algorithm), the terminal device adds information about the security algorithm to the first registration request message to indicate the security algorithms supported by the terminal device to the S-CSCF network element. The terminal device and the S-CSCF network element may calculate an authentication response based on the same security algorithm. For example, the terminal device calculates a first authentication response based on a third security algorithm, and the S-CSCF network element calculates a second authentication response based on the third security algorithm. Then, the S-CSCF network element checks the first authentication response by using the second authentication response, so that the terminal device that supports the "first security algorithm and / or the second security algorithm" can be authenticated. This prevents authentication failures caused by using different security algorithms by the terminal device and the S-CSCF network element. In addition, for a terminal device that does not support the first security algorithm and the second security algorithm, the terminal device does not need to carry information about the security algorithm in the first registration request message. In this case, the S-CSCF network element may determine that the security algorithm is the MD5 algorithm, and calculate an authentication response by using the MD5 algorithm to realize the authentication process of the terminal device.
[0182] An embodiment of this application provides an authentication method 400. The authentication method 400 is applied to an authentication process. See Figure 4a and Figure 4b. The authentication method 400 includes the following steps:
[0183] S401: A terminal device sends a first registration request message to an S-CSCF network element. In response, the S-CSCF network element receives the first registration request message from the terminal device.
[0184] For the description of the first registration request message, please refer to the relevant description of "First Registration Request Message" in S111. The details will not be described again here. For the implementation process of S401, please refer to the relevant description of S111, S112, and S113. The details will not be described again here.
[0185] S402: The S-CSCF network element sends an authentication vector request message to the HSS. In response, the HSS receives an authentication vector request message from the S-CSCF network element.
[0186] For the authentication vector request message, please refer to the relevant description of the "authentication vector request message" in S121. The details will not be described again here. For the implementation process of S402, please refer to the relevant description of S121. The details will not be described again here.
[0187] For the HSS, the authentication method 400 in this embodiment of the application is described in two cases based on the quantity of security algorithms configured by the HSS.
[0188] In the first case, when the HSS configures the first security algorithm and the second security algorithm, the HSS executes S403a shown in FIG. 4a.
[0189] S403a: The HSS calculates a first hash value HA1 of the security parameters based on a first security algorithm, and calculates a second hash value HA1 of the security parameters based on a second security algorithm.
[0190] The first security algorithm is SHA256 and the second security algorithm is MD5 algorithm. Alternatively, the first security algorithm is SHA512 and the second security algorithm is MD5 algorithm. Alternatively, the first security algorithm is SHA256 and the second security algorithm is SHA512.
[0191] The security parameters include a username, password, and realm information for logging into the terminal device.
[0192] For example, when the first security algorithm is SHA256 and the second security algorithm is MD5 algorithm, the HSS calculates three parameters, namely, the user name, the password, and the realm information, by using SHA256 (i.e., the first security algorithm) to obtain a first hash value HA1 corresponding to SHA256 (i.e., the first security algorithm). The HSS calculates three parameters, namely, the user name, the password, and the realm information, by using MD5 algorithm (i.e., the second security algorithm) to obtain a second hash value HA1 corresponding to the MD5 algorithm (i.e., the second security algorithm).
[0193] In the second case, when the HSS configures the first security algorithm, the second security algorithm, and the fourth security algorithm, the HSS executes S403b shown in FIG. 4b.
[0194] S403b: The HSS calculates a first hash value HA1 of the security parameters based on the first security algorithm, calculates a second hash value HA1 of the security parameters based on the second security algorithm, and calculates a third hash value HA1 of the security parameters based on the fourth security algorithm.
[0195] The first security algorithm is SHA256, the second security algorithm is SHA512, and the fourth security algorithm is the MD5 algorithm.
[0196] For the process of calculating the first hash value HA1 and the second hash value HA1, please refer to S403a. For the process of calculating the third hash value HA1, please refer to the related description in S122. Details will not be described again here.
[0197] S404: The HSS sends an authentication vector request response to the S-CSCF network element. In response, the S-CSCF network element receives an authentication vector request response from the HSS.
[0198] The authentication vector request response is described in two cases.
[0199] In the first case, when the HSS executes S403a, the authentication vector request response carries a first hash value HA1 and a second hash value HA1. The first hash value HA1 is the first hash value HA1 calculated by the HSS in S403a, and the second hash value HA1 is the second hash value HA1 calculated by the HSS in S403a. Of course, the authentication vector request response may further include another parameter. For details, please refer to the related description of S122. The details will not be described again here.
[0200] In some implementations, for example, the authentication vector request response carries two hash values, and the authentication vector request response carries the first hash value HA1 and the second hash value HA1 in a preset order. The preset order is determined based on a priority of the first security algorithm and a priority of the second security algorithm. For example, when the priority of the first security algorithm is higher than the priority of the second security algorithm, the first hash value HA1 is placed before the second hash value HA1 in the authentication vector request response. Conversely, when the priority of the first security algorithm is lower than the priority of the second security algorithm, the first hash value HA1 is placed after the second hash value HA1 in the authentication vector request response. In this way, the S-CSCF network element can distinguish between the first hash value HA1 and the second hash value HA1 based on the preset order.
[0201] It should be noted that the above-mentioned preset order is described by only using the indicator of "algorithm priority" as an example. Of course, the preset order may alternatively be determined based on another indicator, which is not limited in this embodiment of this application.
[0202] In some implementations, for example, the authentication vector request response carries two hash values, and the authentication vector request response further carries information about the first security algorithm and information about the second security algorithm. There is a correspondence between the information about the first security algorithm and the first hash value HA1, and there is a correspondence between the information about the second security algorithm and the second hash value HA1. For example, the first security algorithm is still SHA256, the second security algorithm is still SHA512, and the authentication vector request response further carries an identifier of SHA256 and an identifier of SHA512. The correspondence between the information about the first security algorithm and the first hash value HA1 may be reflected as a positional relationship between the identifier of SHA256 and the first hash value HA1 in the authentication vector request response. For example, the identifier of SHA256 is placed after (or before) the first hash value HA1. The correspondence between the information about the second security algorithm and the second hash value HA1 may be reflected as a positional relationship between the identifier of SHA512 and the second hash value HA1 in the authentication vector request response. For example, the SHA512 identifier is placed after (or before) the second hash value HA1. Since the S-CSCF network element can distinguish between the first security algorithm and the second security algorithm based on the information about the security algorithm, the S-CSCF network element can distinguish between the first hash value HA1 and the second hash value HA2 by referring to the above-mentioned correspondence.
[0203] In the second case, when the HSS executes S403b, the authentication vector request response carries the first hash value HA1, the second hash value HA1, and the third hash value HA1. The first hash value HA1 is the first hash value HA1 calculated by the HSS in S403b, and the second hash value HA1 is the second hash value HA1 calculated by the HSS in S403b. The third hash value HA1 is the third hash value HA1 calculated by the HSS in S403b. Of course, the authentication vector request response may further include another parameter. For details, please refer to the related description of S122. The details will not be described again here.
[0204] In some implementations, for example, the authentication vector request response carries three hash values, where the authentication vector request response carries the first hash value HA1, the second hash value HA1, and the third hash value HA1 in a preset order, where the preset order is determined based on a priority of the first security algorithm, a priority of the second security algorithm, and a priority of the fourth security algorithm.
[0205] In some implementations, for example, the authentication vector request response carries three hash values, and the authentication vector request response further carries information about a first security algorithm, information about a second security algorithm, and information about a fourth security algorithm, where there is a correspondence between the information about the first security algorithm and the first hash value HA1, there is a correspondence between the information about the second security algorithm and the second hash value HA1, and there is a correspondence between the information about the fourth security algorithm and the third hash value HA1.
[0206] S405: The S-CSCF network element sends an authentication challenge request message to the terminal device. In response, the terminal device receives an authentication challenge request message from the S-CSCF network element.
[0207] For the implementation process of S405, please refer to the relevant descriptions of S131, S132, and S133. The details will not be described again here. The following describes the authentication challenge request message in two cases.
[0208] In the first case, for example, the authentication vector request response carries two hash values, and the authentication challenge request message carries information about the first security algorithm and information about the second security algorithm. The first security algorithm in the authentication challenge request message is consistent with the security algorithm for calculating the first hash value HA1 in the first case of S404. The second security algorithm in the authentication challenge request message is consistent with the security algorithm for calculating the second hash value HA1 in the first case of S404. Of course, the authentication challenge request message may further include another parameter. For details, please refer to the relevant description of S131. The details will not be described again here.
[0209] In some implementations, the authentication challenge request message carries information about the first security algorithm and information about the second security algorithm in a preset order. The preset order is determined based on a priority of the first security algorithm and a priority of the second security algorithm. For example, when the priority of the first security algorithm is higher than the priority of the second security algorithm, the information about the first security algorithm is placed before the information about the second security algorithm in the authentication challenge request message. Conversely, when the priority of the first security algorithm is lower than the priority of the second security algorithm, the information about the first security algorithm is placed after the information about the second security algorithm in the authentication challenge request message. In this way, the terminal device can preferentially identify a security algorithm having a higher priority based on the preset order.
[0210] In the second case, for example, the authentication vector request response carries three hash values, and the authentication challenge request message carries information about the first security algorithm, information about the second security algorithm, and information about the fourth security algorithm. The first security algorithm in the authentication challenge request message is consistent with the security algorithm for calculating the first hash value HA1 in the second case of S404. The second security algorithm in the authentication challenge request message is consistent with the security algorithm for calculating the second hash value HA1 in the second case of S404. The fourth security algorithm in the authentication challenge request message is consistent with the security algorithm for calculating the third hash value HA1 in the second case of S404. Of course, the authentication challenge request message may further include another parameter. For details, please refer to the relevant description of S131. The details will not be described again here.
[0211] In some implementations, the authentication challenge request message carries information about the first security algorithm, the second security algorithm, and the fourth security algorithm in a preset order, where the preset order is determined based on a priority of the first security algorithm, a priority of the second security algorithm, and a priority of the fourth security algorithm, so that the terminal device preferentially identifies a security algorithm having a higher priority based on the preset order.
[0212] It should be noted that the above-mentioned preset order is described by only using the indicator of "algorithm priority" as an example. Of course, the preset order may alternatively be determined based on another indicator, which is not limited in this embodiment of this application.
[0213] S406: The terminal device determines a third security algorithm.
[0214] The implementation process of S406 may be, but is not limited to, the following two cases:
[0215] In the first case, when the authentication challenge request message carries information about two security algorithms (e.g., information about the first security algorithm and information about the second security algorithm), the third security algorithm is the first security algorithm, or the third security algorithm is the second security algorithm. The implementation process of S406 may be, but is not limited to, the following two manners.
[0216] In the first manner, the terminal device first determines a first security algorithm and a second security algorithm based on the authentication challenge request message, and then selects a security algorithm having a higher priority from the first security algorithm and the second security algorithm as a third security algorithm based on the priority of the first security algorithm and the priority of the second security algorithm.
[0217] In the second scheme, when the "authentication challenge request message carries information about a first security algorithm and information about a second security algorithm in a preset order", the terminal device identifies information about security algorithms in the authentication challenge request message one by one until the terminal device identifies information about a security algorithm supported by the terminal device. In this case, the security algorithm identified by the terminal device is the third security algorithm. In other words, the third security algorithm is the first security algorithm supported by the terminal device and in the preset order. For example, the authentication challenge request message carries an identifier of SHA256 (i.e., information about the first security algorithm) and an identifier of MD5 (i.e., information about the second security algorithm) in the preset order. When the terminal device supports SHA256 and after the terminal device identifies information about SHA256 in the authentication challenge request message, the terminal device uses SHA256 as the third security algorithm.
[0218] In the second case, when "the authentication challenge request message carries information about three security algorithms (e.g., information about a first security algorithm, information about a second security algorithm, and information about a fourth security algorithm)," the third security algorithm is the first security algorithm, or the third security algorithm is the second security algorithm, or the third security algorithm is the fourth security algorithm. The implementation process of S406 may be, but is not limited to, the following two manners.
[0219] In the first manner, the terminal device first determines a first security algorithm, a second security algorithm, and a fourth security algorithm based on the authentication challenge request message, and then selects a security algorithm having a higher priority from the first security algorithm, the second security algorithm, and the fourth security algorithm as a third security algorithm based on the priority of the first security algorithm, the priority of the second security algorithm, and the priority of the fourth security algorithm.
[0220] In the second scheme, when the authentication challenge request message carries information about a first security algorithm, information about a second security algorithm, and information about a fourth security algorithm in a preset order, the terminal device identifies the information about the security algorithms in the authentication challenge request message one by one until it identifies information about a security algorithm supported by the terminal device, in which case the security algorithm identified by the terminal device is the third security algorithm.
[0221] S407: The terminal device calculates a hash value HA1 of the security parameters based on a third security algorithm.
[0222] The third security algorithm is the security algorithm determined by the terminal device in S406. For example, the third security algorithm is SHA256.
[0223] Security parameters are configuration parameters of a terminal device, including a username, password, and realm information for logging into the terminal device.
[0224] For example, the terminal device calculates three parameters, namely, username, password, and realm information, by using SHA256 (i.e., the third security algorithm) to obtain HA1 corresponding to SHA256 (i.e., the third security algorithm).
[0225] S408: The terminal device calculates a first authentication response based on the third security algorithm and the hash value HA1.
[0226] For example, the third security algorithm is still SHA256, and the calculation process of the first authentication response is as follows:
[0227] First, the terminal device calculates the method and digest-uri by using SHA256 to obtain a hash value HA2. For example, the hash value HA2 is a hash value obtained by combining the following parameters: HA2=SHA256 value of method:digest-uri
[0228] The method indicates the HTTP request method, the digest-uri indicates information about the URI, and ":" indicates a combination.
[0229] Then, the terminal device calculates HA1, nonce, nc, cnonce, qop, and HA2 by using SHA256 to obtain a first authentication response. The first authentication response is a hash value obtained by combining the following parameters: response=HA1:nonce:nc:cnonce:qop:SHA256 value of HA2
[0230] response indicates the first authentication response, HA1 indicates a hash value obtained by performing a SHA256 calculation on the username, realm information, and password, nonce indicates a random number generated by the S-CSCF network element, nc indicates the nonce-count, i.e., the count value of the counter used by the terminal device to send the second registration request message by using the same nonce, cnonce is a random number generated by the terminal device, and the value of qop indicates that the first authentication response is used for authentication only or for both authentication and message body integrity protection. The hash value HA2 is a hash value obtained by combining method and digest-uri by using the SHA256 algorithm.
[0231] HA2=SHA256 value of method:digest-uri.
[0232] The method indicates the HTTP request method, the digest-uri indicates information about the URI, and ":" indicates a combination.
[0233] S409: The terminal device sends a second registration request message to the S-CSCF network element. In response, the S-CSCF network element receives a second registration request message from the terminal device.
[0234] The second registration request message includes information about the first authentication response and the third security algorithm. The first authentication response carried in the second registration request message is the first authentication response obtained by the terminal device through the calculation in S408. The third security algorithm is the third security algorithm determined by the terminal device in S407. Of course, the second registration request message may further include another parameter. For details, please refer to the relevant description of S141. The details will not be described again here.
[0235] For the implementation process of S409, please refer to the relevant explanations of S141, S142 and S143. The details will not be described again here.
[0236] For an S-CSCF network element, the execution process of the S-CSCF network element is described in the following two cases:
[0237] In the first case, when the authentication vector request response in S404 carries two hash values, the S-CSCF network element executes S410a depicted in FIG. 4a.
[0238] S410a: The S-CSCF network element selects a hash value HA1 corresponding to a third security algorithm from the first hash value HA1 and the second hash value HA1.
[0239] The first hash value HA1 and the second hash value HA1 are hash values carried in the authentication vector request response at S404. The third security algorithm is a security algorithm determined by the S-CSCF network element based on the second registration request message at S409.
[0240] The implementation process of S410a may be, but is not limited to, the following two ways:
[0241] In the first scheme, when the "authentication vector request response carries the first hash value HA1 and the second hash value HA1 in a preset order", the S-CSCF network element distinguishes between the first hash value HA1 and the second hash value HA1 based on the preset order. The S-CSCF network element selects the hash value HA1 corresponding to the third security algorithm from the first hash value HA1 and the second hash value HA1. Specifically, when the third security algorithm is realized as the first security algorithm, the S-CSCF network element determines that the hash value corresponding to the third security algorithm is the first hash value HA1. When the third security algorithm is realized as the second security algorithm, the S-CSCF network element determines that the hash value corresponding to the third security algorithm is the second hash value HA1.
[0242] In the second scheme, when "the authentication vector request response further carries information about the first security algorithm and information about the second security algorithm, and there is a correspondence between the information about the first security algorithm and the first hash value HA1, and there is a correspondence between the information about the second security algorithm and the second hash value HA1", the S-CSCF network element selects a hash value HA1 corresponding to the third security algorithm from the first hash value HA1 and the second hash value HA1 based on the correspondence in the authentication vector request response. Specifically, since the S-CSCF network element can distinguish between the first security algorithm and the second security algorithm based on the information about the security algorithm, the S-CSCF network element can distinguish between the first hash value HA1 and the second hash value HA1 by referring to the aforementioned correspondence. If the third security algorithm is realized as the first security algorithm, the S-CSCF network element determines that the hash value corresponding to the third security algorithm is the first hash value HA1. If the third security algorithm is implemented as the second security algorithm, the S-CSCF network element determines that the hash value corresponding to the third security algorithm is the second hash value HA1.
[0243] In the second case, when the authentication vector request response in S404 carries three hash values, the S-CSCF network element executes S410b depicted in FIG. 4b.
[0244] S410b: The S-CSCF network element selects a hash value HA1 corresponding to a third security algorithm from the first hash value HA1, the second hash value HA1, and the third hash value HA1.
[0245] The first hash value HA1, the second hash value HA1, and the third hash value HA1 are hash values carried in the authentication vector request response at S404. The third security algorithm is a security algorithm determined by the S-CSCF network element based on the second registration request message at S409.
[0246] The implementation process of S410b may be, but is not limited to, the following two ways.
[0247] In the first scheme, when the "authentication vector request response carries the first hash value HA1, the second hash value HA1, and the third hash value HA1 in a preset order", the S-CSCF network element distinguishes the first hash value HA1, the second hash value HA1, and the third hash value HA1 based on the preset order. The S-CSCF network element selects the hash value HA1 corresponding to the third security algorithm from the first hash value HA1, the second hash value HA1, and the third hash value HA1. For details, please refer to the description of S410a. The details will not be described again here.
[0248] In the second scheme, when "the authentication vector request response further carries information about a first security algorithm, information about a second security algorithm, and information about a fourth security algorithm, and there is a correspondence between the information about the first security algorithm and the first hash value HA1, there is a correspondence between the information about the second security algorithm and the second hash value HA1, and there is a correspondence between the information about the fourth security algorithm and the third hash value HA1", the S-CSCF network element selects a hash value HA1 corresponding to the third security algorithm from the first hash value HA1 and the second hash value HA1 based on the correspondence in the authentication vector request response. For details, please refer to the description of S410a. Details will not be described again here.
[0249] S411: The S-CSCF network element calculates a second authentication response based on a third security algorithm and a hash value HA1 corresponding to the third security algorithm.
[0250] The third security algorithm is a security algorithm determined by the S-CSCF network element based on the second registration request message in S409, and is consistent with the third security algorithm in the second registration request message. The hash value HA1 corresponding to the third security algorithm is a hash value determined by the S-CSCF network element based on S410.
[0251] For example, the third security algorithm is SHA256, and the calculation process of the second authentication response is as follows:
[0252] First, the S-CSCF network element calculates the method and digest-uri by using SHA256 to obtain a hash value HA2.
[0253] The S-CSCF network element then calculates HA1, nonce, nc, cnonce, qop, and HA2 by using SHA256 to obtain a second authentication response.
[0254] S412: The S-CSCF network element checks the first authentication response by using the second authentication response to obtain an authentication result of the terminal device.
[0255] The first authentication response is the first authentication response carried in the second registration request message at S409. The second authentication response is the second authentication response obtained by the S-CSCF network element through calculation at S411.
[0256] For example, when the S-CSCF network element determines that the first authentication response is different from the second authentication response, the S-CSCF network element determines that the authentication for the terminal device has failed. Conversely, when the S-CSCF network element determines that the first authentication response is the same as the second authentication response, the S-CSCF network element determines that the authentication for the terminal device has succeeded, and the S-CSCF network element sends an authentication success message to the terminal device. For details, please refer to the relevant descriptions of S151, S152, and S153. The details will not be described again here.
[0257] In other words, the terminal device can refer to the information about the security algorithm in the authentication challenge request message and the security algorithm supported by the terminal device to determine a security algorithm, i.e., a third security algorithm, and the terminal device calculates a first authentication response by using the third security algorithm. In addition, the terminal device adds the information about the third security algorithm to the second registration request message to indicate the security algorithm supported by the terminal device to the S-CSCF network element. The terminal device and the S-CSCF network element may calculate an authentication response based on the same security algorithm, and the S-CSCF network element checks the first authentication response by using the second authentication response to authenticate the terminal device. This prevents authentication failure caused by using different security algorithms by the terminal device and the S-CSCF network element. For the network side (such as the S-CSCF network element and the HSS), the network side does not need to identify whether the terminal device supports a new security algorithm, and the network side only needs to use the method represented in FIG. 4a or FIG. 4b. This simplifies the implementation process of the network side.
[0258] An embodiment of this application provides an authentication method 500. The authentication method 500 is applied to an authentication process. See Figure 5. The authentication method 500 includes the following steps:
[0259] S501: A terminal device sends a first registration request message to an S-CSCF network element. In response, the S-CSCF network element receives the first registration request message from the terminal device.
[0260] For the description of the first registration request message, please refer to the relevant description of "First Registration Request Message" in S111. The details will not be described again here. For the implementation process of S501, please refer to the relevant description of S111, S112, and S113. The details will not be described again here.
[0261] S502: The S-CSCF network element sends an authentication challenge request message to the terminal device. In response, the terminal device receives an authentication challenge request message from the S-CSCF network element.
[0262] For the implementation process of S502, please refer to the relevant descriptions of S131, S132, and S133. The details will not be described again here.
[0263] The authentication challenge request message is described in two cases.
[0264] In the first case, the authentication challenge request message carries two security algorithms, namely, information on the first security algorithm and information on the second security algorithm. The first security algorithm is SHA256, and the second security algorithm is MD5 algorithm. Alternatively, the first security algorithm is SHA512, and the second security algorithm is MD5 algorithm. Alternatively, the first security algorithm is SHA256, and the second security algorithm is SHA512. Of course, the authentication challenge request message may further include another parameter. For details, please refer to the related description of S131. The details will not be described again here. In some implementations, the authentication challenge request message carries information on the first security algorithm and information on the second security algorithm in a preset order. For details, please refer to the description of the first case of S405 in the method 400. The details will not be described again here.
[0265] In the second case, the authentication challenge request message carries three security algorithms, namely, information about a first security algorithm, information about a second security algorithm, and information about a fourth security algorithm. For example, the first security algorithm is SHA256, the second security algorithm is SHA512, and the fourth security algorithm is MD5 algorithm. In some implementations, the authentication challenge request message carries information about the first security algorithm, information about the second security algorithm, and information about the fourth security algorithm in a preset order. For details, please refer to the description of the second case of S405 in the method 400. The details will not be described again here.
[0266] S503: The terminal device determines a third security algorithm.
[0267] The implementation process of S503 may be, but is not limited to, the following two cases:
[0268] In the first case, when "the authentication challenge request message carries information about two security algorithms (for example, information about the first security algorithm and information about the second security algorithm)", the third security algorithm is the first security algorithm, or the third security algorithm is the second security algorithm. For the specific implementation process of S503, please refer to the description of the first case in S406. The details will not be described again here.
[0269] In the second case, when "the authentication challenge request message carries information about three security algorithms (for example, information about the first security algorithm, information about the second security algorithm, and information about the fourth security algorithm)", the third security algorithm is the first security algorithm, the third security algorithm is the second security algorithm, or the third security algorithm is the fourth security algorithm. For the specific implementation process of S503, please refer to the description of the first case in S406. The details will not be described again here.
[0270] S504: The terminal device calculates a hash value HA1 of the security parameters based on a third security algorithm.
[0271] The third security algorithm is the security algorithm determined by the terminal device in S503. For example, the third security algorithm is SHA256.
[0272] Security parameters are configuration parameters of a terminal device, including a username, password, and realm information for logging into the terminal device.
[0273] For example, the terminal device calculates three parameters, namely, username, password, and realm information, by using SHA256 (i.e., the third security algorithm) to obtain HA1 corresponding to SHA256 (i.e., the third security algorithm).
[0274] S505: The terminal device calculates a first authentication response based on the third security algorithm and the hash value HA1.
[0275] For example, the third security algorithm is still SHA256, and the calculation process of the first authentication response is as follows:
[0276] First, the terminal device calculates the method and digest-uri by using SHA256 to obtain a hash value HA2.
[0277] Then, the terminal device calculates HA1, nonce, nc, cnonce, qop, and HA2 by using SHA256 to obtain a first authentication response.
[0278] S506: The terminal device sends a second registration request message to the S-CSCF network element. In response, the S-CSCF network element receives a second registration request message from the terminal device.
[0279] The second registration request message includes information about the first authentication response and the third security algorithm. The first authentication response carried in the second registration request message is the first authentication response obtained by the terminal device through the calculation in S505. The third security algorithm is the third security algorithm determined by the terminal device in S503. Of course, the second registration request message may further include another parameter. For details, please refer to the relevant description of S141. The details will not be described again here.
[0280] For the implementation process of S506, please refer to the relevant descriptions of S141, S142, and S143. The details will not be described again here.
[0281] S507: The S-CSCF network element sends an authentication vector request message to the HSS. In response, the HSS receives an authentication vector request message from the S-CSCF network element.
[0282] The authentication vector request message includes information about a third security algorithm, which matches the third security algorithm in the second registration request message at S506.
[0283] For the implementation process of S507, please refer to the relevant explanation of S121. The details will not be described again here.
[0284] S508: The HSS calculates a hash value HA1 of the security parameters based on the third security algorithm.
[0285] The third security algorithm is determined by the HSS based on the authentication vector request message in S507, and is consistent with the third security algorithm in the authentication vector request message.
[0286] The security parameters include a username, password, and realm information for logging into the terminal device.
[0287] For example, when the third security algorithm is SHA256, the HSS calculates three parameters, namely, username, password, and realm information, by using SHA256 (i.e., the third security algorithm), and obtains a hash value HA1 corresponding to SHA256 (i.e., the third security algorithm).
[0288] S509: The HSS sends an authentication vector request response to the S-CSCF network element. In response, the S-CSCF network element receives an authentication vector request response from the HSS.
[0289] The authentication vector request response carries a hash value HA1. The hash value HA1 is the hash value HA1 obtained by the HSS through the calculation in S508. Of course, the authentication vector request response may further include other parameters. For details, please refer to the related description of S122. The details will not be described again here.
[0290] S510: The S-CSCF network element calculates a second authentication response based on a third security algorithm and a hash value HA1 corresponding to the third security algorithm.
[0291] The third security algorithm is a security algorithm determined by the S-CSCF network element based on the second registration request message at S506, and is consistent with the third security algorithm in the second registration request message.
[0292] For example, the third security algorithm is SHA256, and the calculation process of the second authentication response is as follows:
[0293] First, the S-CSCF network element calculates the method and digest-uri by using SHA256 to obtain a hash value HA2.
[0294] The S-CSCF network element then calculates HA1, nonce, nc, cnonce, qop, and HA2 by using SHA256 to obtain a second authentication response.
[0295] S511: The S-CSCF network element checks the first authentication response by using the second authentication response to obtain an authentication result of the terminal device.
[0296] The first authentication response is the first authentication response carried in the second registration request message at S509. The second authentication response is the second authentication response obtained by the S-CSCF network element through calculation at S510.
[0297] For example, when the S-CSCF network element determines that the first authentication response is different from the second authentication response, the S-CSCF network element determines that the authentication for the terminal device has failed. Conversely, when the S-CSCF network element determines that the first authentication response is the same as the second authentication response, the S-CSCF network element determines that the authentication for the terminal device has succeeded, and the S-CSCF network element sends an authentication success message to the terminal device. For details, please refer to the relevant descriptions of S151, S152, and S153. The details will not be described again here.
[0298] In other words, the terminal device can refer to the information about the security algorithm in the authentication challenge request message and the security algorithm supported by the terminal device to determine a security algorithm, i.e., a third security algorithm, and the terminal device calculates a first authentication response by using the third security algorithm. In addition, the terminal device adds the information about the third security algorithm to the second registration request message to indicate the security algorithm supported by the terminal device to the S-CSCF network element. The terminal device and the S-CSCF network element may calculate an authentication response based on the same security algorithm, and the S-CSCF network element checks the first authentication response by using the second authentication response to authenticate the terminal device. This prevents authentication failure caused by using different security algorithms by the terminal device and the S-CSCF network element. For the interaction process between the S-CSCF network element and the HSS, the authentication vector request message carries the security algorithm supported by the terminal device, i.e., the third security algorithm. Therefore, the HSS can provide the S-CSCF network element with a hash value HA1 corresponding to the third security algorithm, so that the S-CSCF network element calculates a second authentication response based on the HA1 of the third security algorithm provided by the HSS network element. For the network side (such as the S-CSCF network element and the HSS), the network side does not need to identify whether the terminal device supports the new security algorithm, and the network side only needs to use the method depicted in Figure 5. This simplifies the implementation process of the network side.
[0299] The above mainly describes the solution provided in the embodiments of this application from the viewpoint of the interaction between network elements. Correspondingly, the embodiments of this application further provide a communication device. The communication device may be a network element in the embodiments of the above method, a device including the above network element, or a component that can be used in the network element. To realize the above functions, it can be understood that the communication device includes a hardware structure and / or a software module for performing the corresponding functions. Those skilled in the art should easily recognize that, in combination with the example units and algorithm steps described in the embodiments disclosed in this specification, this application can be realized by hardware or a combination of hardware and computer software. Whether the functions are performed by hardware or by hardware driven by computer software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to realize the described functions for each specific application, but the implementation should not be considered to go beyond the scope of this application.
[0300] One embodiment of the present application provides a chip, the chip including a logic circuit and an input / output interface, the input / output interface configured to communicate with a module other than the chip, and the logic circuit configured to perform operations other than receiving and transmitting operations in a terminal device in an embodiment of the aforementioned method.
[0301] For example, the chip realizes the functions of the terminal device in FIG. 3 in the embodiment of the aforementioned method. The input / output interface may be configured to perform S301, S305, and S308 at the terminal device side in the embodiment of this application, and / or the input / output interface is further configured to perform other receiving and transmitting steps at the terminal device side in the embodiment of this application. The logic circuit may be configured to perform S306 and S307 at the terminal device side in the embodiment of this application, and / or the logic circuit is further configured to perform other processing steps at the terminal device side in the embodiment of this application.
[0302] In another example, the chip realizes the functions of the terminal device in FIG. 4a (or FIG. 4b) in the embodiment of the aforementioned method. The input / output interface may be configured to perform S401, S405, and S409 at the terminal device side, and / or the input / output interface is further configured to perform other receiving and transmitting steps at the terminal device side in the embodiment of this application. The logic circuit may be configured to perform S406, S407, and S408 at the terminal device side, and / or the logic circuit is further configured to perform other processing steps at the terminal device side in the embodiment of this application.
[0303] In another example, the chip realizes the functions of the terminal device in FIG. 5 in the embodiment of the aforementioned method. The input / output interface may be configured to perform S501, S502, and S506 at the terminal device side, and / or the input / output interface is further configured to perform other receiving and transmitting steps at the terminal device side in the embodiment of this application. The logic circuit may be configured to perform S503, S504, and S505 at the terminal device side, and / or the logic circuit is further configured to perform other processing steps at the terminal device side in the embodiment of this application.
[0304] For example, the chip realizes the function of the serving call session control function network element in FIG. 3 in the embodiment of the above-mentioned method. The input / output interface may be configured to perform S301, S302, S304, S305, and S308 at the serving call session control function network element side in the embodiment of this application, and / or the input / output interface is further configured to perform other receiving and transmitting steps at the serving call session control function network element side in the embodiment of this application. The logic circuit may be configured to perform S309 and S310 at the serving call session control function network element side in the embodiment of this application, and / or the logic circuit is further configured to perform other processing steps at the serving call session control function network element side in the embodiment of this application.
[0305] In another example, the chip realizes the function of the serving call session control function network element in Fig. 4a in the embodiment of the above-mentioned method. The input / output interface may be configured to perform S401, S402, S404, S405, and S409 at the serving call session control function network element side, and / or the input / output interface is further configured to perform other receiving and transmitting steps at the serving call session control function network element side in the embodiment of this application. The logic circuit may be configured to perform S410a, S411, and S412 at the serving call session control function network element side, and / or the logic circuit is further configured to perform other processing steps at the serving call session control function network element side in the embodiment of this application.
[0306] In another example, the chip realizes the function of the serving call session control function network element in Fig. 4b in the embodiment of the above-mentioned method. The input / output interface may be configured to perform S401, S402, S404, S405, and S409 at the serving call session control function network element side, and / or the input / output interface is further configured to perform other receiving and transmitting steps at the serving call session control function network element side in the embodiment of this application. The logic circuit may be configured to perform S410b, S411, and S412 at the serving call session control function network element side, and / or the logic circuit is further configured to perform other processing steps at the serving call session control function network element side in the embodiment of this application.
[0307] In another example, the chip realizes the function of the serving call session control function network element in FIG. 5 in the embodiment of the aforementioned method. The input / output interface may be configured to perform S501, S502, S506, S507, and S509 at the serving call session control function network element side, and / or the input / output interface is further configured to perform other receiving and transmitting steps at the serving call session control function network element side in the embodiment of this application. The logic circuit may be configured to perform S510 and S511 at the serving call session control function network element side, and / or the logic circuit is further configured to perform other processing steps at the serving call session control function network element side in the embodiment of this application.
[0308] For example, the chip realizes the function of the home subscriber server in Fig. 3 in the embodiment of the aforementioned method. The input / output interface may be configured to perform S302 and S304 at the home subscriber server side in the embodiment of this application, and / or the input / output interface is further configured to perform other receiving and transmitting steps at the home subscriber server side in the embodiment of this application. The logic circuit may be configured to perform S303 at the home subscriber server side in the embodiment of this application, and / or the logic circuit is further configured to perform other processing steps at the home subscriber server side in the embodiment of this application.
[0309] In another example, the chip realizes the function of the home subscriber server in Fig. 4a in the embodiment of the aforementioned method. The input / output interface may be configured to perform S402 and S404 at the home subscriber server side, and / or the input / output interface is further configured to perform other receiving and transmitting steps at the home subscriber server side in the embodiment of this application. The logic circuit may be configured to perform S403a at the home subscriber server side, and / or the logic circuit is further configured to perform other processing steps at the home subscriber server side in the embodiment of this application.
[0310] In another example, the chip realizes the function of the home subscriber server in Fig. 4b in the embodiment of the aforementioned method. The input / output interface may be configured to perform S402 and S404 at the home subscriber server side, and / or the input / output interface is further configured to perform other receiving and transmitting steps at the home subscriber server side in the embodiment of this application. The logic circuit may be configured to perform S403b at the home subscriber server side, and / or the logic circuit is further configured to perform other processing steps at the home subscriber server side in the embodiment of this application.
[0311] In another example, the chip realizes the function of the home subscriber server in FIG. 5 in the embodiment of the aforementioned method. The input / output interface may be configured to perform S507 and S509 at the home subscriber server side, and / or the input / output interface is further configured to perform other receiving and transmitting steps at the home subscriber server side in the embodiment of this application. The logic circuit may be configured to perform S508 at the home subscriber server side, and / or the logic circuit is further configured to perform other processing steps at the home subscriber server side in the embodiment of this application.
[0312] 6 is a schematic diagram of the structure of a communication device 600. The communication device 600 may exist in the form of software or may be a device or a component within a device.
[0313] The communication device 600 includes a processing unit 602 , a transmitting unit 603 , and a receiving unit 604 .
[0314] The transmitting unit 603 is an interface circuit of the communication device 600 and is configured to transmit signals to another device. For example, when the communication device 600 is realized in the form of a chip, the transmitting unit 603 is an interface circuit used by the chip to transmit signals to another chip or device.
[0315] The receiving unit 604 is an interface circuit of the communication device 600 and is configured to receive a signal from another device. For example, when the communication device 600 is realized in the form of a chip, the receiving unit 604 is an interface circuit used by the chip to receive a signal from another chip or device.
[0316] For example, when the communication device 600 is configured to realize the functions of the terminal device described above, for example, in FIG. 3, the processing unit 602 may be configured to support the communication device 600 in performing S306 and S307 in FIG. 3 and / or to perform another process in the solution described in this specification. The transmitting unit 603 is configured to support communication between the communication device 600 and another network element. For example, the transmitting unit 603 is configured to support the communication device 600 in performing S301 and S308 in FIG. 3 and / or to perform another process in the solution described in this specification. The receiving unit 604 is configured to support communication between the communication device 600 and another network element. For example, the receiving unit 604 is configured to support the communication device 600 in performing S305 in FIG. 3 and / or to perform another process in the solution described in this specification.
[0317] FIG. 4a (or FIG. 4b) is used as an example. The processing unit 602 may be configured to support the communication device 600 in performing S406, S407, and S408 in FIG. 4a (or FIG. 4b) and / or configured to perform another process in the solution described in this specification. The sending unit 603 is configured to support communication between the communication device 600 and another network element. For example, the sending unit 603 may be configured to support the communication device 600 in performing S401 and S409 in FIG. 4a (or FIG. 4b) and / or configured to perform another process in the solution described in this specification. The receiving unit 604 is configured to support communication between the communication device 600 and another network element. For example, the receiving unit 604 is configured to support the communication device 600 in performing S405 in FIG. 4a (or FIG. 4b) and / or configured to perform another process in the solution described in this specification.
[0318] FIG. 5 is used as an example. The processing unit 602 may be configured to support the communication device 600 in performing S503, S504, and S505 in FIG. 5, and / or configured to perform another process in the solution described in this specification. The sending unit 603 is configured to support communication between the communication device 600 and another network element. For example, the sending unit 603 is configured to support the communication device 600 in performing S501 and S506 in FIG. 5, and / or configured to perform another process in the solution described in this specification. The receiving unit 604 is configured to support communication between the communication device 600 and another network element. For example, the receiving unit 604 is configured to support the communication device 600 in performing S502 in FIG. 5, and / or configured to perform another process in the solution described in this specification.
[0319] For example, when the communication device 600 is configured to realize the functionality of the Serving Call Session Control Function network element described above, for example, in FIG. 3, the processing unit 602 may be configured to support the communication device 600 in performing S309 and S310 in FIG. 3 and / or to perform another process in the solution described in this specification. The transmitting unit 603 is configured to support communication between the communication device 600 and another network element. For example, the transmitting unit 603 is configured to support the communication device 600 in performing S302 in FIG. 3 and / or to perform another process in the solution described in this specification. The receiving unit 604 is configured to support communication between the communication device 600 and another network element. For example, the receiving unit 604 is configured to support the communication device 600 in performing S301, S304, and S308 in FIG. 3 and / or to perform another process in the solution described in this specification.
[0320] FIG. 4a is used as an example. The processing unit 602 may be configured to support the communication device 600 in performing S410a, S411, and S412 in FIG. 4a, and / or configured to perform another process in the solution described in this specification. The sending unit 603 is configured to support communication between the communication device 600 and another network element. For example, the sending unit 603 is configured to support the communication device 600 in performing S402 in FIG. 4a, and / or configured to perform another process in the solution described in this specification. The receiving unit 604 is configured to support communication between the communication device 600 and another network element. For example, the receiving unit 604 is configured to support the communication device 600 in performing S401, S404, and S409 in FIG. 4a, and / or configured to perform another process in the solution described in this specification.
[0321] FIG. 4b is used as an example. The processing unit 602 may be configured to support the communication device 600 in performing S410b, S411, and S412 in FIG. 4b, and / or configured to perform another process in the solution described in this specification. The sending unit 603 is configured to support communication between the communication device 600 and another network element. For example, the sending unit 603 is configured to support the communication device 600 in performing S402 in FIG. 4b, and / or configured to perform another process in the solution described in this specification. The receiving unit 604 is configured to support communication between the communication device 600 and another network element. For example, the receiving unit 604 is configured to support the communication device 600 in performing S401, S404, and S409 in FIG. 4b, and / or configured to perform another process in the solution described in this specification.
[0322] FIG. 5 is used as an example. The processing unit 602 may be configured to support the communication device 600 in performing S510 and S511 in FIG. 5, and / or configured to perform another process in the solution described in this specification. The sending unit 603 is configured to support communication between the communication device 600 and another network element. For example, the sending unit 603 is configured to support the communication device 600 in performing S502 and S507 in FIG. 5, and / or configured to perform another process in the solution described in this specification. The receiving unit 604 is configured to support communication between the communication device 600 and another network element. For example, the receiving unit 604 is configured to support the communication device 600 in performing S501, S506, and S509 in FIG. 5, and / or configured to perform another process in the solution described in this specification.
[0323] For example, when the communication device 600 is configured to realize the functionality of the aforementioned home subscriber server, for example, in FIG. 3, the processing unit 602 may be configured to support the communication device 600 in performing S303 in FIG. 3 and / or to perform another process in the solution described in this specification. The sending unit 603 is configured to support communication between the communication device 600 and another network element. For example, the sending unit 603 is configured to support the communication device 600 in performing S304 in FIG. 3 and / or to perform another process in the solution described in this specification. The receiving unit 604 is configured to support communication between the communication device 600 and another network element. For example, the receiving unit 604 is configured to support the communication device 600 in performing S302 in FIG. 3 and / or to perform another process in the solution described in this specification.
[0324] FIG. 4a is used as an example. The processing unit 602 may be configured to support the communication device 600 in executing S403a in FIG. 4a and / or configured to perform another process in the solution described in this specification. The sending unit 603 is configured to support communication between the communication device 600 and another network element. For example, the sending unit 603 is configured to support the communication device 600 in executing S404 in FIG. 4a and / or configured to perform another process in the solution described in this specification. The receiving unit 604 is configured to support communication between the communication device 600 and another network element. For example, the receiving unit 604 is configured to support the communication device 600 in executing S402 in FIG. 4a and / or configured to perform another process in the solution described in this specification.
[0325] FIG. 4b is used as an example. The processing unit 602 may be configured to support the communication device 600 in executing S403b in FIG. 4b and / or configured to perform another process in the solution described in this specification. The sending unit 603 is configured to support communication between the communication device 600 and another network element. For example, the sending unit 603 is configured to support the communication device 600 in executing S404 in FIG. 4b and / or configured to perform another process in the solution described in this specification. The receiving unit 604 is configured to support communication between the communication device 600 and another network element. For example, the receiving unit 604 is configured to support the communication device 600 in executing S402 in FIG. 4b and / or configured to perform another process in the solution described in this specification.
[0326] FIG. 5 is used as an example. The processing unit 602 may be configured to support the communication device 600 in executing S508 in FIG. 5 and / or configured to perform another process in the solution described in this specification. The sending unit 603 is configured to support communication between the communication device 600 and another network element. For example, the sending unit 603 is configured to support the communication device 600 in executing S509 in FIG. 5 and / or configured to perform another process in the solution described in this specification. The receiving unit 604 is configured to support communication between the communication device 600 and another network element. For example, the receiving unit 604 is configured to support the communication device 600 in executing S507 in FIG. 5 and / or configured to perform another process in the solution described in this specification.
[0327] Optionally, the communication device 600 may further include a storage unit 601 configured to store program codes and data of the communication device 600. The data may include, but is not limited to, original data, intermediate data, or the like.
[0328] The processing unit 602 may be a processor or controller, such as a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. The processing unit 602 may implement or execute various example logic blocks, modules, and circuits described with reference to the disclosed subject matter in this application. Alternatively, the processor may be a combination of processors that implement computing functions, such as a combination of one or more microprocessors, or a combination of a DSP and a microprocessor.
[0329] The transmitting unit 603 and the receiving unit 604 may be a communication interface, a transceiver, a transceiver circuit, or the like. The communication interface is a general term. During specific implementation, the communication interface may include multiple interfaces.
[0330] The storage unit 601 may be a memory.
[0331] When the processing unit 602 includes a processor, the sending unit 603 and the receiving unit 604 include communication interfaces, and the storage unit 601 includes a memory, a communication device 700 in an embodiment of this application may be represented in FIG.
[0332] See Figure 7. The communications device 700 includes at least one processor 702, a transceiver 703, and a memory 701.
[0333] The transceiver 703 may be an independently installed transmitter, which may be configured to transmit information to another device. Alternatively, the transceiver may be an independently installed receiver, which may be configured to receive information from another device. Alternatively, the transceiver may be a component that integrates the functions of transmitting and receiving information. The specific implementation of the transceiver is not limited in this embodiment of this application.
[0334] Optionally, the communication device 700 may further include a bus 704. The transceiver 703, the processor 702, and the memory 701 may be connected to each other through the bus 704. The bus 704 may include a peripheral component interconnect (PCI) bus, an extended industry standard architecture (EISA) bus, or the like. The bus 704 may be classified into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used for representation in FIG. 7, but this does not mean that there is only one bus or only one type of bus.
[0335] Those skilled in the art may understand that all or some of the above-mentioned embodiments may be realized by software, hardware, firmware, or any combination thereof. When software is used to realize the embodiments, all or part of the embodiments may be realized in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed in a computer, the procedures or functions according to the embodiments of this application are generated in whole or in part. The computer may include a general-purpose computer, a special-purpose computer, a computer network, or another programmable device. The computer instructions may be recorded in a computer-readable storage medium or transmitted from a computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center in a wired (e.g., coaxial cable, optical fiber, or digital subscriber line (DSL)) or wireless (e.g., infrared, radio, or microwave) manner. A computer-readable storage medium may include any available medium that can be accessed by a computer, or may be a data storage device, such as a server or data center integrated with one or more available media. The available media may include magnetic media (e.g., floppy disks, hard disks, or magnetic tapes), optical media (e.g., digital video discs (DVDs)), semiconductor media (e.g., solid-state disks (SSDs)), or the like.
[0336] In some embodiments provided in this application, it should be understood that the disclosed system, device, and method can be realized in other manners. For example, the described device embodiment is merely an example. For example, the division into units is merely a logical functional division, and there may be other divisions during actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not implemented. In addition, the shown or discussed mutual couplings or direct couplings or communication connections may be realized by using some interfaces. Indirect couplings or communication connections between devices or units may be realized in electronic or other forms.
[0337] The units described as separate parts may or may not be physically separate, and the parts shown as units may or may not be physical units, and may be located in one location or distributed in multiple network devices. Some or all of the units may be selected based on actual requirements to achieve the objectives of the solutions of the embodiments.
[0338] In addition, the functional units in the embodiments of this application may be integrated into one processing unit, each of the functional units may exist physically alone, or two or more units may be integrated into one unit. The integrated units may be realized as hardware or as a combination of hardware and software functional units.
[0339] Based on the above description of the implementation, those skilled in the art can clearly understand that this application can be realized by software in addition to the required general hardware, or by hardware alone. In most circumstances, the former is the preferred implementation. Based on such understanding, the technical solution of this application or the part that contributes to the prior art can be realized in the form of a software product. The computer software product is stored in a readable storage medium, for example, a computer floppy disk, a hard disk, or an optical disk, and includes some instructions for instructing a computer device (which may include a personal computer, a server, a network device, or the like) to execute the method in the embodiment of this application.
[0340] The above description is merely a specific implementation of this application, but is not intended to limit the protection scope of this application. Any variation or replacement within the technical scope disclosed in this application shall be within the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims. [Explanation of symbols]
[0341] 20 Terminal Devices 21 Network Devices 300 Authentication Method 400 Authentication Method 500 Authentication Method 600 Communication Equipment 602 Processing Unit 603 Transmitter Unit 604 Receiver Unit 700 Communication Equipment 701 Memory 702 Processor 703 Transceiver 704 Bus
Claims
1. An authentication method implemented in a home subscriber server or a chip of the home subscriber server, comprising: receiving an authentication vector request message from a serving call session control function network element; calculating a first hash value of a security parameter based on a first security algorithm; calculating a second hash value of the security parameter based on a second security algorithm; returning an authentication vector request response to the serving call session control function network element, the authentication vector request response carrying the first hash value and the second hash value; Including, 11. The authentication method, wherein the first security algorithm is a Secure Hash Algorithm SHA256 or a Secure Hash Algorithm SHA512, and the second security algorithm is a Message Digest 5 algorithm.
2. 2. The method of claim 1 , wherein the authentication vector request response includes the first hash value and the second hash value conveyed in a preset order, the preset order being determined based on a priority of the first security algorithm and a priority of the second security algorithm.
3. An authentication method implemented in a serving call session control function network element or a chip of the serving call session control function network element, comprising: receiving a first registration request message from a terminal device; sending an authentication vector request message to a home subscriber server; receiving an authentication vector request response returned by the home subscriber server, the authentication vector request response carrying a first hash value and a second hash value, the first hash value being calculated based on a first security algorithm and the second hash value being calculated based on a second security algorithm; sending an authentication challenge request message to the terminal device, the authentication challenge request message carrying information about the first security algorithm and information about the second security algorithm, the first security algorithm being a Secure Hash Algorithm SHA256 or a Secure Hash Algorithm SHA512, and the second security algorithm being a Message Digest 5 algorithm; receiving a second registration request message from the terminal device, the second registration request message including a first authentication response and information about a third security algorithm, the first authentication response being calculated based on the third security algorithm, and the third security algorithm being the first security algorithm or the second security algorithm; selecting a hash value from the first hash value and the second hash value, the hash value corresponding to the third security algorithm; calculating a second authentication response based on the third security algorithm and the hash value corresponding to the third security algorithm; checking the first authentication response by using the second authentication response to obtain an authentication result of the terminal device; Authentication methods, including:
4. the authentication vector request response includes the first hash value and the second hash value conveyed in a preset order, the preset order being determined based on a priority of the first security algorithm and a priority of the second security algorithm; 4. The method of claim 3, wherein the step of selecting a hash value corresponding to the third security algorithm from the first hash value and the second hash value includes the step of selecting the hash value corresponding to the third security algorithm from the first hash value and the second hash value based on the preset order.
5. 5. The method of claim 3, wherein the authentication challenge request message includes the information regarding the first security algorithm and the information regarding the second security algorithm conveyed in a preset order, the preset order being determined based on a priority of the first security algorithm and a priority of the second security algorithm.
6. An authentication method implemented in a terminal device or in a chip of said terminal device, comprising: receiving an authentication challenge request message from a serving call session control function network element, the authentication challenge request message carrying information about a first security algorithm and information about a second security algorithm, the first security algorithm being a Secure Hash Algorithm SHA256 or a Secure Hash Algorithm SHA512, and the second security algorithm being a Message Digest 5 algorithm; determining a third security algorithm, the third security algorithm being the first security algorithm or the second security algorithm; calculating a hash value of a security parameter based on the third security algorithm; calculating an authentication response based on the third security algorithm and the hash value; sending a registration request message to the serving call session control function network element, the registration request message carrying the authentication response and information regarding the third security algorithm, the authentication response being used to authenticate a terminal device; Authentication methods, including:
7. 7. The method of claim 6, wherein the authentication challenge request message includes the information regarding the first security algorithm and the information regarding the second security algorithm conveyed in a preset order, the preset order being determined based on a priority of the first security algorithm and a priority of the second security algorithm.
8. 8. The method of claim 6 or 7, wherein the step of determining a third security algorithm comprises determining, as the third security algorithm, a first security algorithm supported by the terminal device and present in the authentication challenge request message.
9. A communication device for a home subscriber server, comprising: a receiving unit configured to receive an authentication vector request message from a serving call session control function network element; Calculating a first hash value of the security parameter based on a first security algorithm; a processing unit configured to calculate a second hash value of the security parameter based on a second security algorithm; a transmitting unit configured to return an authentication vector request response to the serving call session control function network element, the authentication vector request response carrying the first hash value and the second hash value; Including, The first security algorithm is a Secure Hash Algorithm SHA256 or a Secure Hash Algorithm SHA512, and the second security algorithm is a Message Digest 5 algorithm.
10. 10. The apparatus of claim 9, wherein the authentication vector request response includes the first hash value and the second hash value conveyed in a preset order, the preset order being determined based on a priority of the first security algorithm and a priority of the second security algorithm.
11. A communication device of a serving call session control function network element, comprising: a receiving unit configured to receive a first registration request message from a terminal device; a sending unit configured to send an authentication vector request message to a home subscriber server; Including, The receiving unit is further configured to receive an authentication vector request response returned by the home subscriber server, the authentication vector request response carrying a first hash value and a second hash value, the first hash value being calculated based on a first security algorithm and the second hash value being calculated based on a second security algorithm; The sending unit is further configured to send an authentication challenge request message to the terminal device, the authentication challenge request message carrying information about the first security algorithm and information about the second security algorithm, the first security algorithm being a Secure Hash Algorithm SHA256 or a Secure Hash Algorithm SHA512, and the second security algorithm being a Message Digest 5 algorithm; The receiving unit is further configured to receive a second registration request message from the terminal device, the second registration request message including a first authentication response and information about a third security algorithm, the first authentication response being calculated based on the third security algorithm, and the third security algorithm being the first security algorithm or the second security algorithm; The communication device includes: a processing unit configured to select a hash value from the first hash value and the second hash value, the hash value corresponding to the third security algorithm; The processing unit is further configured to calculate a second authentication response based on the third security algorithm and the hash value corresponding to the third security algorithm; The communication apparatus, wherein the processing unit is further configured to check the first authentication response by using the second authentication response to obtain an authentication result of the terminal device.
12. 12. The apparatus of claim 11, wherein the authentication vector request response includes the first hash value and the second hash value conveyed in a preset order, the preset order being determined based on a priority of the first security algorithm and a priority of the second security algorithm, and the processing unit is specifically configured to select the hash value corresponding to the third security algorithm from the first hash value and the second hash value based on the preset order.
13. 13. The apparatus of claim 11 or 12, wherein the authentication challenge request message includes the information regarding the first security algorithm and the information regarding the second security algorithm conveyed in a preset order, the preset order being determined based on a priority of the first security algorithm and a priority of the second security algorithm.
14. A communication apparatus for a terminal device, comprising: A receiving unit configured to receive an authentication challenge request message from a serving call session control function network element, the authentication challenge request message carrying information about a first security algorithm and information about a second security algorithm, the first security algorithm being a Secure Hash Algorithm SHA256 or a Secure Hash Algorithm SHA512, and the second security algorithm being a Message Digest 5 algorithm; a processing unit configured to determine a third security algorithm, the third security algorithm being the first security algorithm or the second security algorithm; The processing unit is further configured to calculate a hash value of a security parameter based on the third security algorithm; a processing unit, the processing unit further configured to calculate an authentication response based on the third security algorithm and the hash value; a transmission unit configured to transmit a registration request message to the serving call session control function network element, the registration request message carrying the authentication response and information regarding the third security algorithm, the authentication response being used to authenticate the communication device; A communication device comprising:
15. 15. The apparatus of claim 14, wherein the authentication challenge request message includes the information regarding the first security algorithm and the information regarding the second security algorithm conveyed in a preset order, the preset order being determined based on a priority of the first security algorithm and a priority of the second security algorithm.
16. 16. The apparatus of claim 14 or 15, wherein the processing unit is specifically configured to determine a first security algorithm that can be identified by the processing unit as the third security algorithm and that is present in the authentication challenge request message.
17. An authentication method implemented in a terminal device or in a chip of said terminal device, comprising: sending a first registration request message to a serving call session control function network element, the first registration request message carrying information about security algorithms that can be supported by the terminal device, the security algorithms including at least one of the following: a first security algorithm or a second security algorithm, the first security algorithm being a Secure Hash Algorithm SHA256 and the second security algorithm being a Secure Hash Algorithm SHA512; receiving an authentication challenge message from the Serving Call Session Control Function network element, the authentication challenge message including information regarding a third security algorithm, the third security algorithm being one of the security algorithms that can be supported by the terminal device; calculating a hash value of a security parameter based on the third security algorithm; calculating an authentication response based on the third security algorithm and the hash value; sending a second registration request message to the serving call session control function network element, the second registration request message carrying the authentication response and information regarding the third security algorithm, the authentication response being used to authenticate the terminal device; Authentication methods, including:
18. An authentication method implemented in a serving call session control function network element or a chip of the serving call session control function network element, comprising: receiving a first registration request message from a terminal device, the first registration request message including information about security algorithms that can be supported by the terminal device, the security algorithms including at least one of the following: a first security algorithm or a second security algorithm, the first security algorithm being a Secure Hash Algorithm SHA256 and the second security algorithm being a Secure Hash Algorithm SHA512; sending an authentication vector request message to a home subscriber server, the authentication vector request message including the information regarding the security algorithms that can be supported by the terminal device; receiving an authentication vector request response returned by the home subscriber server, the authentication vector request response including a hash value and information about a third security algorithm, the hash value being obtained through a calculation based on the third security algorithm, the third security algorithm being one of the security algorithms that can be supported by the terminal device; sending an authentication challenge message to the terminal device, the authentication challenge message including the information regarding the third security algorithm; receiving a second registration request message from the terminal device, the second registration request message carrying a first authentication response; calculating a second authentication response based on the third security algorithm and the hash value; checking the first authentication response by using the second authentication response to obtain an authentication result of the terminal device; Authentication methods, including:
19. An authentication method implemented in a home subscriber server or in a chip of said home subscriber server, comprising: receiving an authentication vector request message from a serving call session control function network element, the authentication vector request message including information about security algorithms that can be supported by the terminal device, the security algorithms including at least one of the following: a first security algorithm or a second security algorithm, the first security algorithm being a Secure Hash Algorithm SHA256 and the second security algorithm being a Secure Hash Algorithm SHA512; calculating a hash value of a security parameter based on a third security algorithm, the third security algorithm being one of the security algorithms that can be supported by the terminal device; returning an authentication vector request response to the Serving Call Session Control Function network element, the authentication vector request response carrying the hash value and information regarding the third security algorithm; Authentication methods, including:
20. A communication apparatus for a terminal device, comprising: a sending unit configured to send a first registration request message to a serving call session control function network element, the first registration request message carrying information about security algorithms that can be supported by the communication device, the security algorithms including at least one of the following: a first security algorithm or a second security algorithm, the first security algorithm being a Secure Hash Algorithm SHA256 and the second security algorithm being a Secure Hash Algorithm SHA512; a receiving unit configured to receive an authentication challenge message from the Serving Call Session Control Function network element, the authentication challenge message including information about a third security algorithm, the third security algorithm being one of the security algorithms that can be supported by the communication device; and a processing unit configured to calculate a hash value of a security parameter based on the third security algorithm; Including, the processing unit is further configured to calculate an authentication response based on the third security algorithm and the hash value; The communication device, wherein the transmitting unit is further configured to transmit a second registration request message to the serving call session control function network element, the second registration request message carrying the authentication response, the authentication response being used to authenticate the communication device.
21. A communication device of a serving call session control function network element, comprising: a receiving unit configured to receive a first registration request message from a terminal device, the first registration request message including information about a security algorithm that can be supported by the terminal device, the security algorithm including at least one of the following: a first security algorithm or a second security algorithm, the first security algorithm being a Secure Hash Algorithm SHA256 and the second security algorithm being a Secure Hash Algorithm SHA512; a sending unit configured to send an authentication vector request message to a home subscriber server, the authentication vector request message including the information on the security algorithms that can be supported by the terminal device; Including, The receiving unit is further configured to receive an authentication vector request response returned by the home subscriber server, the authentication vector request response including a hash value and information about a third security algorithm, the hash value being obtained through calculation based on the third security algorithm, and the third security algorithm being one of the security algorithms that can be supported by the terminal device; The sending unit is further configured to send an authentication challenge message to the terminal device, the authentication challenge message including the information about the third security algorithm; The receiving unit is further configured to receive a second registration request message from the terminal device, the second registration request message carrying a first authentication response; The communication device includes: a processing unit configured to calculate a second authentication response based on the third security algorithm and the hash value; The communication apparatus, wherein the processing unit is further configured to check the first authentication response by using the second authentication response to obtain an authentication result of the terminal device.
22. A communication device for a home subscriber server, comprising: a receiving unit configured to receive an authentication vector request message from a serving call session control function network element, the authentication vector request message including information about security algorithms that can be supported by a terminal device, the security algorithms including at least one of the following: a first security algorithm or a second security algorithm, the first security algorithm being a Secure Hash Algorithm SHA256 and the second security algorithm being a Secure Hash Algorithm SHA512; a processing unit configured to calculate a hash value of a security parameter based on a third security algorithm, the third security algorithm being one of the security algorithms that can be supported by the terminal device; a sending unit configured to return an authentication vector request response to the serving call session control function network element, the authentication vector request response carrying the hash value and information regarding the third security algorithm; A communication device comprising:
23. A communications device comprising a processor and a transceiver, wherein the processor is configured to perform processing operations in the method of any one of claims 1 to 8 and the transceiver is configured to perform communication operations in the method of any one of claims 1 to 8, or wherein the processor is configured to perform processing operations in the method of any one of claims 17 to 19 and the transceiver is configured to perform communication operations in the method of any one of claims 17 to 19.
24. 20. A computer readable storage medium storing computer instructions, which when executed in a computer enable the computer to perform the method according to any one of claims 1 to 8, or enable the computer to perform the method according to any one of claims 17 to 19.
25. A computer program, when said computer program runs on a computer, enabling said computer to carry out the method according to any one of claims 1 to 8, or enabling said computer to carry out the method according to any one of claims 17 to 19.
26. A chip comprising a processing circuit and a transceiver pin, the processing circuit configured to perform a processing operation in a method according to any one of claims 1 to 8, and the transceiver pin configured to perform a communication operation in a method according to any one of claims 1 to 8, or the processing circuit configured to perform a processing operation in a method according to any one of claims 17 to 19, and the transceiver pin configured to perform a communication operation in a method according to any one of claims 17 to 19.
27. 1. An authentication method, comprising: receiving, by a serving call session control function network element, a first registration request message from a terminal device; sending, by the Serving Call Session Control Function network element, an authentication vector request message to a Home Subscriber Server; receiving, by the Home Subscriber Server, the authentication vector request message; calculating, by the home subscriber server, a first hash value of security parameters based on a first security algorithm; calculating, by the home subscriber server, a second hash value of the security parameters based on a second security algorithm; returning, by the Home Subscriber Server, an authentication vector request response to the Serving Call Session Control Function network element, the authentication vector request response carrying the first hash value and the second hash value; receiving, by the Serving Call Session Control Function network element, the authentication vector request response returned by the Home Subscriber Server; sending, by the Serving Call Session Control Function network element, an authentication challenge request message to the terminal device, the authentication challenge request message carrying information about the first security algorithm and information about the second security algorithm, the first security algorithm being a Secure Hash Algorithm SHA256 or a Secure Hash Algorithm SHA512, and the second security algorithm being a Message Digest 5 algorithm; receiving, by the serving call session control function network element, a second registration request message from the terminal device, the second registration request message including a first authentication response and information regarding a third security algorithm, the first authentication response being calculated based on the third security algorithm, and the third security algorithm being the first security algorithm or the second security algorithm; selecting, by the serving call session control function network element, from the first hash value and the second hash value, a hash value corresponding to the third security algorithm; calculating, by the serving call session control function network element, a second authentication response based on the third security algorithm and the hash value corresponding to the third security algorithm; checking, by the serving call session control function network element, the first authentication response by using the second authentication response to obtain an authentication result of the terminal device; Authentication methods, including:
28. 28. The method of claim 27, wherein the authentication vector request response includes the first hash value and the second hash value conveyed in a preset order, the preset order being determined based on a priority of the first security algorithm and a priority of the second security algorithm.
29. the authentication vector request response includes the first hash value and the second hash value conveyed in a preset order, the preset order being determined based on a priority of the first security algorithm and a priority of the second security algorithm; 29. The method of claim 27 or 28, wherein the step of selecting, by the serving call session control function network element, from the first hash value and the second hash value, a hash value corresponding to the third security algorithm, comprises a step of selecting, by the serving call session control function network element, from the first hash value and the second hash value, the hash value corresponding to the third security algorithm based on the preset order from the first hash value and the second hash value.
30. 30. The method of claim 27, 28, or 29, wherein the authentication challenge request message includes the information regarding the first security algorithm and the information regarding the second security algorithm conveyed in a preset order, the preset order being determined based on a priority of the first security algorithm and a priority of the second security algorithm.
31. sending, by the terminal device, the first registration request message to the serving call session control function network element; receiving, by the terminal device, the authentication challenge request message; determining, by the terminal device, the third security algorithm; calculating, by the terminal device, the hash value of the security parameters based on the third security algorithm; calculating, by the terminal device, the first authentication response based on the third security algorithm and the hash value; sending, by the terminal device, the second registration request message to the serving call session control function network element; 31. The method of any one of claims 27 to 30, further comprising:
32. 32. The method of claim 31, wherein the step of determining, by the terminal device, the third security algorithm comprises determining, by the terminal device, a first security algorithm that is capable of being identified by the terminal device as the third security algorithm and that is within the authentication challenge request message.
33. A wireless communication system comprising a communication device according to any one of claims 9 to 10 and a communication device according to any one of claims 11 to 13 or a communication device according to claim 20 or 21.
34. 34. The system of claim 33, further comprising a communication device according to any one of claims 14 to 16 or a communication device according to claim 22.
Citation Information
Patent Citations
media security for ims sessions
JP2009543453A
Enables the selection of appropriate security algorithms for secure network connections.
JP2012531792A
A method for managing access to a service
JP2018516403A