[go: up one dir, main page]

CN118803751A - Authentication method, device, network equipment and storage medium - Google Patents

Authentication method, device, network equipment and storage medium Download PDF

Info

Publication number
CN118803751A
CN118803751A CN202311006119.5A CN202311006119A CN118803751A CN 118803751 A CN118803751 A CN 118803751A CN 202311006119 A CN202311006119 A CN 202311006119A CN 118803751 A CN118803751 A CN 118803751A
Authority
CN
China
Prior art keywords
parameter
cryptographic algorithm
authentication
target
cryptographic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311006119.5A
Other languages
Chinese (zh)
Inventor
彭华熹
张艳
张杨
李邦灵
马爱良
张媞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
Research Institute of China Mobile Communication Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
Research Institute of China Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, Research Institute of China Mobile Communication Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202311006119.5A priority Critical patent/CN118803751A/en
Publication of CN118803751A publication Critical patent/CN118803751A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/14Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • H04W12/041Key generation or derivation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • H04W12/068Authentication using credential vaults, e.g. password manager applications or one time password [OTP] applications

Landscapes

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

Abstract

本发明提供一种认证鉴权方法、装置、网络设备及存储介质。该方法包括:获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,第一参数用于指示相应第二设备所支持的密码算法;根据第一设备所支持的密码算法和/或所述第一参数,确定目标密码算法;根据目标密码算法,执行网络认证鉴权和/或密钥推衍的相关操作。采用该方法,根据所获取的至少一第二设备的第一参数,确定相应第二设备所支持的密码算法,第一设备可以自适应判断所采用的密码算法,以兼容不同密码算法,实现不同密码算法的互联互通需求。

The present invention provides an authentication method, device, network device and storage medium. The method includes: obtaining a first parameter of at least one second device used for performing network authentication and/or key derivation on a terminal, the first parameter being used to indicate the cryptographic algorithm supported by the corresponding second device; determining a target cryptographic algorithm according to the cryptographic algorithm supported by the first device and/or the first parameter; and performing related operations of network authentication and/or key derivation according to the target cryptographic algorithm. Using this method, the cryptographic algorithm supported by the corresponding second device is determined according to the first parameter of the at least one second device obtained, and the first device can adaptively determine the cryptographic algorithm used to be compatible with different cryptographic algorithms and realize the interconnection requirements of different cryptographic algorithms.

Description

认证鉴权方法、装置、网络设备及存储介质Authentication method, device, network equipment and storage medium

技术领域Technical Field

本发明涉及无线技术领域,尤其是指一种认证鉴权方法、装置、网络设备及存储介质。The present invention relates to the field of wireless technology, and in particular to an authentication method, device, network equipment and storage medium.

背景技术Background Art

随着互联网技术快速发展,信息系统的网络安全风险持续增加,威胁挑战日益严峻,密码安全是信息安全的重要基础,可以用于有效保障网络信息系统的数据安全,我国商用密码算法(以下可以简称商密算法)是保障网络信息系统的核心技术和重要手段。With the rapid development of Internet technology, the network security risks of information systems continue to increase, and the threat challenges are becoming increasingly severe. Cryptographic security is an important foundation for information security and can be used to effectively protect the data security of network information systems. my country's commercial cryptographic algorithms (hereinafter referred to as commercial cryptographic algorithms) are the core technologies and important means to protect network information systems.

目前5G通信网络鉴权协议中采用的是国际密码算法,不能兼容商密算法,认证网元无法实现采用商密算法和国际算法的互联互通,这样支持商密的终端漫游到不支持商密的服务网络下,由于算法不兼容无法完成网络鉴权。Currently, the 5G communication network authentication protocol uses an international cryptographic algorithm, which is not compatible with commercial encryption algorithms. Authentication network elements cannot achieve interoperability between commercial encryption algorithms and international algorithms. As a result, when a terminal that supports commercial encryption roams to a service network that does not support commercial encryption, network authentication cannot be completed due to algorithm incompatibility.

发明内容Summary of the invention

本发明技术方案的目的在于提供一种认证鉴权方法、装置、网络设备及存储介质,用于根据网络和终端的状态,自适应兼容不同密码算法,实现不同密码算法的互联互通需求。The technical solution of the present invention aims to provide an authentication method, device, network equipment and storage medium, which are used to adaptively be compatible with different cryptographic algorithms according to the status of the network and the terminal, and realize the interconnection and interoperability requirements of different cryptographic algorithms.

本发明其中一实施例提供一种认证鉴权方法,其中,由第一设备执行,所述方法包括:One embodiment of the present invention provides an authentication method, wherein the method is performed by a first device and includes:

获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,所述第一参数用于指示相应所述第二设备所支持的密码算法;Acquire a first parameter of at least one second device used for performing network authentication and/or key derivation on the terminal, wherein the first parameter is used to indicate a cryptographic algorithm supported by the corresponding second device;

根据所述第一设备所支持的密码算法和/或所述第一参数,确定目标密码算法;Determining a target cryptographic algorithm according to the cryptographic algorithms supported by the first device and/or the first parameters;

根据所述目标密码算法,执行网络认证鉴权和/或密钥推衍的相关操作。According to the target cryptographic algorithm, network authentication and/or key derivation related operations are performed.

可选地,所述的认证鉴权方法,其中,根据所述第一设备所支持的密码算法和/或所述第一参数,确定目标密码算法,包括:Optionally, the authentication method, wherein determining a target cryptographic algorithm according to a cryptographic algorithm supported by the first device and/or the first parameter, includes:

在根据所述第一设备所支持的密码算法,确定所述第一设备不支持商用密码算法的情况下,确定所述目标密码算法为国际密码算法;If it is determined that the first device does not support a commercial cryptographic algorithm according to the cryptographic algorithms supported by the first device, determining that the target cryptographic algorithm is an international cryptographic algorithm;

在所述第一设备所支持的密码算法包括商用密码算法的情况下,根据所述第一参数,确定所述目标密码算法。In the case that the cryptographic algorithms supported by the first device include commercial cryptographic algorithms, the target cryptographic algorithm is determined according to the first parameters.

可选地,所述的认证鉴权方法,其中,所述至少一第二设备包括以下的一项或多项:Optionally, in the authentication method, the at least one second device includes one or more of the following:

移动设备ME、全球用户识别卡USIM和安全锚点功能SEAF。Mobile equipment ME, Universal Subscriber Identity Module USIM and Security Anchor Function SEAF.

可选地,所述的认证鉴权方法,其中,获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,包括以下至少一项:Optionally, in the authentication method, obtaining a first parameter of at least one second device for performing network authentication and/or key derivation on the terminal includes at least one of the following:

获取终端进行网络认证鉴权和/或密钥推衍过程中第三设备发送的第一消息,其中所述第一消息中包括至少一所述第二设备的第一参数;Acquire a first message sent by a third device during a process of performing network authentication and/or key derivation on a terminal, wherein the first message includes at least one first parameter of the second device;

根据所述第二设备的签约数据,获得所述第二设备的第一参数。A first parameter of the second device is obtained according to the subscription data of the second device.

可选地,所述的认证鉴权方法,其中,所述第一设备为统一数据管理功能UDM或认证凭证存储库和处理功能ARPF时,所述第三设备包括AUSF,所述第二设备包括ME、USIM和SEAF中的至少一个;Optionally, in the authentication method, when the first device is a unified data management function UDM or an authentication credential repository and processing function ARPF, the third device includes an AUSF, and the second device includes at least one of an ME, a USIM and a SEAF;

其中,获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,包括以下中的至少一个:Wherein, obtaining a first parameter of at least one second device for performing network authentication and/or key derivation on the terminal includes at least one of the following:

获取所述AUSF发送的第一消息,所述第一消息中包括ME和/或SEAF的第一参数;Obtaining a first message sent by the AUSF, where the first message includes a first parameter of the ME and/or the SEAF;

根据所述USIM的签约数据,获得所述USIM的第一参数。A first parameter of the USIM is obtained according to the subscription data of the USIM.

可选地,所述的认证鉴权方法,其中,所述第一设备为AUSF时,所述第三设备包括UDM、ARPF和/或SEAF,所述第二设备包括ME、USIM和SEAF中的至少一个;Optionally, in the authentication method, when the first device is an AUSF, the third device includes a UDM, an ARPF and/or a SEAF, and the second device includes at least one of a ME, a USIM and a SEAF;

其中,获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,包括以下中的至少一个:Wherein, obtaining a first parameter of at least one second device for performing network authentication and/or key derivation on the terminal includes at least one of the following:

获取SEAF发送的一个第一消息,所述一个第一消息中包括ME的第一参数和SEAF的第一参数;Acquire a first message sent by SEAF, wherein the first message includes a first parameter of ME and a first parameter of SEAF;

获取UDM或ARPF发送的另一个第一消息,所述另一个第一消息中包括USIM的第一参数。Another first message sent by the UDM or the ARPF is acquired, where the another first message includes a first parameter of the USIM.

可选地,所述的认证鉴权方法,其中,所述第一设备为SEAF时,所述第三设备包括ME和/或AUSF,所述第二设备包括ME和USIM中的至少一个;Optionally, in the authentication method, when the first device is a SEAF, the third device includes a ME and/or an AUSF, and the second device includes at least one of a ME and a USIM;

其中,获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,包括以下中的至少一个:Wherein, obtaining a first parameter of at least one second device for performing network authentication and/or key derivation on the terminal includes at least one of the following:

获取ME发送的一个第一消息,所述一个第一消息中包括ME的第一参数;Acquire a first message sent by the ME, where the first message includes a first parameter of the ME;

获取AUSF发送的另一个第一消息,所述另一个第一消息中包括USIM的第一参数。Obtain another first message sent by the AUSF, wherein the another first message includes a first parameter of the USIM.

可选地,所述的认证鉴权方法,其中,所述第一设备为ME时,所述第三设备包括SEAF,所述第二设备包括SEAF和USIM中的至少一个;Optionally, in the authentication method, when the first device is a ME, the third device includes a SEAF, and the second device includes at least one of a SEAF and a USIM;

其中,获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,包括:Wherein, obtaining a first parameter of at least one second device for performing network authentication and/or key derivation on the terminal includes:

获取SEAF发送的第一消息,所述第一消息中包括SEAF的第一参数和USIM的第一参数。A first message sent by SEAF is obtained, where the first message includes a first parameter of SEAF and a first parameter of USIM.

可选地,所述的认证鉴权方法,其中,所述方法还包括:Optionally, the authentication method further comprises:

向第四设备发送第二消息,其中所述第二消息中包括所述第一设备的第一参数和/或至少一所述第二设备的第一参数。A second message is sent to a fourth device, wherein the second message includes a first parameter of the first device and/or at least one first parameter of the second device.

可选地,所述的认证鉴权方法,其中,在所述第一设备所支持的密码算法包括商用密码算法的情况下,所述第二消息中包括所述第一设备的第一参数和/或至少一所述第二设备的第一参数。Optionally, in the authentication method, when the cryptographic algorithm supported by the first device includes a commercial cryptographic algorithm, the second message includes a first parameter of the first device and/or at least one first parameter of the second device.

可选地,所述的认证鉴权方法,其中,所述第一设备为统一数据管理功能UDM或认证凭证存储库和处理功能ARPF,所述至少一第二设备的第一参数包括USIM的第一参数和ME的第一参数;Optionally, in the authentication method, the first device is a unified data management function UDM or an authentication credential repository and processing function ARPF, and the first parameter of the at least one second device includes a first parameter of a USIM and a first parameter of a ME;

在所述第一设备所支持的密码算法包括商用密码算法的情况下,根据所述第一参数,确定所述目标密码算法,包括:In a case where the cryptographic algorithm supported by the first device includes a commercial cryptographic algorithm, determining the target cryptographic algorithm according to the first parameter includes:

在所述USIM的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第一目标密码算法为商用密码算法,所述第一目标密码算法用于计算终端进行网络认证鉴权的认证向量;在所述ME的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第二目标密码算法为商用密码算法,否则确定所述目标密码算法中的第二目标密码算法为国际密码算法;所述第二目标密码算法用于计算终端进行网络认证鉴权的鉴权参数;In the first parameter of the USIM, if the supported cryptographic algorithms include commercial cryptographic algorithms, a first target cryptographic algorithm in the target cryptographic algorithms is determined to be a commercial cryptographic algorithm, and the first target cryptographic algorithm is used to calculate the authentication vector for the terminal to perform network authentication and authorization; in the first parameter of the ME, if the supported cryptographic algorithms include commercial cryptographic algorithms, a second target cryptographic algorithm in the target cryptographic algorithms is determined to be a commercial cryptographic algorithm, otherwise, the second target cryptographic algorithm in the target cryptographic algorithms is determined to be an international cryptographic algorithm; the second target cryptographic algorithm is used to calculate the authentication parameters for the terminal to perform network authentication and authorization;

在所述USIM的第一参数中,所支持的密码算法包括国际密码算法的情况下,确定所述目标密码算法中的所述第一目标密码算法和所述第二目标算法分别为国际密码算法。In the first parameter of the USIM, when the supported cryptographic algorithms include international cryptographic algorithms, it is determined that the first target cryptographic algorithm and the second target cryptographic algorithm in the target cryptographic algorithms are international cryptographic algorithms respectively.

可选地,所述的认证鉴权方法,其中,所述第一设备为AUSF,所述至少一第二设备的第一参数包括USIM的第一参数、ME的第一参数和SEAF的第一参数;Optionally, in the authentication method, the first device is an AUSF, and the first parameter of the at least one second device includes a first parameter of a USIM, a first parameter of a ME, and a first parameter of a SEAF;

在所述第一设备所支持的密码算法包括商用密码算法的情况下,根据所述第一参数,确定所述目标密码算法,包括:In a case where the cryptographic algorithm supported by the first device includes a commercial cryptographic algorithm, determining the target cryptographic algorithm according to the first parameter includes:

在所述USIM的第一参数和所述SEAF的第一参数中,所支持的密码算法均包括商用密码算法的情况下,则确定所述目标密码算法中的第三目标密码算法为商用密码算法;在所述USIM的第一参数和所述SEAF的第一参数中,所支持的密码算法任一个不包括商用密码算法的情况下,则确定所述目标密码算法中的第三目标密码算法为国际密码算法;所述第三目标密码算法用于计算第一鉴权参数;In the case where the cryptographic algorithms supported in the first parameter of the USIM and the first parameter of the SEAF both include commercial cryptographic algorithms, a third target cryptographic algorithm in the target cryptographic algorithms is determined to be a commercial cryptographic algorithm; in the case where any of the cryptographic algorithms supported in the first parameter of the USIM and the first parameter of the SEAF does not include a commercial cryptographic algorithm, the third target cryptographic algorithm in the target cryptographic algorithms is determined to be an international cryptographic algorithm; the third target cryptographic algorithm is used to calculate the first authentication parameter;

在所述USIM的第一参数和所述ME的第一参数中,所支持的密码算法均包括商用密码算法的情况下,则确定所述目标密码算法中的第四目标密码算法为商用密码算法;在所述USIM的第一参数和所述ME的第一参数中,所支持的密码算法任一个不包括商用密码算法的情况下,则确定所述目标密码算法中的第四目标密码算法为国际密码算法;所述第四目标密码算法用于计算第二鉴权参数。In the first parameter of the USIM and the first parameter of the ME, when the supported cryptographic algorithms both include commercial cryptographic algorithms, the fourth target cryptographic algorithm among the target cryptographic algorithms is determined to be a commercial cryptographic algorithm; in the first parameter of the USIM and the first parameter of the ME, when any of the supported cryptographic algorithms does not include a commercial cryptographic algorithm, the fourth target cryptographic algorithm among the target cryptographic algorithms is determined to be an international cryptographic algorithm; the fourth target cryptographic algorithm is used to calculate the second authentication parameter.

可选地,所述的认证鉴权方法,其中,所述第一设备为ME,所述至少一第二设备的第一参数包括USIM的第一参数和/或SEAF的第一参数;Optionally, in the authentication method, the first device is a ME, and the first parameter of the at least one second device includes a first parameter of a USIM and/or a first parameter of a SEAF;

根据所述第一设备所支持的密码算法,确定目标密码算法,包括:Determining a target cryptographic algorithm according to the cryptographic algorithms supported by the first device includes:

在所述USIM的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第五目标密码算法为商用密码算法,否则确定所述目标密码算法中的第五目标密码算法为国际密码算法;所述第五目标密码算法用于计算终端第三鉴权参数;In the first parameter of the USIM, if the supported cryptographic algorithm includes a commercial cryptographic algorithm, determining that a fifth target cryptographic algorithm in the target cryptographic algorithm is a commercial cryptographic algorithm, otherwise determining that the fifth target cryptographic algorithm in the target cryptographic algorithm is an international cryptographic algorithm; the fifth target cryptographic algorithm is used to calculate a third authentication parameter of the terminal;

在所述SEAF的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第六目标密码算法为商用密码算法,否则确定所述目标密码算法中的第六目标密码算法为国际密码算法;所述第六目标密码算法用于计算第四鉴权参数。In the first parameter of the SEAF, when the supported cryptographic algorithms include commercial cryptographic algorithms, the sixth target cryptographic algorithm among the target cryptographic algorithms is determined to be a commercial cryptographic algorithm; otherwise, the sixth target cryptographic algorithm among the target cryptographic algorithms is determined to be an international cryptographic algorithm; the sixth target cryptographic algorithm is used to calculate the fourth authentication parameter.

可选地,所述的认证鉴权方法,其中,所述方法还包括:Optionally, the authentication method further comprises:

在所获取的至少一第二设备的第一参数中不包括所述USIM的第一参数的情况下,调用所述USIM的算法支持状态查询接口,生成所述USIM的第一参数。In a case where the acquired first parameters of at least one second device do not include the first parameters of the USIM, an algorithm support status query interface of the USIM is called to generate the first parameters of the USIM.

可选地,所述的认证鉴权方法,其中,所述第一设备为SEAF,所述至少一第二设备的第一参数包括USIM的第一参数和/或ME的第一参数;Optionally, in the authentication method, the first device is a SEAF, and the first parameter of the at least one second device includes a first parameter of a USIM and/or a first parameter of a ME;

根据所述第一设备所支持的密码算法,确定目标密码算法,包括:Determining a target cryptographic algorithm according to the cryptographic algorithms supported by the first device includes:

在所述USIM的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第七目标密码算法为商用密码算法;否则,确定所述目标密码算法中的第七目标密码算法为国际密码算法;所述第七目标密码算法用于计算第五鉴权参数;In the first parameter of the USIM, when the supported cryptographic algorithms include commercial cryptographic algorithms, determining that a seventh target cryptographic algorithm in the target cryptographic algorithms is a commercial cryptographic algorithm; otherwise, determining that the seventh target cryptographic algorithm in the target cryptographic algorithms is an international cryptographic algorithm; the seventh target cryptographic algorithm is used to calculate a fifth authentication parameter;

在所述ME的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第八目标密码算法为商用密码算法;否则,确定所述目标密码算法中的第八目标密码算法为国际密码算法;所述第八目标密码算法用于计算第六鉴权参数。In the first parameter of the ME, if the supported cryptographic algorithms include commercial cryptographic algorithms, the eighth target cryptographic algorithm among the target cryptographic algorithms is determined to be a commercial cryptographic algorithm; otherwise, the eighth target cryptographic algorithm among the target cryptographic algorithms is determined to be an international cryptographic algorithm; the eighth target cryptographic algorithm is used to calculate the sixth authentication parameter.

可选地,所述的认证鉴权方法,其中,所述第一设备为SEAF,根据所述第一设备所支持的密码算法,确定目标密码算法,包括:Optionally, in the authentication method, wherein the first device is a SEAF, determining a target cryptographic algorithm according to cryptographic algorithms supported by the first device includes:

在所述第一设备所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法为商用密码算法;In a case where the cryptographic algorithms supported by the first device include commercial cryptographic algorithms, determining that the target cryptographic algorithm is a commercial cryptographic algorithm;

在所述第一设备所支持的密码算法不包括商用密码算法的情况下,确定所述目标密码算法为国际密码算法。In a case where the cryptographic algorithms supported by the first device do not include commercial cryptographic algorithms, the target cryptographic algorithm is determined to be an international cryptographic algorithm.

可选地,所述的认证鉴权方法,其中,所述第一参数包括预设指示位,用于指示相应的第二设备是否支持商用密码算法。Optionally, in the authentication method, the first parameter includes a preset indication bit for indicating whether the corresponding second device supports a commercial cryptographic algorithm.

可选地,所述的认证鉴权方法,其中,所述第一参数包括以下的一项或多项:Optionally, in the authentication method, the first parameter includes one or more of the following:

第一位数组,包括多个第一指示位,每一第一指示位对应一种类型加密密码算法,用于指示第二设备是否支持相应类型的加密密码算法;a first bit array, comprising a plurality of first indicator bits, each first indicator bit corresponding to a type of encryption cryptographic algorithm, and used to indicate whether the second device supports the corresponding type of encryption cryptographic algorithm;

第二位数组,包括多个第二指示位,每一第二指示位对应一种类型的哈希算法,用于指示第二设备是否支持相应类型的哈希算法。The second bit array includes multiple second indicator bits, each second indicator bit corresponds to a type of hash algorithm, and is used to indicate whether the second device supports the corresponding type of hash algorithm.

可选地,所述的认证鉴权方法,其中,所述第一参数包括在所述第一消息中的预留字段中,或者所述第一参数为所述第一消息中的增设参数。Optionally, in the authentication method, the first parameter is included in a reserved field in the first message, or the first parameter is an additional parameter in the first message.

可选地,所述的认证鉴权方法,其中,所述第一参数包括在所述第一消息中的认证管理字段AMF中。Optionally, in the authentication and authorization method, the first parameter is included in the authentication management field AMF in the first message.

