Application authentication method and device

By using the network identifier of the terminal device in the application server to generate the application identity identifier, combined with one-way derivative function processing, the problems of user information leakage and insufficient security in the existing technology are solved, and higher system security and authentication efficiency are achieved. .

CN118740409APending Publication Date: 2024-10-01HUAWEI TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310371895.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-28
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Existing application authentication methods rely on centralized identity institutions to store user information, and there is a risk of user information leakage. Especially when the centralized identity institution has a single point of failure or lacks trust, security is not high.

Method used

The application identity is generated by using the network identity of the terminal device, and the correspondence between the public key of the terminal device and the application identity authenticated by the application server is written to the application server. The application server is based on the network identity of the terminal device and the pre-written The corresponding relationship is used to complete the authentication without resorting to user information. A one-way derivative function is used to process the network identifier to generate an application identity identifier, ensuring that the authentication process does not involve user information.

Benefits of technology

It effectively reduces the risk of user information leakage, improves system security, avoids security problems caused by single points of failure of centralized identity institutions, simplifies the authentication process, and improves authentication efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118740409A_ABST
    Figure CN118740409A_ABST
Patent Text Reader

Abstract

The invention discloses an application authentication method and device, which are favorable for reducing the risk of user information leakage and improving the system security in the process of authenticating a terminal equipment application by an application server. The method comprises the steps that an application server obtains first information from terminal equipment, the first information is used for requesting to obtain service data, and the first information carries a network identifier of the terminal equipment; the application server authenticates the terminal device based on the network identifier of the terminal device and a pre-stored corresponding relationship, and the corresponding relationship is used for indicating the corresponding relationship between the public key of the at least one terminal device and the at least one application identity identifier authenticated by the application server; the at least one application identity identifier is obtained based on a network identifier of a terminal device corresponding to the at least one application identity identifier; and under the condition that the authentication is passed, the application server sends second information to the terminal equipment, and the second information is used for indicating that the terminal equipment passes the authentication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communications, and in particular to an application authentication method and device. Background Art

[0002] In the era of big data in information technology, the number of applications (referred to as applications) in terminal devices has exploded. When users use applications in terminal devices, the terminal devices need to access the application server corresponding to the application through the application to obtain relevant data in order to provide relevant services to users. When the terminal device application accesses the application server, the application server needs to authenticate the accessed terminal device application (also known as authentication). After the authentication is passed, the application server can provide relevant service data for the terminal device application. In this way, user information security can be guaranteed, and network security issues caused by information theft and malicious intrusion can be prevented.

[0003] At present, application servers mainly authenticate applications through the network address of the terminal device and the identity and password information entered by the user when using the terminal device application. When the terminal device is connected to the network, when the user uses the application in the terminal device, the terminal device can send an application authentication request to the centralized identity agency (which can also be the application server). The centralized identity agency matches the network address of the terminal device and the identity and password information or biological characteristics entered by the user on the terminal device with the locally stored information. If there is a match, the centralized identity agency provides services for the terminal device application, so that the user can use the terminal device application normally.

[0004] The above-mentioned application authentication method requires the participation of a centralized identity agency, which stores user identity and password information. There is a risk of user information leakage, especially when the centralized identity agency has a single point of failure and lacks trust, and the security is not high. Summary of the invention

[0005] The embodiments of the present application provide an application authentication method and device, which are beneficial to reducing the risk of user information leakage and improving system security during the process of an application server authenticating a terminal device application.

[0006] In a first aspect, an application authentication method is provided, comprising: obtaining first information from a terminal device, the first information being used to request service data, the first information carrying a network identifier of the terminal device; authenticating the terminal device based on the network identifier of the terminal device and a pre-stored correspondence, the correspondence being used to indicate a correspondence between a public key of at least one terminal device and at least one application identity authenticated by the application server, the at least one application identity being obtained based on the network identifier of the terminal device corresponding to the at least one application identity; and in a case where the authentication is successful, sending second information to the terminal device, the second information being used to indicate that the terminal device has passed the authentication.

[0007] The application authentication method of the embodiment of the present application generates an application identity of the terminal device by utilizing the network identifier of the terminal device, and writes the correspondence between the public key of the terminal device and the application identity authenticated by the application server into the application server. When the user uses the application of the terminal device, the terminal device initiates an authentication process to the application server. The application server can complete the authentication of the terminal device by relying on the network identifier of the terminal device and the above-mentioned pre-written correspondence, without resorting to user information, and without the risk of user information leakage, which is beneficial to improving the security of the system.

[0008] In combination with the first aspect, in some implementations of the first aspect, the execution subject of the above-mentioned application authentication method may be an application server.

[0009] In combination with the first aspect, in certain implementations of the first aspect, the application identity of the terminal device is a value obtained by processing the network identifier of the terminal device using a preset one-way derivative function, or the application identity of the terminal device is the network identifier of the terminal device.

[0010] It should be understood that the one-way derivative function can be a hash function or an encryption algorithm, which is not limited in the present embodiment. The specific type of hash function or encryption algorithm used is pre-negotiated by the application server and the terminal device, or is agreed upon by the protocol, which is not limited in the present embodiment.

[0011] This application will use a preset one-way derivative function to process the network identification of the terminal device and abbreviate the value obtained by a process as APPID, and the network identification of the terminal device will be abbreviated as BCADD. Exemplarily, the above application identity can be Hash(BCADD), that is, APPID, and BCADD can be Hash(PKu). Among them, Hash(BCADD) represents the value obtained after performing a hash operation on BCADD using a hash function, and Hash(PKu) represents the value obtained after performing a hash operation on the public key PKu.

[0012] Exemplarily, the above application identity may be Hash(PKu), namely BCADD, wherein Hash(PKu) represents a value obtained after performing a hash operation on the public key PKu.

[0013] The application identity of the terminal device in the embodiment of the present application can complete the authentication of the terminal device by the application server based on the terminal device network identification by utilizing the above two possible implementation methods, without resorting to user information and without the risk of user information leakage, which is beneficial to improving the security of the system.

[0014] In combination with the first aspect, in certain implementations of the first aspect, the application identity of the terminal device is a value obtained by processing the network identity of the terminal device using a preset one-way derivative function; the authentication of the terminal device based on the network identity of the terminal device and the pre-stored correspondence includes: processing the network identity of the terminal device using a preset one-way derivative function to obtain a processing result; if there is a first application identity in the at least one application identity that is equal to the processing result, it is determined that the terminal device has passed the authentication.

[0015] The embodiment of the present application uses APPID as the application identity identifier, so that different terminal devices have the same access path to the same application, which can prevent the terminal device from being tracked in the communication system, thereby avoiding user information leakage.

[0016] In combination with the first aspect, in certain implementations of the first aspect, the application identity of the terminal device is the network identity of the terminal device; the method also includes: receiving a first authentication request from the terminal device, the first authentication request carrying a first random number and a first ciphertext, the first ciphertext being the ciphertext obtained by encrypting the network identity of the terminal device and the first random number using the private key of the terminal device; authenticating the terminal device based on the network identity of the terminal device and a pre-stored correspondence, including: using the public key of the terminal device to decrypt the first ciphertext to obtain the decrypted network identity of the terminal device and the decrypted first random number; and determining that the terminal device authentication is successful when there is a first application identity in the at least one application identity that is equal to the decrypted network identity of the terminal device, and the decrypted first random number is equal to the first random number carried in the first authentication request.

[0017] Exemplarily, the first ciphertext may be SKu(BCADD, first random number), where SKu(BCADD, first random number) is the ciphertext obtained by encrypting BCADD and the first random number with the private key SKu, where PKu is the public key of the terminal device, and SKu is the private key of the terminal device.

[0018] The embodiment of the present application uses BCADD as the application identity, which can ensure the identity uniformity of the terminal device between different layers such as the data link layer, network layer, transport layer and application layer. However, there is a risk of the terminal device being tracked, so the BCADD can be updated, and the specific update method is as follows. In combination with the first aspect, in some implementations of the first aspect, the method also includes: receiving fourth information from the terminal device, the fourth information is used to indicate the update of the application identity of the terminal device, the fourth information carries a second random number and a second ciphertext, the second ciphertext is the ciphertext obtained by encrypting the new network identifier of the terminal device, the network identifier and the second random number using the private key of the terminal device; decrypting the second ciphertext using the public key of the terminal device to obtain the decrypted new network identifier, the decrypted network identifier and the decrypted second random number; when the decrypted second random number is equal to the second random number carried in the second ciphertext, and the first application identifier is equal to the decrypted network identifier in the at least one application identifier, the first application identifier is updated from the network identifier to the new network identifier.

[0019] Exemplarily, the second ciphertext may be SKu(new BCADD, BCADD, second random number), wherein SKu(new BCADD, BCADD, second random number) is the ciphertext obtained by encrypting new BCADD, BCADD and the second random number using the private key SKu.

[0020] In the embodiment of the present application, when the application identity of the terminal device is the network identity of the terminal device, updating the application identity of the terminal device is helpful to avoid the user's application usage behavior from being tracked, resulting in user information leakage, thereby improving the security of the system.

[0021] Optionally, the method further comprises: the application server sends an update response to the terminal device to indicate whether the update is successful. Correspondingly, the terminal device receives the update response from the application server.

[0022] In one possible implementation, if the update is successful, the update response may be a message indicating that the update is successful, such as an acknowledgement character (ACK); if the update fails, the update response may be a message indicating that the update fails, such as a negative acknowledgement character (NACK).

[0023] In another possible implementation, if the update is successful, the application server sends an update response to the terminal device, and the update response is a message indicating the update is successful, such as ACK. If the update fails, no response is made. In this case, the terminal device can set a timer, which starts counting after the fourth information is sent. If the terminal device does not receive the update response fed back by the application server before the timer times out, the terminal device defaults to the failure of the application server to update BCADD.

[0024] In combination with the first aspect, in certain implementations of the first aspect, before receiving a first authentication request from the terminal device, the method also includes: sending third information to a corresponding network device, the third information being used to respond to the first information, and the third information carrying a network identifier of the terminal device.

[0025] It should be understood that after receiving the third information, the network device corresponding to the above-mentioned application server can send a query request to the blockchain device based on the third information. The query request carries the network identification of the terminal device, and the query request is used to query the ID of the network device corresponding to the terminal device, which corresponds to the network identification of the terminal device and is in the same network domain as the network device corresponding to the application server. Correspondingly, the blockchain device receives the query request, and determines the ID of the network device corresponding to the terminal device, which corresponds to the received network identification and is in the same network domain as the network device corresponding to the application server, by using the correspondence between the network identification stored therein and the ID of the network device corresponding to the terminal device. The network device corresponding to the application server obtains the ID of the network device corresponding to the terminal device, thereby addressing the network device to which the terminal device is connected according to the ID of the network device, and then finding the terminal device.

[0026] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: when the authentication is successful, allocating a temporary external identifier to the terminal device, wherein the temporary external identifier is used to externally identify an application of the terminal device; and sending information to the blockchain device indicating the correspondence between the network identifier and the temporary external identifier.

[0027] Exemplarily, the temporary external identifier may be a unified resource location address (URL), an application programming interface (API), or a port identifier.

[0028] The embodiment of the present application can prevent the internal identifier of the terminal device from being exposed in the network by setting a temporary external identifier, thereby increasing the security of the communication system.

[0029] In combination with the first aspect, in some implementations of the first aspect, the method also includes: receiving fifth information from the terminal device, the fifth information is used to request to use the first application identity as the identity of the terminal device under the corresponding application, and the fifth information carries the first application identity; based on the fifth information, sending a second authentication request to the terminal device, the second authentication request is used to request authentication of the terminal device; receiving a second authentication response from the terminal device, the second authentication response carries information used for authentication; based on the second authentication response, authenticating the terminal device; and if the authentication passes, storing the correspondence between the first application identity and the public key of the terminal device.

[0030] It should be understood that before the terminal device sends the fifth information to the application server, the terminal device needs to access the network. The embodiment of the present application does not limit the network access method and the network identifier used. In one possible implementation, the terminal device can use BCADD as the network identifier, initiate a random access process, and access the network. In another possible implementation, the terminal device can use other identifiers as the network identifier, initiate a random access process, and access the network.

[0031] In combination with the first aspect, in certain implementations of the first aspect, the information used for authentication includes: a public key of the terminal device, a third random number and a third ciphertext, the third ciphertext being a ciphertext obtained by encrypting the first application identity and the third random number using the private key of the terminal device; authenticating the terminal device based on the second authentication response, including: decrypting the third ciphertext using the public key of the terminal device to obtain the decrypted first application identity and the decrypted third random number; and determining that the terminal device authentication is successful when the decrypted first application identity is equal to the first application identity carried in the fifth information, and the decrypted third random number is equal to the third random number carried in the second authentication response.

[0032] The embodiment of the present application completes the authentication of the terminal device through a pre-stored correspondence relationship, without the need to establish a correspondence during the authentication process, making the authentication process simpler and faster, thereby improving authentication efficiency.

[0033] Exemplarily, the application identity of the terminal device is the network identity of the terminal device, and the third ciphertext may be SKu(BCADD, third random number), wherein SKu(BCADD, third random number) is the ciphertext obtained by encrypting BCADD and the third random number with the private key SKu.

[0034] Exemplarily, the application identity of the terminal device is a value obtained by processing the network identity of the terminal device using a preset one-way derivative function, and the third ciphertext may be SKu (APPID, third random number), wherein SKu (APPID, third random number) is the ciphertext obtained by encrypting the APPID and the third random number using the private key SKu.

[0035] When the network is untrustworthy, the message sent by the terminal device to the application server may be tampered with, so two-way authentication can be performed again between the terminal device and the application server. If the two-way authentication passes, the application server will provide services for the application of the terminal device to improve the accuracy of application authentication.

[0036] In combination with the first aspect, in certain implementations of the first aspect, the method also includes: sending a third authentication request to the terminal device, the third authentication request carrying a fourth ciphertext, the fourth ciphertext being the ciphertext obtained by encrypting the application identity of the terminal device, the network identity of the terminal device and the fourth random number using the public key of the terminal device; receiving a third authentication response from the terminal device, the third authentication response carrying a fourth ciphertext, the fourth ciphertext being the ciphertext obtained by encrypting the application identity of the terminal device, the network identity of the terminal device and the fourth random number decrypted based on the fourth ciphertext using the private key of the terminal device; authenticating the terminal device based on the third authentication response; and sending the second information to the terminal device if the authentication is successful.