本发明其中一实施例还提供一种认证鉴权方法,其中,由第三设备执行,所述方法包括:One embodiment of the present invention further provides an authentication method, wherein the method is performed by a third device and includes:

在对终端进行网络认证鉴权和/或密钥推衍过程中,向第一设备发送第一消息;其中,所述第一消息中包括至少一第二设备的第一参数;所述第一参数用于指示相应所述第二设备所支持的密码算法。During the process of network authentication and/or key derivation of a terminal, a first message is sent to a first device; wherein the first message includes a first parameter of at least one second device; the first parameter is used to indicate the cryptographic algorithm supported by the corresponding second device.

可选地,所述的认证鉴权方法,其中,所述第一设备为统一数据管理功能UDM或认证凭证存储库和处理功能ARPF,所述第三设备包括AUSF,所述第二设备包括ME和SEAF中的至少一个。Optionally, in the authentication and authorization method, the first device is a unified data management function UDM or an authentication credential repository and processing function ARPF, the third device includes AUSF, and the second device includes at least one of ME and SEAF.

可选地,所述的认证鉴权方法,其中,所述第一设备为AUSF,所述第三设备为SEAF,所述第二设备包括ME和SEAF中的至少一个;或者Optionally, in the authentication method, the first device is an AUSF, the third device is a SEAF, and the second device includes at least one of a ME and a SEAF; or

所述第一设备为AUSF,所述第三设备为UDM或ARPF,所述第二设备包括USIM。The first device is an AUSF, the third device is an UDM or an ARPF, and the second device includes a USIM.

可选地,所述的认证鉴权方法,其中,所述第一设备为SEAF,所述第三设备为ME,所述第二设备包括ME;或者Optionally, in the authentication method, the first device is a SEAF, the third device is a ME, and the second device includes the ME; or

所述第一设备为SEAF,所述第三设备为AUSF,所述第二设备包括USIM。The first device is a SEAF, the third device is an AUSF, and the second device includes a USIM.

可选地,所述的认证鉴权方法,其中,所述第一设备为ME,所述第三设备包括SEAF,所述第二设备包括SEAF和USIM中的至少一个。Optionally, in the authentication method, the first device is a ME, the third device includes a SEAF, and the second device includes at least one of a SEAF and a USIM.

可选地,所述的认证鉴权方法,其中,所述第一参数包括预设指示位,用于指示相应的第二设备是否支持商用密码算法。Optionally, in the authentication method, the first parameter includes a preset indication bit for indicating whether the corresponding second device supports a commercial cryptographic algorithm.

可选地,所述的认证鉴权方法,其中,所述第一参数包括以下的一项或多项:Optionally, in the authentication method, the first parameter includes one or more of the following:

第一位数组,包括多个第一指示位,每一第一指示位对应一种类型加密密码算法,用于指示第二设备是否支持相应类型的加密密码算法;a first bit array, comprising a plurality of first indicator bits, each first indicator bit corresponding to a type of encryption cryptographic algorithm, and used to indicate whether the second device supports the corresponding type of encryption cryptographic algorithm;

第二位数组,包括多个第二指示位,每一第二指示位对应一种类型的哈希算法,用于指示第二设备是否支持相应类型的哈希算法。The second bit array includes multiple second indicator bits, each second indicator bit corresponds to a type of hash algorithm, and is used to indicate whether the second device supports the corresponding type of hash algorithm.

本发明其中一实施例还提供一种网络设备,其中,所述网络设备为第一设备,包括处理器,其中,所述处理器用于:One embodiment of the present invention further provides a network device, wherein the network device is a first device, comprising a processor, wherein the processor is used to:

获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,所述第一参数用于指示相应所述第二设备所支持的密码算法;Acquire a first parameter of at least one second device used for performing network authentication and/or key derivation on the terminal, wherein the first parameter is used to indicate a cryptographic algorithm supported by the corresponding second device;

根据所述第一设备所支持的密码算法和/或所述第一参数,确定目标密码算法;Determining a target cryptographic algorithm according to the cryptographic algorithms supported by the first device and/or the first parameters;

根据所述目标密码算法,执行网络认证鉴权和/或密钥推衍的相关操作。According to the target cryptographic algorithm, network authentication and/or key derivation related operations are performed.

本发明其中一实施例还提供一种网络设备,其中,所述网络设备为第三设备,包括收发机,其中,所述收发机用于:One embodiment of the present invention further provides a network device, wherein the network device is a third device, comprising a transceiver, wherein the transceiver is used to:

在对终端进行网络认证鉴权和/或密钥推衍过程中,向第一设备发送第一消息;其中,所述第一消息中包括至少一第二设备的第一参数;所述第一参数用于指示相应所述第二设备所支持的密码算法。During the process of network authentication and/or key derivation of a terminal, a first message is sent to a first device; wherein the first message includes a first parameter of at least one second device; the first parameter is used to indicate the cryptographic algorithm supported by the corresponding second device.

本发明其中一实施例还提供一种认证鉴权装置,其中,应用于第一设备,所述装置包括:One embodiment of the present invention further provides an authentication device, which is applied to a first device and includes:

获取模块,用于获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,所述第一参数用于指示相应所述第二设备所支持的密码算法;An acquisition module, used to acquire a first parameter of at least one second device used to perform network authentication and/or key derivation on the terminal, wherein the first parameter is used to indicate a cryptographic algorithm supported by the corresponding second device;

确定模块,用于根据所述第一设备所支持的密码算法和/或所述第一参数,确定目标密码算法;a determination module, configured to determine a target cryptographic algorithm according to the cryptographic algorithms supported by the first device and/or the first parameters;

鉴权模块,用于根据所述目标密码算法,执行网络认证鉴权和/或密钥推衍的相关操作。The authentication module is used to perform network authentication and/or key derivation related operations according to the target cryptographic algorithm.

本发明其中一实施例还提供一种认证鉴权装置,其中,应用于第三设备,所述装置包括:One embodiment of the present invention further provides an authentication device, which is applied to a third device, and the device includes:

第一发送模块,用于在对终端进行网络认证鉴权和/或密钥推衍过程中,向第一设备发送第一消息;其中,所述第一消息中包括至少一第二设备的第一参数;所述第一参数用于指示相应所述第二设备所支持的密码算法。The first sending module is used to send a first message to a first device during network authentication and/or key derivation of a terminal; wherein the first message includes a first parameter of at least one second device; the first parameter is used to indicate the cryptographic algorithm supported by the corresponding second device.

本发明其中一实施例还提供一种网络设备,其中,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序,所述程序被所述处理器执行时实现如上任一项所述的认证鉴权方法。One embodiment of the present invention further provides a network device, which includes a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program implements the authentication method as described in any one of the above items when executed by the processor.

本发明其中一实施例还提供一种可读存储介质,其中,所述可读存储介质上存储有程序,所述程序被处理器执行时实现如上任一项所述的认证鉴权方法中的步骤。One embodiment of the present invention further provides a readable storage medium, wherein the readable storage medium stores a program, and when the program is executed by a processor, the steps in the authentication method as described in any one of the above items are implemented.

本发明上述技术方案中的至少一个具有以下有益效果:At least one of the above technical solutions of the present invention has the following beneficial effects:

采用本发明实施例所述认证鉴权方法,根据所获取的至少一第二设备的第一参数,确定相应第二设备所支持的密码算法,这样第一设备可以根据所支持的密码算法和/或对终端进行网络认证鉴权的第二设备所支持的密码算法,自适应判断所采用的密码算法,以兼容不同密码算法,实现不同密码算法的互联互通需求。By adopting the authentication method described in the embodiment of the present invention, the cryptographic algorithm supported by the corresponding second device is determined according to the first parameter of at least one second device obtained. In this way, the first device can adaptively determine the cryptographic algorithm to be adopted based on the supported cryptographic algorithms and/or the cryptographic algorithms supported by the second device that performs network authentication on the terminal, so as to be compatible with different cryptographic algorithms and realize the interconnection requirements of different cryptographic algorithms.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1为本发明其中一实施例所述认证鉴权方法的流程示意图;FIG1 is a schematic diagram of a flow chart of an authentication method according to one embodiment of the present invention;

图2为采用本发明实施例所述方法的具体实施方式的流程示意图;FIG2 is a schematic diagram of a specific implementation of the method according to an embodiment of the present invention;

图3为本发明另一实施例所述认证鉴权方法的流程示意图;FIG3 is a schematic diagram of a flow chart of an authentication method according to another embodiment of the present invention;

图4为本发明其中一实施例所述网络设备的结构示意图;FIG4 is a schematic diagram of the structure of a network device according to one embodiment of the present invention;

图5为本发明另一实施例所述网络设备的结构示意图;5 is a schematic diagram of the structure of a network device according to another embodiment of the present invention;

图6为本发明其中一实施例所述认证鉴权装置的结构示意图;FIG6 is a schematic diagram of the structure of an authentication device according to one embodiment of the present invention;

图7为本发明另一实施例所述认证鉴权装置的结构示意图。FIG. 7 is a schematic diagram of the structure of an authentication device according to another embodiment of the present invention.

具体实施方式DETAILED DESCRIPTION

为使本发明要解决的技术问题、技术方案和优点更加清楚,下面将结合附图及具体实施例进行详细描述。In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”所区别的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”一般表示前后关联对象是一种“或”的关系。The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first" and "second" are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and/or" in the specification and claims represents at least one of the connected objects, and the character "/" generally represents that the objects associated with each other are in an "or" relationship.

为了根据网络和终端的状态,自适应兼容不同密码算法,实现不同密码算法的互联互通需求,本发明实施例提供一种认证鉴权方法,根据所获取的至少一第二设备的第一参数,确定相应第二设备所支持的密码算法,这样第一设备可以根据所支持的密码算法和/或对终端进行网络认证鉴权和/或密钥推衍的第二设备所支持的密码算法,自适应判断所采用的密码算法,以兼容不同密码算法,实现不同密码算法的互联互通需求。In order to adaptively be compatible with different cryptographic algorithms according to the status of the network and the terminal and realize the interconnection and interoperability requirements of different cryptographic algorithms, an embodiment of the present invention provides an authentication and authorization method, which determines the cryptographic algorithm supported by the corresponding second device according to the first parameter of at least one second device obtained, so that the first device can adaptively determine the cryptographic algorithm to be adopted based on the supported cryptographic algorithms and/or the cryptographic algorithms supported by the second device that performs network authentication and/or key derivation on the terminal, so as to be compatible with different cryptographic algorithms and realize the interconnection and interoperability requirements of different cryptographic algorithms.

本发明其中一实施例提供一种认证鉴权方法,由第一设备执行,如图1所示,所述方法包括:One embodiment of the present invention provides an authentication method, which is performed by a first device, as shown in FIG1 , and the method includes:

S110,获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,所述第一参数用于指示相应所述第二设备所支持的密码算法;S110, obtaining a first parameter of at least one second device used for performing network authentication and/or key derivation on the terminal, where the first parameter is used to indicate a cryptographic algorithm supported by the corresponding second device;

S120,根据所述第一设备所支持的密码算法和/或所述第一参数,确定目标密码算法;S120, determining a target cryptographic algorithm according to the cryptographic algorithm supported by the first device and/or the first parameter;

S130,根据所述目标密码算法,执行网络认证鉴权和/或密钥推衍的相关操作。S130, performing network authentication and/or key derivation related operations according to the target cryptographic algorithm.

本发明实施例中,可选地,第一设备为能够对终端进行网络认证鉴权和/或密钥推衍的任一设备。In the embodiment of the present invention, optionally, the first device is any device capable of performing network authentication and/or key derivation on the terminal.

第一设备和第二设备分别可以包括以下至少之一:全球用户识别卡(UniversalSubscriber Identity Module,USIM),移动设备(Mobile Equipment,ME),安全锚点功能(Security Anchor Function,SEAF),鉴权服务功能(Authentication Server Function,AUSF),统一数据管理功能(Unified Data Management,UDM)/认证凭证存储库和处理功能(Authentication Credential Repository and Processing Function,ARPF),其中,The first device and the second device may respectively include at least one of the following: a Universal Subscriber Identity Module (USIM), a Mobile Equipment (ME), a Security Anchor Function (SEAF), an Authentication Server Function (AUSF), a Unified Data Management Function (UDM)/Authentication Credential Repository and Processing Function (ARPF), wherein:

(1)USIM:保存了用户的核心密钥K和标识符等数据。(1) USIM: stores the user's core key K and identifier data.

(2)ME:与USIM配合完成网络鉴权。ME和USIM的统称为用户设备(User Equipment,UE)。(2) ME: cooperates with USIM to complete network authentication. ME and USIM are collectively referred to as User Equipment (UE).

(3)SEAF:访问网络实现对UE的鉴权。(3) SEAF: Access network to authenticate UE.

(4)AUSF:归属网络实现对UE的鉴权。(4)AUSF: The home network authenticates the UE.

(5)UDM/ARP:存储用户的签约信息,鉴权数据K等。(5) UDM/ARP: stores user contract information, authentication data K, etc.

可选地,第一设备和第二设备分别可以是支持国际密码算法和/或商用密码算法的设备,所支持的密码算法、目标密码算法分别包括国际密码算法和/或商用密码算法。Optionally, the first device and the second device may respectively be devices supporting international cryptographic algorithms and/or commercial cryptographic algorithms, and the supported cryptographic algorithms and target cryptographic algorithms include international cryptographic algorithms and/or commercial cryptographic algorithms respectively.

可选的,国际密码算法可以包括但不限于高级加密标准(Advanced EncryptionStandard,AES),SHA256等。Optionally, international cryptographic algorithms may include but are not limited to Advanced Encryption Standard (AES), SHA256, etc.

可选的,商用密码算法可以包括但不限于SM4,SM3、SM2等。Optionally, the commercial cryptographic algorithm may include but is not limited to SM4, SM3, SM2, etc.

本实施例中,网络认证鉴权和/或密钥推衍的相关操作包括但不限于根据目标密码算法计算网络认证鉴权所需的参数,该参数包括但不限于RES*、KAUSF、KSEAF、KAMF、后续用于与AMF,gNB等其他网元的各类密钥、XRES*、KAUSF、HRES*、HXRES*、5G HE AV等。In this embodiment, operations related to network authentication and/or key derivation include but are not limited to calculating parameters required for network authentication according to the target cryptographic algorithm, including but not limited to RES*, KAUSF, KSEAF, KAMF, various keys subsequently used for communication with other network elements such as AMF, gNB, XRES*, KAUSF, HRES*, HXRES*, 5G HE AV, etc.

采用本发明实施例所述认证鉴权方法,第一设备能够获取至少一第二设备的第一参数,确定相应第二设备所支持的密码算法,这样第一设备可以根据所支持的密码算法和/或对终端进行网络认证鉴权和/或密钥推衍的第二设备所支持的密码算法,自适应判断所采用的密码算法,以兼容不同密码算法,从而即使支持商用密码算法的终端漫游到不支持商用密码的服务网络的情况时,在第一设备不支持商用密码算法的情况下,第一设备也可以根据所支持的密码算法和至少一第二设备所支持的密码算法,确定目标密码算法,保证各种场景下网络认证鉴权和/或密钥推衍流程中的相关设备可以互联互通。By adopting the authentication method described in the embodiment of the present invention, the first device can obtain the first parameter of at least one second device and determine the cryptographic algorithm supported by the corresponding second device. In this way, the first device can adaptively determine the cryptographic algorithm to be adopted based on the supported cryptographic algorithm and/or the cryptographic algorithm supported by the second device that performs network authentication and/or key derivation on the terminal to be compatible with different cryptographic algorithms. Therefore, even if a terminal that supports commercial cryptographic algorithms roams to a service network that does not support commercial cryptographic algorithms, when the first device does not support commercial cryptographic algorithms, the first device can also determine the target cryptographic algorithm based on the supported cryptographic algorithms and the cryptographic algorithms supported by at least one second device, thereby ensuring that relevant devices in the network authentication and/or key derivation process in various scenarios can be interconnected.

可选地,所述第一参数包括预设指示位,用于指示相应的第二设备是否支持商用密码算法。Optionally, the first parameter includes a preset indication bit for indicating whether the corresponding second device supports a commercial cryptographic algorithm.

举例说明,该预设指示位包括1个bit位,该预设指示位为第一值(如为1)时,表示第二设备支持商用密码算法,预设指示位为第二值(如为0)时,表示第二设备不支持商用密码算法。For example, the preset indicator bit includes 1 bit. When the preset indicator bit is a first value (such as 1), it indicates that the second device supports the commercial encryption algorithm. When the preset indicator bit is a second value (such as 0), it indicates that the second device does not support the commercial encryption algorithm.

另一实施方式,可选地,所述第一参数包括以下的一项或多项:In another implementation manner, optionally, the first parameter includes one or more of the following:

第一位数组,包括多个第一指示位,每一第一指示位对应一种类型加密密码算法,用于指示第二设备是否支持相应类型的加密密码算法;例如,该第一位数组包括2个第一指示位,该2个第一指示位的第0位对应加密密码算法AES,表示是否支持AES;如该第0位为第一值(如为1)时,表示支持AES,为第二值(如为0时),表示不支持AES;该2个第二指示位的第1位对应加密密码算法SM4,表示是否支持SM4;如该第0位为第一值(如为1)时,表示支持SM4,为第二值(如为0时),表示不支持SM4;A first bit array includes a plurality of first indicator bits, each first indicator bit corresponds to a type of encryption cryptographic algorithm, and is used to indicate whether the second device supports the corresponding type of encryption cryptographic algorithm; for example, the first bit array includes 2 first indicator bits, the 0th bit of the 2 first indicator bits corresponds to the encryption cryptographic algorithm AES, indicating whether AES is supported; if the 0th bit is a first value (such as 1), it indicates that AES is supported, and if it is a second value (such as 0), it indicates that AES is not supported; the 1st bit of the 2 second indicator bits corresponds to the encryption cryptographic algorithm SM4, indicating whether SM4 is supported; if the 0th bit is a first value (such as 1), it indicates that SM4 is supported, and if it is a second value (such as 0), it indicates that SM4 is not supported;

第二位数组,包括多个第二指示位,每一第二指示位对应一种类型的哈希算法,用于指示第二设备是否支持相应类型的哈希算法。可选地,该哈希算法包括hash算法和对应的hmac算法。例如,该第二位数组包括2个第二指示位,该2个第二指示位的第0位对应SHA256算法和/或HAMC_SHA256算法,表示是否支持对应的SHA256算法和/或HAMC_SHA256算法,如该第0位为第一值(如为1)时,表示支持对应的SHA256算法和/或HAMC_SHA256算法,为第二值(如为0时),表示不支持对应的SHA256算法和/或HAMC_SHA256算法;该2个第二指示位的第1位对应SM3算法和/或HMAC_SM3算法,表示是否支持对应的SM3算法和/或HMAC_SM3算法,如该第1位为第一值(如为1)时,表示支持对应的SM3算法和/或HMAC_SM3算法,为第二值(如为0时)表示不支持对应的SM3算法和/或HMAC_SM3算法。The second bit array includes a plurality of second indicator bits, each second indicator bit corresponds to a type of hash algorithm, and is used to indicate whether the second device supports the corresponding type of hash algorithm. Optionally, the hash algorithm includes a hash algorithm and a corresponding hmac algorithm. For example, the second bit array includes two second indicator bits, the 0th bit of the two second indicator bits corresponds to the SHA256 algorithm and/or the HAMC_SHA256 algorithm, indicating whether the corresponding SHA256 algorithm and/or the HAMC_SHA256 algorithm are supported. If the 0th bit is a first value (such as 1), it indicates that the corresponding SHA256 algorithm and/or the HAMC_SHA256 algorithm are supported; if it is a second value (such as 0), it indicates that the corresponding SHA256 algorithm and/or the HAMC_SHA256 algorithm are not supported; the first bit of the two second indicator bits corresponds to the SM3 algorithm and/or the HMAC_SM3 algorithm, indicating whether the corresponding SM3 algorithm and/or the HMAC_SM3 algorithm are supported. If the first bit is a first value (such as 1), it indicates that the corresponding SM3 algorithm and/or the HMAC_SM3 algorithm are supported; if it is a second value (such as 0), it indicates that the corresponding SM3 algorithm and/or the HMAC_SM3 algorithm are not supported.

本发明实施例中,可选地,设备(包括第一设备和第二设备)的第一参数可以表示为XX_AS,则不同设备时的第一参数分别为USIM_AS、ME_AS、SEAF_AS等,表示相应设备在鉴权认证和密钥推衍中所支持的密码算法,若其中一设备的第一参数XX_AS不存在,表示相应设备只支持国际密码算法,不支持商用密码算法。In an embodiment of the present invention, optionally, the first parameter of a device (including a first device and a second device) can be expressed as XX_AS, and the first parameters of different devices are USIM_AS, ME_AS, SEAF_AS, etc., respectively, indicating the cryptographic algorithms supported by the corresponding devices in authentication and key derivation. If the first parameter XX_AS of one of the devices does not exist, it indicates that the corresponding device only supports international cryptographic algorithms and does not support commercial cryptographic algorithms.

本发明实施例中,在步骤S120,根据所述第一设备所支持的密码算法和/或所述第一参数,确定目标密码算法,包括:In the embodiment of the present invention, in step S120, determining a target cryptographic algorithm according to the cryptographic algorithm supported by the first device and/or the first parameter includes:

在根据所述第一设备所支持的密码算法,确定所述第一设备不支持商用密码算法的情况下,确定所述目标密码算法为国际密码算法;If it is determined that the first device does not support a commercial cryptographic algorithm according to the cryptographic algorithms supported by the first device, determining that the target cryptographic algorithm is an international cryptographic algorithm;

在所述第一设备所支持的密码算法包括商用密码算法的情况下,根据所述第一参数,确定所述目标密码算法。In the case that the cryptographic algorithms supported by the first device include commercial cryptographic algorithms, the target cryptographic algorithm is determined according to the first parameters.