[0037] Optionally, the terminal device receives the third authentication request, and based on the third authentication request, sends a third authentication response to the application server, specifically including: the terminal device uses its own private key to decrypt the fourth ciphertext to obtain the decrypted application identity, the decrypted network identity and the decrypted fourth random number; the terminal device then uses its own private key to encrypt the decrypted application identity, the decrypted network identity and the decrypted fourth random number to obtain the fourth ciphertext encrypted by the private key, and sends a third authentication response to the application server, the third authentication response carries the fourth ciphertext encrypted by the private key. Exemplarily, the fourth ciphertext encrypted by the private key may be SKu (APPID, BCADD, fourth random number). Based on the third authentication response, the application server authenticates the terminal device, specifically including: the application server uses the public key of the terminal device to decrypt the fourth ciphertext encrypted by the private key to obtain the decrypted application identity, the decrypted network identity and the decrypted fourth random number; when the decrypted fourth random number is equal to the fourth random number carried in the third authentication request, the application server determines that the terminal device is authenticated.

[0038] The terminal device and the application server of the embodiment of the present application can perform two-way authentication. When the two-way authentication is passed, the application server provides services for the application of the terminal device to improve the accuracy of application authentication.

[0039] In a second aspect, another application authentication method is provided, including: sending first information to an application server, the first information being used to request service data, the first information carrying a network identifier of a terminal device, the network identifier of the terminal device being used by the application server to authenticate the terminal device based on a pre-stored correspondence, the correspondence being used to indicate a correspondence between a public key of at least one terminal device and at least one application identity identifier authenticated by the application server, the at least one application identity identifier being obtained based on the network identifier of the terminal device corresponding to the at least one application identity identifier; receiving second information from the application server, the second information being used to indicate that the terminal device has passed the authentication.

[0040] In combination with the second aspect, in some implementations of the second aspect, the execution subject of the above-mentioned application authentication method may be a terminal device.

[0041] In combination with the second aspect, in certain implementations of the second aspect, the application identity of the terminal device is a value obtained by processing the network identifier of the terminal device using a preset one-way derivative function, or the application identity of the terminal device is the network identifier of the terminal device.

[0042] In combination with the second aspect, in certain implementations of the second aspect, the method also includes: sending fourth information to the application server, the fourth information being used to indicate an update of an application identity of the terminal device, the fourth information carrying a second random number and a second ciphertext, the second ciphertext being the ciphertext obtained by encrypting the new network identifier of the terminal device, the network identifier and the second random number using the private key of the terminal device.

[0043] In combination with the second aspect, in certain implementations of the second aspect, the method also includes: sending fifth information to the application server, the fifth information is used to request that the first application identity be used as the identity of the terminal device under the application corresponding to the application server, and the fifth information carries the first application identity; receiving a second authentication request from the application server, the second authentication request is used to request authentication of the terminal device; and sending a second authentication response to the application server, the second authentication response carries information used for authentication.

[0044] In combination with the second aspect, in certain implementations of the second aspect, the information used for authentication includes: a public key of the terminal device, a third random number and a third ciphertext, and the third ciphertext is the ciphertext obtained by encrypting the first application identity and the third random number using the private key of the terminal device.

[0045] In combination with the second aspect, in certain implementations of the second aspect, the method also includes: receiving a third authentication request from the application server, the third authentication request carrying a fourth ciphertext, the fourth ciphertext being the ciphertext obtained by encrypting the first application identity, the network identity of the terminal device and the fourth random number using the public key of the terminal device; decrypting the fourth ciphertext using the private key of the terminal device to obtain the decrypted first application identity, the decrypted network identity of the terminal device and the decrypted fourth random number; encrypting the decrypted first application identity, the decrypted network identity of the terminal device and the decrypted fourth random number using the private key of the terminal device to obtain a fourth ciphertext; and sending a third authentication response to the application server, the third authentication response carrying the fourth ciphertext.

[0046] According to a third aspect, an application authentication method is provided, comprising: receiving a first correspondence relationship from a network device, wherein the first correspondence relationship is used to represent a correspondence relationship between a network identifier of a terminal device and an identifier of the network device; and storing the first correspondence relationship.

[0047] In combination with the third aspect, in certain implementations of the third aspect, the executor of the above-mentioned application authentication method may be a blockchain device.

[0048] It should be understood that the above-mentioned blockchain device can be an independent device, or multiple devices deployed in a distributed manner, or a chip driver that can realize related functions. The embodiments of the present application do not limit its specific product form.

[0049] In combination with the third aspect, in certain implementations of the third aspect, the method further includes: receiving a second correspondence from an application server, wherein the second correspondence is used to represent a correspondence between the network identifier and a temporary external identifier allocated by the application server to the terminal device.

[0050] In a fourth aspect, an application authentication device is provided, which is used to execute the method in any possible implementation of the first aspect, the second aspect, or the third aspect. Specifically, the device includes a module for executing the method in any possible implementation of the first aspect, the second aspect, or the third aspect.

[0051] In a fifth aspect, another application authentication device is provided, including a processor and a memory, wherein the processor is coupled to the memory and can be used to execute instructions in the memory to implement the method in any possible implementation of the first aspect, the second aspect, or the third aspect. Optionally, the application authentication device also includes a communication interface, and the processor is coupled to the communication interface.

[0052] In one implementation, the application authentication device is an application server. When the application authentication device is an application server, the communication interface may be a transceiver, or an input / output interface.

[0053] In another implementation, the application authentication device is a chip configured in the application server. When the application authentication device is a chip configured in the application server, the communication interface may be an input / output interface.

[0054] In one implementation, the application authentication device is a terminal device. When the application authentication device is a terminal device, the communication interface may be a transceiver, or an input / output interface.

[0055] In another implementation, the application authentication device is a chip configured in the terminal device. When the application authentication device is a chip configured in the terminal device, the communication interface may be an input / output interface.

[0056] In one implementation, the application authentication device is a blockchain device. When the application authentication device is a blockchain device, the communication interface may be a transceiver, or an input / output interface.

[0057] In another implementation, the application authentication device is a chip configured in the blockchain device. When the application authentication device is a chip configured in the blockchain device, the above-mentioned communication interface may be an input / output interface.

[0058] In a sixth aspect, a processor is provided, comprising: an input circuit, an output circuit, and a processing circuit. The processing circuit is used to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method in any possible implementation of the first aspect, the second aspect, or the third aspect.

[0059] In the specific implementation process, the processor can be a chip, the input circuit can be an input pin, the output circuit can be an output pin, and the processing circuit can be a transistor, a gate circuit, a trigger, and various logic circuits. The input signal received by the input circuit can be, for example, but not limited to, received and input by a receiver, and the signal output by the output circuit can be, for example, but not limited to, output to a transmitter and transmitted by the transmitter, and the input circuit and the output circuit can be the same circuit, which is used as an input circuit and an output circuit at different times. The embodiments of the present application do not limit the specific implementation methods of the processor and various circuits.

[0060] In a seventh aspect, a processing device is provided, comprising a processor and a memory. The processor is used to read instructions stored in the memory, and can receive signals through a receiver and transmit signals through a transmitter to execute the method in any possible implementation of the first aspect, the second aspect, or the third aspect.

[0061] Optionally, the number of the processors is one or more, and the number of the memories is one or more.

[0062] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.

[0063] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips respectively. The embodiments of the present application do not limit the type of memory and the setting method of the memory and the processor.

[0064] It should be understood that the relevant data interaction process, such as sending indication information, can be a process of outputting indication information from a processor, and receiving capability information can be a process of receiving input capability information from a processor. Specifically, the processed output data can be output to a transmitter, and the input data received by the processor can come from a receiver. Among them, the transmitter and the receiver can be collectively referred to as a transceiver.

[0065] The processing device in the seventh aspect mentioned above can be a chip. The processor can be implemented by hardware or by software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor can be a general-purpose processor, which is implemented by reading the software code stored in the memory. The memory can be integrated in the processor or can be located outside the processor and exist independently.

[0066] In an eighth aspect, a computer program product is provided, comprising: a computer program (also referred to as code, or instruction), which, when executed, enables a computer to execute a method in any possible implementation of the first aspect, the second aspect, or the third aspect.

[0067] In the ninth aspect, a computer-readable storage medium is provided, which stores a computer program (also referred to as code, or instructions). When the computer-readable storage medium is run on a computer, the computer executes a method in any possible implementation of the first aspect, the second aspect, or the third aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] Figure 1 is a schematic diagram of a communication system applicable to an embodiment of the present application;

[0069] Figure 2 is a schematic diagram of another communication system applicable to an embodiment of the present application;

[0070] Figure 3 A schematic diagram of a three-layer identity relationship of an embodiment of the present application;

[0071] Figure 4 A schematic flow chart of an application authentication method according to an embodiment of the present application;

[0072] Figure 5 A schematic flow chart of another application authentication method according to an embodiment of the present application;

[0073] Figure 6 A schematic flow chart of another application authentication method according to an embodiment of the present application;

[0074] Figure 7 A schematic flow chart of another application authentication method according to an embodiment of the present application;

[0075] Figure 8 A schematic flow chart of another application authentication method according to an embodiment of the present application;

[0076] Fig. 9 A schematic block diagram of an application authentication device according to an embodiment of the present application;

[0077] Fig.10 A schematic block diagram of another application authentication device according to an embodiment of the present application;

[0078] Fig.11 This is a schematic block diagram of another application authentication device according to an embodiment of the present application. DETAILED DESCRIPTION

[0079] The technical solution in this application will be described below in conjunction with the accompanying drawings.

[0080] In order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit the difference.

[0081] It should be noted that, in this application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplarily" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.

[0082] In addition, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, where a, b, c can be single or multiple.

[0083] The technical solutions of the embodiments of the present application can be applied to various communication systems, such as: long term evolution (LTE) system, LTE frequency division duplex (FDD) system, LTE time division duplex (TDD), universal mobile telecommunication system (UMTS), worldwide interoperability for microwave access (WiMAX) communication system, fifth generation (5G) system or new radio (NR), future evolved communication systems, such as sixth generation (6G) system, etc.

[0084] It should also be understood that the technical solutions of the embodiments of the present application can also be applied to various communication systems based on non-orthogonal multiple access technology, such as sparse code multiple access (SCMA) system. Of course, SCMA may also be called other names in the communication field; further, the technical solutions of the embodiments of the present application can be applied to multi-carrier transmission systems using non-orthogonal multiple access technology, such as orthogonal frequency division multiplexing (OFDM), filter bank multi-carrier (FBMC), generalized frequency division multiplexing (GFDM), filtered orthogonal frequency division multiplexing (F-OFDM) system, etc.

[0085] To facilitate understanding of the embodiments of the present application, first Figure 1 The following describes a communication system applicable to an embodiment of the present application. Figure 1 The schematic diagram of a communication system 100 applicable to an embodiment of the present application is shown. The communication system 100 includes: a terminal device 110 and an application server 120. The terminal device 110 has at least one application installed, and the at least one application may correspond to at least one application server. Figure 1 An application server 120 is shown in FIG. The application server 120 can provide services for applications of the terminal device 110. The terminal device 110 and the application server 120 can communicate with each other through application layer messages.

[0086] It should be understood that the terminal device 110 may be configured with multiple antennas, which may include at least one transmitting antenna for sending signals and at least one receiving antenna for receiving signals. In addition, the terminal device 110 also includes a transmitter chain and a receiver chain, and those skilled in the art may understand that they may include multiple components related to signal transmission and reception (such as processors, modulators, multiplexers, demodulators, demultiplexers or antennas, etc.). Therefore, the terminal device 110 and other devices may communicate via multi-antenna technology.

[0087] In some deployments, the communication system 100 may further include: a network device 130. The network device 130 may communicate with the terminal device 110 via a wireless link. The network device 130 may also be configured with multiple antennas, similar to the terminal device 110, and will not be described in detail here. Therefore, the network device 130 may communicate with the terminal device 110 via a multi-antenna technology.

[0088] In some deployments, the communication system 100 may further include: a blockchain device 140. The blockchain device 140 includes a plurality of decentralized distributed devices, which jointly maintain a blockchain ledger. The distributed devices may communicate with each other to achieve data transmission and synchronization.

[0089] Figure 2 FIG. 2 shows a schematic diagram of another communication system 200 applicable to an embodiment of the present application. Figure 2 As shown, the communication system 200 may include a terminal device 210, an application server 220, and a network device 230. The terminal device 210 includes a terminal device application 211 and a terminal device network interface 212. The terminal device application 211 may include social applications, information applications, game applications, shopping applications, and tool applications that provide services to users using the terminal device 210. The terminal device network interface 212 is responsible for sending signaling such as authentication, mobility management, and access control to the application server 220 for processing. The application server 220 is similar to the above-mentioned application server 120, and will not be described in detail here. The network device 230 is a network device to which the terminal device 210 is connected.

[0090] In some deployments, the communication system 200 may further include: a network device 240 and a blockchain device 250. Exemplarily, the network device 240 may be understood as a router for forwarding data packets from the application server 220. The blockchain device 250 is similar to the blockchain device 140, and will not be described in detail here. The terminal device 210 may communicate with the application server 220, the network device 230 and the blockchain device 250, the application server 220 may communicate with the network device 240 and the blockchain device 250, and the blockchain device 250 may communicate with the network device 230 and the network device 240.

[0091] The terminal device in the embodiment of the present application can communicate with one or more core networks via a radio access network (RAN), and the terminal device can be called an access terminal, user equipment (UE), user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device. The access terminal can be a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a wearable device, a terminal device in a 5G network, or a terminal device in a public land mobile network (PLMN) to be evolved in the future, etc.

[0092] The network device in the embodiment of the present application can be a device for communicating with a terminal device. The network device can be a base station (base transceiver station, BTS) in a global system for mobile communications (GSM) system or code division multiple access (CDMA), or a base station (NodeB, NB) in a wideband code division multiple access (WCDMA) system, or an evolved base station (evolved NodeB, eNB or eNodeB) in an LTE system, or a wireless controller in a cloud radio access network (CRAN) scenario, or the network device can be a relay station, an access point, a vehicle-mounted device, a wearable device, a network device in a 5G network, or a network device in a future evolved PLMN network, etc. The embodiment of the present application is not limited to this. For example, a gNB in ​​an NR system, or a transmission point (transmission and receiving point, TRP or TP), one or a group of (including multiple antenna panels) antenna panels of a base station in a 5G system, or a network node constituting a gNB or a transmission point, such as a baseband unit (baseband unit, BBU), or a distributed unit (distributed unit, DU), etc.

[0093] In some deployments, the gNB may include a centralized unit (CU) and a DU. The gNB may also include a radio unit (RU). The CU implements some functions of the gNB, and the DU implements some functions of the gNB, for example, the CU implements the functions of the radio resource control (RRC) and packet data convergence protocol (PDCP) layers, and the DU implements the functions of the radio link control (RLC) layer, the media access control (MAC) layer, and the physical (PHY) layer. Since the information of the RRC layer will eventually become the information of the PHY layer, or be converted from the information of the PHY layer, therefore, under this architecture, high-level signaling, such as RRC layer signaling, can also be considered to be sent by the DU, or by the DU+CU. It can be understood that the network device can be a CU node, a DU node, or a device including a CU node and a DU node. In addition, the CU can be divided into a network device in an access network (radio access network, RAN), and the CU can also be divided into a network device in a core network (core network, CN), which is not limited in this application.

[0094] The above-mentioned network device can also refer to the general term for all devices on the network end. For example, when multiple TRPs are used to transmit data to a terminal device, multiple TRPs can be collectively referred to as network devices.

[0095] In an embodiment of the present application, a terminal device or a network device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and a memory (also called main memory). The operating system can be any one or more computer operating systems that implement business processing through a process, such as a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a windows operating system. The application layer includes applications such as a browser, an address book, a word processing software, and an instant messaging software. In addition, the embodiment of the present application does not specifically limit the specific structure of the execution subject of the method provided in the embodiment of the present application, as long as it can communicate according to the method provided in the embodiment of the present application by running a program that records the code of the method provided in the embodiment of the present application, for example, the execution subject of the method provided in the embodiment of the present application can be a terminal device or a network device, or a functional module in a terminal device or a network device that can call a program and execute a program.

[0096] In addition, various aspects or features of the present application can be implemented as methods, devices or products using standard programming and / or engineering techniques. The term "product" used in this application covers computer programs that can be accessed from any computer-readable device, carrier or medium. For example, computer-readable media may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks or tapes, etc.), optical disks (e.g., compact discs (CDs), digital versatile discs (DVDs), etc.), smart cards and flash memory devices (e.g., erasable programmable read-only memory (EPROM), cards, sticks or key drives, etc.). In addition, the various storage media described herein may represent one or more devices and / or other machine-readable media for storing information. The term "machine-readable medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing and / or carrying instructions and / or data.

[0097] In the era of big data in information technology, the number of applications (referred to as applications) in terminal devices has exploded. When users use applications in terminal devices, the terminal devices need to access the application server corresponding to the application through the application to obtain relevant data in order to provide relevant services to users. When the terminal device application accesses the application server, the application server needs to authenticate the accessed terminal device application (also known as authentication). After the authentication is passed, the application server can provide relevant service data for the terminal device application. In this way, user information security can be guaranteed, and network security issues caused by information theft and malicious intrusion can be prevented.

[0098] At present, application servers mainly authenticate applications through the network address of the terminal device and the identity and password information entered by the user when using the terminal device application. When the terminal device is connected to the network, when the user uses the application in the terminal device, the terminal device can send an application authentication request to the centralized identity agency (which can also be the application server). The centralized identity agency matches the network address of the terminal device and the identity and password information or biological characteristics entered by the user on the terminal device with the locally stored information. If there is a match, the centralized identity agency provides services for the terminal device application, so that the user can use the terminal device application normally.

[0099] The above-mentioned application authentication method requires the participation of a centralized identity agency, which stores user identity and password information. There is a risk of user information leakage, especially when the centralized identity agency has a single point of failure and lacks trust, and the security is not high.

[0100] In view of this, an embodiment of the present application proposes an application authentication method and device, which generates an application identity of the terminal device by utilizing the network identifier of the terminal device, and writes the correspondence between the public key of the terminal device and the application identity authenticated by the application server into the application server. When the user uses the application of the terminal device, the terminal device initiates an authentication process to the application server. The application server can complete the authentication of the terminal device by relying on the network identifier of the terminal device and the above-mentioned pre-written correspondence, without the need to rely on user information, and there is no risk of user information leakage, which is beneficial to improving the security of the system.

[0101] The following will describe in detail the application authentication method and device provided by the present application in conjunction with the accompanying drawings. It should be understood that the technical solution of the present application can be applied to the above Figure 1 or Figure 2 In the communication system shown, for example, Figure 1 In the communication system 100 shown in FIG. 1 , the terminal device described in the following embodiments may correspond to Figure 1 The terminal device 110 shown in FIG. 1 may be Figure 1The terminal device 110 shown in the figure may also be a chip configured in the terminal device 110; the application server described in the following embodiments may correspond to Figure 1 The application server 120 shown in FIG. 1 may be, for example, Figure 1 The application server 120 shown in the figure may also be a chip configured in the application server 120.

[0102] In addition to the devices mentioned above, in other possible implementations, the application server 120 may also be other devices in the network. For example, in an open radio access network (O-RAN), the application server 120 may be a RAN intelligent controller (RIC) node, an open cloud (O-Cloud) node, a service management orchestration (SMO) node, an open base station (open eNB, O-eNB), an open radio unit (open radio unit, O-RU), an open DU (open DU, O-DU), an open CU (open CU, O-CU), etc., which is not limited to the embodiments of the present application.

[0103] In the following, without loss of generality, the application authentication method provided by the embodiment of the present application is described in detail by taking the interaction process between devices as an example. In order to better understand, the corresponding relationship between the application identity provided by the embodiment of the present application and the terminal device network identity is described below.

[0104] Figure 3 FIG. 3 is a schematic diagram showing a three-layer identity correspondence relationship 300 provided in an embodiment of the present application. Figure 3 As shown, the three-layer identity correspondence 300 may include: a first-layer identity RealID, a second-layer identity BCADD, and a third-layer identity APPID.

[0105] 1. The first-level identity (real identity, RealID) can be understood as the public key PKu of the terminal device registered with the national regulatory agency. Among them, the first-level identity RealID is not used in any network or application.

[0106] 2. The second-layer identity (block chain address, BCADD) is used to indicate the basic transmission identification between the link layer and the network layer, and is also used to indicate the network identification of the terminal device. It can be understood as the blockchain address of the above-mentioned terminal device derived from the public key PKu. The second-layer identity BCADD is obtained by performing mathematical operations on the first-layer identity RealID using a one-way derivative function. When a terminal device has only one network address, the second-layer identity BCADD can be used to indicate the network identification of the terminal device; when a terminal device has multiple network addresses, the second-layer identity BCADD can be used to indicate the network identification of a specific network card of the terminal device.

[0107] It should be understood that the above-mentioned one-way derivative function can be a hash function or an encryption algorithm, and the embodiments of the present application are not limited to this.

[0108] In a possible implementation, taking the first-layer identity RealID as the public key PKu of the terminal device as an example, the second-layer identity BCADD may be Hash(PKu), where Hash(PKu) represents the value obtained by performing a hash operation on the public key PKu of the terminal device using a hash function.

[0109] It should be understood that hash functions include multiple types, and hash operations may include different types such as addition hash, bitwise hash, multiplication hash, division hash, table lookup hash, and mixed hash. After performing different types of hash operations on the same seed, or after performing the same type of hash operations on different seeds, or after performing different types of hash operations on different seeds, the values ​​obtained are also different. The embodiments of the present application do not limit the specific hash function used.

[0110] Optionally, the second-layer identity BCADD may be updated. For example, the seed may be a public key PKu. After obtaining the second-layer identity BCADD 1, a different hash function and / or a different hash operation method may be used to obtain the second-layer identity BCADD 2, and the second-layer identity BCADD 1 may be replaced with the second-layer identity BCADD 2, thereby completing the update of the second-layer identity BCADD.

[0111] Figure 3 This is just an example. In actual application, the second-layer identity BCADD can be updated 1 time or N times, where N is a positive integer greater than 1. The number of updates of the second-layer identity BCADD is not limited in the embodiment of the present application.

[0112] 3. The third-layer identity (application identity, APPID) is used to indicate the identity of the user using the terminal device in different applications. The third-layer identity APPID is obtained by performing mathematical operations on the second-layer identity BCADD using a one-way derivative function. Among them, multiple different third-layer identities APPID can be obtained based on the same second-layer identity BCADD. Different third-layer identities APPID are used to indicate the identity of the user using the terminal device in different applications.

[0113] It should be understood that Figure 3 In the figure, the third-layer identity APPID 11, the third-layer identity APPID 12 and the third-layer identity APPID 13 can be obtained respectively according to the second-layer identity BCADD 1. This is only an example. In actual application, 1 or N third-layer identity APPIDs can be obtained according to the same second-layer identity BCADD, where N is a positive integer greater than 1. The specific number of the third-layer identity APPID is not limited in the embodiments of the present application.

[0114] In one possible implementation, the third-layer identity APPID is obtained by performing a hash operation on the second-layer identity BCADD. Taking the second-layer identity BCADD as Hash(PKu) as an example, the third-layer identity APPID may be Hash(BCADD), that is, the third-layer identity APPID may be Hash(Hash(PKu)), wherein Hash(BCADD) represents the value obtained by performing a hash operation on the second-layer identity BCADD, and Hash(PKu) represents the value obtained by performing a hash operation on the public key PK.

[0115] It should be understood that the difference between the third-layer identity APPID and the second-layer identity BCADD is that the second-layer identity BCADD has a corresponding public key pair to support its two-way authentication capability, while the third-layer identity APPID has no public key support and can only be two-way authenticated through its corresponding second-layer identity BCADD. That is, the third-layer identity APPID can only be obtained by performing a hash operation on the second-layer identity BCADD, and the second-layer identity BCADD cannot be obtained through the third-layer identity APPID. Therefore, the second-layer identity BCADD can be used to verify the correspondence between the second-layer identity BCADD and the third-layer identity APPID.

[0116] Similar to the above-mentioned second-layer identity BCADD, the third-layer identity APPID can be updated according to the updated second-layer identity BCADD, which will not be elaborated here.

[0117] Figure 4 FIG. 4 is a schematic flow chart of an application authentication method 400 provided in an embodiment of the present application. The method can be applied to Figure 1 The communication system 100 shown can also be applied to Figure 2 The communication system 200 shown can also be applied to other communication systems, which is not limited in the present embodiment. The method 400 includes:

[0118] S401, a terminal device sends first information to an application server, the first information being used to request service data, and the first information carrying a network identifier of the terminal device. Correspondingly, the application server receives the first information and obtains the network identifier of the terminal device.

[0119] S402, the application server authenticates the terminal device based on the network identification of the terminal device and a pre-stored correspondence, where the correspondence is used to indicate the correspondence between a public key of at least one terminal device and at least one application identity authenticated by the application server, and the at least one application identity is obtained based on the network identification of the terminal device corresponding to the at least one application identity.

[0120] S403, when the authentication is successful, the application server sends second information to the terminal device, where the second information is used to indicate that the terminal device has passed the authentication; correspondingly, the terminal device receives the second information.

[0121] It should be understood that if the authentication fails, the application server will not provide subsequent services to the terminal device. In one possible implementation, the application server sends a third message to the terminal device, where the third message is used to indicate that the terminal device has failed the authentication; correspondingly, the terminal device receives the third message. In another possible implementation, the application server does not respond to the terminal device.

[0122] The application authentication method of the embodiment of the present application generates an application identity of the terminal device by utilizing the network identifier of the terminal device, and writes the correspondence between the public key of the terminal device and the application identity authenticated by the application server into the application server. When the user uses the application of the terminal device, the terminal device initiates an authentication process to the application server. The application server can complete the authentication of the terminal device by relying on the network identifier of the terminal device and the above-mentioned pre-written correspondence, without resorting to user information, and without the risk of user information leakage, which is beneficial to improving the security of the system.

[0123] It should be understood that the at least one application identity is obtained based on the network identifier of the terminal device corresponding to the at least one application identity, including the following two possible implementations:

[0124] In a first possible implementation, the application identity of the terminal device is a value obtained by processing the network identity of the terminal device using a preset one-way derivation function. In the above S402, the application server authenticates the terminal device based on the network identity of the terminal device and a pre-stored correspondence, including: the application server processes the network identity of the terminal device using a preset one-way derivation function to obtain a processing result; if there is a first application identity in the at least one application identity that is equal to the processing result, the application server determines that the terminal device has passed the authentication.

[0125] Optionally, if there is no first application identity identifier in the at least one application identity identifier that is equal to the processing result, the application server determines that the terminal device has not passed the authentication.

[0126] Exemplarily, the above application identity may be Hash (BCADD), namely APPID.

[0127] The embodiment of the present application uses APPID as the application identity identifier, so that different terminal devices have the same access path to the same application, which can prevent the terminal device from being tracked in the communication system, thereby avoiding user information leakage.

[0128] In a second possible implementation, the application identity of the terminal device is the network identity of the terminal device, and the method further includes: the terminal device sends a first authentication request to the application server, the first authentication request carries a first random number and a first ciphertext, and the first ciphertext is a ciphertext obtained by encrypting the network identity of the terminal device and the first random number using the private key of the terminal device. Correspondingly, the application server receives the first authentication request. In the above S402, the application server authenticates the terminal device based on the network identity of the terminal device and the pre-stored correspondence, including: the application server uses the public key of the terminal device to decrypt the first ciphertext to obtain the decrypted network identity of the terminal device and the decrypted first random number; when there is a first application identity in the at least one application identity that is equal to the decrypted network identity of the terminal device, and the decrypted first random number is equal to the first random number carried in the first authentication request, the application server determines that the terminal device is authenticated.

[0129] Optionally, when there is no first application identity in the at least one application identity that is equal to the network identity of the terminal device after decryption, and / or the first decrypted random number is not equal to the first random number carried in the first authentication request, the application server determines that the terminal device authentication has failed.

[0130] Exemplarily, the above application identity may be Hash(PKu), i.e., BCADD. The above first ciphertext may be SKu(BCADD, first random number), where SKu(BCADD, first random number) is the ciphertext obtained by encrypting BCADD and the first random number with the private key SKu. PKu is the public key of the terminal device, and SKu is the private key of the terminal device.

[0131] The embodiment of the present application uses BCADD as the application identity identifier, which can ensure the identity uniformity of the terminal device between different layers such as the data link layer, network layer, transport layer and application layer, but there is a risk of the terminal device being tracked. Therefore, BCADD can be updated to reduce the risk of the terminal device being tracked. The specific update method is as follows.