可选地,本发明实施例中所提及的第一设备和第二设备等(包括但不限于USIM、ME、SEAF、AUSF、UDM/ARPF)需要支持国际密码算法,也需要支持商用密码算法。Optionally, the first device and the second device mentioned in the embodiments of the present invention (including but not limited to USIM, ME, SEAF, AUSF, UDM/ARPF) need to support international cryptographic algorithms and commercial cryptographic algorithms.

可选地,支持商用密码算法的USIM应使用商用密码算法(也即确定为目标密码算法)计算鉴权参数,并提供算法支持状态查询接口,ME可通过该接口查询USIM是否支持商密算法,若不支持该接口则认为不支持商密算法。Optionally, a USIM that supports commercial cryptographic algorithms should use commercial cryptographic algorithms (that is, determined as target cryptographic algorithms) to calculate authentication parameters and provide an algorithm support status query interface. The ME can query whether the USIM supports commercial cryptographic algorithms through this interface. If this interface is not supported, it is considered that commercial cryptographic algorithms are not supported.

支持商用密码算法的UDM/ARPF优先使用商用密码算法(也即确定为目标密码算法)计算鉴权参数。The UDM/ARPF that supports commercial cryptographic algorithms shall preferentially use the commercial cryptographic algorithms (that is, determined as the target cryptographic algorithms) to calculate the authentication parameters.

可选地,AUSF和UDM/ARPF,AUSF和UDM/ARPF应同时支持商用密码算法或者不支持商用密码算法。Optionally, AUSF and UDM/ARPF, AUSF and UDM/ARPF should support commercial cryptographic algorithms at the same time or not support commercial cryptographic algorithms.

本发明实施例中,可选地,第一设备为USIM、ME、SEAF、AUSF、UDM/ARPF的其中之一,至少一第二设备包括ME、USIM和SEAF中的一个或多个。In the embodiment of the present invention, optionally, the first device is one of USIM, ME, SEAF, AUSF, UDM/ARPF, and the at least one second device includes one or more of ME, USIM and SEAF.

可选地,第一设备为UDM/ARPF,在UDM/ARPF不支持商用密码算法时,确定目标密码算法为国际密码算法,采用国际密码算法执行网络认证鉴权和/或密钥推衍的相关操作。在UDM/ARPF支持商用密码算法的情况下,则需要根据USIM的第一参数和ME的第一参数确定执行网络认证鉴权和/或密钥推衍的相关操作的目标密码算法。Optionally, the first device is UDM/ARPF, and when UDM/ARPF does not support commercial cryptographic algorithms, the target cryptographic algorithm is determined to be an international cryptographic algorithm, and the international cryptographic algorithm is used to perform network authentication and/or key derivation related operations. In the case that UDM/ARPF supports commercial cryptographic algorithms, it is necessary to determine the target cryptographic algorithm for performing network authentication and/or key derivation related operations based on the first parameter of the USIM and the first parameter of the ME.

该实施方式中,可选地,所述第一设备为统一数据管理功能UDM或认证凭证存储库和处理功能ARPF,所述至少一第二设备的第一参数包括USIM的第一参数和ME的第一参数;In this implementation manner, optionally, the first device is a unified data management function UDM or an authentication credential repository and processing function ARPF, and the first parameter of the at least one second device includes a first parameter of a USIM and a first parameter of a ME;

在所述第一设备所支持的密码算法包括商用密码算法的情况下,根据所述第一参数,确定所述目标密码算法,包括:In a case where the cryptographic algorithm supported by the first device includes a commercial cryptographic algorithm, determining the target cryptographic algorithm according to the first parameter includes:

在所述USIM的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第一目标密码算法为商用密码算法,所述第一目标密码算法用于计算终端进行网络认证鉴权的认证向量(如计算5G HE AV);在所述ME的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第二目标密码算法为商用密码算法,否则确定所述目标密码算法中的第二目标密码算法为国际密码算法;所述第二目标密码算法用于计算终端进行网络认证鉴权的鉴权参数(如计算KAUSF和XRES*);In the first parameter of the USIM, if the supported cryptographic algorithms include commercial cryptographic algorithms, the first target cryptographic algorithm in the target cryptographic algorithm is determined to be a commercial cryptographic algorithm, and the first target cryptographic algorithm is used to calculate the authentication vector of the terminal for network authentication and authentication (such as calculating 5G HE AV); in the first parameter of the ME, if the supported cryptographic algorithms include commercial cryptographic algorithms, the second target cryptographic algorithm in the target cryptographic algorithm is determined to be a commercial cryptographic algorithm, otherwise, the second target cryptographic algorithm in the target cryptographic algorithm is determined to be an international cryptographic algorithm; the second target cryptographic algorithm is used to calculate the authentication parameters of the terminal for network authentication and authentication (such as calculating K AUSF and XRES*);

在所述USIM的第一参数中,所支持的密码算法包括国际密码算法的情况下,确定所述目标密码算法中的所述第一目标密码算法和所述第二目标算法分别为国际密码算法。In the first parameter of the USIM, when the supported cryptographic algorithms include international cryptographic algorithms, it is determined that the first target cryptographic algorithm and the second target cryptographic algorithm in the target cryptographic algorithms are international cryptographic algorithms respectively.

可选地,第一设备为AUSF,在AUSF不支持商用密码算法时,确定目标密码算法为国际密码算法,采用国际密码算法执行网络认证鉴权和/或密钥推衍的相关操作。在AUSF支持商用密码算法的情况下,则需要根据SEAF的第一参数、USIM的第一参数和ME的第一参数确定执行网络认证鉴权和/或密钥推衍的相关操作的目标密码算法。Optionally, the first device is AUSF, and when AUSF does not support commercial cryptographic algorithms, the target cryptographic algorithm is determined to be an international cryptographic algorithm, and the international cryptographic algorithm is used to perform network authentication and/or key derivation related operations. In the case where AUSF supports commercial cryptographic algorithms, it is necessary to determine the target cryptographic algorithm for performing network authentication and/or key derivation related operations based on the first parameter of SEAF, the first parameter of USIM, and the first parameter of ME.

该实施方式中,可选地,在所述USIM的第一参数和所述SEAF的第一参数中,所支持的密码算法均包括商用密码算法的情况下,则确定所述目标密码算法中的第三目标密码算法为商用密码算法;在所述USIM的第一参数和所述SEAF的第一参数中,所支持的密码算法任一个不包括商用密码算法的情况下,则确定所述目标密码算法中的第三目标密码算法为国际密码算法;所述第三目标密码算法用于计算第一鉴权参数(如计算HXRES*);In this implementation manner, optionally, in the case where the cryptographic algorithms supported in the first parameter of the USIM and the first parameter of the SEAF both include commercial cryptographic algorithms, a third target cryptographic algorithm in the target cryptographic algorithms is determined to be a commercial cryptographic algorithm; in the case where any of the cryptographic algorithms supported in the first parameter of the USIM and the first parameter of the SEAF does not include a commercial cryptographic algorithm, the third target cryptographic algorithm in the target cryptographic algorithms is determined to be an international cryptographic algorithm; the third target cryptographic algorithm is used to calculate the first authentication parameter (such as calculating HXRES*);

在所述USIM的第一参数和所述ME的第一参数中,所支持的密码算法均包括商用密码算法的情况下,则确定所述目标密码算法中的第四目标密码算法为商用密码算法;在所述USIM的第一参数和所述ME的第一参数中,所支持的密码算法任一个不包括商用密码算法的情况下,则确定所述目标密码算法中的第四目标密码算法为国际密码算法;所述第四目标密码算法用于计算终端的第二鉴权参数(如计算KSEAF)。In the case where the supported cryptographic algorithms in the first parameter of the USIM and the first parameter of the ME both include commercial cryptographic algorithms, a fourth target cryptographic algorithm among the target cryptographic algorithms is determined to be a commercial cryptographic algorithm; in the case where any of the supported cryptographic algorithms in the first parameter of the USIM and the first parameter of the ME does not include a commercial cryptographic algorithm, the fourth target cryptographic algorithm among the target cryptographic algorithms is determined to be an international cryptographic algorithm; the fourth target cryptographic algorithm is used to calculate a second authentication parameter of the terminal (such as calculating K SEAF ).

可选地,第一设备为USIM,支持商用密码算法的USIM,确定目标密码算法为商用密码算法,采用商用密码算法执行网络认证鉴权和/或密钥推衍的相关操作。Optionally, the first device is a USIM that supports commercial cryptographic algorithms, determines that the target cryptographic algorithm is a commercial cryptographic algorithm, and uses the commercial cryptographic algorithm to perform network authentication and/or key derivation related operations.

可选地,第一设备为ME,在ME不支持商用密码算法时,确定目标密码算法为国际密码算法,采用国际密码算法执行网络认证鉴权和/或密钥推衍的相关操作。在ME支持商用密码算法的情况下,则需要根据USIM的第一参数和/或SEAF的第一参数确定执行网络认证鉴权和/或密钥推衍的相关操作的目标密码算法。Optionally, the first device is a ME, and when the ME does not support a commercial cryptographic algorithm, the target cryptographic algorithm is determined to be an international cryptographic algorithm, and the international cryptographic algorithm is used to perform network authentication and/or key derivation related operations. In the case where the ME supports a commercial cryptographic algorithm, it is necessary to determine the target cryptographic algorithm for performing network authentication and/or key derivation related operations according to the first parameter of the USIM and/or the first parameter of the SEAF.

该实施方式中,可选地,所述第一设备为ME,所述至少一第二设备的第一参数包括USIM的第一参数和/或SEAF的第一参数;In this implementation manner, optionally, the first device is an ME, and the first parameter of the at least one second device includes a first parameter of a USIM and/or a first parameter of a SEAF;

根据所述第一设备所支持的密码算法,确定目标密码算法,包括:Determining a target cryptographic algorithm according to the cryptographic algorithms supported by the first device includes:

在所述USIM的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第五目标密码算法为商用密码算法,否则确定所述目标密码算法中的第五目标密码算法为国际密码算法;所述第五目标密码算法用于计算的第三鉴权参数(如用于计算RES*和KAUSF以及KSEAF中的一个或多个);In the first parameter of the USIM, when the supported cryptographic algorithms include commercial cryptographic algorithms, determining that a fifth target cryptographic algorithm in the target cryptographic algorithms is a commercial cryptographic algorithm, otherwise determining that the fifth target cryptographic algorithm in the target cryptographic algorithms is an international cryptographic algorithm; the fifth target cryptographic algorithm is used to calculate a third authentication parameter (such as used to calculate one or more of RES*, K AUSF , and K SEAF );

在所述SEAF的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第六目标密码算法为商用密码算法,否则确定所述目标密码算法中的第六目标密码算法为国际密码算法;所述第六目标密码算法用于计算第四鉴权参数(如计算KAMF)。In the first parameter of the SEAF, when the supported cryptographic algorithms include commercial cryptographic algorithms, the sixth target cryptographic algorithm among the target cryptographic algorithms is determined to be a commercial cryptographic algorithm; otherwise, the sixth target cryptographic algorithm among the target cryptographic algorithms is determined to be an international cryptographic algorithm; the sixth target cryptographic algorithm is used to calculate the fourth authentication parameter (such as calculating KAMF ).

可选地,该实施方式中,所述第一设备为ME时,所述方法还包括:Optionally, in this implementation manner, when the first device is a ME, the method further includes:

在所获取的至少一第二设备的第一参数中不包括所述USIM的第一参数的情况下,调用所述USIM的算法支持状态查询接口,生成所述USIM的第一参数。In a case where the acquired first parameters of at least one second device do not include the first parameters of the USIM, an algorithm support status query interface of the USIM is called to generate the first parameters of the USIM.

可选地,第一设备为SEAF,在SEAF不支持商用密码算法时,确定目标密码算法为国际密码算法,采用国际密码算法执行网络认证鉴权和/或密钥推衍的相关操作。在SEAF支持商用密码算法的情况下,则需要根据USIM的第一参数和/或ME的第一参数确定执行网络认证鉴权和/或密钥推衍的相关操作的目标密码算法。Optionally, the first device is SEAF, and when SEAF does not support commercial cryptographic algorithms, the target cryptographic algorithm is determined to be an international cryptographic algorithm, and the international cryptographic algorithm is used to perform network authentication and/or key derivation related operations. In the case that SEAF supports commercial cryptographic algorithms, it is necessary to determine the target cryptographic algorithm for performing network authentication and/or key derivation related operations based on the first parameter of the USIM and/or the first parameter of the ME.

该实施方式中,可选地,所述第一设备为SEAF,所述至少一第二设备的第一参数包括USIM的第一参数和/或ME的第一参数;In this implementation manner, optionally, the first device is a SEAF, and the first parameter of the at least one second device includes a first parameter of a USIM and/or a first parameter of a ME;

根据所述第一设备所支持的密码算法,确定目标密码算法,包括:Determining a target cryptographic algorithm according to the cryptographic algorithms supported by the first device includes:

在所述USIM的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第七目标密码算法为商用密码算法;否则,确定所述目标密码算法中的第七目标密码算法为国际密码算法;所述第七目标密码算法用于计算第五鉴权参数(如计算HRES*);In the first parameter of the USIM, when the supported cryptographic algorithms include commercial cryptographic algorithms, determining that a seventh target cryptographic algorithm in the target cryptographic algorithms is a commercial cryptographic algorithm; otherwise, determining that the seventh target cryptographic algorithm in the target cryptographic algorithms is an international cryptographic algorithm; the seventh target cryptographic algorithm is used to calculate a fifth authentication parameter (such as calculating HRES*);

在所述ME的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第八目标密码算法为商用密码算法;否则,确定所述目标密码算法中的第八目标密码算法为国际密码算法;所述第八目标密码算法用于计算第六鉴权参数(如计算KAMF)。In the first parameter of the ME, if the supported cryptographic algorithms include commercial cryptographic algorithms, the eighth target cryptographic algorithm among the target cryptographic algorithms is determined to be a commercial cryptographic algorithm; otherwise, the eighth target cryptographic algorithm among the target cryptographic algorithms is determined to be an international cryptographic algorithm; the eighth target cryptographic algorithm is used to calculate the sixth authentication parameter (such as calculating KAMF ).

本发明实施例中,另一实施方式,可选地,所述第一设备为SEAF的情况下,根据所述第一设备所支持的密码算法,确定目标密码算法;In another implementation manner in the embodiment of the present invention, optionally, when the first device is a SEAF, the target cryptographic algorithm is determined according to the cryptographic algorithms supported by the first device;

其中,根据所述第一设备所支持的密码算法,确定目标密码算法,包括:Wherein, determining a target cryptographic algorithm according to the cryptographic algorithms supported by the first device includes:

在所述第一设备所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法为商用密码算法;In a case where the cryptographic algorithms supported by the first device include commercial cryptographic algorithms, determining that the target cryptographic algorithm is a commercial cryptographic algorithm;

在所述第一设备所支持的密码算法不包括商用密码算法的情况下,确定所述目标密码算法为国际密码算法。In a case where the cryptographic algorithms supported by the first device do not include commercial cryptographic algorithms, the target cryptographic algorithm is determined to be an international cryptographic algorithm.

本发明实施例中,可选地,在步骤S110,获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,包括以下至少一项:In the embodiment of the present invention, optionally, in step S110, obtaining a first parameter of at least one second device for performing network authentication and/or key derivation on the terminal includes at least one of the following:

获取终端进行网络认证鉴权和/或密钥推衍过程中第三设备发送的第一消息,其中所述第一消息中包括至少一所述第二设备的第一参数;Acquire a first message sent by a third device during a process of performing network authentication and/or key derivation on a terminal, wherein the first message includes at least one first parameter of the second device;

根据所述第二设备的签约数据,获得所述第二设备的第一参数。A first parameter of the second device is obtained according to the subscription data of the second device.

其中一实施方式,可选地,所述第一设备为统一数据管理功能UDM或认证凭证存储库和处理功能ARPF时,所述第三设备包括AUSF,所述第二设备包括ME、USIM和SEAF中的至少一个;In one implementation manner, optionally, when the first device is a unified data management function UDM or an authentication credential repository and processing function ARPF, the third device includes an AUSF, and the second device includes at least one of an ME, a USIM, and a SEAF;

其中,获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,包括以下中的至少一个:Wherein, obtaining a first parameter of at least one second device for performing network authentication and/or key derivation on the terminal includes at least one of the following:

获取所述AUSF发送的第一消息,所述第一消息中包括ME和/或SEAF的第一参数;Obtaining a first message sent by the AUSF, where the first message includes a first parameter of the ME and/or the SEAF;

根据所述USIM的签约数据,获得所述USIM的第一参数。A first parameter of the USIM is obtained according to the subscription data of the USIM.

其中一实施方式,可选地,所述第一设备为AUSF时,所述第三设备包括UDM、ARPF和/或SEAF,所述第二设备包括ME、USIM和SEAF中的至少一个;In one implementation manner, optionally, when the first device is an AUSF, the third device includes a UDM, an ARPF and/or a SEAF, and the second device includes at least one of a ME, a USIM and a SEAF;

其中,获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,包括以下中的至少一个:Wherein, obtaining a first parameter of at least one second device for performing network authentication and/or key derivation on the terminal includes at least one of the following:

获取SEAF发送的一个第一消息,所述一个第一消息中包括ME的第一参数和SEAF的第一参数;Acquire a first message sent by SEAF, wherein the first message includes a first parameter of ME and a first parameter of SEAF;

获取UDM或ARPF发送的另一个第一消息,所述另一个第一消息中包括USIM的第一参数。Another first message sent by the UDM or the ARPF is acquired, where the another first message includes a first parameter of the USIM.

其中一实施方式,可选地,所述第一设备为SEAF时,所述第三设备包括ME和/或AUSF,所述第二设备包括ME和USIM中的至少一个;In one implementation manner, optionally, when the first device is a SEAF, the third device includes a ME and/or an AUSF, and the second device includes at least one of a ME and a USIM;

其中,获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,包括以下中的至少一个:Wherein, obtaining a first parameter of at least one second device for performing network authentication and/or key derivation on the terminal includes at least one of the following:

获取ME发送的一个第一消息,所述一个第一消息中包括ME的第一参数;Acquire a first message sent by the ME, where the first message includes a first parameter of the ME;

获取AUSF发送的另一个第一消息,所述另一个第一消息中包括USIM的第一参数。Obtain another first message sent by the AUSF, wherein the another first message includes a first parameter of the USIM.

其中一实施方式,可选地,所述第一设备为ME时,所述第三设备包括SEAF,所述第二设备包括SEAF和USIM中的至少一个;In one implementation manner, optionally, when the first device is a ME, the third device includes a SEAF, and the second device includes at least one of a SEAF and a USIM;

其中,获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,包括:Wherein, obtaining a first parameter of at least one second device for performing network authentication and/or key derivation on the terminal includes:

获取SEAF发送的第一消息,所述第一消息中包括SEAF的第一参数和USIM的第一参数。A first message sent by SEAF is obtained, where the first message includes a first parameter of SEAF and a first parameter of USIM.

本发明实施例中,可选地,所述第一参数包括在所述第一消息中的预留字段中,或者所述第一参数为所述第一消息中的增设参数。In the embodiment of the present invention, optionally, the first parameter is included in a reserved field in the first message, or the first parameter is an additional parameter in the first message.

可选地,所述第一参数包括在所述第一消息中的认证管理字段AMF中Optionally, the first parameter is included in the authentication management field AMF in the first message.

本发明实施例中,其中一实施方式,可选地,所述方法还包括:In an embodiment of the present invention, in one implementation mode, optionally, the method further includes:

根据所述第一消息,向第四设备发送第二消息,其中所述第二消息中包括所述第一设备的第一参数和/或至少一所述第二设备的第一参数。A second message is sent to a fourth device according to the first message, wherein the second message includes a first parameter of the first device and/or at least one first parameter of the second device.

可选地,在所述第一设备所支持的密码算法包括商用密码算法的情况下,所述第二消息中包括所述第一设备的第一参数和/或至少一所述第二设备的第一参数。Optionally, when the cryptographic algorithm supported by the first device includes a commercial cryptographic algorithm, the second message includes a first parameter of the first device and/or at least one first parameter of the second device.

以下结合用户设备的认证鉴权过程,对本发明实施例所述认证鉴权方法的具体实施过程说明。The following describes the specific implementation process of the authentication method according to the embodiment of the present invention in conjunction with the authentication process of the user equipment.

结合图2所示,采用本发明实施例所述认证鉴权方法的实施过程包括:As shown in FIG. 2 , the implementation process of the authentication method according to the embodiment of the present invention includes:

1)ME将发送初始化注册请求(Initial Registration Request)给安全锚功能SEAF。1) ME will send an Initial Registration Request to the Security Anchor Function SEAF.

可选地,ME需要启动注册认证流程时,根据本设备的算法支持情况生成第一参数ME_AS,也即生成指示ME所支持的密码算法的参数。Optionally, when the ME needs to start the registration and authentication process, a first parameter ME_AS is generated according to the algorithm support status of the device, that is, a parameter indicating the cryptographic algorithms supported by the ME is generated.

其中,ME_AS表示ME在鉴权认证和密钥推衍所支持的密码算法,包含了ME设备自身支持的相关算法状态,可以是支持的所有加密算法,哈希算法列表,也可以是是否支持商密算法的状态等。Among them, ME_AS represents the cryptographic algorithms supported by ME in authentication and key derivation, including the status of related algorithms supported by the ME device itself, which can be all supported encryption algorithms, a list of hash algorithms, or the status of whether commercial secret algorithms are supported.

可选地,ME_AS可作为初始化注册请求的新增参数,也可以使用初始化注册请求中的预留字段等。如果使用预留字段可以保存在Registration Request消息的UE securitycapability的预留字段中。Optionally, ME_AS may be used as a newly added parameter of the initial registration request, or a reserved field in the initial registration request may be used. If a reserved field is used, it may be stored in a reserved field of UE security capability in the Registration Request message.