[0132] As an optional embodiment, the method further includes: the terminal device sends a fourth message to the application server, the fourth message is used to indicate the update of the application identity of the terminal device, the fourth message carries a second random number and a second ciphertext, and the second ciphertext is the ciphertext obtained by encrypting the new network identity of the terminal device, the network identity and the second random number using the private key of the terminal device. Correspondingly, the application server receives the fourth message. The application server decrypts the second ciphertext using the public key of the terminal device to obtain the decrypted new network identity, the decrypted network identity and the decrypted second random number; when the decrypted second random number is equal to the second random number carried in the second ciphertext, and when the first application identity is equal to the decrypted network identity in at least one application identity, the application server updates the first application identity from the network identity to the new network identity.

[0133] Exemplarily, the second ciphertext may be SKu(new BCADD, BCADD, second random number), wherein SKu(new BCADD, BCADD, second random number) is the ciphertext obtained by encrypting new BCADD, BCADD and the second random number using the private key SKu.

[0134] In the embodiment of the present application, when the application identity of the terminal device is the network identity of the terminal device, updating the application identity of the terminal device is helpful to avoid the user's application usage behavior from being tracked, resulting in user information leakage, thereby improving the security of the system.

[0135] Optionally, the method further comprises: the application server sends an update response to the terminal device to indicate whether the update is successful. Correspondingly, the terminal device receives the update response from the application server.

[0136] In one possible implementation, if the update is successful, the update response may be a message indicating that the update is successful, such as an acknowledgement character (ACK); if the update fails, the update response may be a message indicating that the update fails, such as a negative acknowledgement character (NACK).

[0137] In another possible implementation, if the update is successful, the application server sends an update response to the terminal device, and the update response is a message indicating the update is successful, such as ACK. If the update fails, no response is made. In this case, the terminal device can set a timer, which starts counting after the fourth information is sent. If the terminal device does not receive the update response fed back by the application server before the timer times out, the terminal device defaults to the failure of the application server to update BCADD.

[0138] It should be understood that when the application identity of the terminal device is the network identity of the terminal device, since BCADD has no globally accessible location, when the terminal device requests access to the application server, the network device 2 corresponding to the application server performs routing, and the application server needs to look up the address in the blockchain to route subsequent messages to the terminal device.

[0139] As an optional embodiment, before the application server receives the first authentication request from the terminal device, the method also includes: the application server sends third information to a network device corresponding to the application server, the third information is used to respond to the first information, and the third information carries the network identification of the terminal device; correspondingly, the network device corresponding to the application server receives the third information.

[0140] It should be understood that after receiving the third information, the network device corresponding to the above-mentioned application server can send a query request to the blockchain device based on the third information. The query request carries the network identification of the terminal device. The query request is used to query the identity (ID) of the network device corresponding to the terminal device, which corresponds to the network identification of the terminal device and is in the same network domain as the network device corresponding to the application server. Correspondingly, the blockchain device receives the query request, and determines the ID of the network device corresponding to the terminal device, which corresponds to the received network identification and is in the same network domain as the network device corresponding to the application server, by using the correspondence between the network identification stored therein and the ID of the network device corresponding to the terminal device. The network device corresponding to the application server obtains the ID of the network device corresponding to the terminal device, thereby addressing the network device to which the terminal device is connected according to the ID of the network device, and then finding the terminal device.

[0141] As an optional embodiment, when the authentication is passed, the application server allocates a temporary external identifier to the terminal device, and the temporary external identifier is used to externally identify the application of the terminal device; the application server sends information indicating the correspondence between the network identifier and the temporary external identifier to the blockchain device. Correspondingly, the blockchain device receives the information.

[0142] Exemplarily, the temporary external identifier may be a unified resource location address (URL), an application programming interface (API), or a port identifier.

[0143] The embodiment of the present application can prevent the internal identifier of the terminal device from being exposed in the network by setting a temporary external identifier, thereby increasing the security of the communication system.

[0144] As an optional embodiment, the method further includes: the terminal device sends fifth information to the application server, the fifth information is used to request that the first application identity be used as the identity of the terminal device under the application corresponding to the application server, and the fifth information carries the first application identity. Correspondingly, the application server receives the fifth information, and based on the fifth information, sends a second authentication request to the terminal device, the second authentication request is used to request authentication of the terminal device. Correspondingly, the terminal device receives the second authentication request, and based on the second authentication request, sends a second authentication response to the application server, the second authentication response carries information used for authentication. Correspondingly, the application server receives the second authentication response, and based on the second authentication response, authenticates the terminal device. If the authentication is successful, the application server stores the correspondence between the first application identity and the public key of the terminal device.

[0145] It should be understood that before the terminal device sends the fifth information to the application server, the terminal device needs to access the network. The embodiment of the present application does not limit the network access method and the network identifier used. In one possible implementation, the terminal device can use BCADD as the network identifier, initiate a random access process, and access the network. In another possible implementation, the terminal device can use other identifiers as the network identifier, initiate a random access process, and access the network.

[0146] Optionally, the information used for authentication includes: the public key of the terminal device, a third random number and a third ciphertext, the third ciphertext being the ciphertext obtained by encrypting the first application identity and the third random number using the private key of the terminal device; the application server authenticates the terminal device based on the second authentication response, including: the application server uses the public key of the terminal device to decrypt the third ciphertext to obtain the decrypted first application identity and the decrypted third random number; when the decrypted first application identity is equal to the first application identity carried in the fifth information, and the decrypted third random number is equal to the third random number carried in the second authentication response, the application server determines that the terminal device authentication is successful.

[0147] Optionally, when the decrypted first application identity is not equal to the first application identity carried in the fifth information, and / or the decrypted third random number is not equal to the third random number carried in the second authentication response, the application server determines that the terminal device authentication has failed.

[0148] Optionally, if the above authentication fails, the application server may send an authentication request message to the terminal device again, requesting re-authentication of the terminal device. When the above authentication passes, the authentication request message will no longer be sent repeatedly. If the specific number of repetitions reaches the preset upper limit, the application server considers that the terminal device has failed the authentication.

[0149] It should be understood that the process in which the application server authenticates the terminal device and stores the correspondence between the first application identity and the public key of the terminal device may be performed before S402 in method 400 .

[0150] The embodiment of the present application completes the authentication of the terminal device through a pre-stored correspondence relationship, without the need to establish a correspondence during the authentication process, making the authentication process simpler and faster, thereby improving authentication efficiency.

[0151] Exemplarily, the application identity of the terminal device is the network identity of the terminal device, and the third ciphertext may be SKu(BCADD, third random number), wherein SKu(BCADD, third random number) is the ciphertext obtained by encrypting BCADD and the third random number with the private key SKu.

[0152] Exemplarily, the application identity of the terminal device is a value obtained by processing the network identity of the terminal device using a preset one-way derivative function, and the third ciphertext may be SKu (APPID, third random number), wherein SKu (APPID, third random number) is the ciphertext obtained by encrypting the APPID and the third random number using the private key SKu.

[0153] When the network is untrustworthy, the message sent by the terminal device to the application server may be tampered with, so two-way authentication can be performed again between the terminal device and the application server. If the two-way authentication passes, the application server will provide services for the application of the terminal device to improve the accuracy of application authentication.

[0154] As an optional embodiment, the method further includes: the application server sends a third authentication request to the terminal device, the third authentication request carries a fourth ciphertext, and the fourth ciphertext is a ciphertext obtained by encrypting the application identity of the terminal device, the network identity of the terminal device, and the fourth random number using the public key of the terminal device. Correspondingly, the terminal device receives the third authentication request, and based on the third authentication request, sends a third authentication response to the application server. Correspondingly, the application server receives the third authentication response, the third authentication response carries a fourth ciphertext, and the fourth ciphertext is a ciphertext obtained by encrypting the application identity of the terminal device, the network identity of the terminal device, and the fourth random number obtained by decrypting the fourth ciphertext using the private key of the terminal device. The application server authenticates the terminal device based on the third authentication response; if the authentication is successful, the application server sends the second information to the terminal device.

[0155] Optionally, the terminal device receives the third authentication request, and based on the third authentication request, sends a third authentication response to the application server, which specifically includes: the terminal device uses its own private key to decrypt the fourth ciphertext to obtain a decrypted application identity, a decrypted network identity and a decrypted fourth random number; the terminal device then uses its own private key to encrypt the decrypted application identity, the decrypted network identity and the decrypted fourth random number to obtain a fourth ciphertext encrypted by the private key, and sends a third authentication response to the application server, wherein the third authentication response carries the fourth ciphertext encrypted by the private key.

[0156] Exemplarily, the fourth ciphertext encrypted by the private key may be SKu (APPID, BCADD, fourth random number). The application server authenticates the terminal device based on the third authentication response, specifically including: the application server decrypts the fourth ciphertext encrypted by the private key using the public key of the terminal device to obtain the decrypted application identity, the decrypted network identity and the decrypted fourth random number; when the decrypted fourth random number is equal to the fourth random number carried in the third authentication request, the application server determines that the terminal device is authenticated.

[0157] The terminal device and the application server of the embodiment of the present application can perform two-way authentication. When the two-way authentication is passed, the application server provides services for the application of the terminal device to improve the accuracy of application authentication.

[0158] Next, combine Figures 5 to 8 The application authentication method of the embodiment of the present application is described in detail.

[0159] Figure 5 FIG. 5 shows a schematic flow chart of an application authentication method 500 provided in an embodiment of the present application. The method can be applied to Figure 1 The communication system 100 shown can also be applied to other communication systems, which is not limited in the embodiments of the present application. The method 500 includes:

[0160] S501, the terminal device generates a public-private key pair (PKu, SKu), wherein PKu is the public key of the terminal device, and SKu is the private key of the terminal device.

[0161] It should be understood that based on the public key PKu, the terminal device can obtain Hash (PKu), that is, the above-mentioned BCADD, and Hash (PKu) represents the value obtained after hashing the public key PKu. BCADD can be understood as the blockchain address of the above-mentioned terminal device derived from the public key PKu. The above-mentioned Hash (BCADD) represents the value obtained after hashing BCADD. The Hash (BCADD) of the embodiment of the present application is APPID, which can be understood as the encrypted network identity identifier (also referred to as identity identifier) ​​of the terminal device under the application.

[0162] S502, the terminal device accesses the network.

[0163] It should be understood that the above-mentioned access network does not limit the network access method of the terminal device and the network identifier used. In one possible implementation, the terminal device uses BCADD as the network identifier, initiates a random access process, and the terminal device accesses the network. In another possible implementation, the terminal device uses other identifiers as the network identifier, initiates a random access process, and the terminal device accesses the network.

[0164] S503, when a user opens an application through a terminal device, in response to the user's operation, the terminal device sends a first message to the application server of the application, the first message carrying the APPID, the first message being used to indicate that the APPID is used as the identity of the terminal device under the application. Correspondingly, the application server receives the first message.

[0165] S504, the application server sends an authentication request to the terminal device based on the received APPID, where the authentication request is used to request authentication of the terminal device. Correspondingly, the terminal device receives the authentication request.

[0166] S505: Based on the received authentication request, the terminal device sends an authentication response to the application server, which carries SKu (APPID, random number 1), public key PKu and random number 1, where SKu (APPID, random number 1) is the ciphertext obtained by encrypting APPID and random number 1 with private key SKu. Correspondingly, the application server receives the authentication response.

[0167] It should be understood that when the application server is disconnected from the network, the above authentication response may not reach the application server. Therefore, in a possible implementation, the application server can set a timer, which starts counting after the authentication request is sent in S504. If the application server does not receive an authentication response from the terminal device before the timer times out, the application server sends an authentication failure message to the terminal device, and the authentication failure message can be, for example, a NACK message. Correspondingly, the terminal device receives the authentication failure message.

[0168] S506: The application server performs authentication based on the received authentication response.

[0169] The above authentication can be understood as: the application server uses the public key PKu to decrypt SKu (APPID, random number 1). If the decrypted APPID is the same as the APPID received in the above S504, and the decrypted random number 1 is the same as the random number 1 carried in the authentication response, the application server determines that the terminal device has passed the authentication.

[0170] S507, when the authentication is successful, the application server stores the APPID as the identity of the terminal device under the application, and stores the corresponding relationship between the APPID and the public key PKu.

[0171] It should be understood that when the above authentication fails, the application server can send an authentication request message to the terminal device again and repeat the above S504-S506. When the above authentication passes, it will no longer be repeated. If the specific number of repetitions reaches the preset upper limit, the application server considers that the terminal device has failed the authentication.

[0172] S508, the terminal device uses BCADD as the network identifier to access the network, establishes an RRC connection with the network device based on the public-private key pair (PKu, SKu), and establishes a protocol data unit (PDU) session through two-way authentication with the network device.

[0173] It should be understood that the terminal device uses BCADD as the network identifier to initiate a random access process to the network device. In one possible implementation, the terminal device sends an RRC connection establishment request to the network device, and the RRC connection establishment request carries BCADD. Correspondingly, the network device receives the RRC connection establishment request and triggers the RRC connection establishment process, and the terminal device establishes an RRC connection with the network device.

[0174] After the terminal device establishes an RRC connection with the network device, the terminal device sends an authentication request to the network device and performs two-way authentication with the network device. When the terminal device passes the authentication of the network device and the network device passes the authentication of the terminal device, a PDU session between the terminal device and the network device can be established and key negotiation can be performed.

[0175] S509, when the user logs in to the application through the terminal device, the terminal device sends a data packet encapsulated with a BCADD header to the application server based on the current communication protocol. Correspondingly, the application server receives the data packet encapsulated with the BCADD header.

[0176] S510, the application server decapsulates the received data packet encapsulated with the BCADD header, captures the BCADD, and determines Hash(BCADD) based on a preset hash function, and determines whether Hash(BCADD) is the same as the APPID stored in the above S507.

[0177] It should be understood that the above-mentioned preset hash function is the hash function used by the terminal device to generate the APPID.

[0178] Optionally, when the network is untrustworthy, the method 500 further includes S511 to S513:

[0179] S511, the application server sends a request message to the terminal device, the request message is used to request the terminal device to use the private key SKu to sign APPID, BCADD and random number 2, and the request message carries PKu (APPID, BCADD, random number 2). Correspondingly, the terminal device receives the request message.