比如:通常协议中定义的终端安全能力UE security capability的第7个到第9个字节是预留字段,可以选择其中固定的几个bit位保存ME_AS,某bit位设置为1表示支持商用密码的算法(SM3或者SM4等),如果设置为0表示不支持对应的算法。如果这几个bit位没有使用或者不存在表示不支持对应的算法。For example, the 7th to 9th bytes of the UE security capability defined in the protocol are reserved fields. Several fixed bits can be selected to store ME_AS. A bit set to 1 indicates support for commercial encryption algorithms (SM3 or SM4, etc.), and if set to 0, it indicates that the corresponding algorithm is not supported. If these bits are not used or do not exist, it indicates that the corresponding algorithm is not supported.

ME将ME_AS通过初始化注册请求(Initial Registration Request)发送给SEAF。如果ME不支持商密算法,则该请求中可以不包含ME_AS。The ME sends the ME_AS to the SEAF via an Initial Registration Request. If the ME does not support the commercial encryption algorithm, the request may not include the ME_AS.

该实施方式中,ME可以为第一设备,向SEAF(第四设备)发送初始化注册请求(Initial Registration Request),也即该初始化注册请求(Initial RegistrationRequest)可以为第二消息,包括ME的第一参数ME_AS。In this implementation, the ME may be the first device, and sends an initial registration request (Initial Registration Request) to the SEAF (the fourth device). That is, the initial registration request (Initial Registration Request) may be a second message, including the first parameter ME_AS of the ME.

2)SEAF将ME的Initial Registration Request的相关参数通过终端认证请求Nausf_UEAuthentication_Authenticate Request发送给AUSF。2) SEAF sends the relevant parameters of ME's Initial Registration Request to AUSF through the terminal authentication request Nausf_UEAuthentication_Authenticate Request.

可选地,SEAF支持商用密码算法的情况下,则识别并保存ME_AS,并将ME_AS以及SEAF的第一参数SEAF_AS(用于指示SEAF所支持的密码算法算法)通过Nausf_UEAuthentication_Authenticate Request发送给AUSF。Optionally, when SEAF supports commercial cryptographic algorithms, ME_AS is identified and saved, and ME_AS and the first parameter SEAF_AS of SEAF (used to indicate the cryptographic algorithms supported by SEAF) are sent to AUSF through Nausf_UEAuthentication_Authenticate Request.

可选地,SEAF_AS可以为Nausf_UEAuthentication_Authenticate Request中的新增参数,也可以为该消息中的预留字段;可选地,如果SEAF不支持商密算法,或者无法识别ME_AS,则可忽略该参数。SEAF也可以不生成SEAF_AS,而是由AUSF通过SEAF ID判断或者维护一个支持商密算法的SEAF列表来替代SEAF_AS,判断SEAF是否支持商密算法。Optionally, SEAF_AS can be a new parameter in Nausf_UEAuthentication_Authenticate Request or a reserved field in the message; optionally, if SEAF does not support the commercial encryption algorithm or cannot identify ME_AS, this parameter can be ignored. SEAF may not generate SEAF_AS, but AUSF may determine through SEAF ID or maintain a SEAF list that supports the commercial encryption algorithm to replace SEAF_AS and determine whether SEAF supports the commercial encryption algorithm.

该实施方式中,可选地,SEAF可以为第一设备,获取ME(第二设备)发送的初始化注册请求(第一消息),该初始化注册请求中包括ME的第一参数ME_AS。可选地,SEAF还向AUSF(第四设备)发送终端认证请求Nausf_UEAuthentication_Authenticate Request(第二消息),该终端认证请求中包括SEAF(第一设备)的第一参数和/或ME(第二设备)的第一参数ME_AS。In this implementation, optionally, SEAF can be the first device, and obtain an initialization registration request (first message) sent by ME (second device), and the initialization registration request includes the first parameter ME_AS of ME. Optionally, SEAF also sends a terminal authentication request Nausf_UEAuthentication_Authenticate Request (second message) to AUSF (fourth device), and the terminal authentication request includes the first parameter of SEAF (first device) and/or the first parameter ME_AS of ME (second device).

其中一实施方式中,AUSF通过终端认证信息获取请求Nudm_UEAuthentication_Get Request将ME_AS发送给UDM/ARPF。In one implementation manner, the AUSF sends the ME_AS to the UDM/ARPF via a terminal authentication information acquisition request Nudm_UEAuthentication_Get Request.

可选地,若AUSF支持商用密码算法,则识别并保存ME_AS以及SEAF_AS,将ME_AS发送给UDM/ARPF(ME_AS可作为新增参数,也可以使用消息中的预留字段等);如果AUSF不支持商用密码算法,或者无法识别ME_AS,则可忽略该参数。Optionally, if AUSF supports commercial encryption algorithms, ME_AS and SEAF_AS are identified and saved, and ME_AS is sent to UDM/ARPF (ME_AS can be used as a new parameter, or a reserved field in the message can be used, etc.); if AUSF does not support commercial encryption algorithms, or cannot identify ME_AS, this parameter can be ignored.

该实施方式中,AUSF可以为第一设备,获取SEAF发送的终端认证请求Nausf_UEAuthentication_Authenticate Request(第一消息),该终端认证请求中包括SEAF(第二设备)的第一参数和/或ME(第二设备)的第一参数ME_AS。其中,AUSF还向UDM/ARPF(第四设备)发送终端认证信息获取请求Nudm_UEAuthentication_Get Request(第二消息),该终端认证信息获取请求中包括ME的第一参数ME_AS。In this implementation, AUSF may be the first device, and obtains the terminal authentication request Nausf_UEAuthentication_Authenticate Request (first message) sent by SEAF, and the terminal authentication request includes the first parameter of SEAF (second device) and/or the first parameter ME_AS of ME (second device). AUSF also sends a terminal authentication information acquisition request Nudm_UEAuthentication_Get Request (second message) to UDM/ARPF (fourth device), and the terminal authentication information acquisition request includes the first parameter ME_AS of ME.

3)UDM/ARPF对每个Nudm_Authenticate_Get Request消息创建一个5GHE AV(RAND,AUTN,XRES,CK,IK)。为此,UDM/ARPF首先生成一个认证管理字段(AuthenticationManagement Field,AMF)“separation bit”为1的认证向量。然后,UDM/ARPF应推衍出KAUSF和XRES*。最后,UDM/ARPF应创建一个包含RAND、AUTN、XRES*和KAUSF的5G HE AV。3) UDM/ARPF creates a 5G HE AV (RAND, AUTN, XRES, CK, IK) for each Nudm_Authenticate_Get Request message. To do this, UDM/ARPF first generates an authentication vector with the "separation bit" of the Authentication Management Field (AMF) as 1. Then, UDM/ARPF shall derive K AUSF and XRES*. Finally, UDM/ARPF shall create a 5G HE AV containing RAND, AUTN, XRES* and K AUSF .

本申请实施例中,可选地,若UDM/ARPF不支持商用密码算法,则使用国际密码算法计算5G HE AV,使用国际密码算法计算KAUSF和XRES*。也即,不支持商用密码算法的UDM/ARPF,确定目标密码算法为国际密码算法,用于执行网络认证鉴权和/或密钥推衍的相关操作。In the embodiment of the present application, optionally, if the UDM/ARPF does not support the commercial cryptographic algorithm, the international cryptographic algorithm is used to calculate 5G HE AV, and the international cryptographic algorithm is used to calculate K AUSF and XRES*. That is, the UDM/ARPF that does not support the commercial cryptographic algorithm determines that the target cryptographic algorithm is the international cryptographic algorithm, which is used to perform network authentication and/or key derivation related operations.

可选地,支持商用密码算法的UDM/ARPF进行如下处理:Optionally, UDM/ARPF that supports commercial cryptographic algorithms performs the following processing:

根据USIM的签约数据,查询SUCI对应的USIM的商密算法支持状态,生成USIM_AS。According to the subscription data of USIM, query the commercial encryption algorithm support status of USIM corresponding to SUCI and generate USIM_AS.

可选地,USIM_AS可为新增字段,或者使用预留字段。如果使用预留字段,可以将USIM_AS保存在AMF中。AMF后续用于计算5G HE AV(RAND,AUTN,XRES,CK,IK),其中AUTN中包含了AMF。由于AMF(Authentication Management Field)的第8-15位是预留位,默认是0。可以选择其中固定的几个bit位保存USIM_AS,某bit位设置为1表示支持商用密码的某算法(SM3或者SM4等),如果设置为0表示不支持对应的算法。如果该几个bit位没有扩展或者不存在,表示不支持对应的算法。Optionally, USIM_AS can be a newly added field, or a reserved field can be used. If the reserved field is used, USIM_AS can be saved in AMF. AMF is subsequently used to calculate 5G HE AV (RAND, AUTN, XRES, CK, IK), where AMF is included in AUTN. Since bits 8-15 of AMF (Authentication Management Field) are reserved bits, the default is 0. Several fixed bits can be selected to save USIM_AS. If a bit is set to 1, it means that a certain algorithm of commercial encryption (SM3 or SM4, etc.) is supported. If it is set to 0, it means that the corresponding algorithm is not supported. If the bits are not extended or do not exist, it means that the corresponding algorithm is not supported.

可选地,UDM/ARPF在支持商用密码算法的情况下,进行如下处理:如果USIM_AS支持商密算法:则应使用商密算法计算5G HE AV;也即,目标密码算法中的第一目标密码算法为商用密码算法;如果ME_AS支持商密算法,则应使用商密算法计算KAUSF和XRES*,也即确定目标密码算法中的第二目标密码算法为商用密码算法,否则使用国际算法计算KAUSF和XRES*,也即否则确定第二目标密码算为国际密码算法。如果USIM_AS不支持商密算法,则应使用国际密码算法计算5G HE AV,KAUSF和XRES*,也即确定目标密码算法的第一目标密码算法和第二目标算法分别为国际密码算法。Optionally, when UDM/ARPF supports commercial cryptographic algorithms, the following processing is performed: If USIM_AS supports commercial cryptographic algorithms: 5G HE AV should be calculated using commercial cryptographic algorithms; that is, the first target cryptographic algorithm in the target cryptographic algorithm is a commercial cryptographic algorithm; If ME_AS supports commercial cryptographic algorithms, K AUSF and XRES* should be calculated using commercial cryptographic algorithms, that is, the second target cryptographic algorithm in the target cryptographic algorithm is determined to be a commercial cryptographic algorithm, otherwise K AUSF and XRES* are calculated using international algorithms, that is, otherwise the second target cryptographic algorithm is determined to be an international cryptographic algorithm. If USIM_AS does not support commercial cryptographic algorithms, 5G HE AV, K AUSF and XRES* should be calculated using international cryptographic algorithms, that is, the first target cryptographic algorithm and the second target algorithm of the target cryptographic algorithm are determined to be international cryptographic algorithms, respectively.

该实施方式中,可选地,UDM/ARPF可以为第一设备,获取AUSF发送的终端认证信息获取请求Nudm_UEAuthentication_Get Request(第一消息),包括ME(第二设备)的第一参数ME_AS;另外,UDM/ARPF可以通过USIM的签约数据,查询SUCI对应的USIM的商密算法支持状态,生成USIM(第二设备)的第一参数USIM_AS。In this implementation, optionally, UDM/ARPF can be the first device, and obtain the terminal authentication information acquisition request Nudm_UEAuthentication_Get Request (first message) sent by AUSF, including the first parameter ME_AS of ME (second device); in addition, UDM/ARPF can query the commercial encryption algorithm support status of the USIM corresponding to SUCI through the contract data of USIM, and generate the first parameter USIM_AS of USIM (second device).

4)UDM在终端认证信息获取请求响应Nudm_UEAuthentication_Get Response消息中向AUSF返回所请求的5G HE AV,并指示5G HE AV用于5GAKA。若Nudm_UEAuthentication_Get请求中包含用户隐藏标识符(Subscriptionconcealed identifier,SUCI),UDM将在Nudm_UEAuthentication_Get响应中包含用户永久标识符(SUbscription PermanentIdentifier,SUPI)。4) UDM returns the requested 5G HE AV to AUSF in the Nudm_UEAuthentication_Get Response message and indicates that 5G HE AV is used for 5G AKA. If the Nudm_UEAuthentication_Get request contains the Subscription concealed identifier (SUCI), UDM will include the Subscription Permanent Identifier (SUPI) in the Nudm_UEAuthentication_Get response.

可选地,支持商用密码算法的UDM在终端认证信息获取请求响应Nudm_UEAuthentication_Get Response消息中包括USIM_AS。可选地,USIM_AS可以包括在该消息中的预留字段中,也可以为该消息中的增设字段或增设参数。Optionally, the UDM supporting the commercial encryption algorithm includes USIM_AS in the terminal authentication information acquisition request response Nudm_UEAuthentication_Get Response message. Optionally, USIM_AS may be included in a reserved field in the message, or may be an additional field or parameter in the message.

该实施方式中,UDM可以为第一设备,向AUSF发送的终端认证信息获取请求响应Nudm_UEAuthentication_Get Response消息为第二消息,包括USIM(第二设备)的第一参数。In this implementation, the UDM may be the first device, and the terminal authentication information acquisition request response Nudm_UEAuthentication_Get Response message sent to the AUSF is the second message, including the first parameter of the USIM (second device).

5)AUSF应临时保存XRES*及接收到的SUCI或SUPI。AUSF可保存KAUSF5) AUSF shall temporarily save XRES* and the received SUCI or SUPI. AUSF may save K AUSF .

6)AUSF应基于从UDM/ARPF接收到的5G HE AV生成一个5G AV。从XRES*计算出HXRES*,从KAUSF推衍出KSEAF,然后用HXRES*和的KSEAF分别替换5G HE AV中XRES*和KAUSF6) AUSF shall generate a 5G AV based on the 5G HE AV received from UDM/ARPF, calculate HXRES* from XRES*, derive K SEAF from K AUSF , and then replace XRES* and K AUSF in the 5G HE AV with HXRES* and K SEAF respectively.

可选地,AUSF不支持商用密码算法的情况下,AUSF使用国际密码算法计算上述参数;支持商用密码算法的AUSF可以从消息中获取并保存USIM_AS。如果USIM_AS保存在AMF预留字段中,则从5G HE AV的AUTN中获取AMF,从AMF中获取USIM_AS。Optionally, if AUSF does not support commercial encryption algorithms, AUSF uses international encryption algorithms to calculate the above parameters; AUSF that supports commercial encryption algorithms can obtain and save USIM_AS from the message. If USIM_AS is saved in the AMF reserved field, AMF is obtained from the AUTN of 5G HE AV, and USIM_AS is obtained from AMF.

该实施方式中,可选地,AUSF可以为第一设备,获取UDM/ARPF(第三设备)发送的第一消息(终端认证信息获取请求响应Nudm_UEAuthentication_Get Response消息),包括USIM(第二设备)的第一参数USIM_AS。In this implementation, optionally, AUSF can be the first device, and obtains the first message (terminal authentication information acquisition request response Nudm_UEAuthentication_Get Response message) sent by UDM/ARPF (third device), including the first parameter USIM_AS of USIM (second device).

可选地,AUSF支持商用密码算法的情况下,进行如下处理:Optionally, when AUSF supports commercial cryptographic algorithms, the following processing is performed:

如果SEAF_AS和USIM_AS支持商用密码算法,则应使用商用密码算法计算HXRES*,否则使用国际密码算法计算HXRES*。也即,在所述USIM的第一参数和所述SEAF的第一参数中,所支持的密码算法均包括商用密码算法的情况下,则确定所述目标密码算法中的第三目标密码算法(用于计算第一鉴权参数HXRES*)为商用密码算法;在所述USIM的第一参数和所述SEAF的第一参数中,所支持的密码算法任一个不包括商用密码算法的情况下,则确定所述目标密码算法中的第三目标密码算法(用于计算第一鉴权参数HXRES*)为国际密码算法。If SEAF_AS and USIM_AS support commercial cryptographic algorithms, the commercial cryptographic algorithms shall be used to calculate HXRES*, otherwise the international cryptographic algorithms shall be used to calculate HXRES*. That is, when the cryptographic algorithms supported in the first parameter of the USIM and the first parameter of the SEAF both include commercial cryptographic algorithms, the third target cryptographic algorithm in the target cryptographic algorithms (used to calculate the first authentication parameter HXRES*) is determined to be a commercial cryptographic algorithm; when any of the cryptographic algorithms supported in the first parameter of the USIM and the first parameter of the SEAF does not include a commercial cryptographic algorithm, the third target cryptographic algorithm in the target cryptographic algorithms (used to calculate the first authentication parameter HXRES*) is determined to be an international cryptographic algorithm.

如果ME_AS和USIM_AS支持商用密码算法,则应使用商用密码算法计算KSEAF,否则使用国际密码算法计算。也即,在所述USIM的第一参数和所述ME的第一参数中,所支持的密码算法均包括商用密码算法的情况下,则确定所述目标密码算法中的第四目标密码算法(用于计算第二鉴权参数KSEAF)为商用密码算法;在所述USIM的第一参数和所述ME的第一参数中,所支持的密码算法任一个不包括商用密码算法的情况下,则确定所述目标密码算法中的第四目标密码算法(用于计算第二鉴权参数KSEAF)为国际密码算法。If the ME_AS and the USIM_AS support commercial cryptographic algorithms, the commercial cryptographic algorithms shall be used to calculate K SEAF , otherwise the international cryptographic algorithms shall be used for calculation. That is, when the cryptographic algorithms supported in the first parameter of the USIM and the first parameter of the ME both include commercial cryptographic algorithms, the fourth target cryptographic algorithm (used to calculate the second authentication parameter K SEAF ) in the target cryptographic algorithms is determined to be a commercial cryptographic algorithm; when any of the cryptographic algorithms supported in the first parameter of the USIM and the first parameter of the ME does not include a commercial cryptographic algorithm, the fourth target cryptographic algorithm (used to calculate the second authentication parameter K SEAF ) in the target cryptographic algorithms is determined to be an international cryptographic algorithm.

7)AUSF移除KSEAF,通过终端认证Nausf_UEAuthentication_Authenticate响应消息将5G SE AV(RAND,AUTN,HXRES*)发送至SEAF。7) AUSF removes K SEAF and sends 5G SE AV (RAND, AUTN, HXRES*) to SEAF through the terminal authentication Nausf_UEAuthentication_Authenticate response message.

可选地,在AUSF支持商密算法的情况下,终端认证Nausf_UEAuthentication_Authenticate响应消息中包括USIM_AS。可选地,该USIM_AS可以为该响应消息中的增设字段或增设参数,也可以为该响应消息中的预留字段(比如AUTN中的AMF的预留字段)。Optionally, when AUSF supports the commercial encryption algorithm, the terminal authentication Nausf_UEAuthentication_Authenticate response message includes USIM_AS. Optionally, the USIM_AS can be an additional field or additional parameter in the response message, or a reserved field in the response message (such as a reserved field of AMF in AUTN).

该实施方式中,可选地,AUSF可以为第一设备,向SEAF(第四设备)发送第二消息(终端认证Nausf_UEAuthentication_Authenticate响应消息),包括USIM(第二设备)的第一参数。In this implementation, optionally, the AUSF may be the first device, and sends a second message (terminal authentication Nausf_UEAuthentication_Authenticate response message) to the SEAF (the fourth device), including the first parameter of the USIM (the second device).

8)SEAF应通过NAS消息(Auth-Req)向UE发送RAND和AUTN。该消息还应包含被UE和AMF用于标识KAMF和部分原生安全上下文的ngKSI,该消息还应包括ABBA参数(用于对可能引入的安全功能进行防降级攻击保护)。ME应向USIM转发NAS消息(Auth-Req)中的RAND和AUTN。8) SEAF shall send RAND and AUTN to UE via NAS message (Auth-Req). The message shall also contain ngKSI used by UE and AMF to identify KAMF and part of the native security context. The message shall also include ABBA parameters (for protection against downgrade attacks on security functions that may be introduced). ME shall forward RAND and AUTN in NAS message (Auth-Req) to USIM.

可选地,在SEAF支持商用密码算法的情况下,应将SEAF_AS和USIM_AS发送给ME(SEAF_AS和USIM_AS可作为新增参数,也可以使用消息中的预留字段等),否则可不包含该参数;支持商用密码算法的ME应识别并保存SEAF_AS和USIM_AS(若USIM_AS保存在AMF的预留字段中,则从AUTN的AMF中识别USIM_AS),否则可忽略该参数。可选地,SEAF也可以不生成SEAF_AS,而是由ME通过SEAF ID判断或者维护一个支持商密算法的SEAF列表来替代SEAF_AS,判断SEAF是否支持商密算法。Optionally, when SEAF supports commercial encryption algorithms, SEAF_AS and USIM_AS should be sent to ME (SEAF_AS and USIM_AS can be added as parameters, or reserved fields in the message can be used, etc.), otherwise the parameter may not be included; ME that supports commercial encryption algorithms should identify and save SEAF_AS and USIM_AS (if USIM_AS is saved in the reserved field of AMF, USIM_AS is identified from AMF of AUTN), otherwise the parameter may be ignored. Optionally, SEAF may not generate SEAF_AS, but ME may determine through SEAF ID or maintain a list of SEAFs that support commercial encryption algorithms to replace SEAF_AS to determine whether SEAF supports commercial encryption algorithms.

该实施方式中,可选地,SEAF可以为第一设备,向UE(第四设备)发送第二消息(NAS消息(Auth-Req)),包括SEAF(第一设备)的第一参数和USIM(第二设备)的第一参数。In this implementation, optionally, SEAF may be the first device, and sends a second message (NAS message (Auth-Req)) to UE (fourth device), including a first parameter of SEAF (first device) and a first parameter of USIM (second device).