[0180] The above PKu (APPID, BCADD, random number 2) is the ciphertext obtained by encrypting APPID, BCADD and random number 2 with the public key PKu.

[0181] It should be understood that the random numbers involved in the embodiments of the present application (such as the above-mentioned random number 1 and random number 2) are all randomly generated. The above-mentioned random number 2 may be the same as the above-mentioned random number 1 or different from the above-mentioned random number 1, and the embodiments of the present application do not limit this.

[0182] S512, the terminal device sends SKu (APPID, BCADD, random number 2) to the application server based on the received request message. Correspondingly, the application server receives SKu (APPID, BCADD, random number 2).

[0183] The above SKu (APPID, BCADD, random number 2) is the ciphertext obtained by encrypting APPID, BCADD and random number 2 with the private key SKu.

[0184] S513, the application server uses the public key PKu of the terminal device to decrypt SKu (APPID, BCADD, random number 2). If the decryption is successful, the application server determines that the terminal device has passed the authentication.

[0185] It should be understood that when the above authentication fails, the application server can send a request message to the terminal device again and repeat the above S511-S513. When the above authentication passes, it will no longer be repeated. If the specific number of repetitions reaches the preset upper limit, the application server considers that the terminal device has failed the authentication.

[0186] S514, when the Hash (BCADD) in S510 is the same as the APPID stored in S507, or when the terminal device passes the authentication in S513, the application server sends the second information to the terminal device, the second information is used to indicate that the terminal device passes the authentication and the application server can provide subsequent services for the terminal device. Correspondingly, the terminal device receives the second information from the application server.

[0187] It should be understood that, in the case where the Hash (BCADD) in S510 is different from the APPID stored in S507, and in the case where the terminal device fails to pass the authentication in S513, the application server will not provide subsequent services for the terminal device. In one possible implementation, the application server sends a third message to the terminal device, and the third message is used to indicate that the terminal device fails to pass the authentication; correspondingly, the terminal device receives the third message. In another possible implementation, the application server does not respond to the terminal device.

[0188] Next, combine Figure 2 The communication system shown in the figure introduces the above-mentioned application authentication method 500 in more detail.

[0189] Figure 6 FIG. 6 is a schematic flow chart of an application authentication method 600 provided in an embodiment of the present application. The method can be applied to Figure 2 The communication system 200 shown can also be applied to other communication systems, which is not limited in the present embodiment. The method 600 includes:

[0190] S601, the terminal device network interface generates a public-private key pair (PKu, SKu), wherein PKu is the public key of the terminal device network interface, and SKu is the private key of the terminal device network interface.

[0191] S602, the terminal device network interface sends first information to the terminal device application, the first information carries Hash (BCADD), and the first information is used to indicate that Hash (BCADD) is used as the APPID of the terminal device network interface. Correspondingly, the terminal device application receives the first information.

[0192] S603, the terminal device accesses the network.

[0193] S604, when a user opens an application through a terminal device, in response to the user's operation, the terminal device application sends a second message to the application server of the application, the second message carries the APPID, and the second message is used to indicate that the APPID is used as the identity of the terminal device network interface under the application. Correspondingly, the application server receives the second message.

[0194] S605, the application server sends an authentication request to the terminal device network interface based on the received APPID, where the authentication request is used to request authentication of the terminal device. Correspondingly, the terminal device network interface receives the authentication request.

[0195] S606, the terminal device network interface sends an authentication response to the application server based on the received authentication request, and the authentication response carries SKu (APPID, random number 1), PKu and random number 1, wherein SKu (APPID, random number 1) is the ciphertext obtained by encrypting APPID and random number 1 with the private key SKu. Correspondingly, the application server receives the authentication response.

[0196] The random number 1 generally refers to a randomly generated value, which may be the same as or different from the other random numbers mentioned above, and the embodiment of the present application does not limit this.

[0197] S607: The application server performs authentication based on the received authentication response.

[0198] The above authentication can be understood as: the application server uses the public key PKu to decrypt SKu (APPID, random number 1). If the decrypted APPID is the same as the APPID received in the above S604, and the decrypted random number 1 is the same as the random number 1 carried in the authentication response, the application server determines that the network interface of the terminal device has passed the authentication.

[0199] S608, when the authentication is successful, the application server stores the APPID as the identity identifier of the terminal device network interface under the application, and stores the corresponding relationship between the APPID and PKu.

[0200] S609, the terminal device network interface uses BCADD as the network identifier to access the network, establishes an RRC connection with the network device based on the public-private key pair (PKu, SKu), and establishes a PDU session through two-way authentication with the network device.

[0201] S610, when a user logs in to an application through a terminal device, the terminal device application sends a login instruction to the terminal device network interface through an application layer message. Correspondingly, the terminal device network interface receives the login instruction.

[0202] S611, the network interface of the terminal device sends a data packet encapsulated with a BCADD header to the application server based on the current communication protocol. Correspondingly, the application server receives the data packet encapsulated with the BCADD header.

[0203] S612, the application server decapsulates the received data packet encapsulated with the BCADD header, captures the BCADD, and determines Hash(BCADD) based on a preset hash function, and determines whether Hash(BCADD) is the same as the APPID stored in the above S608.

[0204] Optionally, when the network is untrustworthy, the method 600 further includes S613 to S615:

[0205] S613, the application server sends a request message to the terminal device network interface, the request message is used to request the terminal device network interface to use the private key SKu to sign APPID, BCADD and random number 2, and the request message carries PKu (APPID, BCADD, random number 2). Correspondingly, the terminal device network interface receives the request message.

[0206] The above PKu (APPID, BCADD, random number 2) is the ciphertext obtained by encrypting APPID, BCADD and random number 2 with the public key PKu.

[0207] The random number 2 generally refers to a randomly generated value, which may be the same as or different from the other random numbers mentioned above, and the embodiment of the present application does not limit this.

[0208] S614, the terminal device network interface sends SKu (APPID, BCADD, random number 2) to the application server based on the received request message. Correspondingly, the application server receives SKu (APPID, BCADD, random number 2).

[0209] The above SKu (APPID, BCADD, random number 2) is the ciphertext obtained by encrypting APPID, BCADD and random number 2 with the private key SKu.

[0210] S615, the application server uses the public key PKu of the network interface of the terminal device to decrypt SKu (APPID, BCADD, random number 2). If the decryption is successful, the network device determines that the network interface of the terminal device has passed the authentication.

[0211] It should be understood that when the above-mentioned authentication fails, the application server may send a request message to the network interface of the terminal device again and repeat the above-mentioned S613-S615. When the above-mentioned authentication passes, it will no longer be repeated. If the specific number of repetitions reaches the preset upper limit, the application server considers that the network interface of the terminal device has failed the authentication.

[0212] S616, when the Hash (BCADD) in S612 is the same as the APPID stored in S608, or when the terminal device network interface passes the authentication in S615, the application server sends the third information to the terminal device application, the third information is used to indicate that the terminal device network interface passes the authentication, and the application server can provide subsequent services for the terminal device application. Correspondingly, the terminal device application receives the third information from the application server.

[0213] In the case of authentication failure, the application server will not provide subsequent services for the terminal device application. In one possible implementation, the application server sends fourth information to the terminal device application, where the fourth information is used to indicate that the terminal device network interface has not passed authentication; correspondingly, the terminal device application receives the fourth information. In another possible implementation, the application server will not make any response to the terminal device application.

[0214] It should be understood that the details in method 600 can refer to the description in the above method 500 and will not be repeated here.

[0215] Figure 7 FIG. 7 is a schematic flow chart of an application authentication method 700 provided in an embodiment of the present application. The method can be applied to Figure 1 The communication system 100 shown can also be applied to other communication systems, which is not limited in the embodiments of the present application. The method 700 includes:

[0216] S701, the terminal device generates a public-private key pair (PKu, SKu), wherein PKu is the public key of the terminal device, and SKu is the private key of the terminal device.

[0217] It should be understood that based on the public key PKu, the terminal device can obtain Hash(PKu), that is, the above-mentioned BCADD, and Hash(PKu) represents the value obtained after performing a hash operation on the public key PKu. BCADD can be understood as the blockchain address of the above-mentioned terminal device derived from the public key PKu. Since the BCADD of the embodiment of the present application is APPID, BCADD can also be understood as the encrypted network identity identifier (also referred to as identity identifier) ​​of the terminal device under the application.

[0218] S702, the terminal device accesses the network.

[0219] It should be understood that the above-mentioned access network does not limit the network access method of the terminal device and the network identifier used. In one possible implementation, the terminal device uses BCADD as the network identifier, initiates a random access process, and the terminal device accesses the network. In another possible implementation, the terminal device uses other identifiers as the network identifier, initiates a random access process, and the terminal device accesses the network.

[0220] S703, when a user opens an application through a terminal device, in response to the user's operation, the terminal device sends a first message to the application server of the application, the first message carrying BCADD, the first message is used to indicate that the BCADD is used as the identity of the terminal device under the application. Correspondingly, the application server receives the first message.

[0221] S704, the application server sends an authentication request to the terminal device based on the received BCADD, where the authentication request is used to request authentication of the terminal device. Correspondingly, the terminal device receives the authentication request.

[0222] S705, based on the received authentication request, the terminal device sends an authentication response to the application server, the authentication response carrying SKu (BCADD, random number 1), public key PKu and random number 1, wherein SKu (BCADD, random number 1) is the ciphertext obtained by encrypting BCADD and random number 1 with private key SKu. Correspondingly, the application server receives the authentication response.

[0223] It should be understood that when the application server is disconnected from the network, the above authentication response may not be able to reach the application server. Therefore, in a possible implementation, the application server can set a timer, which starts timing after the authentication request is sent in S704. If the application server does not receive an authentication response from the terminal device before the timer times out, the application server sends an authentication failure message to the terminal device, and the authentication failure message can be, for example, a NACK message. Correspondingly, the terminal device receives the authentication failure message.

[0224] S706: The application server performs authentication based on the received authentication response.

[0225] The above authentication can be understood as: the application server uses the public key PKu to decrypt SKu (BCADD, random number 1). If the decrypted BCADD is the same as the BCADD received in the above S703, and the decrypted random number 1 is the same as the random number 1 carried in the authentication response, the application server determines that the terminal device has passed the authentication.

[0226] The random number 1 generally refers to a randomly generated value, which may be the same as or different from the other random numbers mentioned above, and the embodiment of the present application does not limit this.

[0227] S707, when the authentication is successful, the application server stores BCADD as the identity of the terminal device under the application, and stores the corresponding relationship between BCADD and the public key PKu.

[0228] S708, the terminal device uses BCADD as the network identifier to access the network, establishes an RRC connection with network device 1 based on the public-private key pair (PKu, SKu), and establishes a PDU session through two-way authentication with network device 1.

[0229] It should be understood that the terminal device uses BCADD as the network identifier to initiate a random access process to the network device 1. In one possible implementation, the terminal device sends an RRC connection establishment request to the network device 1, and the RRC connection establishment request carries BCADD. Correspondingly, the network device 1 receives the RRC connection establishment request and triggers the RRC connection establishment process, and the terminal device establishes an RRC connection with the network device 1.

[0230] During the RRC connection establishment process, network device 1 allocates a cell-radio network temporary identifier (C-RNTI) to the terminal device. In addition to obtaining the C-RNTI, the terminal device can also obtain the cell identifier (national cell identifier, NCI) of network device 1 and the ID of network device 1.

[0231] After the terminal device establishes an RRC connection with network device 1, the terminal device sends an authentication request to network device 1 and performs two-way authentication with network device 1. When the terminal device passes the authentication of network device 1 and network device 1 passes the authentication of the terminal device, a PDU session between the terminal device and network device 1 can be established and key negotiation can be performed.

[0232] S709, when the RRC connection between the terminal device and the network device 1 is successfully established, the network device 1 sends the BCADD and the ID of the network device 1 to the blockchain device. Correspondingly, the blockchain device receives the BCADD and the ID of the network device 1, and stores the corresponding relationship between the BCADD and the ID of the network device 1.

[0233] It should be understood that a terminal device may simultaneously access multiple interconnected or contained network domains, for example, the connection between the terminal device and the access network device, and the connection between the terminal device and the core network device. Since different network domains correspond to different network device IDs, a BCADD may have a corresponding relationship with multiple network device IDs. For a blockchain device, the corresponding relationship between the BCADD and multiple network device IDs can be saved.

[0234] Optionally, since BCADD has no globally network-reachable location, method 700 further includes S710 to S714. When a terminal device requests access to an application server, the network device 2 corresponding to the application server performs routing, and the application server needs to search for addressing in the blockchain so as to route subsequent messages to the terminal device.

[0235] S710, when a user logs in to an application through a terminal device, the terminal device sends an access request to an application server, the access request carries a BCADD, and the access request is used to instruct the application server to provide services for the terminal device. Correspondingly, the application server receives the access request.

[0236] S711, based on the received access request, the application server sends a login response to network device 2, the login response carrying the BCADD, the login response being used to determine the ID of network device 1 corresponding to the BCADD and in the same network domain as network device 2. Correspondingly, network device 2 receives the login response.

[0237] Exemplarily, the network device 2 may be a router.

[0238] S712, network device 2 sends a query request to the blockchain device based on the received login response, the query request carries BCADD, and the query request is used to query the ID of network device 1 corresponding to the BCADD and in the same network domain as network device 2. Correspondingly, the blockchain device receives the query request, and uses the correspondence between the BCADD and the ID of network device 1 stored in S710 to determine the ID of network device 1 corresponding to the received BCADD and in the same network domain as network device 2, and network device 2 obtains the ID of network device 1.

[0239] S713, network device 2 sends a login response to network device 1 corresponding to the ID of network device 1 based on the ID of network device 1, where the login response carries BCADD. Correspondingly, network device 1 receives the login response.

[0240] S714, network device 1 determines a terminal device corresponding to the BCADD based on the BCADD, and sends a login response to the terminal device, where the login response carries the BCADD.

[0241] S715, based on the received login response, the terminal device sends an authentication request to the application server, the authentication request carries SKu(BCADD, random number 2) and random number 2, wherein SKu(BCADD, random number 2) is the ciphertext obtained by encrypting BCADD and random number 2 with the private key SKu. Correspondingly, the application server receives the authentication request.

[0242] The random number 2 generally refers to a randomly generated value, which may be the same as or different from the other random numbers mentioned above, and the embodiment of the present application does not limit this.

[0243] S716: The application server performs authentication based on the received authentication request.

[0244] The above authentication can be understood as: the application server uses the public key PKu to decrypt SKu (BCADD, random number 2). If the decrypted BCADD is the same as the BCADD received in the above S712, and the decrypted random number 2 is the same as the random number 2 carried in the authentication request, the application server determines that the terminal device has passed the authentication.

[0245] S717: If the authentication is successful, the application server sends an authentication response to the terminal device, and the terminal device receives the authentication response accordingly.

[0246] Optionally, the above authentication response may carry SKs(BCADD, random number 3), public key PKs and random number 3, wherein PKs is the public key of the application server, SKs is the private key of the application server, and SKs(BCADD, random number 3) is the ciphertext obtained by encrypting BCADD and random number 3 with private key SKs. Correspondingly, the terminal device receives the authentication response.

[0247] The random number 3 generally refers to a randomly generated value, which may be the same as or different from the other random numbers mentioned above, and the embodiment of the present application does not limit this.

[0248] Optionally, when the terminal device considers it necessary to authenticate the application server, the method 700 further includes S718:

[0249] S718: The terminal device performs authentication based on the received authentication response.

[0250] The above authentication can be understood as: the terminal device uses the public key PKs to decrypt SKs (BCADD, random number 3). If the decrypted BCADD is the same as the BCADD received in the above S716, and the decrypted random number 3 is the same as the random number 3 carried in the authentication response, the terminal device determines that the application server has passed the authentication.

[0251] S719, when the terminal device passes the authentication of the application server, the application server allocates a temporary external identifier for BCADD, and sends the correspondence between BCADD and the temporary external identifier to the blockchain device, where the temporary external identifier can be, for example, a unified resource location address (URL) and / or a port. Correspondingly, the blockchain device receives and stores the correspondence between the BCADD and the temporary external identifier. By setting a temporary external identifier, the internal identifier of the terminal device can be prevented from being exposed to the network, thereby increasing the security of the system.

[0252] S720, when the terminal device passes the authentication of the application server, the application server sends second information to the terminal device, the second information is used to indicate that the terminal device passes the authentication and the application server can provide subsequent services for the terminal device. Correspondingly, the terminal device receives the second information from the application server.

[0253] It should be understood that the result of the terminal device authenticating the application server in S718 above does not affect the application server providing subsequent services to the terminal device. For example, if the terminal device passes the authentication of the application server but the application server fails the authentication of the terminal device, the application server can provide subsequent services to the terminal device, and the terminal device may choose not to use the service.

[0254] Optionally, when the current PDU session needs to be replaced with a new BCADD due to security or privacy reasons, the method 700 further includes the following steps:

[0255] S721, after generating a new BCADD, the terminal device sends SKu (new BCADD, BCADD, random number 4) and random number 4 to the application server, where SKu (new BCADD, BCADD, random number 4) is the ciphertext obtained by encrypting the new BCADD, BCADD and random number 4 with the private key SKu. Correspondingly, the application server receives the SKu (new BCADD, BCADD, random number 4) and random number 4.

[0256] The random number 4 generally refers to a randomly generated value, which may be the same as or different from the other random numbers mentioned above, and the embodiment of the present application does not limit this.

[0257] Exemplarily, the new BCADD can be obtained by hashing the public key PKu using a new hash function, or by hashing the public key PKu newly generated by the terminal device using the original hash function, or by hashing the public key PKu newly generated by the terminal device using a new hash function. This application does not limit this.

[0258] It should be understood that the above-mentioned private key SKu can be stored in a secure place such as a trusted execution environment (TEE) or a trusted platform module (TPM), and the embodiments of the present application are not limited thereto.

[0259] S722, the application server uses the public key PKu to decrypt SKu (new BCADD, BCADD, random number 4). If the decrypted BCADD is the same as the BCADD received in the above S710, and the decrypted random number 4 is the same as the received random number 4, the authentication is passed.

[0260] S723, if the authentication is successful, the application server sends an ACK to the terminal device; if the authentication fails, the application server sends a NACK to the terminal device. Correspondingly, the terminal device receives an ACK or a NACK from the application server.

[0261] S724, when the authentication is successful, the terminal device updates the BCADD to a new BCADD and uses the BCADD in subsequent PDU sessions.

[0262] It should be understood that when the above authentication fails, the terminal device can send an authentication request message to the application server again and repeat the above S721-S723. When the above authentication is successful, it will not be repeated. If the specific number of repetitions reaches the preset upper limit, the application server considers that the terminal device has not passed the authentication.

[0263] Next, combine Figure 2 The communication system shown in the figure introduces the above-mentioned application authentication method 700 in more detail.

[0264] Figure 8 FIG. 8 is a schematic flow chart of an application authentication method 800 provided in an embodiment of the present application. The method can be applied to Figure 2 The communication system 200 shown can also be applied to other communication systems, which is not limited in the present embodiment. The method 800 includes:

[0265] S801, the terminal device network interface generates a public-private key pair (PKu, SKu), wherein PKu is the public key of the terminal device network interface, and SKu is the private key of the terminal device network interface.

[0266] S802, the terminal device network interface sends first information to the terminal device application, the first information carries BCADD, and the first information is used to indicate that BCADD is used as the APPID of the terminal device network interface. Correspondingly, the terminal device application receives the first information.

[0267] S803, the terminal device accesses the network.

[0268] S804, when a user opens an application through a terminal device, in response to the user's operation, the terminal device application sends a second message to the application server of the application, the second message carries BCADD, and the second message is used to indicate that the BCADD is used as the identity of the terminal device under the application. Correspondingly, the application server receives the second message.

[0269] S805, the application server sends an authentication request to the terminal device network interface based on the received BCADD, where the authentication request is used to request authentication of the terminal device network interface. Correspondingly, the terminal device network interface receives the authentication request.

[0270] S806, the terminal device network interface sends an authentication response to the application server based on the received authentication request, and the authentication response carries SKu (BCADD, random number 1), public key PKu and random number 1, wherein SKu (BCADD, random number 1) is the ciphertext obtained by encrypting BCADD and random number 1 with private key SKu. Correspondingly, the application server receives the authentication response.

[0271] The random number 1 generally refers to a randomly generated value, which may be the same as or different from the other random numbers mentioned above, and the embodiment of the present application does not limit this.

[0272] S807: The application server performs authentication based on the received authentication response.

[0273] The above authentication can be understood as: the application server uses the public key PKu to decrypt SKu (BCADD, random number 1). If the decrypted BCADD is the same as the BCADD received in the above S804, and the decrypted random number 1 is the same as the random number 1 carried in the authentication response, the application server determines that the terminal device has passed the authentication.

[0274] S808, when the authentication is successful, the application server stores BCADD as the identity of the terminal device under the application, and stores the corresponding relationship between BCADD and the public key PKu.

[0275] S809, the terminal device network interface uses BCADD as the network identifier to access the network, establishes an RRC connection with network device 1 based on the public-private key pair (PKu, SKu), and establishes a PDU session through two-way authentication with network device 1.

[0276] S810, when the RRC connection between the terminal device network interface and the network device 1 is successfully established, the network device 1 sends the BCADD and the ID of the network device 1 to the blockchain device. Correspondingly, the blockchain device receives the BCADD and the ID of the network device 1, and stores the corresponding relationship between the BCADD and the ID of the network device 1.

[0277] S811, when a user logs in to an application through a terminal device, the terminal device application sends a login instruction to a terminal device network interface through an application layer message. Correspondingly, the terminal device network interface receives the login instruction.

[0278] Optionally, since BCADD has no globally network-reachable location, method 800 also includes S812 to S816. When the terminal device network interface requests access to the application server, the network device 2 corresponding to the application server performs routing, and the application server needs to search for addressing in the blockchain to route subsequent messages to the terminal device network interface.

[0279] S812, the terminal device network interface sends an access request to the application server based on the received login instruction, the access request carries the BCADD, and the access request is used to instruct the application server to provide services for the terminal device. Correspondingly, the application server receives the access request.

[0280] S813, based on the received access request, the application server sends a login response to network device 2, the login response carrying the BCADD, the login response being used to determine the ID of network device 1 corresponding to the BCADD and in the same network domain as network device 2. Correspondingly, network device 2 receives the login response.

[0281] Exemplarily, the network device 2 may be a router.

[0282] S814, network device 2 sends a query request to the blockchain device based on the received login response, the query request carries BCADD, and the query request is used to query the ID of network device 1 corresponding to the BCADD and in the same network domain as network device 2. Correspondingly, the blockchain device receives the query request, and uses the correspondence between the BCADD and the ID of network device 1 stored in S810 to determine the ID of network device 1 corresponding to the received BCADD and in the same network domain as network device 2, and network device 2 obtains the ID of network device 1.

[0283] S815, based on the ID of network device 1, network device 2 sends a login response to network device 1 corresponding to the ID of network device 1, the login response carrying BCADD. Correspondingly, network device 1 receives the login response.

[0284] S816, network device 1 determines the terminal device network interface corresponding to the BCADD based on the BCADD, and sends a login response to the terminal device network interface, where the login response carries the BCADD.

[0285] S817, the terminal device network interface sends an authentication request to the application server based on the received login response, and the authentication request carries SKu(BCADD, random number 2) and random number 2, wherein SKu(BCADD, random number 2) is the ciphertext obtained by encrypting BCADD and random number 2 with the private key SKu. Correspondingly, the application server receives the authentication request.

[0286] The random number 2 generally refers to a randomly generated value, which may be the same as or different from the other random numbers mentioned above, and the embodiment of the present application does not limit this.

[0287] S818: The application server performs authentication based on the received authentication request.

[0288] The above authentication can be understood as: the application server uses the public key PKu to decrypt SKu (BCADD, random number 2). If the decrypted BCADD is the same as the BCADD received in the above S812, and the decrypted random number 2 is the same as the random number 2 carried in the authentication request, the application server determines that the network interface of the terminal device has passed the authentication.

[0289] S819, when the authentication is successful, the application server sends an authentication response to the terminal device network interface. Correspondingly, the terminal device network interface receives the authentication response.

[0290] Optionally, the above authentication response may carry SKs(BCADD, random number 3), public key PKs and random number 3, wherein PKs is the public key of the application server, SKs is the private key of the application server, and SKs(BCADD, random number 3) is the ciphertext obtained by encrypting BCADD and random number 3 with SKs. Correspondingly, the terminal device network interface receives the authentication response.

[0291] The random number 3 generally refers to a randomly generated value, which may be the same as or different from the other random numbers mentioned above, and the embodiment of the present application does not limit this.

[0292] Optionally, when the terminal device network interface deems it necessary to authenticate the application server, the method 800 further includes S820:

[0293] S820, the network interface of the terminal device performs authentication based on the received authentication response.

[0294] The above authentication can be understood as: the terminal device network interface uses the public key PKs to decrypt SKs (BCADD, random number 3). If the decrypted BCADD is the same as the BCADD received in the above S816, and the decrypted random number 3 is the same as the random number 3 carried in the authentication response, then the terminal device network interface determines that the application server has passed the authentication.

[0295] S821, when the network interface of the terminal device passes the authentication of the application server, the application server allocates a temporary external identifier for BCADD, and sends the correspondence between BCADD and the temporary external identifier to the blockchain device, where the temporary external identifier can be, for example, a unified resource location address (URL) and / or a port. Correspondingly, the blockchain device receives and stores the correspondence between the BCADD and the temporary external identifier. By setting a temporary external identifier, the internal identifier of the terminal device can be prevented from being exposed to the network, thereby increasing the security of the system.

[0296] S822, when the terminal device network interface passes the authentication of the application server, the application server sends second information to the terminal device application, the second information is used to indicate that the terminal device application passes the authentication, and the application server can provide subsequent services for the terminal device application. Correspondingly, the terminal device application receives the second information from the application server.

[0297] It should be understood that the result of the terminal device network interface authenticating the application server in S820 does not affect the application server providing subsequent services to the terminal device application. For example, if the terminal device network interface passes the authentication of the application server, but the application server fails to authenticate it through the terminal device network interface, the application server can provide subsequent services to the terminal device application, and the terminal device application may choose not to use the service.

[0298] Optionally, when the current PDU session needs to be replaced with a new BCADD due to security or privacy reasons, the method 800 further includes the following steps:

[0299] S823, the terminal device network interface sends a new BCADD to the terminal device application. Correspondingly, the terminal device application receives the new BCADD.

[0300] S824, the terminal device network interface sends the private key SKu to the terminal device application. Correspondingly, the terminal device application receives the private key SKu.

[0301] The sending of the private key SKu and the sending of the new BCADD are not limited in order. In one possible implementation, the private key SKu can be sent to the terminal device application together with the new BCADD in S823. In another possible implementation, when the current PDU session needs to be replaced with a new BCADD again due to security or privacy reasons, and the private key SKu has not changed, the terminal device network interface does not need to repeatedly send SKu to the terminal device application, but only needs to send a new BCADD.

[0302] S825, the terminal device application sends SKu(new BCADD, BCADD, random number 4) and random number 4 to the application server based on the received private key SKu, wherein SKu(new BCADD, BCADD, random number 4) is the ciphertext obtained by encrypting new BCADD, BCADD and random number 4 with the private key SKu. Correspondingly, the application server receives SKu(new BCADD, BCADD, random number 4) and random number 4.

[0303] The random number 4 generally refers to a randomly generated value, which may be the same as or different from the other random numbers mentioned above, and the embodiment of the present application does not limit this.

[0304] S826, the application server uses the public key PKu to decrypt SKu (new BCADD, BCADD, random number 4). If the decrypted BCADD is the same as the BCADD received in the above S812, and the decrypted random number 4 is the same as the received random number 4, the authentication is passed.

[0305] S827, if the authentication is successful, the application server sends an ACK to the terminal device application; if the authentication fails, the application server sends a NACK to the terminal device application. Correspondingly, the terminal device application receives an ACK or NACK from the application server.

[0306] S828, when the authentication is successful, the terminal device network interface updates the BCADD to a new BCADD and uses the BCADD in subsequent PDU sessions.

[0307] It should be understood that when the above authentication fails, the application server can send an authentication request message to the terminal device again and repeat the above S823-S827. When the above authentication passes, it will no longer be repeated. If the specific number of repetitions reaches the preset upper limit, the application server considers that the terminal device has failed the authentication.

[0308] It should be understood that the details in method 800 can refer to the description in the above method 700 and will not be repeated here.