9)USIM收到RAND和AUTN后,USIM应检查AUTN是否被接受,以此来验证认证向量是否为最新。若验证通过,USIM应计算响应RES,并向ME返回RES、CK、IK。可选地,USIM使用转换函数c3从CK和IK计算出Kc(即GPRS Kc)并将其发送给ME,ME应忽略该GPRS Kc,且GPRS Kc不应存储在USIM或ME上。9) After the USIM receives RAND and AUTN, the USIM shall check whether the AUTN is accepted to verify whether the authentication vector is up to date. If the verification is successful, the USIM shall calculate the response RES and return RES, CK, and IK to the ME. Optionally, the USIM calculates Kc (i.e., GPRS Kc) from CK and IK using the conversion function c3 and sends it to the ME. The ME shall ignore the GPRS Kc, and the GPRS Kc shall not be stored on the USIM or ME.

可选地,支持商密算法的USIM应使用商用密码算法计算(或者根据AUTN的AMF中的USIM_AS选择相应的算法计算)AUTN,响应RES,CK,IK和Kc,否则使用国际密码算法计算AUTN。Optionally, a USIM supporting commercial cryptographic algorithms shall use a commercial cryptographic algorithm to calculate AUTN (or select a corresponding algorithm based on the USIM_AS in the AMF of AUTN) and respond with RES, CK, IK and Kc, otherwise use an international cryptographic algorithm to calculate AUTN.

10)ME应从RES计算RES*。ME应从CK||IK推衍出KAUSF。ME应从KAUSF推衍出KSEAF。接入5G的ME应在认证期间检查AUTN的AMF字段“separation bit”是否设为1。“separation bit”是AUTN的AMF字段的第0位。注:AUTN的AMF中的该“separation bit”不能再用于运营商特定目的。10) The ME shall calculate RES* from RES. The ME shall derive K AUSF from CK||IK. The ME shall derive K SEAF from K AUSF . The ME accessing 5G shall check during authentication whether the "separation bit" of the AMF field of AUTN is set to 1. The "separation bit" is the 0th bit of the AMF field of AUTN. NOTE: This "separation bit" in the AMF of AUTN can no longer be used for operator specific purposes.

可选地,若ME不支持商用密码算法,则ME使用国际密码算法计算上述参数;若ME支持商用密码算法,则进行如下处理:如果无USIM_AS参数,则可以调用USIM卡的算法支持状态查询接口生成USIM_AS。Optionally, if the ME does not support commercial encryption algorithms, the ME uses international encryption algorithms to calculate the above parameters; if the ME supports commercial encryption algorithms, the following processing is performed: If there is no USIM_AS parameter, the algorithm support status query interface of the USIM card can be called to generate USIM_AS.

如果USIM_AS支持商密算法,则应使用商密算法计算RES*和KAUSF以及KSEAF,否则使用国际算法计算RES*和KAUSF以及KSEAF。也即,在所述USIM的第一参数USIM_AS中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第五目标密码算法(用于计算第三鉴权参数RES*和KAUSF以及KSEAF)为商用密码算法,否则确定所述目标密码算法中的第五目标密码算法(用于计算第三鉴权参数RES*和KAUSF以及KSEAF)为国际密码算法。If USIM_AS supports commercial cryptographic algorithms, RES*, KAUSF and KSEAF shall be calculated using the commercial cryptographic algorithms, otherwise RES*, KAUSF and KSEAF shall be calculated using international algorithms. That is, in the first parameter USIM_AS of the USIM, when the supported cryptographic algorithms include commercial cryptographic algorithms, the fifth target cryptographic algorithm (used to calculate the third authentication parameters RES*, KAUSF and KSEAF) in the target cryptographic algorithms is determined to be a commercial cryptographic algorithm, otherwise the fifth target cryptographic algorithm (used to calculate the third authentication parameters RES*, KAUSF and KSEAF) in the target cryptographic algorithms is determined to be an international cryptographic algorithm.

如果SEAF_AS支持商密算法,则应使用商密算法计算KAMF,否则使用国际算法计算。也即,在所述SEAF的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第六目标密码算法(用于计算第四鉴权参数KAMF)为商用密码算法,否则确定所述目标密码算法中的第六目标密码算法(用于计算第四鉴权参数KAMF)为国际密码算法。If SEAF_AS supports commercial cryptographic algorithms, KAMF shall be calculated using the commercial cryptographic algorithms, otherwise, KAMF shall be calculated using the international algorithms. That is, in the first parameter of the SEAF, when the supported cryptographic algorithms include commercial cryptographic algorithms, the sixth target cryptographic algorithm (used to calculate the fourth authentication parameter KAMF ) in the target cryptographic algorithms is determined to be a commercial cryptographic algorithm, otherwise, the sixth target cryptographic algorithm (used to calculate the fourth authentication parameter KAMF ) in the target cryptographic algorithms is determined to be an international cryptographic algorithm.

11)UE在NAS消息认证响应中将RES*返回给SEAF。11) The UE returns RES* to SEAF in the NAS message authentication response.

12)SEAF从RES*计算HRES*,并比较HRES*和HXRES*。若两值一致,SEAF应从服务网的角度认为认证成功。如果UE不可达,且SEAF从未接收到RES*,SEAF应认为认证失败,并向AUSF指示失败。12) SEAF calculates HRES* from RES* and compares HRES* with HXRES*. If the two values are consistent, SEAF shall consider the authentication successful from the perspective of the serving network. If the UE is unreachable and SEAF never receives RES*, SEAF shall consider the authentication failed and indicate the failure to AUSF.

可选地,若SEAF不支持商用密码算法,则SEAF使用国际密码算法计算上述参数;可选地,支持商用密码算法的SEAF进行如下处理:Optionally, if SEAF does not support commercial cryptographic algorithms, SEAF uses international cryptographic algorithms to calculate the above parameters; Optionally, SEAF that supports commercial cryptographic algorithms performs the following processing:

如果USIM_AS支持商用密码算法,应使用商用密码算法计算HRES*,否则使用国际算法计算HRES*。If the USIM_AS supports commercial cryptographic algorithms, HRES* shall be calculated using the commercial cryptographic algorithms; otherwise, HRES* shall be calculated using the international algorithms.

13)SEAF应将来自UE的相应SUCI或SUPI通过终端认证信息请求Nausf_UEAuthentication_Authenticate Request消息发送给AUSF。13) SEAF shall send the corresponding SUCI or SUPI from the UE to AUSF via the terminal authentication information request Nausf_UEAuthentication_Authenticate Request message.

14)当接收到包含RES*的Nausf_UEAuthentication_Authenticate Request消息时,AUSF可验证AV是否已到期。若AV已过期,AUSF可从归属网络的角度认为认证不成功。AUSF应将接收到的RES*与存储的XRES*进行比较。若RES*和XRES*一致,AUSF应从归属网络的角度认为认证成功。14) Upon receiving a Nausf_UEAuthentication_Authenticate Request message containing a RES*, the AUSF may verify whether the AV has expired. If the AV has expired, the AUSF may consider the authentication unsuccessful from the perspective of the home network. The AUSF shall compare the received RES* with the stored XRES*. If the RES* and XRES* are consistent, the AUSF shall consider the authentication successful from the perspective of the home network.

15)AUSF通过终端认证信息请求的响应消息Nausf_UEAuthentication_Authenticate Response向SEAF指示认证是否成功。若认证成功,则应通过Nausf_UEAuthentication_Authenticate Response将KSEAF发送至SEAF。若AUSF在启动认证时从SEAF接收到SUCI且认证成功,AUSF还应在Nausf_UEAuthentication_AuthenticateResponse中包含SUPI。15) The AUSF indicates to SEAF whether the authentication is successful via the Nausf_UEAuthentication_Authenticate Response response message of the terminal authentication information request. If the authentication is successful, K SEAF shall be sent to SEAF via Nausf_UEAuthentication_Authenticate Response. If the AUSF receives SUCI from SEAF when starting authentication and the authentication is successful, the AUSF shall also include SUPI in the Nausf_UEAuthentication_AuthenticateResponse.

若认证成功,SEAF应把从Nausf_UEAuthentication_Authenticate Response消息中接收到密钥KSEAF作为锚密钥。然后SEAF应从KSEAF、ABBA参数和SUPI推衍出KAMF,并向AMF提供ngKSI和KAMFIf authentication is successful, SEAF shall use the key K SEAF received from the Nausf_UEAuthentication_Authenticate Response message as the anchor key. SEAF shall then derive KAMF from K SEAF , ABBA parameters and SUPI, and provide ngKSI and KAMF to AMF.

可选地,若SEAF不支持商用密码算法,则SEAF使用国际密码算法计算上述参数;支持商用密码算法的SEAF进行如下处理:Optionally, if SEAF does not support commercial cryptographic algorithms, SEAF uses international cryptographic algorithms to calculate the above parameters; SEAF that supports commercial cryptographic algorithms performs the following processing:

如果ME_AS支持商用密码算法,则应使用商用密码算法计算KAMF,否则使用国际密码算法计算KAMFIf ME_AS supports commercial cryptographic algorithms, it shall use the commercial cryptographic algorithms to calculate KAMF ; otherwise, it shall use the international cryptographic algorithms to calculate KAMF .

可选地,如果SUCI用于此认证,SEAF应仅在接收到包含SUPI的Nausf_UEAuthentication_Authenticate Response消息后才向AMF提供ngKSI和KAMF;在服务网获知SUPI之前,不会向UE提供通信服务。Optionally, if SUCI is used for this authentication, the SEAF shall provide the ngKSI and KAMF to the AMF only after receiving the Nausf_UEAuthentication_Authenticate Response message containing the SUPI; no communication service shall be provided to the UE until the serving network knows the SUPI.

采用本发明实施例所述认证鉴权方法,进行网络认证鉴权和/或密钥推衍的设备之间的消息传输,包括设备所支持的密码算法(如包括USIM_AS、ME_AS和SEAF_AS中的一个或多个),这样各设备之间可以根据相应设备的密码算法支持状态自适应采用对应的密码算法执行网络认证鉴权和/或密钥推衍的相关操作,以自适应兼容不同密码算法,实现不同密码算法的互联互通需求。The authentication method described in the embodiment of the present invention is used to transmit messages between devices for network authentication and/or key derivation, including the cryptographic algorithms supported by the devices (such as one or more of USIM_AS, ME_AS and SEAF_AS). In this way, each device can adaptively adopt the corresponding cryptographic algorithm to perform related operations of network authentication and/or key derivation according to the cryptographic algorithm support status of the corresponding device, so as to adaptively be compatible with different cryptographic algorithms and realize the interconnection and interoperability requirements of different cryptographic algorithms.

本发明其中一实施例还提供一种认证鉴权方法,由第三设备执行,如图3所示,所述方法包括:One embodiment of the present invention further provides an authentication method, which is performed by a third device, as shown in FIG3 , and the method includes:

S310,在对终端进行网络认证鉴权和/或密钥推衍过程中,向第一设备发送第一消息;其中,所述第一消息中包括至少一第二设备的第一参数;所述第一参数用于指示相应所述第二设备所支持的密码算法。S310, during the process of network authentication and/or key derivation of the terminal, a first message is sent to a first device; wherein the first message includes a first parameter of at least one second device; the first parameter is used to indicate the cryptographic algorithm supported by the corresponding second device.

可选地,第一设备、第二设备和第三设备分别包括USIM、ME、SEAF、AUSF、UDM/ARPF中的一个或多个。Optionally, the first device, the second device and the third device respectively include one or more of USIM, ME, SEAF, AUSF, UDM/ARPF.

采用本发明实施例所述认证鉴权方法,进行网络认证鉴权和/或密钥推衍的设备之间的消息传输,包括设备所支持的密码算法(如包括USIM_AS、ME_AS和SEAF_AS中的一个或多个),这样各设备之间可以根据相应设备的密码算法支持状态自适应采用对应的密码算法执行网络认证鉴权和/或密钥推衍的相关操作,以自适应兼容不同密码算法,实现不同密码算法的互联互通需求。The authentication method described in the embodiment of the present invention is used to transmit messages between devices for network authentication and/or key derivation, including the cryptographic algorithms supported by the devices (such as one or more of USIM_AS, ME_AS and SEAF_AS). In this way, each device can adaptively adopt the corresponding cryptographic algorithm to perform related operations of network authentication and/or key derivation according to the cryptographic algorithm support status of the corresponding device, so as to adaptively be compatible with different cryptographic algorithms and realize the interconnection and interoperability requirements of different cryptographic algorithms.

可选地,所述的认证鉴权方法,其中,所述第一设备为统一数据管理功能UDM或认证凭证存储库和处理功能ARPF,所述第三设备包括AUSF,所述第二设备包括ME和SEAF中的至少一个。Optionally, in the authentication and authorization method, the first device is a unified data management function UDM or an authentication credential repository and processing function ARPF, the third device includes AUSF, and the second device includes at least one of ME and SEAF.

可选地,所述的认证鉴权方法,其中,所述第一设备为AUSF,所述第三设备为SEAF,所述第二设备包括ME和SEAF中的至少一个;或者Optionally, in the authentication method, the first device is an AUSF, the third device is a SEAF, and the second device includes at least one of a ME and a SEAF; or

所述第一设备为AUSF,所述第三设备为UDM或ARPF,所述第二设备包括USIM。The first device is an AUSF, the third device is an UDM or an ARPF, and the second device includes a USIM.

可选地,所述的认证鉴权方法,其中,所述第一设备为SEAF,所述第三设备为ME,所述第二设备包括ME;或者Optionally, in the authentication method, the first device is a SEAF, the third device is a ME, and the second device includes the ME; or

所述第一设备为SEAF,所述第三设备为AUSF,所述第二设备包括USIM。The first device is a SEAF, the third device is an AUSF, and the second device includes a USIM.

可选地,所述的认证鉴权方法,其中,所述第一设备为ME,所述第三设备包括SEAF,所述第二设备包括SEAF和USIM中的至少一个。Optionally, in the authentication method, the first device is a ME, the third device includes a SEAF, and the second device includes at least one of a SEAF and a USIM.

可选地,所述的认证鉴权方法,其中,所述第一参数包括预设指示位,用于指示相应的第二设备是否支持商用密码算法。Optionally, in the authentication method, the first parameter includes a preset indication bit for indicating whether the corresponding second device supports a commercial cryptographic algorithm.

可选地,所述的认证鉴权方法,其中,所述第一参数包括以下的一项或多项:Optionally, in the authentication method, the first parameter includes one or more of the following:

第一位数组,包括多个第一指示位,每一第一指示位对应一种类型加密密码算法,用于指示第二设备是否支持相应类型的加密密码算法;a first bit array, comprising a plurality of first indicator bits, each first indicator bit corresponding to a type of encryption cryptographic algorithm, and used to indicate whether the second device supports the corresponding type of encryption cryptographic algorithm;

第二位数组,包括多个第二指示位,每一第二指示位对应一种类型的哈希算法,用于指示第二设备是否支持相应类型的哈希算法。The second bit array includes multiple second indicator bits, each second indicator bit corresponds to a type of hash algorithm, and is used to indicate whether the second device supports the corresponding type of hash algorithm.

本发明实施例所述认证鉴权方法应用于第三设备的具体实施方式,可以结合应用于第一设备时的具体实施方式的详细说明,在此不再重复描述。The specific implementation of the authentication method described in the embodiment of the present invention when applied to the third device can be combined with the detailed description of the specific implementation when applied to the first device, and will not be repeated here.

本发明其中一实施例还提供一种网络设备,其中,所述网络设备为第一设备,如图4所示,该第一设备400包括处理器410,其中,所述处理器410用于:One embodiment of the present invention further provides a network device, wherein the network device is a first device. As shown in FIG. 4 , the first device 400 includes a processor 410, wherein the processor 410 is configured to:

获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,所述第一参数用于指示相应所述第二设备所支持的密码算法;Acquire a first parameter of at least one second device used for performing network authentication and/or key derivation on the terminal, wherein the first parameter is used to indicate a cryptographic algorithm supported by the corresponding second device;

根据所述第一设备所支持的密码算法和/或所述第一参数,确定目标密码算法;Determining a target cryptographic algorithm according to the cryptographic algorithms supported by the first device and/or the first parameters;

根据所述目标密码算法,执行网络认证鉴权和/或密钥推衍的相关操作。According to the target cryptographic algorithm, network authentication and/or key derivation related operations are performed.

可选地,所述的网络设备,其中,处理器410根据所述第一设备所支持的密码算法和/或所述第一参数,确定目标密码算法,包括:Optionally, in the network device, the processor 410 determines the target cryptographic algorithm according to the cryptographic algorithm supported by the first device and/or the first parameter, including:

在根据所述第一设备所支持的密码算法,确定所述第一设备不支持商用密码算法的情况下,确定所述目标密码算法为国际密码算法;If it is determined that the first device does not support a commercial cryptographic algorithm according to the cryptographic algorithms supported by the first device, determining that the target cryptographic algorithm is an international cryptographic algorithm;

在所述第一设备所支持的密码算法包括商用密码算法的情况下,根据所述第一参数,确定所述目标密码算法。In the case that the cryptographic algorithms supported by the first device include commercial cryptographic algorithms, the target cryptographic algorithm is determined according to the first parameters.

可选地,所述的网络设备,其中,所述至少一第二设备包括以下的一项或多项:Optionally, in the network device, the at least one second device includes one or more of the following:

移动设备ME、全球用户识别卡USIM和安全锚点功能SEAF。Mobile equipment ME, Universal Subscriber Identity Module USIM and Security Anchor Function SEAF.

可选地,所述的网络设备,其中,处理器410获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,包括以下至少一项:Optionally, in the network device, the processor 410 obtains a first parameter of at least one second device for performing network authentication and/or key derivation on the terminal, including at least one of the following:

获取终端进行网络认证鉴权和/或密钥推衍过程中第三设备发送的第一消息,其中所述第一消息中包括至少一所述第二设备的第一参数;Acquire a first message sent by a third device during a process of performing network authentication and/or key derivation on a terminal, wherein the first message includes at least one first parameter of the second device;

根据所述第二设备的签约数据,获得所述第二设备的第一参数。A first parameter of the second device is obtained according to the subscription data of the second device.

可选地,所述的网络设备,其中,所述第一设备为统一数据管理功能UDM或认证凭证存储库和处理功能ARPF时,所述第三设备包括AUSF,所述第二设备包括ME、USIM和SEAF中的至少一个;Optionally, in the network device, when the first device is a unified data management function UDM or an authentication credential repository and processing function ARPF, the third device includes an AUSF, and the second device includes at least one of an ME, a USIM and a SEAF;

其中,处理器410获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,包括以下中的至少一个:The processor 410 obtains a first parameter of at least one second device for performing network authentication and/or key derivation on the terminal, including at least one of the following:

获取所述AUSF发送的第一消息,所述第一消息中包括ME和/或SEAF的第一参数;Obtaining a first message sent by the AUSF, where the first message includes a first parameter of the ME and/or the SEAF;

根据所述USIM的签约数据,获得所述USIM的第一参数。A first parameter of the USIM is obtained according to the subscription data of the USIM.

可选地,所述的网络设备,其中,所述第一设备为AUSF时,所述第三设备包括UDM、ARPF和/或SEAF,所述第二设备包括ME、USIM和SEAF中的至少一个;Optionally, in the network device, when the first device is an AUSF, the third device includes a UDM, an ARPF and/or a SEAF, and the second device includes at least one of a ME, a USIM and a SEAF;

其中,处理器410获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,包括以下中的至少一个:The processor 410 obtains a first parameter of at least one second device for performing network authentication and/or key derivation on the terminal, including at least one of the following:

获取SEAF发送的一个第一消息,所述一个第一消息中包括ME的第一参数和SEAF的第一参数;Acquire a first message sent by SEAF, wherein the first message includes a first parameter of ME and a first parameter of SEAF;

获取UDM或ARPF发送的另一个第一消息,所述另一个第一消息中包括USIM的第一参数。Another first message sent by the UDM or the ARPF is acquired, where the another first message includes a first parameter of the USIM.

可选地,所述的网络设备,其中,所述第一设备为SEAF时,所述第三设备包括ME和/或AUSF,所述第二设备包括ME和USIM中的至少一个;Optionally, in the network device, when the first device is a SEAF, the third device includes a ME and/or an AUSF, and the second device includes at least one of a ME and a USIM;

其中,处理器410获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,包括以下中的至少一个:The processor 410 obtains a first parameter of at least one second device for performing network authentication and/or key derivation on the terminal, including at least one of the following:

获取ME发送的一个第一消息,所述一个第一消息中包括ME的第一参数;Acquire a first message sent by the ME, where the first message includes a first parameter of the ME;

获取AUSF发送的另一个第一消息,所述另一个第一消息中包括USIM的第一参数。Obtain another first message sent by the AUSF, wherein the another first message includes a first parameter of the USIM.

可选地,所述的网络设备,其中,所述第一设备为ME时,所述第三设备包括SEAF,所述第二设备包括SEAF和USIM中的至少一个;Optionally, in the network device, when the first device is a ME, the third device includes a SEAF, and the second device includes at least one of a SEAF and a USIM;

其中,处理器410获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,包括:The processor 410 obtains a first parameter of at least one second device for performing network authentication and/or key derivation on the terminal, including:

获取SEAF发送的第一消息,所述第一消息中包括SEAF的第一参数和USIM的第一参数。A first message sent by SEAF is obtained, where the first message includes a first parameter of SEAF and a first parameter of USIM.

可选地,所述的网络设备,其中,所述设备还包括收发机420,用于:Optionally, the network device further comprises a transceiver 420, which is used to:

向第四设备发送第二消息,其中所述第二消息中包括所述第一设备的第一参数和/或至少一所述第二设备的第一参数。A second message is sent to a fourth device, wherein the second message includes a first parameter of the first device and/or at least one first parameter of the second device.

可选地,所述的网络设备,其中,在所述第一设备所支持的密码算法包括商用密码算法的情况下,所述第二消息中包括所述第一设备的第一参数和/或至少一所述第二设备的第一参数。Optionally, the network device, wherein, when the cryptographic algorithm supported by the first device includes a commercial cryptographic algorithm, the second message includes a first parameter of the first device and/or at least one first parameter of the second device.

可选地,所述的网络设备,其中,所述第一设备为统一数据管理功能UDM或认证凭证存储库和处理功能ARPF,所述至少一第二设备的第一参数包括USIM的第一参数和ME的第一参数;Optionally, the network device, wherein the first device is a unified data management function UDM or an authentication credential repository and processing function ARPF, and the first parameter of the at least one second device includes a first parameter of a USIM and a first parameter of a ME;

在所述第一设备所支持的密码算法包括商用密码算法的情况下,处理器410根据所述第一参数,确定所述目标密码算法,包括:In the case where the cryptographic algorithm supported by the first device includes a commercial cryptographic algorithm, the processor 410 determines the target cryptographic algorithm according to the first parameter, including:

在所述USIM的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第一目标密码算法为商用密码算法,所述第一目标密码算法用于计算终端进行网络认证鉴权的认证向量;在所述ME的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第二目标密码算法为商用密码算法,否则确定所述目标密码算法中的第二目标密码算法为国际密码算法;所述第二目标密码算法用于计算终端进行网络认证鉴权的鉴权参数;In the first parameter of the USIM, if the supported cryptographic algorithms include commercial cryptographic algorithms, a first target cryptographic algorithm in the target cryptographic algorithms is determined to be a commercial cryptographic algorithm, and the first target cryptographic algorithm is used to calculate the authentication vector for the terminal to perform network authentication and authorization; in the first parameter of the ME, if the supported cryptographic algorithms include commercial cryptographic algorithms, a second target cryptographic algorithm in the target cryptographic algorithms is determined to be a commercial cryptographic algorithm, otherwise, the second target cryptographic algorithm in the target cryptographic algorithms is determined to be an international cryptographic algorithm; the second target cryptographic algorithm is used to calculate the authentication parameters for the terminal to perform network authentication and authorization;

在所述USIM的第一参数中,所支持的密码算法包括国际密码算法的情况下,确定所述目标密码算法中的所述第一目标密码算法和所述第二目标算法分别为国际密码算法。In the first parameter of the USIM, when the supported cryptographic algorithms include international cryptographic algorithms, it is determined that the first target cryptographic algorithm and the second target cryptographic algorithm in the target cryptographic algorithms are international cryptographic algorithms respectively.

可选地,所述的网络设备,其中,所述第一设备为AUSF,所述至少一第二设备的第一参数包括USIM的第一参数、ME的第一参数和SEAF的第一参数;Optionally, the network device, wherein the first device is an AUSF, and the first parameter of the at least one second device includes a first parameter of a USIM, a first parameter of a ME, and a first parameter of a SEAF;

在所述第一设备所支持的密码算法包括商用密码算法的情况下,处理器410根据所述第一参数,确定所述目标密码算法,包括:In the case where the cryptographic algorithm supported by the first device includes a commercial cryptographic algorithm, the processor 410 determines the target cryptographic algorithm according to the first parameter, including:

在所述USIM的第一参数和所述SEAF的第一参数中,所支持的密码算法均包括商用密码算法的情况下,则确定所述目标密码算法中的第三目标密码算法为商用密码算法;在所述USIM的第一参数和所述SEAF的第一参数中,所支持的密码算法任一个不包括商用密码算法的情况下,则确定所述目标密码算法中的第三目标密码算法为国际密码算法;所述第三目标密码算法用于计算第一鉴权参数;In the case where the cryptographic algorithms supported in the first parameter of the USIM and the first parameter of the SEAF both include commercial cryptographic algorithms, a third target cryptographic algorithm in the target cryptographic algorithms is determined to be a commercial cryptographic algorithm; in the case where any of the cryptographic algorithms supported in the first parameter of the USIM and the first parameter of the SEAF does not include a commercial cryptographic algorithm, the third target cryptographic algorithm in the target cryptographic algorithms is determined to be an international cryptographic algorithm; the third target cryptographic algorithm is used to calculate the first authentication parameter;

在所述USIM的第一参数和所述ME的第一参数中,所支持的密码算法均包括商用密码算法的情况下,则确定所述目标密码算法中的第四目标密码算法为商用密码算法;在所述USIM的第一参数和所述ME的第一参数中,所支持的密码算法任一个不包括商用密码算法的情况下,则确定所述目标密码算法中的第四目标密码算法为国际密码算法;所述第四目标密码算法用于计算第二鉴权参数。In the first parameter of the USIM and the first parameter of the ME, when the supported cryptographic algorithms both include commercial cryptographic algorithms, the fourth target cryptographic algorithm among the target cryptographic algorithms is determined to be a commercial cryptographic algorithm; in the first parameter of the USIM and the first parameter of the ME, when any of the supported cryptographic algorithms does not include a commercial cryptographic algorithm, the fourth target cryptographic algorithm among the target cryptographic algorithms is determined to be an international cryptographic algorithm; the fourth target cryptographic algorithm is used to calculate the second authentication parameter.

可选地,所述的网络设备,其中,所述第一设备为ME,所述至少一第二设备的第一参数包括USIM的第一参数和/或SEAF的第一参数;Optionally, the network device, wherein the first device is a ME, and the first parameter of the at least one second device includes a first parameter of a USIM and/or a first parameter of a SEAF;

处理器410根据所述第一设备所支持的密码算法,确定目标密码算法,包括:The processor 410 determines a target cryptographic algorithm according to the cryptographic algorithms supported by the first device, including:

在所述USIM的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第五目标密码算法为商用密码算法,否则确定所述目标密码算法中的第五目标密码算法为国际密码算法;所述第五目标密码算法用于计算第三鉴权参数;In the first parameter of the USIM, when the supported cryptographic algorithms include commercial cryptographic algorithms, determining that a fifth target cryptographic algorithm in the target cryptographic algorithms is a commercial cryptographic algorithm, otherwise determining that the fifth target cryptographic algorithm in the target cryptographic algorithms is an international cryptographic algorithm; the fifth target cryptographic algorithm is used to calculate a third authentication parameter;

在所述SEAF的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第六目标密码算法为商用密码算法,否则确定所述目标密码算法中的第六目标密码算法为国际密码算法;所述第六目标密码算法用于计算第四鉴权参数。In the first parameter of the SEAF, when the supported cryptographic algorithms include commercial cryptographic algorithms, the sixth target cryptographic algorithm among the target cryptographic algorithms is determined to be a commercial cryptographic algorithm; otherwise, the sixth target cryptographic algorithm among the target cryptographic algorithms is determined to be an international cryptographic algorithm; the sixth target cryptographic algorithm is used to calculate the fourth authentication parameter.

可选地,所述的网络设备,其中,所述处理器410还用于:Optionally, in the network device, the processor 410 is further configured to:

在所获取的至少一第二设备的第一参数中不包括所述USIM的第一参数的情况下,调用所述USIM的算法支持状态查询接口,生成所述USIM的第一参数。In a case where the acquired first parameters of at least one second device do not include the first parameters of the USIM, an algorithm support status query interface of the USIM is called to generate the first parameters of the USIM.

可选地,所述的网络设备,其中,所述第一设备为SEAF,所述至少一第二设备的第一参数包括USIM的第一参数和/或ME的第一参数;Optionally, the network device, wherein the first device is a SEAF, and the first parameter of the at least one second device includes a first parameter of a USIM and/or a first parameter of a ME;

处理器410根据所述第一设备所支持的密码算法,确定目标密码算法,包括:The processor 410 determines a target cryptographic algorithm according to the cryptographic algorithms supported by the first device, including:

在所述USIM的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第七目标密码算法为商用密码算法;否则,确定所述目标密码算法中的第七目标密码算法为国际密码算法;所述第七目标密码算法用于计算第五鉴权参数;In the first parameter of the USIM, when the supported cryptographic algorithms include commercial cryptographic algorithms, determining that a seventh target cryptographic algorithm in the target cryptographic algorithms is a commercial cryptographic algorithm; otherwise, determining that the seventh target cryptographic algorithm in the target cryptographic algorithms is an international cryptographic algorithm; the seventh target cryptographic algorithm is used to calculate a fifth authentication parameter;

在所述ME的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第八目标密码算法为商用密码算法;否则,确定所述目标密码算法中的第八目标密码算法为国际密码算法;所述第八目标密码算法用于计算第六鉴权参数。In the first parameter of the ME, if the supported cryptographic algorithms include commercial cryptographic algorithms, the eighth target cryptographic algorithm among the target cryptographic algorithms is determined to be a commercial cryptographic algorithm; otherwise, the eighth target cryptographic algorithm among the target cryptographic algorithms is determined to be an international cryptographic algorithm; the eighth target cryptographic algorithm is used to calculate the sixth authentication parameter.

可选地,所述的网络设备,其中,所述第一设备为SEAF,处理器410根据所述第一设备所支持的密码算法,确定目标密码算法,包括:Optionally, in the network device, wherein the first device is a SEAF, the processor 410 determines the target cryptographic algorithm according to the cryptographic algorithms supported by the first device, including:

在所述第一设备所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法为商用密码算法;In a case where the cryptographic algorithms supported by the first device include commercial cryptographic algorithms, determining that the target cryptographic algorithm is a commercial cryptographic algorithm;

在所述第一设备所支持的密码算法不包括商用密码算法的情况下,确定所述目标密码算法为国际密码算法。In a case where the cryptographic algorithms supported by the first device do not include commercial cryptographic algorithms, the target cryptographic algorithm is determined to be an international cryptographic algorithm.

可选地,所述的网络设备,其中,所述第一参数包括预设指示位,用于指示相应的第二设备是否支持商用密码算法。Optionally, in the network device, the first parameter includes a preset indication bit for indicating whether the corresponding second device supports a commercial cryptographic algorithm.

可选地,所述的网络设备,其中,所述第一参数包括以下的一项或多项:Optionally, in the network device, the first parameter includes one or more of the following:

第一位数组,包括多个第一指示位,每一第一指示位对应一种类型加密密码算法,用于指示第二设备是否支持相应类型的加密密码算法;a first bit array, comprising a plurality of first indicator bits, each first indicator bit corresponding to a type of encryption cryptographic algorithm, and used to indicate whether the second device supports the corresponding type of encryption cryptographic algorithm;

第二位数组,包括多个第二指示位,每一第二指示位对应一种类型的哈希算法,用于指示第二设备是否支持相应类型的哈希算法。The second bit array includes multiple second indicator bits, each second indicator bit corresponds to a type of hash algorithm, and is used to indicate whether the second device supports the corresponding type of hash algorithm.

可选地,所述的网络设备,其中,所述第一参数包括在所述第一消息中的预留字段中,或者所述第一参数为所述第一消息中的增设参数。Optionally, in the network device, the first parameter is included in a reserved field in the first message, or the first parameter is an additional parameter in the first message.

可选地,所述的网络设备,其中,所述第一参数包括在所述第一消息中的认证管理字段AMF中。Optionally, the network device, wherein the first parameter is included in the authentication management field AMF in the first message.

本发明其中一实施例还提供一种网络设备,其中,所述网络设备为第三设备,如图5所示,该第三设备500包括收发机510,其中,所述收发机510用于:One embodiment of the present invention further provides a network device, wherein the network device is a third device, as shown in FIG5 , the third device 500 includes a transceiver 510, wherein the transceiver 510 is used to:

在对终端进行网络认证鉴权和/或密钥推衍过程中,向第一设备发送第一消息;其中,所述第一消息中包括至少一第二设备的第一参数;所述第一参数用于指示相应所述第二设备所支持的密码算法。During network authentication and/or key derivation of a terminal, a first message is sent to a first device; wherein the first message includes a first parameter of at least one second device; the first parameter is used to indicate a cryptographic algorithm supported by the corresponding second device.

可选地,所述的网络设备,其中,所述第一设备为统一数据管理功能UDM或认证凭证存储库和处理功能ARPF,所述第三设备包括AUSF,所述第二设备包括ME和SEAF中的至少一个。Optionally, the network device, wherein the first device is a unified data management function UDM or an authentication credential repository and processing function ARPF, the third device includes AUSF, and the second device includes at least one of ME and SEAF.

可选地,所述的网络设备,其中,所述第一设备为AUSF,所述第三设备为SEAF,所述第二设备包括ME和SEAF中的至少一个;或者Optionally, the network device, wherein the first device is an AUSF, the third device is a SEAF, and the second device includes at least one of a ME and a SEAF; or

所述第一设备为AUSF,所述第三设备为UDM或ARPF,所述第二设备包括USIM。The first device is an AUSF, the third device is an UDM or an ARPF, and the second device includes a USIM.

可选地,所述的网络设备,其中,所述第一设备为SEAF,所述第三设备为ME,所述第二设备包括ME;或者Optionally, in the network device, the first device is a SEAF, the third device is a ME, and the second device includes the ME; or

所述第一设备为SEAF,所述第三设备为AUSF,所述第二设备包括USIM。The first device is a SEAF, the third device is an AUSF, and the second device includes a USIM.

可选地,所述的网络设备,其中,所述第一设备为ME,所述第三设备包括SEAF,所述第二设备包括SEAF和USIM中的至少一个。Optionally, the network device, wherein the first device is a ME, the third device includes a SEAF, and the second device includes at least one of a SEAF and a USIM.

可选地,所述的网络设备,其中,所述第一参数包括预设指示位,用于指示相应的第二设备是否支持商用密码算法。Optionally, in the network device, the first parameter includes a preset indication bit for indicating whether the corresponding second device supports a commercial cryptographic algorithm.

可选地,所述的网络设备,其中,所述第一参数包括以下的一项或多项:Optionally, in the network device, the first parameter includes one or more of the following:

第一位数组,包括多个第一指示位,每一第一指示位对应一种类型加密密码算法,用于指示第二设备是否支持相应类型的加密密码算法;a first bit array, comprising a plurality of first indicator bits, each first indicator bit corresponding to a type of encryption cryptographic algorithm, and used to indicate whether the second device supports the corresponding type of encryption cryptographic algorithm;

第二位数组,包括多个第二指示位,每一第二指示位对应一种类型的哈希算法,用于指示第二设备是否支持相应类型的哈希算法。The second bit array includes multiple second indicator bits, each second indicator bit corresponds to a type of hash algorithm, and is used to indicate whether the second device supports the corresponding type of hash algorithm.

本发明其中一实施例还提供一种认证鉴权装置,其中,应用于第一设备,如图6所示,所述装置包括:One embodiment of the present invention further provides an authentication device, which is applied to a first device, as shown in FIG6 , and includes:

获取模块610,用于获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,所述第一参数用于指示相应所述第二设备所支持的密码算法;An acquisition module 610 is used to acquire a first parameter of at least one second device used to perform network authentication and/or key derivation on the terminal, wherein the first parameter is used to indicate a cryptographic algorithm supported by the corresponding second device;

确定模块620,用于根据所述第一设备所支持的密码算法和/或所述第一参数,确定目标密码算法;A determination module 620, configured to determine a target cryptographic algorithm according to the cryptographic algorithms supported by the first device and/or the first parameters;

鉴权模块630,用于根据所述目标密码算法,执行网络认证鉴权和/或密钥推衍的相关操作。The authentication module 630 is used to perform network authentication and/or key derivation related operations according to the target cryptographic algorithm.

可选地,所述的认证鉴权装置,其中,确定模块620根据所述第一设备所支持的密码算法和/或所述第一参数,确定目标密码算法,包括:Optionally, in the authentication device, the determination module 620 determines the target cryptographic algorithm according to the cryptographic algorithm supported by the first device and/or the first parameter, including:

在根据所述第一设备所支持的密码算法,确定所述第一设备不支持商用密码算法的情况下,确定所述目标密码算法为国际密码算法;If it is determined that the first device does not support a commercial cryptographic algorithm according to the cryptographic algorithms supported by the first device, determining that the target cryptographic algorithm is an international cryptographic algorithm;

在所述第一设备所支持的密码算法包括商用密码算法的情况下,根据所述第一参数,确定所述目标密码算法。In the case that the cryptographic algorithms supported by the first device include commercial cryptographic algorithms, the target cryptographic algorithm is determined according to the first parameters.

可选地,所述的认证鉴权装置,其中,所述至少一第二设备包括以下的一项或多项:Optionally, in the authentication apparatus, the at least one second device includes one or more of the following:

移动设备ME、全球用户识别卡USIM和安全锚点功能SEAF。Mobile equipment ME, Universal Subscriber Identity Module USIM and Security Anchor Function SEAF.

可选地,所述的认证鉴权装置,其中,获取模块610获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,包括以下至少一项:Optionally, in the authentication device, the acquisition module 610 acquires a first parameter of at least one second device used for performing network authentication and/or key derivation on the terminal, including at least one of the following:

获取终端进行网络认证鉴权和/或密钥推衍过程中第三设备发送的第一消息,其中所述第一消息中包括至少一所述第二设备的第一参数;Acquire a first message sent by a third device during a process of performing network authentication and/or key derivation on a terminal, wherein the first message includes at least one first parameter of the second device;

根据所述第二设备的签约数据,获得所述第二设备的第一参数。A first parameter of the second device is obtained according to the subscription data of the second device.

可选地,所述的认证鉴权装置,其中,所述第一设备为统一数据管理功能UDM或认证凭证存储库和处理功能ARPF时,所述第三设备包括AUSF,所述第二设备包括ME、USIM和SEAF中的至少一个;Optionally, in the authentication and authorization apparatus, when the first device is a unified data management function UDM or an authentication credential repository and processing function ARPF, the third device includes an AUSF, and the second device includes at least one of an ME, a USIM and a SEAF;

其中,获取模块610获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,包括以下中的至少一个:The acquisition module 610 acquires a first parameter of at least one second device used for performing network authentication and/or key derivation on the terminal, including at least one of the following:

获取所述AUSF发送的第一消息,所述第一消息中包括ME和/或SEAF的第一参数;Obtaining a first message sent by the AUSF, where the first message includes a first parameter of the ME and/or the SEAF;

根据所述USIM的签约数据,获得所述USIM的第一参数。A first parameter of the USIM is obtained according to the subscription data of the USIM.

可选地,所述的认证鉴权装置,其中,所述第一设备为AUSF时,所述第三设备包括UDM、ARPF和/或SEAF,所述第二设备包括ME、USIM和SEAF中的至少一个;Optionally, in the authentication device, when the first device is an AUSF, the third device includes a UDM, an ARPF and/or a SEAF, and the second device includes at least one of a ME, a USIM and a SEAF;

其中,获取模块610获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,包括以下中的至少一个:The acquisition module 610 acquires a first parameter of at least one second device used for performing network authentication and/or key derivation on the terminal, including at least one of the following:

获取SEAF发送的一个第一消息,所述一个第一消息中包括ME的第一参数和SEAF的第一参数;Acquire a first message sent by SEAF, wherein the first message includes a first parameter of ME and a first parameter of SEAF;

获取UDM或ARPF发送的另一个第一消息,所述另一个第一消息中包括USIM的第一参数。Another first message sent by the UDM or the ARPF is acquired, where the another first message includes a first parameter of the USIM.

可选地,所述的认证鉴权装置,其中,所述第一设备为SEAF时,所述第三设备包括ME和/或AUSF,所述第二设备包括ME和USIM中的至少一个;Optionally, in the authentication device, when the first device is a SEAF, the third device includes a ME and/or an AUSF, and the second device includes at least one of a ME and a USIM;

其中,获取模块610获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,包括以下中的至少一个:The acquisition module 610 acquires a first parameter of at least one second device used for performing network authentication and/or key derivation on the terminal, including at least one of the following:

获取ME发送的一个第一消息,所述一个第一消息中包括ME的第一参数;Acquire a first message sent by the ME, where the first message includes a first parameter of the ME;

获取AUSF发送的另一个第一消息,所述另一个第一消息中包括USIM的第一参数。Obtain another first message sent by the AUSF, wherein the another first message includes a first parameter of the USIM.

可选地,所述的认证鉴权装置,其中,所述第一设备为ME时,所述第三设备包括SEAF,所述第二设备包括SEAF和USIM中的至少一个;Optionally, in the authentication device, when the first device is a ME, the third device includes a SEAF, and the second device includes at least one of a SEAF and a USIM;

其中,获取模块610获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,包括:The acquisition module 610 acquires a first parameter of at least one second device used for performing network authentication and/or key derivation on the terminal, including:

获取SEAF发送的第一消息,所述第一消息中包括SEAF的第一参数和USIM的第一参数。A first message sent by SEAF is obtained, where the first message includes a first parameter of SEAF and a first parameter of USIM.

可选地,所述的认证鉴权装置,其中,所述装置还包括:Optionally, the authentication device further comprises:

第二发送模块640,用于向第四设备发送第二消息,其中所述第二消息中包括所述第一设备的第一参数和/或至少一所述第二设备的第一参数。The second sending module 640 is configured to send a second message to a fourth device, wherein the second message includes a first parameter of the first device and/or at least one first parameter of the second device.

可选地,所述的认证鉴权装置,其中,在所述第一设备所支持的密码算法包括商用密码算法的情况下,所述第二消息中包括所述第一设备的第一参数和/或至少一所述第二设备的第一参数。Optionally, in the authentication apparatus, when the cryptographic algorithm supported by the first device includes a commercial cryptographic algorithm, the second message includes a first parameter of the first device and/or at least one first parameter of the second device.

可选地,所述的认证鉴权装置,其中,所述第一设备为统一数据管理功能UDM或认证凭证存储库和处理功能ARPF,所述至少一第二设备的第一参数包括USIM的第一参数和ME的第一参数;Optionally, in the authentication and authorization device, the first device is a unified data management function UDM or an authentication credential repository and processing function ARPF, and the first parameter of the at least one second device includes a first parameter of a USIM and a first parameter of a ME;