[0309] It should be understood that the sequence numbers of the above processes do not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0310] Combined with the above Figures 1 to 8 , describes in detail the application authentication method according to the embodiment of the present application, and will be combined with Figures 9 to 11 , describe in detail the application authentication device according to the embodiment of the present application.

[0311] Fig. 9 The application authentication device 900 provided in an embodiment of the present application is shown. The device 900 includes: a transceiver unit 910 and a processing unit 920.

[0312] Among them, the transceiver unit 910 is used to: obtain first information from the terminal device, the first information is used to request service data, and the first information carries the network identification of the terminal device; the processing unit 920 is used to: authenticate the terminal device based on the network identification of the terminal device and a pre-stored correspondence, and the correspondence is used to indicate the correspondence between the public key of at least one terminal device and at least one application identity authenticated by the device 900, and the at least one application identity is obtained based on the network identification of the terminal device corresponding to the at least one application identity; the transceiver unit 910 is also used to: when the authentication is successful, send second information to the terminal device, and the second information is used to indicate that the terminal device has passed the authentication.

[0313] Optionally, the application identity of the terminal device is a value obtained by processing the network identity of the terminal device using a preset one-way derivation function, or the application identity of the terminal device is the network identity of the terminal device.

[0314] Optionally, the application identity of the terminal device is a value obtained by processing the network identity of the terminal device using a preset one-way derivative function, and the processing unit 920 is specifically used to: use a preset one-way derivative function to process the network identity of the terminal device to obtain a processing result; if there is a first application identity in the at least one application identity that is equal to the processing result, it is determined that the terminal device has passed the authentication.

[0315] Optionally, the application identity of the terminal device is the network identity of the terminal device, and the transceiver unit 910 is specifically used to: receive a first authentication request from the terminal device, the first authentication request carries a first random number and a first ciphertext, the first ciphertext is the ciphertext obtained by encrypting the network identity of the terminal device and the first random number using the private key of the terminal device; the processing unit 920 is specifically used to: use the public key of the terminal device to decrypt the first ciphertext to obtain the decrypted network identity of the terminal device and the decrypted first random number; and when there is a first application identity in the at least one application identity that is equal to the decrypted network identity of the terminal device, and the decrypted first random number is equal to the first random number carried in the first authentication request, it is determined that the terminal device authentication is successful.

[0316] Optionally, the transceiver unit 910 is further used to: send third information to a network device corresponding to the apparatus 900, wherein the third information is used to respond to the first information, and the third information carries a network identifier of the terminal device.

[0317] Optionally, the processing unit 920 is also used to: when the authentication is successful, assign a temporary external identifier to the terminal device, and the temporary external identifier is used to externally identify the application of the terminal device; and send information to the blockchain device indicating the correspondence between the network identifier and the temporary external identifier.

[0318] Optionally, the transceiver unit 910 is also used to: receive fourth information from the terminal device, the fourth information is used to indicate an update of the application identity of the terminal device, the fourth information carries a second random number and a second ciphertext, the second ciphertext is the ciphertext obtained by encrypting the new network identifier of the terminal device, the network identifier and the second random number using the private key of the terminal device; the processing unit 920 is also used to: decrypt the second ciphertext using the public key of the terminal device to obtain the decrypted new network identifier, the decrypted network identifier and the decrypted second random number; when the decrypted second random number is equal to the second random number carried in the second ciphertext, and when the first application identity exists in the at least one application identity and is equal to the decrypted network identifier, the first application identity is updated from the network identifier to the new network identifier.

[0319] Optionally, the transceiver unit 910 is used to: receive fifth information from the terminal device, the fifth information is used to request that the first application identity be used as the identity of the terminal device under the application corresponding to the device 900, and the third information carries the first application identity; the processing unit 920 is used to: send a second authentication request to the terminal device based on the fifth information, and the second authentication request is used to request authentication of the terminal device; the transceiver unit 910 is also used to: receive a second authentication response from the terminal device, and the second authentication response carries information used for authentication; the processing unit 920 is also used to: authenticate the terminal device based on the second authentication response; and if the authentication is successful, store the correspondence between the first application identity and the public key of the terminal device.

[0320] Optionally, the information used for authentication includes: the public key of the terminal device, a third random number and a third ciphertext, wherein the third ciphertext is the ciphertext obtained by encrypting the first application identity and the third random number using the private key of the terminal device; the processing unit 920 is also used to: use the public key of the terminal device to decrypt the third ciphertext to obtain the decrypted first application identity and the decrypted third random number; when the decrypted first application identity is equal to the first application identity carried in the fifth information, and the decrypted third random number is equal to the third random number carried in the second authentication response, it is determined that the terminal device authentication is successful.

[0321] Optionally, the transceiver unit 910 is used to: send a third authentication request to the terminal device, the third authentication request carries a fourth ciphertext, and the fourth ciphertext is the ciphertext obtained by encrypting the application identity of the terminal device, the network identity of the terminal device and the fourth random number using the public key of the terminal device; receive a third authentication response from the terminal device, the third authentication response carries a fourth ciphertext, and the fourth ciphertext is the ciphertext obtained by encrypting the application identity of the terminal device, the network identity of the terminal device and the fourth random number decrypted based on the fourth ciphertext using the private key of the terminal device; the processing unit 920 is used to: authenticate the terminal device based on the third authentication response; the transceiver unit 910 is also used to: send the second information to the terminal device if the authentication is successful.

[0322] It should be understood that the device 900 here is embodied in the form of a functional unit. The term "unit" here may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a proprietary processor or a group processor, etc.) and a memory for executing one or more software or firmware programs, a merged logic circuit and / or other suitable components that support the described functions. In an optional example, those skilled in the art will understand that the device 900 may be specifically an application server in the above-mentioned embodiment, and the device 900 may be used to execute the various processes and / or steps corresponding to the application server in the above-mentioned method embodiment, and to avoid repetition, it will not be repeated here.

[0323] Fig.10 Another application authentication device 1000 provided in an embodiment of the present application is shown. The device 1000 includes: a sending unit 1010 and a receiving unit 1020.

[0324] Among them, the sending unit 1010 is used to: send first information to the application server, the first information is used to request service data, the first information carries the network identification of the device 1000, the network identification of the device 1000 is used by the application server to authenticate the device 1000 based on a pre-stored correspondence relationship, the correspondence is used to indicate the correspondence between the public key of at least one device 1000 and at least one application identity authenticated by the application server, the at least one application identity is obtained based on the network identification of the device 900 corresponding to the at least one application identity; the receiving unit 1020 is used to: receive second information from the application server, the second information is used to indicate that the device 1000 has passed the authentication.

[0325] Optionally, the application identity of the device 1000 is a value obtained by processing the network identity of the device 1000 using a preset one-way derivation function, or the application identity of the device 1000 is the network identity of the device 1000.

[0326] Optionally, the sending unit 1010 is used to: send fourth information to the application server, the fourth information is used to indicate an update of the application identity of the device 1000, the fourth information carries a second random number and a second ciphertext, the second ciphertext is the ciphertext obtained by encrypting the new network identifier of the device 1000, the network identifier and the second random number using the private key of the device 1000.

[0327] Optionally, the sending unit 1010 is further used to: send fifth information to the application server, the fifth information being used to request that the first application identity be used as the identity of the device 1000 under the application corresponding to the application server, and the fifth information carrying the first application identity;

[0328] Optionally, the receiving unit 1020 is further used to: receive a second authentication request from the application server, the second authentication request is used to request authentication of the device 1000; and send a second authentication response to the application server, the second authentication response carrying information used for authentication.

[0329] Optionally, the information used for authentication includes: a public key of the device 1000, a third random number and a third ciphertext, and the third ciphertext is a ciphertext obtained by encrypting the first application identity and the third random number using the private key of the device 1000.

[0330] Optionally, the receiving unit 1020 is used to: receive a third authentication request from the application server, the third authentication request carries a fourth ciphertext, and the fourth ciphertext is the ciphertext obtained by encrypting the first application identity, the network identity of the device 1000 and the fourth random number using the public key of the device 1000; the device 1000 also includes a processing unit, which is used to: use the private key of the device 1000 to decrypt the fourth ciphertext to obtain the decrypted first application identity, the decrypted network identity of the device 1000 and the decrypted fourth random number; the processing unit is also used to: use the private key of the device 1000 to encrypt the decrypted first application identity, the decrypted network identity of the device 1000 and the decrypted fourth random number to obtain a fourth ciphertext; the sending unit 1010 is used to: send a third authentication response to the application server, and the third authentication response carries the fourth ciphertext.

[0331] It should be understood that the device 1000 here is embodied in the form of a functional unit. The term "unit" here may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a proprietary processor or a group processor, etc.) and a memory for executing one or more software or firmware programs, a merged logic circuit and / or other suitable components that support the described functions. In an optional example, those skilled in the art can understand that the device 1000 can be specifically a terminal device in the above-mentioned embodiment, and the device 1000 can be used to execute the various processes and / or steps corresponding to the terminal device in the above-mentioned method embodiment. To avoid repetition, it will not be repeated here.

[0332] The apparatus 900 of each of the above-mentioned schemes has the function of implementing the corresponding steps executed by the application server in the above-mentioned method, and the apparatus 1000 of each of the above-mentioned schemes has the function of implementing the corresponding steps executed by the terminal device in the above-mentioned method; the functions can be implemented by hardware, or by hardware executing corresponding software implementations. The hardware or software includes one or more modules corresponding to the above-mentioned functions. For example, the above-mentioned transceiver unit 910 may include a sending unit and a receiving unit, the sending unit can be used to implement the above-mentioned transceiver unit 910 corresponding to the various steps and / or processes for performing the sending action, and the receiving unit can be used to implement the above-mentioned transceiver unit corresponding to the various steps and / or processes for performing the receiving action. The sending unit can be replaced by a transmitter, and the receiving unit can be replaced by a receiver, respectively performing the sending and receiving operations and related processing operations in each method embodiment.

[0333] In the embodiments of the present application, Fig. 9 The device 900 and / or Fig.10 The device 1000 in the embodiment may also be a chip or a chip system, for example, a system on chip (SoC). Correspondingly, the transceiver unit (including the transmitting unit and the receiving unit) may be a transceiver circuit of the chip, which is not limited here.

[0334] Fig.11 Another application authentication device 1100 provided in an embodiment of the present application is shown. The device 1100 includes a processor 1110, a transceiver 1120, and a memory 1130. The processor 1110, the transceiver 1120, and the memory 1130 communicate with each other through an internal connection path, the memory 1130 is used to store instructions, and the processor 1110 is used to execute the instructions stored in the memory 1130 to control the transceiver 1120 to send and / or receive signals.

[0335] In one design, the apparatus 1100 may be an application server. The transceiver 1120 is used to: obtain first information from a terminal device, the first information is used to request service data, and the first information carries a network identifier of the terminal device; the processor 1110 is used to: authenticate the terminal device based on the network identifier of the terminal device and a pre-stored correspondence relationship, the correspondence relationship is used to indicate the correspondence between a public key of at least one terminal device and at least one application identity identifier authenticated by the apparatus 1100, the at least one application identity identifier is obtained based on the network identifier of the terminal device corresponding to the at least one application identity identifier; the transceiver 1120 is also used to: send second information to the terminal device when the authentication is successful, the second information is used to indicate that the terminal device is successful.

[0336] In another design, the device 1100 may be a terminal device. The transceiver 1120 is used to: send first information to an application server, the first information is used to request service data, the first information carries the network identification of the device 1100, the network identification of the device 1100 is used by the application server to authenticate the device 1100 based on a pre-stored correspondence relationship, the correspondence relationship is used to indicate the correspondence between the public key of at least one device 1100 and at least one application identity authenticated by the application server, the at least one application identity is obtained based on the network identification of the device 1100 corresponding to the at least one application identity; the transceiver 1120 is also used to: receive second information from the application server, the second information is used to indicate that the device 1100 has passed the authentication.

[0337] It should be understood that the device 1100 can be specifically an application server or terminal device in the above-mentioned embodiment, and can be used to execute the various steps and / or processes corresponding to the application server or terminal device in the above-mentioned method embodiment. Optionally, the memory 1130 may include a read-only memory and a random access memory, and provide instructions and data to the processor. A part of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type. The processor 1110 may be used to execute instructions stored in the memory, and when the processor 1110 executes instructions stored in the memory, the processor 1110 is used to execute the various steps and / or processes of the above-mentioned method embodiment corresponding to the application server or terminal device. The transceiver 1120 may include a transmitter and a receiver, the transmitter may be used to implement the various steps and / or processes corresponding to the above-mentioned transceiver for performing the sending action, and the receiver may be used to implement the various steps and / or processes corresponding to the above-mentioned transceiver for performing the receiving action.

[0338] It should be understood that in the embodiments of the present application, the processor of the above-mentioned device may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0339] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software units in a processor for execution. The software unit can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor executes the instructions in the memory, and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.

[0340] Those of ordinary skill in the art will appreciate that the various method steps and units described in the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the steps and components of each embodiment have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those of ordinary skill in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0341] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0342] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or it can be an electrical, mechanical or other form of connection.

[0343] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present application.

[0344] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0345] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0346] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. An application authentication method, characterized in that: include: The application server obtains first information from the terminal device, where the first information is used to request to obtain service data, and the first information carries a network identifier of the terminal device; The application server authenticates the terminal device based on the network identifier of the terminal device and a pre-stored correspondence relationship, where the correspondence relationship is used to indicate a correspondence between a public key of at least one terminal device and at least one application identity identifier authenticated by the application server, where the at least one application identity identifier is obtained based on the network identifier of the terminal device corresponding to the at least one application identity identifier; In the case where the authentication is successful, the application server sends second information to the terminal device, where the second information is used to indicate that the terminal device has passed the authentication.

2. The method according to claim 1, characterized in that The application identity of the terminal device is a value obtained by processing the network identity of the terminal device using a preset one-way derivation function, or the application identity of the terminal device is the network identity of the terminal device.

3. The method according to claim 1 or 2, characterized in that: The application identity of the terminal device is a value obtained by processing the network identity of the terminal device using a preset one-way derivative function; The application server authenticates the terminal device based on the network identification of the terminal device and the pre-stored correspondence, including: The application server processes the network identification of the terminal device using a preset one-way derivation function to obtain a processing result; If there is a first application identity in the at least one application identity that is equal to the processing result, the application server determines that the terminal device passes the authentication.