在所述第一设备所支持的密码算法包括商用密码算法的情况下,确定模块620根据所述第一参数,确定所述目标密码算法,包括:In the case where the cryptographic algorithm supported by the first device includes a commercial cryptographic algorithm, the determination module 620 determines the target cryptographic algorithm according to the first parameter, including:

在所述USIM的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第一目标密码算法为商用密码算法,所述第一目标密码算法用于计算终端进行网络认证鉴权的认证向量;在所述ME的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第二目标密码算法为商用密码算法,否则确定所述目标密码算法中的第二目标密码算法为国际密码算法;所述第二目标密码算法用于计算终端进行网络认证鉴权的鉴权参数;In the first parameter of the USIM, if the supported cryptographic algorithms include commercial cryptographic algorithms, a first target cryptographic algorithm in the target cryptographic algorithms is determined to be a commercial cryptographic algorithm, and the first target cryptographic algorithm is used to calculate the authentication vector for the terminal to perform network authentication and authorization; in the first parameter of the ME, if the supported cryptographic algorithms include commercial cryptographic algorithms, a second target cryptographic algorithm in the target cryptographic algorithms is determined to be a commercial cryptographic algorithm, otherwise, the second target cryptographic algorithm in the target cryptographic algorithms is determined to be an international cryptographic algorithm; the second target cryptographic algorithm is used to calculate the authentication parameters for the terminal to perform network authentication and authorization;

在所述USIM的第一参数中,所支持的密码算法包括国际密码算法的情况下,确定所述目标密码算法中的所述第一目标密码算法和所述第二目标算法分别为国际密码算法。In the first parameter of the USIM, when the supported cryptographic algorithms include international cryptographic algorithms, it is determined that the first target cryptographic algorithm and the second target cryptographic algorithm in the target cryptographic algorithms are international cryptographic algorithms respectively.

可选地,所述的认证鉴权装置,其中,所述第一设备为AUSF,所述至少一第二设备的第一参数包括USIM的第一参数、ME的第一参数和SEAF的第一参数;Optionally, in the authentication device, the first device is an AUSF, and the first parameter of the at least one second device includes a first parameter of a USIM, a first parameter of a ME, and a first parameter of a SEAF;

在所述第一设备所支持的密码算法包括商用密码算法的情况下,确定模块620根据所述第一参数,确定所述目标密码算法,包括:In the case where the cryptographic algorithm supported by the first device includes a commercial cryptographic algorithm, the determination module 620 determines the target cryptographic algorithm according to the first parameter, including:

在所述USIM的第一参数和所述SEAF的第一参数中,所支持的密码算法均包括商用密码算法的情况下,则确定所述目标密码算法中的第三目标密码算法为商用密码算法;在所述USIM的第一参数和所述SEAF的第一参数中,所支持的密码算法任一个不包括商用密码算法的情况下,则确定所述目标密码算法中的第三目标密码算法为国际密码算法;所述第三目标密码算法用于计算第一鉴权参数;In the case where the cryptographic algorithms supported in the first parameter of the USIM and the first parameter of the SEAF both include commercial cryptographic algorithms, a third target cryptographic algorithm in the target cryptographic algorithms is determined to be a commercial cryptographic algorithm; in the case where any of the cryptographic algorithms supported in the first parameter of the USIM and the first parameter of the SEAF does not include a commercial cryptographic algorithm, the third target cryptographic algorithm in the target cryptographic algorithms is determined to be an international cryptographic algorithm; the third target cryptographic algorithm is used to calculate the first authentication parameter;

在所述USIM的第一参数和所述ME的第一参数中,所支持的密码算法均包括商用密码算法的情况下,则确定所述目标密码算法中的第四目标密码算法为商用密码算法;在所述USIM的第一参数和所述ME的第一参数中,所支持的密码算法任一个不包括商用密码算法的情况下,则确定所述目标密码算法中的第四目标密码算法为国际密码算法;所述第四目标密码算法用于计算第二鉴权参数。In the first parameter of the USIM and the first parameter of the ME, when the supported cryptographic algorithms both include commercial cryptographic algorithms, the fourth target cryptographic algorithm among the target cryptographic algorithms is determined to be a commercial cryptographic algorithm; in the first parameter of the USIM and the first parameter of the ME, when any of the supported cryptographic algorithms does not include a commercial cryptographic algorithm, the fourth target cryptographic algorithm among the target cryptographic algorithms is determined to be an international cryptographic algorithm; the fourth target cryptographic algorithm is used to calculate the second authentication parameter.

可选地,所述的认证鉴权装置,其中,所述第一设备为ME,所述至少一第二设备的第一参数包括USIM的第一参数和/或SEAF的第一参数;Optionally, in the authentication device, the first device is a ME, and the first parameter of the at least one second device includes a first parameter of a USIM and/or a first parameter of a SEAF;

确定模块620根据所述第一设备所支持的密码算法,确定目标密码算法,包括:The determination module 620 determines a target cryptographic algorithm according to the cryptographic algorithms supported by the first device, including:

在所述USIM的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第五目标密码算法为商用密码算法,否则确定所述目标密码算法中的第五目标密码算法为国际密码算法;所述第五目标密码算法用于计算第三鉴权参数;In the first parameter of the USIM, when the supported cryptographic algorithms include commercial cryptographic algorithms, determining that a fifth target cryptographic algorithm in the target cryptographic algorithms is a commercial cryptographic algorithm, otherwise determining that the fifth target cryptographic algorithm in the target cryptographic algorithms is an international cryptographic algorithm; the fifth target cryptographic algorithm is used to calculate a third authentication parameter;

在所述SEAF的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第六目标密码算法为商用密码算法,否则确定所述目标密码算法中的第六目标密码算法为国际密码算法;所述第六目标密码算法用于计算第四鉴权参数。In the first parameter of the SEAF, if the supported cryptographic algorithms include commercial cryptographic algorithms, the sixth target cryptographic algorithm among the target cryptographic algorithms is determined to be a commercial cryptographic algorithm; otherwise, the sixth target cryptographic algorithm among the target cryptographic algorithms is determined to be an international cryptographic algorithm; the sixth target cryptographic algorithm is used to calculate the fourth authentication parameter.

可选地,所述的认证鉴权装置,其中,所述鉴权模块630还用于:Optionally, in the authentication device, the authentication module 630 is further used to:

在所获取的至少一第二设备的第一参数中不包括所述USIM的第一参数的情况下,调用所述USIM的算法支持状态查询接口,生成所述USIM的第一参数。In a case where the acquired first parameters of at least one second device do not include the first parameters of the USIM, an algorithm support status query interface of the USIM is called to generate the first parameters of the USIM.

可选地,所述的认证鉴权装置,其中,所述第一设备为SEAF,所述至少一第二设备的第一参数包括USIM的第一参数和/或ME的第一参数;Optionally, in the authentication device, the first device is a SEAF, and the first parameter of the at least one second device includes a first parameter of a USIM and/or a first parameter of a ME;

确定模块620根据所述第一设备所支持的密码算法,确定目标密码算法,包括:The determination module 620 determines a target cryptographic algorithm according to the cryptographic algorithms supported by the first device, including:

在所述USIM的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第七目标密码算法为商用密码算法;否则,确定所述目标密码算法中的第七目标密码算法为国际密码算法;所述第七目标密码算法用于计算第五鉴权参数;In the first parameter of the USIM, when the supported cryptographic algorithms include commercial cryptographic algorithms, determining that a seventh target cryptographic algorithm in the target cryptographic algorithms is a commercial cryptographic algorithm; otherwise, determining that the seventh target cryptographic algorithm in the target cryptographic algorithms is an international cryptographic algorithm; the seventh target cryptographic algorithm is used to calculate a fifth authentication parameter;

在所述ME的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第八目标密码算法为商用密码算法;否则,确定所述目标密码算法中的第八目标密码算法为国际密码算法;所述第八目标密码算法用于计算第六鉴权参数。In the first parameter of the ME, if the supported cryptographic algorithms include commercial cryptographic algorithms, the eighth target cryptographic algorithm among the target cryptographic algorithms is determined to be a commercial cryptographic algorithm; otherwise, the eighth target cryptographic algorithm among the target cryptographic algorithms is determined to be an international cryptographic algorithm; the eighth target cryptographic algorithm is used to calculate the sixth authentication parameter.

可选地,所述的认证鉴权装置,其中,所述第一设备为SEAF,确定模块620根据所述第一设备所支持的密码算法,确定目标密码算法,包括:Optionally, in the authentication apparatus, wherein the first device is a SEAF, the determination module 620 determines the target cryptographic algorithm according to the cryptographic algorithms supported by the first device, including:

在所述第一设备所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法为商用密码算法;In a case where the cryptographic algorithms supported by the first device include commercial cryptographic algorithms, determining that the target cryptographic algorithm is a commercial cryptographic algorithm;

在所述第一设备所支持的密码算法不包括商用密码算法的情况下,确定所述目标密码算法为国际密码算法。In a case where the cryptographic algorithms supported by the first device do not include commercial cryptographic algorithms, the target cryptographic algorithm is determined to be an international cryptographic algorithm.

可选地,所述的认证鉴权装置,其中,所述第一参数包括预设指示位,用于指示相应的第二设备是否支持商用密码算法。Optionally, in the authentication device, the first parameter includes a preset indication bit for indicating whether the corresponding second device supports a commercial cryptographic algorithm.

可选地,所述的认证鉴权装置,其中,所述第一参数包括以下的一项或多项:Optionally, in the authentication device, the first parameter includes one or more of the following:

第一位数组,包括多个第一指示位,每一第一指示位对应一种类型加密密码算法,用于指示第二设备是否支持相应类型的加密密码算法;a first bit array, comprising a plurality of first indicator bits, each first indicator bit corresponding to a type of encryption cryptographic algorithm, and used to indicate whether the second device supports the corresponding type of encryption cryptographic algorithm;

第二位数组,包括多个第二指示位,每一第二指示位对应一种类型的哈希算法,用于指示第二设备是否支持相应类型的哈希算法。The second bit array includes multiple second indicator bits, each second indicator bit corresponds to a type of hash algorithm, and is used to indicate whether the second device supports the corresponding type of hash algorithm.

可选地,所述的认证鉴权装置,其中,所述第一参数包括在所述第一消息中的预留字段中,或者所述第一参数为所述第一消息中的增设参数。Optionally, in the authentication device, the first parameter is included in a reserved field in the first message, or the first parameter is an additional parameter in the first message.

可选地,所述的认证鉴权装置,其中,所述第一参数包括在所述第一消息中的认证管理字段AMF中。Optionally, in the authentication and authorization device, the first parameter is included in the authentication management field AMF in the first message.

本发明其中一实施例还提供一种认证鉴权装置,应用于第三设备,如图7所示,所述装置包括:One embodiment of the present invention further provides an authentication device, which is applied to a third device, as shown in FIG7 , and the device includes:

第一发送模块710,用于在对终端进行网络认证鉴权和/或密钥推衍过程中,向第一设备发送第一消息;其中,所述第一消息中包括至少一第二设备的第一参数;所述第一参数用于指示相应所述第二设备所支持的密码算法。The first sending module 710 is used to send a first message to a first device during network authentication and/or key derivation of a terminal; wherein the first message includes a first parameter of at least one second device; the first parameter is used to indicate the cryptographic algorithm supported by the corresponding second device.

可选地,所述的认证鉴权装置,其中,所述第一设备为统一数据管理功能UDM或认证凭证存储库和处理功能ARPF,所述第三设备包括AUSF,所述第二设备包括ME和SEAF中的至少一个。Optionally, in the authentication and authorization apparatus, the first device is a unified data management function UDM or an authentication credential repository and processing function ARPF, the third device includes AUSF, and the second device includes at least one of ME and SEAF.

可选地,所述的认证鉴权装置,其中,所述第一设备为AUSF,所述第三设备为SEAF,所述第二设备包括ME和SEAF中的至少一个;或者Optionally, in the authentication apparatus, the first device is an AUSF, the third device is a SEAF, and the second device includes at least one of a ME and a SEAF; or

所述第一设备为AUSF,所述第三设备为UDM或ARPF,所述第二设备包括USIM。The first device is an AUSF, the third device is an UDM or an ARPF, and the second device includes a USIM.

可选地,所述的认证鉴权装置,其中,所述第一设备为SEAF,所述第三设备为ME,所述第二设备包括ME;或者Optionally, in the authentication apparatus, the first device is a SEAF, the third device is a ME, and the second device includes the ME; or

所述第一设备为SEAF,所述第三设备为AUSF,所述第二设备包括USIM。The first device is a SEAF, the third device is an AUSF, and the second device includes a USIM.

可选地,所述的认证鉴权装置,其中,所述第一设备为ME,所述第三设备包括SEAF,所述第二设备包括SEAF和USIM中的至少一个。Optionally, in the authentication apparatus, the first device is a ME, the third device includes a SEAF, and the second device includes at least one of a SEAF and a USIM.

可选地,所述的认证鉴权装置,其中,所述第一参数包括预设指示位,用于指示相应的第二设备是否支持商用密码算法。Optionally, in the authentication device, the first parameter includes a preset indication bit for indicating whether the corresponding second device supports a commercial cryptographic algorithm.

可选地,所述的认证鉴权装置,其中,所述第一参数包括以下的一项或多项:Optionally, in the authentication device, the first parameter includes one or more of the following:

第一位数组,包括多个第一指示位,每一第一指示位对应一种类型加密密码算法,用于指示第二设备是否支持相应类型的加密密码算法;a first bit array, comprising a plurality of first indicator bits, each first indicator bit corresponding to a type of encryption cryptographic algorithm, and used to indicate whether the second device supports the corresponding type of encryption cryptographic algorithm;

第二位数组,包括多个第二指示位,每一第二指示位对应一种类型的哈希算法,用于指示第二设备是否支持相应类型的哈希算法。The second bit array includes multiple second indicator bits, each second indicator bit corresponds to a type of hash algorithm, and is used to indicate whether the second device supports the corresponding type of hash algorithm.

本发明其中一实施例还提供一种网络设备,其中,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序,所述程序被所述处理器执行时实现如上任一项所述的认证鉴权方法。One embodiment of the present invention further provides a network device, which includes a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program implements the authentication method as described in any one of the above items when executed by the processor.

其中,所述网络设备的处理器上运行的程序,执行所述认证鉴权方法的具体实施方式,可以参阅所述认证鉴权方法应用于第一设备和第三设备时的详细说明,在此不再重复描述。Among them, the specific implementation method of executing the authentication method by the program running on the processor of the network device can refer to the detailed description when the authentication method is applied to the first device and the third device, and will not be repeated here.

另外,本发明具体实施例还提供一种可读存储介质,其上存储有计算机程序,其中,该程序被处理器执行时实现如上中任一项所述认证鉴权方法中的步骤。In addition, a specific embodiment of the present invention further provides a readable storage medium on which a computer program is stored, wherein when the program is executed by a processor, the steps in the authentication method described in any one of the above items are implemented.

具体地,该可读存储介质应用于上述的第一设备或第三设备,在应用于第一设备和第三设备时,对应认证鉴权方法中的执行步骤如上的详细描述,在此不再赘述。Specifically, the readable storage medium is applied to the first device or the third device mentioned above. When applied to the first device and the third device, the execution steps in the corresponding authentication method are as described in detail above and will not be repeated here.

在本申请所提供的几个实施例中,应该理解到,所揭露方法和装置,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理包括,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述收发方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform some steps of the sending and receiving methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.

以上所述的是本发明的优选实施方式,应当指出对于本技术领域的普通人员来说,在不脱离本发明所述原理前提下,还可以作出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary personnel in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims (33)

1.一种认证鉴权方法,其特征在于,由第一设备执行,所述方法包括:1. An authentication method, characterized in that it is performed by a first device, and the method comprises: 获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,所述第一参数用于指示相应所述第二设备所支持的密码算法;Acquire a first parameter of at least one second device used for performing network authentication and/or key derivation on the terminal, wherein the first parameter is used to indicate a cryptographic algorithm supported by the corresponding second device; 根据所述第一设备所支持的密码算法和/或所述第一参数,确定目标密码算法;Determining a target cryptographic algorithm according to the cryptographic algorithms supported by the first device and/or the first parameters; 根据所述目标密码算法,执行网络认证鉴权和/或密钥推衍的相关操作。According to the target cryptographic algorithm, network authentication and/or key derivation related operations are performed. 2.根据权利要求1所述的认证鉴权方法,其特征在于,根据所述第一设备所支持的密码算法和/或所述第一参数,确定目标密码算法,包括:2. The authentication method according to claim 1, characterized in that determining a target cryptographic algorithm according to the cryptographic algorithm supported by the first device and/or the first parameter comprises: 在根据所述第一设备所支持的密码算法,确定所述第一设备不支持商用密码算法的情况下,确定所述目标密码算法为国际密码算法;If it is determined that the first device does not support a commercial cryptographic algorithm according to the cryptographic algorithms supported by the first device, determining that the target cryptographic algorithm is an international cryptographic algorithm; 在所述第一设备所支持的密码算法包括商用密码算法的情况下,根据所述第一参数,确定所述目标密码算法。In the case that the cryptographic algorithms supported by the first device include commercial cryptographic algorithms, the target cryptographic algorithm is determined according to the first parameters. 3.根据权利要求1所述的认证鉴权方法,其特征在于,所述至少一第二设备包括以下的一项或多项:3. The authentication method according to claim 1, wherein the at least one second device comprises one or more of the following: 移动设备ME、全球用户识别卡USIM和安全锚点功能SEAF。Mobile equipment ME, Universal Subscriber Identity Module USIM and Security Anchor Function SEAF. 4.根据权利要求1所述的认证鉴权方法,其特征在于,获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,包括以下至少一项:4. The authentication method according to claim 1, wherein obtaining the first parameter of at least one second device used for performing network authentication and/or key derivation on the terminal comprises at least one of the following: 获取终端进行网络认证鉴权和/或密钥推衍过程中第三设备发送的第一消息,其中所述第一消息中包括至少一所述第二设备的第一参数;Acquire a first message sent by a third device during a process of performing network authentication and/or key derivation on a terminal, wherein the first message includes at least one first parameter of the second device; 根据所述第二设备的签约数据,获得所述第二设备的第一参数。A first parameter of the second device is obtained according to the subscription data of the second device. 5.根据权利要求4所述的认证鉴权方法,其特征在于,所述第一设备为统一数据管理功能UDM或认证凭证存储库和处理功能ARPF时,所述第三设备包括AUSF,所述第二设备包括ME、USIM和SEAF中的至少一个;5. The authentication method according to claim 4, characterized in that when the first device is a unified data management function UDM or an authentication credential repository and processing function ARPF, the third device includes an AUSF, and the second device includes at least one of an ME, a USIM and a SEAF; 其中,获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,包括以下中的至少一个:Wherein, obtaining a first parameter of at least one second device for performing network authentication and/or key derivation on the terminal includes at least one of the following: 获取所述AUSF发送的第一消息,所述第一消息中包括ME和/或SEAF的第一参数;Obtaining a first message sent by the AUSF, where the first message includes a first parameter of the ME and/or the SEAF; 根据所述USIM的签约数据,获得所述USIM的第一参数。A first parameter of the USIM is obtained according to the subscription data of the USIM. 6.根据权利要求4所述的认证鉴权方法,其特征在于,所述第一设备为AUSF时,所述第三设备包括UDM、ARPF和/或SEAF,所述第二设备包括ME、USIM和SEAF中的至少一个;6. The authentication method according to claim 4, characterized in that when the first device is AUSF, the third device includes UDM, ARPF and/or SEAF, and the second device includes at least one of ME, USIM and SEAF; 其中,获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,包括以下中的至少一个:Wherein, obtaining a first parameter of at least one second device for performing network authentication and/or key derivation on the terminal includes at least one of the following: 获取SEAF发送的一个第一消息,所述一个第一消息中包括ME的第一参数和SEAF的第一参数;Acquire a first message sent by SEAF, wherein the first message includes a first parameter of ME and a first parameter of SEAF; 获取UDM或ARPF发送的另一个第一消息,所述另一个第一消息中包括USIM的第一参数。Another first message sent by the UDM or the ARPF is acquired, where the another first message includes a first parameter of the USIM. 7.根据权利要求4所述的认证鉴权方法,其特征在于,所述第一设备为SEAF时,所述第三设备包括ME和/或AUSF,所述第二设备包括ME和USIM中的至少一个;7. The authentication method according to claim 4, characterized in that when the first device is a SEAF, the third device includes an ME and/or an AUSF, and the second device includes at least one of an ME and a USIM; 其中,获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,包括以下中的至少一个:Wherein, obtaining a first parameter of at least one second device for performing network authentication and/or key derivation on the terminal includes at least one of the following: 获取ME发送的一个第一消息,所述一个第一消息中包括ME的第一参数;Acquire a first message sent by the ME, where the first message includes a first parameter of the ME; 获取AUSF发送的另一个第一消息,所述另一个第一消息中包括USIM的第一参数。Obtain another first message sent by the AUSF, wherein the another first message includes a first parameter of the USIM. 8.根据权利要求4所述的认证鉴权方法,其特征在于,所述第一设备为ME时,所述第三设备包括SEAF,所述第二设备包括SEAF和USIM中的至少一个;8. The authentication method according to claim 4, characterized in that when the first device is a ME, the third device includes a SEAF, and the second device includes at least one of a SEAF and a USIM; 其中,获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,包括:Wherein, obtaining a first parameter of at least one second device for performing network authentication and/or key derivation on the terminal includes: 获取SEAF发送的第一消息,所述第一消息中包括SEAF的第一参数和USIM的第一参数。A first message sent by SEAF is obtained, where the first message includes a first parameter of SEAF and a first parameter of USIM. 9.根据权利要求1或4所述的认证鉴权方法,其特征在于,所述方法还包括:9. The authentication method according to claim 1 or 4, characterized in that the method further comprises: 向第四设备发送第二消息,其中所述第二消息中包括所述第一设备的第一参数和/或至少一所述第二设备的第一参数。A second message is sent to a fourth device, wherein the second message includes a first parameter of the first device and/or at least one first parameter of the second device. 10.根据权利要求9所述的认证鉴权方法,其特征在于,在所述第一设备所支持的密码算法包括商用密码算法的情况下,所述第二消息中包括所述第一设备的第一参数和/或至少一所述第二设备的第一参数。10. The authentication method according to claim 9 is characterized in that, when the cryptographic algorithm supported by the first device includes a commercial cryptographic algorithm, the second message includes a first parameter of the first device and/or at least one first parameter of the second device. 11.根据权利要求2所述的认证鉴权方法,其特征在于,所述第一设备为统一数据管理功能UDM或认证凭证存储库和处理功能ARPF,所述至少一第二设备的第一参数包括USIM的第一参数和ME的第一参数;11. The authentication method according to claim 2, characterized in that the first device is a unified data management function UDM or an authentication credential repository and processing function ARPF, and the first parameter of the at least one second device includes a first parameter of a USIM and a first parameter of a ME; 在所述第一设备所支持的密码算法包括商用密码算法的情况下,根据所述第一参数,确定所述目标密码算法,包括:In a case where the cryptographic algorithm supported by the first device includes a commercial cryptographic algorithm, determining the target cryptographic algorithm according to the first parameter includes: 在所述USIM的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第一目标密码算法为商用密码算法,所述第一目标密码算法用于计算终端进行网络认证鉴权的认证向量;在所述ME的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第二目标密码算法为商用密码算法,否则确定所述目标密码算法中的第二目标密码算法为国际密码算法;所述第二目标密码算法用于计算终端进行网络认证鉴权的鉴权参数;In the first parameter of the USIM, if the supported cryptographic algorithms include commercial cryptographic algorithms, a first target cryptographic algorithm in the target cryptographic algorithms is determined to be a commercial cryptographic algorithm, and the first target cryptographic algorithm is used to calculate the authentication vector for the terminal to perform network authentication and authorization; in the first parameter of the ME, if the supported cryptographic algorithms include commercial cryptographic algorithms, a second target cryptographic algorithm in the target cryptographic algorithms is determined to be a commercial cryptographic algorithm, otherwise, the second target cryptographic algorithm in the target cryptographic algorithms is determined to be an international cryptographic algorithm; the second target cryptographic algorithm is used to calculate the authentication parameters for the terminal to perform network authentication and authorization; 在所述USIM的第一参数中,所支持的密码算法包括国际密码算法的情况下,确定所述目标密码算法中的所述第一目标密码算法和所述第二目标算法分别为国际密码算法。In the first parameter of the USIM, when the supported cryptographic algorithms include international cryptographic algorithms, it is determined that the first target cryptographic algorithm and the second target cryptographic algorithm in the target cryptographic algorithms are international cryptographic algorithms respectively. 12.根据权利要求2所述的认证鉴权方法,其特征在于,所述第一设备为AUSF,所述至少一第二设备的第一参数包括USIM的第一参数、ME的第一参数和SEAF的第一参数;12. The authentication method according to claim 2, wherein the first device is an AUSF, and the first parameter of the at least one second device comprises a first parameter of a USIM, a first parameter of a ME, and a first parameter of a SEAF; 在所述第一设备所支持的密码算法包括商用密码算法的情况下,根据所述第一参数,确定所述目标密码算法,包括:In a case where the cryptographic algorithm supported by the first device includes a commercial cryptographic algorithm, determining the target cryptographic algorithm according to the first parameter includes: 在所述USIM的第一参数和所述SEAF的第一参数中,所支持的密码算法均包括商用密码算法的情况下,则确定所述目标密码算法中的第三目标密码算法为商用密码算法;在所述USIM的第一参数和所述SEAF的第一参数中,所支持的密码算法任一个不包括商用密码算法的情况下,则确定所述目标密码算法中的第三目标密码算法为国际密码算法;所述第三目标密码算法用于计算第一鉴权参数;In the case where the cryptographic algorithms supported in the first parameter of the USIM and the first parameter of the SEAF both include commercial cryptographic algorithms, a third target cryptographic algorithm in the target cryptographic algorithms is determined to be a commercial cryptographic algorithm; in the case where any of the cryptographic algorithms supported in the first parameter of the USIM and the first parameter of the SEAF does not include a commercial cryptographic algorithm, the third target cryptographic algorithm in the target cryptographic algorithms is determined to be an international cryptographic algorithm; the third target cryptographic algorithm is used to calculate the first authentication parameter; 在所述USIM的第一参数和所述ME的第一参数中,所支持的密码算法均包括商用密码算法的情况下,则确定所述目标密码算法中的第四目标密码算法为商用密码算法;在所述USIM的第一参数和所述ME的第一参数中,所支持的密码算法任一个不包括商用密码算法的情况下,则确定所述目标密码算法中的第四目标密码算法为国际密码算法;所述第四目标密码算法用于计算第二鉴权参数。In the first parameter of the USIM and the first parameter of the ME, when the supported cryptographic algorithms both include commercial cryptographic algorithms, the fourth target cryptographic algorithm among the target cryptographic algorithms is determined to be a commercial cryptographic algorithm; in the first parameter of the USIM and the first parameter of the ME, when any of the supported cryptographic algorithms does not include a commercial cryptographic algorithm, the fourth target cryptographic algorithm among the target cryptographic algorithms is determined to be an international cryptographic algorithm; the fourth target cryptographic algorithm is used to calculate the second authentication parameter. 13.根据权利要求2所述的认证鉴权方法,其特征在于,所述第一设备为ME,所述至少一第二设备的第一参数包括USIM的第一参数和/或SEAF的第一参数;13. The authentication method according to claim 2, characterized in that the first device is an ME, and the first parameter of the at least one second device includes a first parameter of a USIM and/or a first parameter of a SEAF; 根据所述第一设备所支持的密码算法,确定目标密码算法,包括:Determining a target cryptographic algorithm according to the cryptographic algorithms supported by the first device includes: 在所述USIM的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第五目标密码算法为商用密码算法,否则确定所述目标密码算法中的第五目标密码算法为国际密码算法;所述第五目标密码算法用于计算终端第三鉴权参数;In the first parameter of the USIM, if the supported cryptographic algorithm includes a commercial cryptographic algorithm, determining that a fifth target cryptographic algorithm in the target cryptographic algorithm is a commercial cryptographic algorithm, otherwise determining that the fifth target cryptographic algorithm in the target cryptographic algorithm is an international cryptographic algorithm; the fifth target cryptographic algorithm is used to calculate a third authentication parameter of the terminal; 在所述SEAF的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第六目标密码算法为商用密码算法,否则确定所述目标密码算法中的第六目标密码算法为国际密码算法;所述第六目标密码算法用于计算第四鉴权参数。In the first parameter of the SEAF, when the supported cryptographic algorithms include commercial cryptographic algorithms, the sixth target cryptographic algorithm among the target cryptographic algorithms is determined to be a commercial cryptographic algorithm; otherwise, the sixth target cryptographic algorithm among the target cryptographic algorithms is determined to be an international cryptographic algorithm; the sixth target cryptographic algorithm is used to calculate the fourth authentication parameter. 14.根据权利要求13所述的认证鉴权方法,其特征在于,所述方法还包括:14. The authentication method according to claim 13, characterized in that the method further comprises: 在所获取的至少一第二设备的第一参数中不包括所述USIM的第一参数的情况下,调用所述USIM的算法支持状态查询接口,生成所述USIM的第一参数。In a case where the acquired first parameters of at least one second device do not include the first parameters of the USIM, an algorithm support status query interface of the USIM is called to generate the first parameters of the USIM. 15.根据权利要求2所述的认证鉴权方法,其特征在于,所述第一设备为SEAF,所述至少一第二设备的第一参数包括USIM的第一参数和/或ME的第一参数;15. The authentication method according to claim 2, wherein the first device is a SEAF, and the first parameter of the at least one second device comprises a first parameter of a USIM and/or a first parameter of a ME; 根据所述第一设备所支持的密码算法,确定目标密码算法,包括:Determining a target cryptographic algorithm according to the cryptographic algorithms supported by the first device includes: 在所述USIM的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第七目标密码算法为商用密码算法;否则,确定所述目标密码算法中的第七目标密码算法为国际密码算法;所述第七目标密码算法用于计算第五鉴权参数;In the first parameter of the USIM, when the supported cryptographic algorithms include commercial cryptographic algorithms, determining that a seventh target cryptographic algorithm in the target cryptographic algorithms is a commercial cryptographic algorithm; otherwise, determining that the seventh target cryptographic algorithm in the target cryptographic algorithms is an international cryptographic algorithm; the seventh target cryptographic algorithm is used to calculate a fifth authentication parameter; 在所述ME的第一参数中,所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法中的第八目标密码算法为商用密码算法;否则,确定所述目标密码算法中的第八目标密码算法为国际密码算法;所述第八目标密码算法用于计算第六鉴权参数。In the first parameter of the ME, if the supported cryptographic algorithms include commercial cryptographic algorithms, the eighth target cryptographic algorithm among the target cryptographic algorithms is determined to be a commercial cryptographic algorithm; otherwise, the eighth target cryptographic algorithm among the target cryptographic algorithms is determined to be an international cryptographic algorithm; the eighth target cryptographic algorithm is used to calculate the sixth authentication parameter. 16.根据权利要求1所述的认证鉴权方法,其特征在于,所述第一设备为SEAF,根据所述第一设备所支持的密码算法,确定目标密码算法,包括:16. The authentication method according to claim 1, wherein the first device is a SEAF, and determining a target cryptographic algorithm according to cryptographic algorithms supported by the first device comprises: 在所述第一设备所支持的密码算法包括商用密码算法的情况下,确定所述目标密码算法为商用密码算法;In a case where the cryptographic algorithms supported by the first device include commercial cryptographic algorithms, determining that the target cryptographic algorithm is a commercial cryptographic algorithm; 在所述第一设备所支持的密码算法不包括商用密码算法的情况下,确定所述目标密码算法为国际密码算法。In a case where the cryptographic algorithms supported by the first device do not include commercial cryptographic algorithms, the target cryptographic algorithm is determined to be an international cryptographic algorithm. 17.根据权利要求1所述的认证鉴权方法,其特征在于,所述第一参数包括预设指示位,用于指示相应的第二设备是否支持商用密码算法。17. The authentication method according to claim 1, characterized in that the first parameter includes a preset indication bit for indicating whether the corresponding second device supports a commercial cryptographic algorithm. 18.根据权利要求1所述的认证鉴权方法,其特征在于,所述第一参数包括以下的一项或多项:18. The authentication method according to claim 1, wherein the first parameter comprises one or more of the following: 第一位数组,包括多个第一指示位,每一第一指示位对应一种类型加密密码算法,用于指示第二设备是否支持相应类型的加密密码算法;a first bit array, comprising a plurality of first indicator bits, each first indicator bit corresponding to a type of encryption cryptographic algorithm, and used to indicate whether the second device supports the corresponding type of encryption cryptographic algorithm; 第二位数组,包括多个第二指示位,每一第二指示位对应一种类型的哈希算法,用于指示第二设备是否支持相应类型的哈希算法。The second bit array includes multiple second indicator bits, each second indicator bit corresponds to a type of hash algorithm, and is used to indicate whether the second device supports the corresponding type of hash algorithm. 19.根据权利要求4所述的认证鉴权方法,其特征在于,所述第一参数包括在所述第一消息中的预留字段中,或者所述第一参数为所述第一消息中的增设参数。19. The authentication method according to claim 4, characterized in that the first parameter is included in a reserved field in the first message, or the first parameter is an additional parameter in the first message. 20.根据权利要求4或19所述的认证鉴权方法,其特征在于,所述第一参数包括在所述第一消息中的认证管理字段AMF中。20. The authentication method according to claim 4 or 19, characterized in that the first parameter is included in the authentication management field AMF in the first message. 21.一种认证鉴权方法,其特征在于,由第三设备执行,所述方法包括:21. An authentication method, characterized in that it is performed by a third device, and the method comprises: 在对终端进行网络认证鉴权和/或密钥推衍过程中,向第一设备发送第一消息;其中,所述第一消息中包括至少一第二设备的第一参数;所述第一参数用于指示相应所述第二设备所支持的密码算法。During the process of network authentication and/or key derivation of a terminal, a first message is sent to a first device; wherein the first message includes a first parameter of at least one second device; the first parameter is used to indicate the cryptographic algorithm supported by the corresponding second device. 22.根据权利要求21所述的认证鉴权方法,其特征在于,所述第一设备为统一数据管理功能UDM或认证凭证存储库和处理功能ARPF,所述第三设备包括AUSF,所述第二设备包括ME和SEAF中的至少一个。22. The authentication method according to claim 21 is characterized in that the first device is a unified data management function UDM or an authentication credential repository and processing function ARPF, the third device includes AUSF, and the second device includes at least one of ME and SEAF. 23.根据权利要求21所述的认证鉴权方法,其特征在于,所述第一设备为AUSF,所述第三设备为SEAF,所述第二设备包括ME和SEAF中的至少一个;或者23. The authentication method according to claim 21, wherein the first device is an AUSF, the third device is a SEAF, and the second device includes at least one of a ME and a SEAF; or 所述第一设备为AUSF,所述第三设备为UDM或ARPF,所述第二设备包括USIM。The first device is an AUSF, the third device is an UDM or an ARPF, and the second device includes a USIM. 24.根据权利要求21所述的认证鉴权方法,其特征在于,所述第一设备为SEAF,所述第三设备为ME,所述第二设备包括ME;或者24. The authentication method according to claim 21, wherein the first device is a SEAF, the third device is a ME, and the second device includes the ME; or 所述第一设备为SEAF,所述第三设备为AUSF,所述第二设备包括USIM。The first device is a SEAF, the third device is an AUSF, and the second device includes a USIM. 25.根据权利要求21所述的认证鉴权方法,其特征在于,所述第一设备为ME,所述第三设备包括SEAF,所述第二设备包括SEAF和USIM中的至少一个。25. The authentication method according to claim 21, characterized in that the first device is a ME, the third device includes a SEAF, and the second device includes at least one of a SEAF and a USIM. 26.根据权利要求21所述的认证鉴权方法,其特征在于,所述第一参数包括预设指示位,用于指示相应的第二设备是否支持商用密码算法。26. The authentication method according to claim 21 is characterized in that the first parameter includes a preset indication bit for indicating whether the corresponding second device supports a commercial cryptographic algorithm. 27.根据权利要求21所述的认证鉴权方法,其特征在于,所述第一参数包括以下的一项或多项:27. The authentication method according to claim 21, wherein the first parameter includes one or more of the following: 第一位数组,包括多个第一指示位,每一第一指示位对应一种类型加密密码算法,用于指示第二设备是否支持相应类型的加密密码算法;a first bit array, comprising a plurality of first indicator bits, each first indicator bit corresponding to a type of encryption cryptographic algorithm, and used to indicate whether the second device supports the corresponding type of encryption cryptographic algorithm; 第二位数组,包括多个第二指示位,每一第二指示位对应一种类型的哈希算法,用于指示第二设备是否支持相应类型的哈希算法。The second bit array includes multiple second indicator bits, each second indicator bit corresponds to a type of hash algorithm, and is used to indicate whether the second device supports the corresponding type of hash algorithm. 28.一种网络设备,其中,所述网络设备为第一设备,包括处理器,其特征在于,所述处理器用于:28. A network device, wherein the network device is a first device, comprising a processor, wherein the processor is used to: 获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,所述第一参数用于指示相应所述第二设备所支持的密码算法;Acquire a first parameter of at least one second device used for performing network authentication and/or key derivation on the terminal, wherein the first parameter is used to indicate a cryptographic algorithm supported by the corresponding second device; 根据所述第一设备所支持的密码算法和/或所述第一参数,确定目标密码算法;Determining a target cryptographic algorithm according to the cryptographic algorithms supported by the first device and/or the first parameters; 根据所述目标密码算法,执行网络认证鉴权和/或密钥推衍的相关操作。According to the target cryptographic algorithm, network authentication and/or key derivation related operations are performed. 29.一种网络设备,其中,所述网络设备为第三设备,包括收发机,其特征在于,所述收发机用于:29. A network device, wherein the network device is a third device, comprising a transceiver, wherein the transceiver is used for: 在对终端进行网络认证鉴权和/或密钥推衍过程中,向第一设备发送第一消息;其中,所述第一消息中包括至少一第二设备的第一参数;所述第一参数用于指示相应所述第二设备所支持的密码算法。During the process of network authentication and/or key derivation of a terminal, a first message is sent to a first device; wherein the first message includes a first parameter of at least one second device; the first parameter is used to indicate the cryptographic algorithm supported by the corresponding second device. 30.一种认证鉴权装置,其特征在于,应用于第一设备,所述装置包括:30. An authentication device, characterized in that it is applied to a first device, and the device comprises: 获取模块,用于获取用于对终端进行网络认证鉴权和/或密钥推衍的至少一第二设备的第一参数,所述第一参数用于指示相应所述第二设备所支持的密码算法;An acquisition module, used to acquire a first parameter of at least one second device used to perform network authentication and/or key derivation on the terminal, wherein the first parameter is used to indicate a cryptographic algorithm supported by the corresponding second device; 确定模块,用于根据所述第一设备所支持的密码算法和/或所述第一参数,确定目标密码算法;a determination module, configured to determine a target cryptographic algorithm according to the cryptographic algorithms supported by the first device and/or the first parameters; 鉴权模块,用于根据所述目标密码算法,执行网络认证鉴权和/或密钥推衍的相关操作。The authentication module is used to perform network authentication and/or key derivation related operations according to the target cryptographic algorithm. 31.一种认证鉴权装置,其特征在于,应用于第三设备,所述装置包括:31. An authentication device, characterized in that it is applied to a third device, and the device comprises: 第一发送模块,用于在对终端进行网络认证鉴权和/或密钥推衍过程中,向第一设备发送第一消息;其中,所述第一消息中包括至少一第二设备的第一参数;所述第一参数用于指示相应所述第二设备所支持的密码算法。The first sending module is used to send a first message to a first device during network authentication and/or key derivation of a terminal; wherein the first message includes a first parameter of at least one second device; the first parameter is used to indicate the cryptographic algorithm supported by the corresponding second device. 32.一种网络设备,其特征在于,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序,所述程序被所述处理器执行时实现如权利要求1至20任一项所述的认证鉴权方法,或者实现如权利要求21至27任一项所述的认证鉴权方法。32. A network device, characterized in that it comprises a processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, it implements the authentication and authorization method as described in any one of claims 1 to 20, or implements the authentication and authorization method as described in any one of claims 21 to 27. 33.一种可读存储介质,其特征在于,所述可读存储介质上存储有程序,所述程序被处理器执行时实现如权利要求1至20任一项所述的认证鉴权方法中的步骤,或者实现如权利要求21至27任一项所述的认证鉴权方法中的步骤。33. A readable storage medium, characterized in that a program is stored on the readable storage medium, and when the program is executed by a processor, it implements the steps in the authentication and authentication method as described in any one of claims 1 to 20, or implements the steps in the authentication and authentication method as described in any one of claims 21 to 27.
CN202311006119.5A 2023-08-10 2023-08-10 Authentication method, device, network equipment and storage medium Pending CN118803751A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311006119.5A CN118803751A (en) 2023-08-10 2023-08-10 Authentication method, device, network equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311006119.5A CN118803751A (en) 2023-08-10 2023-08-10 Authentication method, device, network equipment and storage medium

Publications (1)

Publication Number Publication Date
CN118803751A true CN118803751A (en) 2024-10-18

Family

ID=93020741

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311006119.5A Pending CN118803751A (en) 2023-08-10 2023-08-10 Authentication method, device, network equipment and storage medium

Country Status (1)

Country Link
CN (1) CN118803751A (en)

Similar Documents

Publication Publication Date Title
US11825303B2 (en) Method for performing verification by using shared key, method for performing verification by using public key and private key, and apparatus
US11296877B2 (en) Discovery method and apparatus based on service-based architecture
US11496320B2 (en) Registration method and apparatus based on service-based architecture
US11909869B2 (en) Communication method and related product based on key agreement and authentication
US9467432B2 (en) Method and device for generating local interface key
CN102594555B (en) Security protection method for data, entity on network side and communication terminal
KR102024653B1 (en) Access Methods, Devices, and Systems for User Equipment (UE)
CN111327583B (en) Identity authentication method, intelligent equipment and authentication server
JP2019169963A (en) Security configuration in communication between communication device and network device
CN104982053B (en) For obtaining the method and network node of the permanent identity of certification wireless device
CN110858969A (en) Client registration method, device and system
CN111630882B (en) User equipment, authentication server, medium, and method and system for determining key
US20220046003A1 (en) Parameter sending method and apparatus
WO2022068219A1 (en) Virtual private dial-up network access method, network-side system, system, and storage medium
CN102685739B (en) Authentication method and system for Android enterprise applications
US10601830B2 (en) Method, device and system for obtaining local domain name
CN104683343A (en) A method for a terminal to quickly log in to a WiFi hotspot
CN114390521A (en) Key updating method, device, equipment and storage medium
CN118803751A (en) Authentication method, device, network equipment and storage medium
CN114727285B (en) Authentication method, authentication network element and security anchor point entity
CN118803752A (en) Authentication method, device and network equipment
CN111404669B (en) A key generation method, terminal equipment and network equipment
CN109586913B (en) Security authentication method, security authentication device, communication device, and storage medium
CA3137389C (en) Parameter sending method and apparatus
CN118828482A (en) Authentication system and configuration method

Legal Events

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