4. The method according to claim 1, characterized in that: The application identity of the terminal device is the network identity of the terminal device; The method further includes: the application server receiving a first authentication request from the terminal device, the first authentication request carrying a first random number and a first ciphertext, the first ciphertext being a ciphertext obtained by encrypting the network identifier of the terminal device and the first random number using a private key of the terminal device; The application server authenticates the terminal device based on the network identification of the terminal device and the pre-stored correspondence, including: The application server uses the public key of the terminal device to decrypt the first ciphertext to obtain the decrypted network identifier of the terminal device and the decrypted first random number; When there is a first application identity in the at least one application identity that is equal to the decrypted network identity of the terminal device, and the decrypted first random number is equal to the first random number carried in the first authentication request, the application server determines that the terminal device authentication is successful.

5. The method according to claim 4, characterized in that Before the application server receives the first authentication request from the terminal device, the method further includes: The application server sends third information to the network device corresponding to the application server, where the third information is used to respond to the first information and carries the network identifier of the terminal device.

6. The method according to claim 4 or 5, characterized in that: The method further comprises: If the authentication is successful, the application server allocates a temporary external identifier to the terminal device, where the temporary external identifier is used to externally identify the application of the terminal device; The application server sends information indicating a corresponding relationship between the network identifier and the temporary external identifier to the blockchain device.

7. The method according to any one of claims 4 to 6, characterized in that The method further comprises: The application server receives fourth information from the terminal device, the fourth information being used to indicate updating the application identity of the terminal device, the fourth information carrying a second random number and a second ciphertext, the second ciphertext being a ciphertext obtained by encrypting a new network identity of the terminal device, the network identity, and the second random number using a private key of the terminal device; The application server decrypts the second ciphertext using the public key of the terminal device to obtain the decrypted new network identifier, the decrypted network identifier, and the decrypted second random number; When the second random number after decryption is equal to the second random number carried in the second ciphertext, and the first application identity among the at least one application identity is equal to the decrypted network identity, the application server updates the first application identity from the network identity to the new network identity.

8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: The application server receives fifth information from the terminal device, the fifth information is used to request that the first application identity be used as the identity of the terminal device under the application corresponding to the application server, and the fifth information carries the first application identity; The application server sends a second authentication request to the terminal device based on the fifth information, where the second authentication request is used to request authentication of the terminal device; The application server receives a second authentication response from the terminal device, where the second authentication response carries information used for authentication; The application server authenticates the terminal device based on the second authentication response; When the authentication is successful, the application server stores the corresponding relationship between the first application identity and the public key of the terminal device.

9. The method according to claim 8, characterized in that The information used for authentication includes: a public key of the terminal device, a third random number and a third ciphertext, wherein the third ciphertext is a ciphertext obtained by encrypting the first application identity and the third random number using the private key of the terminal device; The application server authenticates the terminal device based on the second authentication response, including: The application server uses the public key of the terminal device to decrypt the third ciphertext to obtain the decrypted first application identity and the decrypted third random number; When the decrypted first application identity is equal to the first application identity carried in the fifth information, and the decrypted third random number is equal to the third random number carried in the second authentication response, the application server determines that the terminal device authentication is successful.

10. The method according to any one of claims 1 to 9, characterized in that The method further comprises: The application server sends a third authentication request to the terminal device, where the third authentication request carries a fourth ciphertext, where the fourth ciphertext is a ciphertext obtained by encrypting the application identity of the terminal device, the network identity of the terminal device, and the fourth random number using the public key of the terminal device; The application server receives a third authentication response from the terminal device, the third authentication response carrying a fourth ciphertext, the fourth ciphertext being a ciphertext obtained by encrypting, using a private key of the terminal device, an application identity of the terminal device, a network identity of the terminal device, and a fourth random number obtained by decrypting the fourth ciphertext; The application server authenticates the terminal device based on the third authentication response; When the authentication is successful, the application server sends the second information to the terminal device.

11. An application authentication method, characterized in that: include: The terminal device sends first information to the application server, where the first information is used to request to obtain service data, the first information carries the network identifier of the terminal device, the network identifier of the terminal device is used by the application server to authenticate the terminal device based on a pre-stored correspondence relationship, the correspondence relationship is used to indicate a correspondence between a public key of at least one terminal device and at least one application identity identifier authenticated by the application server, and the at least one application identity identifier is obtained based on the network identifier of the terminal device corresponding to the at least one application identity identifier; The terminal device receives second information from the application server, where the second information is used to indicate that the terminal device has passed authentication.

12. The method according to claim 11, characterized in that The application identity of the terminal device is a value obtained by processing the network identity of the terminal device using a preset one-way derivation function, or the application identity of the terminal device is the network identity of the terminal device.

13. The method according to claim 11 or 12, characterized in that: The method further comprises: The terminal device sends fourth information to the application server, where the fourth information is used to indicate an update of the application identity of the terminal device. The fourth information carries a second random number and a second ciphertext, where the second ciphertext is the ciphertext obtained by encrypting the new network identifier of the terminal device, the network identifier and the second random number using the private key of the terminal device.

14. The method according to any one of claims 11 to 13, characterized in that The method further comprises: The terminal device sends fifth information to the application server, where the fifth information is used to request that the first application identity be used as the identity of the terminal device under the application corresponding to the application server, and the fifth information carries the first application identity; The terminal device receives a second authentication request from the application server, where the second authentication request is used to request authentication of the terminal device; The terminal device sends a second authentication response to the application server, where the second authentication response carries information used for authentication.

15. The method according to claim 14, characterized in that The information used for authentication includes: a public key of the terminal device, a third random number and a third ciphertext, and the third ciphertext is a ciphertext obtained by encrypting the first application identity and the third random number using the private key of the terminal device.

16. The method according to any one of claims 11 to 15, characterized in that The method further comprises: The terminal device receives a third authentication request from the application server, where the third authentication request carries a fourth ciphertext, where the fourth ciphertext is a ciphertext obtained by encrypting the first application identity, the network identity of the terminal device, and the fourth random number using the public key of the terminal device; The terminal device decrypts the fourth ciphertext using the private key of the terminal device to obtain the decrypted first application identity, the decrypted network identity of the terminal device, and the decrypted fourth random number; The terminal device uses the private key of the terminal device to encrypt the decrypted first application identity, the decrypted network identity of the terminal device, and the decrypted fourth random number to obtain a fourth ciphertext; The terminal device sends a third authentication response to the application server, where the third authentication response carries the fourth ciphertext.

17. An application authentication device, characterized in that: include: A transceiver unit, configured to obtain first information from a terminal device, wherein the first information is used to request service data, and the first information carries a network identifier of the terminal device; a processing unit, configured to authenticate the terminal device based on a network identifier of the terminal device and a pre-stored correspondence relationship, wherein the correspondence relationship is used to indicate a correspondence relationship between a public key of at least one terminal device and at least one application identity identifier authenticated by the apparatus, wherein the at least one application identity identifier is obtained based on a network identifier of the terminal device corresponding to the at least one application identity identifier; The transceiver unit is further used to: when the authentication is successful, send second information to the terminal device, where the second information is used to indicate that the terminal device has passed the authentication.

18. The device according to claim 17, characterized in that The application identity of the terminal device is a value obtained by processing the network identity of the terminal device using a preset one-way derivation function, or the application identity of the terminal device is the network identity of the terminal device.

19. The device according to claim 17 or 18, characterized in that The application identity of the terminal device is a value obtained by processing the network identity of the terminal device using a preset one-way derivative function; The processing unit is also used for: Using a preset one-way derivative function, the network identifier of the terminal device is processed to obtain a processing result; If there is a first application identity in the at least one application identity that is equal to the processing result, it is determined that the terminal device passes the authentication.

20. The device according to claim 17, characterized in that The application identity of the terminal device is the network identity of the terminal device; The transceiver unit is also used for: receiving a first authentication request from the terminal device, the first authentication request carrying a first random number and a first ciphertext, the first ciphertext being a ciphertext obtained by encrypting the network identifier of the terminal device and the first random number using a private key of the terminal device; The processing unit is also used for: Decrypting the first ciphertext using the public key of the terminal device to obtain a decrypted network identifier of the terminal device and a decrypted first random number; When there is a first application identity in the at least one application identity that is equal to the decrypted network identity of the terminal device, and the decrypted first random number is equal to the first random number carried in the first authentication request, it is determined that the terminal device authentication is successful.

21. The device according to claim 20, characterized in that The transceiver unit is also used for: Sending third information to the network device corresponding to the apparatus, wherein the third information is used to respond to the first information, and the third information carries the network identifier of the terminal device.

22. The device according to claim 20 or 21, characterized in that The processing unit is also used for: If the authentication is successful, a temporary external identifier is allocated to the terminal device, where the temporary external identifier is used to identify an application of the terminal device externally; The transceiver unit is also used for: Information indicating a correspondence between the network identifier and the temporary external identifier is sent to the blockchain device.

23. The device according to any one of claims 20 to 22, characterized in that The transceiver unit is also used for: receiving fourth information from the terminal device, the fourth information being used to indicate updating of an application identity of the terminal device, the fourth information carrying a second random number and a second ciphertext, the second ciphertext being a ciphertext obtained by encrypting a new network identity of the terminal device, the network identity, and the second random number using a private key of the terminal device; The processing unit is also used for: Decrypting the second ciphertext using the public key of the terminal device to obtain the decrypted new network identifier, the decrypted network identifier, and the decrypted second random number; When the second random number after decryption is equal to the second random number carried in the second ciphertext, and the first application identity among the at least one application identity is equal to the decrypted network identity, the first application identity is updated from the network identity to the new network identity.

24. The device according to any one of claims 17 to 23, characterized in that The transceiver unit is also used for: receiving fifth information from the terminal device, the fifth information being used to request that a first application identity be used as an identity of the terminal device under an application corresponding to the apparatus, the fifth information carrying the first application identity; The processing unit is also used for: Based on the fifth information, sending a second authentication request to the terminal device, where the second authentication request is used to request authentication of the terminal device; The transceiver unit is also used for: receiving a second authentication response from the terminal device, wherein the second authentication response carries information used for authentication; The processing unit is also used for: authenticating the terminal device based on the second authentication response; When the authentication is successful, the correspondence between the first application identity and the public key of the terminal device is stored.

25. The device according to claim 24, characterized in that The information used for authentication includes: a public key of the terminal device, a third random number and a third ciphertext, wherein the third ciphertext is a ciphertext obtained by encrypting the first application identity and the third random number using the private key of the terminal device; The processing unit is also used for: Decrypting the third ciphertext using the public key of the terminal device to obtain the decrypted first application identity and the decrypted third random number; When the decrypted first application identity is equal to the first application identity carried in the fifth information, and the decrypted third random number is equal to the third random number carried in the second authentication response, it is determined that the terminal device authentication is successful.

26. The device according to any one of claims 17 to 25, characterized in that The transceiver unit is also used for: Sending a third authentication request to the terminal device, the third authentication request carrying a fourth ciphertext, the fourth ciphertext being a ciphertext obtained by encrypting an application identity of the terminal device, a network identity of the terminal device, and the fourth random number using a public key of the terminal device; receiving a third authentication response from the terminal device, the third authentication response carrying a fourth ciphertext, the fourth ciphertext being a ciphertext obtained by encrypting, using a private key of the terminal device, an application identity of the terminal device, a network identity of the terminal device, and a fourth random number obtained by decrypting the fourth ciphertext; The processing unit is further configured to: authenticate the terminal device based on the third authentication response; When the authentication is successful, the transceiver unit is further used to: send the second information to the terminal device.

27. An application authentication device, characterized in that: include: a sending unit, configured to send first information to an application server, the first information being used to request obtaining service data, the first information carrying a network identifier of the device, the network identifier of the device being used by the application server to authenticate the device based on a pre-stored correspondence relationship, the correspondence relationship being used to indicate a correspondence relationship between a public key of at least one device and at least one application identity identifier authenticated by the application server, the at least one application identity identifier being obtained based on the network identifier of the device corresponding to the at least one application identity identifier; The receiving unit is used to receive second information from the application server, where the second information is used to indicate that the device has passed the authentication.

28. The device according to claim 27, characterized in that The application identity of the device is a value obtained by processing the network identity of the device using a preset one-way derivation function, or the application identity of the device is the network identity of the device.

29. The device according to claim 27 or 28, characterized in that The sending unit is also used for: Send fourth information to the application server, the fourth information is used to indicate the update of the application identity of the device, the fourth information carries a second random number and a second ciphertext, and the second ciphertext is the ciphertext obtained by encrypting the new network identifier of the device, the network identifier and the second random number using the private key of the device.

30. The device according to any one of claims 27 to 29, characterized in that The sending unit is also used for: Sending fifth information to the application server, the fifth information being used to request that the first application identity be used as the identity of the device under the application corresponding to the application server, the fifth information carrying the first application identity; The receiving unit is also used for: receiving a second authentication request from the application server, wherein the second authentication request is used to request authentication of the device; The sending unit is also used for: A second authentication response is sent to the application server, where the second authentication response carries information used for authentication.

31. The device according to claim 30, characterized in that The information used for authentication includes: a public key of the device, a third random number and a third ciphertext, and the third ciphertext is a ciphertext obtained by encrypting the first application identity and the third random number using the private key of the device.

32. The device according to any one of claims 27 to 31, characterized in that The receiving unit is also used for: receiving a third authentication request from the application server, the third authentication request carrying a fourth ciphertext, the fourth ciphertext being a ciphertext obtained by encrypting the first application identity, the network identity of the device, and the fourth random number using the public key of the device; The device also includes: a processing unit, configured to decrypt the fourth ciphertext using a private key of the device to obtain the decrypted first application identity, the decrypted network identity of the device, and the decrypted fourth random number; Using the private key of the device, encrypt the decrypted first application identity, the decrypted network identity of the device, and the decrypted fourth random number to obtain a fourth ciphertext; The sending unit is also used for: A third authentication response is sent to the application server, where the third authentication response carries the fourth ciphertext.

33. An application authentication device, characterized in that: include: A processor, wherein the processor is coupled to a memory, wherein the memory is used to store a computer program, and when the processor calls the computer program, the device is caused to execute the method according to any one of claims 1 to 16.

34. A computer-readable storage medium, characterized in that: Used to store a computer program, the computer program comprising instructions for implementing the method according to any one of claims 1 to 16.

35. A computer program product, characterized in that The computer program product includes a computer program code, and when the computer program code is executed on a computer, the computer is enabled to implement the method according to any one of claims 1 to 16.

Citation Information

Cited By

  • Communication method, apparatus, and system

    WO2026158114A1