Account data exchange method based on trusted execution environment
By introducing a trusted execution environment and trusted applications into mobile devices, verifying the identity of the target application and encrypting communications, the problem of security risks of the mobile account management server is solved, and the defense against malicious apps and the risk avoidance of account theft are realized. .
Patent Information
- Application Number
- PCT/CN2023/139404
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-13
- Filing Date
- 2023-12-18
- Publication Date
- 2024-09-19
AI Technical Summary
The account management server on the mobile side has security risks during the user authorization login process. Attackers can steal token information, causing malicious apps to log in to the victim's account without the user's awareness, and steal the identity and interests of normal users.
Adopt an account data interaction method based on the trusted execution environment, introduce trusted application TA through the trusted execution environment TEE in the mobile device, ensure the identity verification of the target application, and prevent malicious apps from launching through encrypted communication and double verification mechanisms End-changing phishing attack.
Effectively resist end-changing phishing attacks initiated by malicious apps, avoid potential account theft risks, and ensure the security of the account login process through hardware layer protection and encrypted communication.
Smart Images

Figure CN2023139404_19092024_PF_FP_ABST
Abstract
Description
A method for interacting with account data based on a trusted execution environment Technical Field
[0001] The embodiments of this specification relate to a data interaction method, and more particularly to an account data interaction method based on a trusted execution environment. Background Art
[0002] Currently, user authorization login services can be used by the user authorization module on the web page through commonly used communication protocols. However, on the mobile side, there are certain security risks in the process of the account management server supporting the user login service by adapting to the protocol used by the web page. The current general process for obtaining account login is that the merchant app on the mobile terminal initiates an account login request to the account management server. The account management server confirms the request and returns token information. The merchant server then performs user authentication and login based on this token information. However, the operator's presence in external merchant apps is just a third-party software development kit, or a piece of code, without the ability to identify malicious attacks. In other words, an attacker can steal token information, i.e., user authorization credentials, by deceiving the account management server without the user's knowledge, thereby logging into the victim's account on the attacker's own device and stealing the identity and interests of normal users in legitimate apps.
[0003] In view of this, we hope to obtain a more reliable solution for obtaining user authorization, so that users can resist terminal-switching phishing attacks launched by malicious apps during the process of logging in and avoid potential account theft risks.
[0004] Summary of the Invention
[0005] One of the purposes of the embodiments of this specification is to provide an account data interaction method based on a trusted execution environment. This method utilizes the trusted execution environment TEE commonly used in mobile devices to strengthen the current operator number collection and login services that have security flaws. It requires that the identity of the target application must be verified, and TEE provides security guarantees for the entire link, thereby effectively resisting terminal phishing attacks initiated by malicious apps and avoiding potential account theft risks.
[0006] Based on the above-mentioned invention objectives, an embodiment of this specification proposes an account data interaction method based on a trusted execution environment, which is applied to a host terminal with a target application installed, and the host terminal includes a trusted execution environment. The method includes: the target application initiates an account login request and transmits the account login request to the trusted application, and the trusted application runs in the trusted execution environment; the trusted application obtains the application identity information of the target application and sends an updated account login request to the account server, wherein the updated account login request carries the application identity information; when the account server verifies the application identity information, the trusted application receives the token information sent by the account server and passes the token information to the target application; the target application executes the account login based on the token information.
[0007] In the embodiments of this specification, the account login request is sent through the trusted application TA agent, so that the account server at the operator's backend can safely identify and verify the identity of the target application when performing the number acquisition and login service, thereby detecting the attack intention of the malicious App; because TEE provides hardware-level protection, it ensures encrypted communication between the trusted application and the account server, providing security guarantees for the entire link, thereby effectively resisting the terminal-switch phishing attack initiated by malicious App and avoiding potential account theft risks.
[0008] Furthermore, the step in which the trusted application obtains the application identity information of the target application and sends an updated account login request to the account server includes: the trusted application obtains the application identity information of the target application and the application credentials of the target application, and sends an updated account login request to the account server, wherein the updated account login request carries the application identity information and the application credentials, and the account server verifies the application identity information based on the mapping relationship between the application identity information and the application credentials.
[0009] Furthermore, after the target application transmits the account login request to the trusted application, the method also includes: the trusted application obtains the application identity information of the target application, and signs the updated account login request and sends it to the account server; after the account server decrypts the signed account login request, if the application identity information is verified, the trusted application receives the token information sent by the account server and passes the token information to the target application; the target application performs account login based on the token information.
[0010] It should be noted that the trusted application TA in the trusted execution environment TEE has pre-set keys to support encrypted communication with the account server, ensuring the reliability of the communication environment.
[0011] Furthermore, when the account server successfully verifies the application identity information, the trusted application receives the token information sent by the account server, and passes the token information to the target application. The steps include: when the account server successfully verifies the application identity information, the trusted application receives the token information sent by the account server after encryption; after decrypting the encrypted token information, the trusted application passes the token information to the target application.
[0012] Furthermore, the trusted application obtains the account credentials corresponding to the host terminal, and associates the token information with the account credentials.
[0013] Even if an attacker forges a request from a trusted application and sends it to the account server, the token information can be used to obtain the associated account credentials, thereby detecting the identity of the host terminal and avoiding potential device-switch phishing attacks. This process is atomic and cannot be interfered with or controlled by external parties, serving as a second layer of security detection. The account credentials include the mobile device's SIM card information.
[0014] Furthermore, before the target application initiates an account login request, the method also includes: the target application initiates an initialization request to the account server; based on the account server's response to the initialization request, the target application receives account information sent from the account server; based on the target application's confirmation of the account information, an account login request is initiated.
[0015] Furthermore, the step of the target application executing account login based on the token information includes: the target application sending the token information to the target application server, wherein the target application server makes an account request to the account server based on the token information and executes account login based on the requested account.
[0016] Another purpose of the embodiments of this specification is to provide an account data interaction device based on a trusted execution environment. The device uses the trusted execution environment TEE commonly used in mobile devices to strengthen the current operator number collection and login services that have security flaws. It requires that the identity of the target application must be verified, and TEE provides hardware-level protection, providing security guarantees for the entire link, thereby effectively resisting terminal phishing attacks initiated by malicious apps and avoiding potential account theft risks.
[0017] Based on the above purpose, an embodiment of this specification also provides an account data interaction device based on a trusted execution environment, which includes a normal execution environment module and a trusted execution environment module, the target application runs in the normal execution environment module, and the trusted application runs in the feasible execution environment module, the normal execution environment module is used to initiate an account login request corresponding to the target application, and transmit the account login request to the trusted application; the trusted execution environment module is used to obtain the application identity information of the target application, and send an updated account login request to the account server, wherein the updated account login request carries the application identity information; when the account server verifies the application identity information, the trusted execution environment module receives the token information sent by the account server, and passes the token information to the normal execution environment module; the normal execution environment module executes account login based on the token information.
[0018] Furthermore, the trusted execution environment module is also used to obtain the application identity information of the target application and the application credentials of the target application, and send an updated account login request to the account server, wherein the updated account login request carries the application identity information and the application credentials, and the account server verifies the application identity information based on the mapping relationship between the application identity information and the application credentials.
[0019] Furthermore, the trusted execution environment module is also used to obtain the application identity information of the target application, and sign the updated account login request and send it to the account server; after the account server decrypts the signed account login request, if the application identity information is verified, the trusted execution environment module receives the token information sent by the account server and passes the token information to the ordinary execution environment module; the ordinary execution environment module executes the account login based on the token information.
[0020] Furthermore, when the account server successfully verifies the application identity information, the trusted execution environment module receives the token information sent by the account server after encryption; after the trusted execution environment module decrypts the encrypted token information, it passes the token information to the ordinary execution environment module.
[0021] Furthermore, the trusted execution environment module is further configured to obtain an account credential corresponding to the host terminal, and associate the token information with the account credential.
[0022] Furthermore, the common execution environment module is also used to initiate an initialization request to the account server; based on the response of the account server to the initialization request, the common execution environment module receives the account information sent from the account server; based on the confirmation of the account information by the common execution environment module, an account login request is initiated.
[0023] Furthermore, the common execution environment module is further configured to send the token information to the target application server, wherein the target application server makes an account request to the account server based on the token information and performs account login based on the requested account.
[0024] Another object of the embodiments of this specification is to provide a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, any one of the methods described above is implemented.
[0025] Another object of the embodiments of this specification is to provide an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any one of the above-described methods when executing the program.
[0026] The account data interaction method based on a trusted execution environment described in the embodiments of this specification has the following beneficial effects: by sending an account login request through a trusted application TA agent, the account server can securely identify and verify the identity of the target application when performing a number acquisition and login service, thereby detecting the attack intention of a malicious app; because TEE provides hardware-level protection, it ensures encrypted communication between the trusted application and the account server, providing security guarantees for the entire link, thereby effectively resisting terminal-switch phishing attacks initiated by malicious apps and avoiding potential account theft risks.
[0027] By obtaining the host terminal's corresponding account credentials and associating them with the token information, a second dimension of security detection is provided. Even if an attacker can forge a request from a trusted application and send it to the account server, the token information can still be used to obtain the associated account credentials, thereby detecting the host terminal's identity and avoiding potential terminal-swap phishing attacks. This process is atomic and cannot be interfered with or controlled by external parties. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] FIG1 exemplarily shows an application scenario diagram of the account data interaction method based on a trusted execution environment described in an embodiment of this specification in one implementation manner.
[0029] FIG2 exemplarily shows a schematic diagram of the steps of the current number-taking and login method in one embodiment.
[0030] FIG3 exemplarily shows a schematic diagram of the steps by which an attacker steals user information using the current number-taking and login method.
[0031] FIG4 exemplarily shows the steps of executing the account data interaction method based on a trusted execution environment described in an embodiment of this specification in one implementation manner.
[0032] FIG5 exemplarily shows a flowchart of an account data interaction method based on a trusted execution environment according to an embodiment of this specification in one implementation manner.
[0033] FIG6 exemplarily shows a schematic structural diagram of an account data interaction device based on a trusted execution environment according to an embodiment of this specification in one implementation manner. DETAILED DESCRIPTION
[0034] The account data interaction method and device based on a trusted execution environment described in the embodiments of this specification will be further described in detail below in conjunction with the drawings and specific embodiments of the specification, but this detailed description does not constitute a limitation on the embodiments of this specification.
[0035] FIG1 exemplarily shows an application scenario diagram of the account data interaction method based on a trusted execution environment described in an embodiment of this specification in one implementation manner.
[0036] The embodiments of this specification can be applied to various application platforms with high account security requirements, such as platforms used to access highly confidential documents or data or platforms involving large-scale transactions. On these platforms, there are also some high-risk operations. For example, on financial transaction platforms, changing payment passwords, changing the mobile phone number associated with an account, large-scale financial transactions, and self-service permission modification and access are all operations that can have serious consequences for account security. Therefore, the platform has strict security controls over these operations.
[0037] As shown in Figure 1, in some embodiments, the terminal can be a mobile device, with the host merchant app installed as the target application on the terminal. The user initiates a login operation through the terminal. The operator server is the operator's back-end account server, which stores the merchant app's application information. After the user initiates a "one-click login" request, the merchant app sends an account login request to the account server and receives token information returned by the account server as user authorization credentials. The host merchant app then returns this token information to the merchant server. The merchant server uses this token information to verify the account login request with the account server, obtain the user's account information, and complete the account login.
[0038] It should be noted that each block in the block diagrams or flow charts in the accompanying drawings, as well as combinations of blocks in the block diagrams or flow charts, can be implemented using a dedicated hardware-based system that performs the specified functions or operations, or can be implemented using a combination of dedicated hardware and computer instructions. In addition, the modules involved in the embodiments described in this specification can be implemented in both software and hardware.
[0039] Currently, the "one-click login service for local numbers" provided by operators is mainly based on the OAuth2.0 protocol. The original design goal of this protocol is to serve the user authorization number retrieval and login module on the web side. On the mobile side, there are certain security risks in the process of operators supporting user login services by adapting the OAuth2.0 protocol.
[0040] FIG2 exemplarily shows a schematic diagram of the steps of the current number-taking and login method in one embodiment.
[0041] As shown in Figure 2, the general process of current number retrieval and login is as follows: the merchant App, as the target application that the user wants to log in, initiates an initialization request to the account server of the operator's back-end, receives the user's mobile phone number and performs a mask operation, and the user initiates an authorization request. The target application sends an account login request to the account server. The request contains the application identity information of the target application, such as appid and application credential appkey, and then receives the token information returned from the account server as the user authorization credential and sends it to the merchant server; the merchant server, as the target application server, verifies the account login request to the account server based on this token information to obtain the current user's mobile phone number, and then uses the mobile phone number to authenticate the user and complete the user login.
[0042] However, the account server exists within the external target application as a third-party software development kit, or rather, a piece of code, and cannot accurately determine the target application's identity. Therefore, the carrier's back-end account server can only receive information from the initialization request initiated by the target application, but cannot securely authenticate the target application's true identity, leading to account risks.
[0043] FIG3 exemplarily shows a schematic diagram of the steps by which an attacker steals user information using the current number-taking and login method.
[0044] As shown in Figure 3, an attacker can steal the application identity information used by legitimate merchant apps, such as appid and application credentials appkey. Without the user's knowledge, the attacker can install a malicious app on the user's device and disguise it as a legitimate merchant app to send an initialization request to the operator's back-end account server to steal the victim's token information, that is, the user authorization credential. The attacker can then use the legitimate merchant app on their own device to initiate a number acquisition and login request and inject the stolen token information to obtain the victim's mobile phone number. The attacker can then authenticate and log in as the victim, stealing the normal user's identity and interests in the legitimate merchant app.
[0045] In view of this, we hope to obtain a more reliable solution for user number retrieval and login. By utilizing the common TEE in mobile devices, when performing operator number retrieval and login services, the operator's back-end account server can safely verify the identity of the target application and provide a high-level hardware protection for user information to resist terminal phishing attacks initiated by malicious apps and avoid potential account theft risks.
[0046] A Trusted Execution Environment (TEE) is an independent processing environment with computing and storage capabilities, providing security and integrity protection. It leverages hardware-secured CPUs to implement secure computing based on memory isolation, completing privacy-preserving computations while ensuring computational efficiency. The basic concept is to allocate a separate, isolated memory block within the hardware for sensitive data requiring protection. All computations on sensitive data are performed within this memory block, and no other hardware components can access the information in this isolated memory block except through authorized interfaces, thereby enabling privacy-preserving computations on sensitive data. TEEs can provide strong security within complex and interconnected systems. Currently, most TEE applications are targeted at smartphones, where they can provide security services such as privacy-preserving ticketing, online transaction confirmation, mobile payment, media content protection, and cloud storage service authentication. Trusted Applications (TAs) are applications running within the TEE environment, communicating with the TEE through authorized interfaces.
[0047] FIG4 exemplarily shows the steps of executing the account data interaction method based on a trusted execution environment described in an embodiment of this specification in one implementation manner.
[0048] As shown in Figure 4, this embodiment of the specification incorporates a trusted application (TA) within the TEE between the merchant app and the operator's backend account server. This application receives account login requests, reassembles them into requests with the merchant app's identity information, and sends them to the account server for verification. By introducing the TEE environment, hardware-level protection is provided for communications between the target application and the account server, thereby enhancing the confidentiality and reliability of communications.
[0049] In one embodiment of the present specification, a method for interacting with account data based on a trusted execution environment is proposed, which is applied to a host terminal having a target application installed thereon, wherein the host terminal includes a trusted execution environment.
[0050] FIG5 exemplarily shows a flowchart of an account data interaction method based on a trusted execution environment according to an embodiment of this specification in one implementation manner.
[0051] As shown in FIG. 5 , the method includes steps 100 to 130 .
[0052] Step 100: The target application initiates an account login request and transmits the account login request to the trusted application, which runs in a trusted execution environment.
[0053] The account used for user login can be a mobile phone number, an email address, or other account format determined by the account issuer. When using an account for "one-click login service," the user agrees to authorization on the host terminal. The target application server then obtains the account from the target application's request response, allowing users to log in using pre-stored account information without entering a password.
[0054] By introducing the TEE environment, the target application no longer communicates directly with the account server. For example, it no longer directly uses the operator's third-party software development kit (SDK) to initiate an account login request. Instead, the request is sent through the trusted application TA agent in the TEE.
[0055] In some embodiments, before the target application initiates an account login request, the following steps are also performed: the target application initiates an initialization request to the account server; based on the account server's response to the initialization request, the target application receives the account information sent from the account server; based on the target application's confirmation of the account information, an account login request is initiated.
[0056] During the initialization request, the target application's application identity information, such as the appID and appKey, included in the request can be initialized. The appID is the unique identifier of the target application issued by the operator and represents its identity. After the target application sends the initialization request to the account server, the account server receives the request and returns the account information, which can be the user's mobile phone number. The account information can also be masked to enhance the confidentiality and security of information transmission. Once the user confirms the account information through the target application and agrees to authorize the operation, the target application initiates an account login request to the trusted application (TA).
[0057] Through the intervention of the trusted application TA in the trusted execution environment TEE, the trusted application agent sends the account login request. This method enables the operator's back-end account server to obtain the real identity of the target application; the double encrypted communication method between the trusted application and the target application and the account server strengthens the protection of the target application identity information and user identity information, providing security guarantees for the entire link, thereby effectively avoiding potential account theft risks.
[0058] Step 110: The trusted application obtains the application identity information of the target application program and sends an updated account login request to the account server, wherein the updated account login request carries the application identity information.
[0059] The trusted application (TA) extracts the application identity information from the target application's account login request to obtain the target application's unique identity. On iOS, this can be represented by a bundle ID; on Android, it can be represented by a combination of the package name and package signature. The extracted application identity information is then added to the login request, reassembling the request within the trusted execution environment. This request carries at least one piece of application identity information that uniquely identifies the target application, and then sends the request to the account server.
[0060] In some embodiments, after the target application transmits the account login request to the trusted application, the following steps are also performed: the trusted application obtains the application identity information of the target application, signs the updated account login request, and sends it to the account server; after the account server decrypts the signed account login request, if the application identity information is verified, the trusted application receives the token information sent by the account server and passes the token information to the target application; the target application performs account login based on the token information.
[0061] To protect the privacy and security of application identity information and ensure encryption of the communication between the target application, the trusted application (TA), and the account server, a signature is added to the account login request carrying the application identity information using a pre-set key in the trusted application (TA). This signature operation completes the reassembly of the account login request. It should be noted that this key is pre-set by the manufacturer and stored in the trusted application (TA) within the TEE system before the device with the TEE system leaves the factory. Accordingly, the operator also pre-sets a corresponding key in the account server for decryption.
[0062] Since the preset keys in TEE are difficult to crack and extract, it provides hardware-level protection for the communication between the target application, the trusted application TA and the account server, so that the identity information of the target application and the corresponding token information are more reliably protected.
[0063] In some embodiments, the trusted application obtains the application identity information and application credentials of the target application, and sends an updated account login request to the account server, wherein the updated account login request carries the application identity information and application credentials, and the account server verifies the application identity information based on the mapping relationship between the application identity information and the application credentials.
[0064] When the account server receives the updated account login request, it first verifies the request signature in the account login request after the signature processing based on the key preset by the operator, and completes the corresponding decryption operation.
[0065] It should be noted that the merchant app and the operator have pre-registered application information. The operator issues an appid to identify the merchant app and stores the association between the appid and the target application identity information on the operator side in advance for subsequent verification of the merchant's identity. This association is reflected in the mapping relationship between the appid of the target application and the application identity information. After the account server completes the decryption of the account login request, it extracts the target application appid carried in the request and verifies the association with the application identity information. If the verification is successful, the corresponding token information is sent to the trusted application as the user authorization credential. If the verification fails, the malicious app's attack intention can be detected in time, and the process is terminated to prevent the attacker from further stealing the account.
[0066] The trusted application TA can proactively obtain the identity information of the target application. This process is an atomic operation that cannot be interfered with. Once started, it will continue to run until the operation is completed. Therefore, it is difficult for attackers to intervene to steal and change the identity information of the target application, ensuring the link security in the process of the account server receiving the login request and verifying the application identity.
[0067] Step 120: When the account server successfully verifies the application identity information, the trusted application receives the token information sent by the account server and passes the token information to the target application.
[0068] In some embodiments, when the account server successfully verifies the application identity information, the trusted application receives the token information sent by the account server after encryption; after decrypting the encrypted token information, the trusted application passes the token information to the target application.
[0069] The token information serves as user authentication credentials. The target application server can use this token information to obtain the user's account information, including the user's mobile phone number, thereby completing authentication and login. This process again utilizes the pre-set key in the trusted application (TA), providing a highly secure communication environment for the token information, effectively mitigating the risk of attackers intercepting and stealing the token information, and ensuring the security of the user's account.
[0070] Step 130: The target application performs account login based on the token information.
[0071] In some embodiments, the target application sends token information to the target application server, wherein the target application server makes an account request to the account server based on the token information and performs account login based on the requested account.
[0072] The target application server receives the decrypted token information sent by the target application, and verifies the corresponding account login request to the account server based on the token information. After the verification is passed, it receives the user account information from the account server, including the user's mobile phone number. The target application server authenticates the user based on the mobile phone number, completes the user authorization and logs in to the user account.
[0073] In some embodiments, the trusted application obtains the account credentials corresponding to the host terminal and associates the token information with the account credentials.
[0074] Even if an attacker forges an account login request on their own device and injects it into a malicious app to communicate with the account server, attempting to steal token information to log into the victim's account, the trusted application can still proactively obtain the host terminal's corresponding account credentials for authentication, such as obtaining the phone's SIM card information. This process is also atomic, so attackers cannot prevent or control the authentication process, making it easily detectable. This avoids potential device-switch phishing attacks and protects the user's account and information security.
[0075] The account data interaction method based on the trusted execution environment described in the embodiments of this specification sends an account login request through a trusted application agent, so that the account server can safely identify and verify the identity of the target application when performing the account login service, thereby detecting the attack intention of the malicious App; because TEE provides hardware-level protection, it ensures the encrypted communication between the trusted application and the account server, and provides security guarantees for the entire link, thereby effectively resisting the terminal-swap phishing attack initiated by the malicious App and avoiding potential account theft risks. By obtaining the account credentials corresponding to the host terminal and associating them with the token information, a second dimension of security detection is provided. Even if the attacker can forge a request from the trusted application in advance and send it to the account server, the associated account credentials can be obtained through the token information, thereby detecting the identity of the host terminal and avoiding potential terminal-swap phishing attacks.
[0076] In another embodiment of the present specification, an account data interaction device based on a trusted execution environment is proposed, which includes a normal execution environment module 20 and a trusted execution environment module 22. The target application runs in the normal execution environment module 20, and the trusted application runs in the feasible execution environment module 22.
[0077] FIG6 exemplarily shows a schematic structural diagram of an account data interaction device based on a trusted execution environment according to an embodiment of this specification in one implementation manner.
[0078] As shown in Figure 6, the device performs the following steps: the normal execution environment module 20 is used to initiate an account login request corresponding to the target application and transmit the account login request to the trusted application; the trusted execution environment module 22 is used to obtain the application identity information of the target application and send an updated account login request to the account server, wherein the updated account login request carries the application identity information; when the account server verifies the application identity information, the trusted execution environment module 22 receives the token information sent by the account server and passes the token information to the normal execution environment module 20; the normal execution environment module 20 executes the account login based on the token information.
[0079] In some embodiments, before the normal execution environment module initiates an account login request corresponding to the target application, the following steps are also performed: the normal execution environment module initiates an initialization request to the account server; based on the account server's response to the initialization request, the normal execution environment module receives the account information sent from the account server; based on the normal execution environment module's confirmation of the account information, an account login request is initiated.
[0080] The account used for user login can be a mobile phone number, an email address, or other account format determined by the account issuer. When using an account for "one-click login service," the user agrees to authorization on the host terminal. The target application server then obtains the account from the target application's request response, allowing users to log in using pre-stored account information without entering a password.
[0081] During the initialization request, the target application's application identity information, such as the appid and appkey, included in the request can be initialized. The appid is the unique identifier of the target application issued by the operator and represents the identity of the target application. After the general execution environment module sends the initialization request to the account server, the account server receives the request and returns the account information, which can be the user's mobile phone number. Furthermore, the account information can be masked to enhance the confidentiality and security of information transmission. Once the user confirms the account information through the target application and agrees to authorize the operation, the general execution environment module initiates an account login request to the trusted application (TA).
[0082] Through the intervention of the trusted application TA in the trusted execution environment TEE, the trusted application agent sends the account login request. This method enables the account server at the operator's backend to obtain the real identity of the target application; the double encrypted communication method between the trusted application and the target application and the account server strengthens the protection of the target application identity information and user identity information, provides a security guarantee for the entire link, and can effectively avoid potential account theft risks. In some embodiments, after the ordinary execution environment module transmits the account login request to the trusted application, it also performs the following steps: the trusted execution environment module obtains the application identity information of the target application, and signs the updated account login request and sends it to the account server; after the account server decrypts the signed account login request, if the application identity information is verified, the trusted execution environment module receives the token information sent by the account server and passes the token information to the ordinary execution environment module; the ordinary execution environment module executes the account login based on the token information.
[0083] The trusted execution environment module extracts the application identity information from the account login request sent by the standard execution environment module to obtain the unique identity of the target application. In iOS, application identity information can be represented by the bundle ID; in Android, application identity information can be represented by a combination of the package name and package signature. The extracted application identity information is added to the login request, reassembling the account login request within the trusted execution environment module to include at least one application identity information that uniquely identifies the target application. The request is then sent to the account server.
[0084] To protect the privacy and security of application identity information and ensure encryption of the communication between the general execution environment module, the trusted execution environment module, and the account server, a signature is added to the account login request carrying the application identity information using a pre-set key in the trusted execution environment module. This signature operation completes the reassembly of the account login request. It should be noted that this key is pre-set by the manufacturer before devices with a TEE system leave the factory and stored in the trusted application TA of the TEE system within the device. Accordingly, the operator also pre-sets a corresponding key in the account server for decryption.
[0085] Since the pre-set keys in TEE are difficult to crack and extract, it provides hardware-level protection for the communication between the normal execution environment module, the trusted execution environment module and the account server, so that the identity information of the target application and the corresponding token information are more reliably protected.
[0086] In some embodiments, the trusted execution environment module obtains the application identity information and application credentials of the target application, and sends an updated account login request to the account server, wherein the updated account login request carries the application identity information and application credentials, and the account server verifies the application identity information based on the mapping relationship between the application identity information and the application credentials.
[0087] When the account server receives the updated account login request, it first verifies the request signature in the account login request after the signature processing based on the key preset by the operator, and completes the corresponding decryption operation.
[0088] It should be noted that the merchant app and the operator have pre-registered application information. The operator issues an appid to identify the merchant app and stores the association between the appid and the target application identity information on the operator side in advance for subsequent verification of the merchant's identity. This association is reflected in the mapping relationship between the appid of the target application and the application identity information. After the account server completes the decryption of the account login request, it extracts the target application appid carried in the request and verifies the association with the application identity information. If the verification is successful, the corresponding token information is sent to the trusted execution environment module as the user authorization credential. If the verification fails, the malicious app's attack intention can be detected in time, and the process is terminated to prevent the attacker from further stealing the account.
[0089] The trusted execution environment module can proactively obtain the identity information of the target application. This process is an atomic operation that cannot be interfered with. Once started, it will continue to run until the operation is completed. Therefore, it is difficult for attackers to intervene to steal and change the identity information of the target application, ensuring the security of the link in the process of the account server receiving login requests and verifying the application identity.
[0090] In some embodiments, when the account server successfully verifies the application identity information, the trusted execution environment module receives the token information encrypted and sent by the account server; after decrypting the encrypted token information, it passes the token information to the normal execution environment module.
[0091] The token information serves as user authentication credentials. The standard execution environment module uses this token information to obtain user account information, including the user's mobile phone number, to complete authentication and login. This process again utilizes the pre-configured keys in the trusted execution environment module, providing a highly secure communication environment for the token information. This effectively mitigates the risk of attackers intercepting and stealing the token information, ensuring user account security.
[0092] In some embodiments, the common execution environment module sends token information to the target application server, wherein the target application server makes an account request to the account server based on the token information and performs account login based on the requested account.
[0093] The target application server receives the decrypted token information sent by the general execution environment module, and verifies the corresponding account login request to the account server based on the token information. After the verification is passed, it receives the user account information from the account server, including the user's mobile phone number. The target application server authenticates the user based on the mobile phone number, completes the user authorization and logs in to the user account.
[0094] In some embodiments, the trusted execution environment module obtains the account credentials corresponding to the host terminal, and associates the token information with the account credentials.
[0095] Even if an attacker forges an account login request on their own device and injects it into a malicious app to communicate with the account server, attempting to steal token information to log into the victim's account, the Trusted Execution Environment module can still proactively obtain the host terminal's corresponding account credentials for authentication, such as obtaining the phone's SIM card information. This process is also atomic, so attackers cannot prevent or control the authentication process, making it easily detectable. This circumvents potential device-switch phishing attacks and protects the user's account and information security.
[0096] In one embodiment of the present specification, a computer-readable storage medium is further provided, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, any one of the above methods is implemented.
[0097] In one embodiment of the present specification, an electronic device is further proposed, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any one of the above-described methods when executing the program.
[0098] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0099] It should be noted that the above examples are examples of the present application. Obviously, the present application is not limited to the above examples, and many similar variations are possible. All variations directly derived or imagined by those skilled in the art from the contents disclosed in the present application should fall within the scope of protection of the present application.
Claims
1. A method for interacting with account data based on a trusted execution environment, applied to a host terminal with a target application installed, the host terminal including a trusted execution environment, the method include: The target application initiates an account login request and transmits the account login request to a trusted application, wherein the trusted application runs in the trusted execution environment; The trusted application obtains the application identity information of the target application program, and sends an updated account login request to the account server, wherein the updated account login request carries the application identity information; When the account server successfully verifies the application identity information, the trusted application receives the token information sent by the account server and transmits the token information to the target application; The target application performs account login based on the token information.
2. The account data interaction method based on a trusted execution environment as claimed in claim 1, in, The steps of the trusted application obtaining the application identity information of the target application and sending an updated account login request to the account server include: The trusted application obtains the application identity information of the target application and the application credentials of the target application, and sends an updated account login request to the account server, wherein the updated account login request carries the application identity information and the application credentials, and the account server verifies the application identity information according to the mapping relationship between the application identity information and the application credentials.
3. The account data interaction method based on a trusted execution environment as claimed in claim 1, in, After the target application transmits the account login request to the trusted application, the method further includes: The trusted application obtains the application identity information of the target application, and signs the updated account login request and sends it to the account server; After the account server decrypts the signed account login request and verifies the application identity information, the trusted application receives the token information sent by the account server and transmits the token information to the target application; The target application performs account login based on the token information.
4. The account data interaction method based on a trusted execution environment as claimed in claim 1, in, When the account server successfully verifies the application identity information, the trusted application receives the token information sent by the account server and transmits the token information to the target application program, including: When the account server successfully verifies the application identity information, the trusted application receives the token information sent by the account server after encryption; After decrypting the encrypted token information, the token information is passed to the target application.
5. The account data interaction method based on a trusted execution environment according to claim 1, wherein the method further include: The trusted application obtains the account credentials corresponding to the host terminal, and associates the token information with the account credentials.
6. The account data interaction method based on a trusted execution environment as claimed in claim 1, in, Before the target application initiates an account login request, the method further includes: The target application initiates an initialization request to the account server; Based on the response of the account server to the initialization request, the target application receives the account information sent from the account server; Based on the confirmation of the account information by the target application, an account login request is initiated.
7. The account data interaction method based on a trusted execution environment as claimed in claim 1, in, The step of the target application executing account login based on the token information includes: The target application sends the token information to a target application server, wherein the target application server makes an account request to the account server based on the token information and performs account login based on the requested account.
8. An account data interaction device based on a trusted execution environment, comprising a common execution environment module and a trusted execution environment module, wherein the target application runs in the common execution environment module and the trusted application runs in the trusted execution environment module. The common execution environment module is used to initiate an account login request corresponding to the target application and transmit the account login request to the trusted application; The trusted execution environment module is used to obtain the application identity information of the target application and send an updated account login request to the account server. in, The updated account login request carries the application identity information; When the account server successfully verifies the application identity information, the trusted execution environment module receives the token information sent by the account server and transmits the token information to the common execution environment module; The common execution environment module performs account login based on the token information.
9. The account data interaction device based on a trusted execution environment as claimed in claim 8, in, The trusted execution environment module is also used to obtain application identity information of the target application and application credentials of the target application, and send an updated account login request to the account server, wherein the updated account login request carries the application identity information and the application credentials, and the account server verifies the application identity information according to the mapping relationship between the application identity information and the application credentials.
10. The account data interaction device based on a trusted execution environment as claimed in claim 8, in, The trusted execution environment module is also used to obtain the application identity information of the target application, and to sign the updated account login request and send it to the account server; After the account server decrypts the signed account login request and verifies the application identity information, the trusted execution environment module receives the token information sent by the account server and transmits the token information to the common execution environment module; The common execution environment module performs account login based on the token information.
11. The account data interaction device based on a trusted execution environment as claimed in claim 8, in, When the account server successfully verifies the application identity information, the trusted execution environment module receives the token information sent by the account server after encryption; After the trusted execution environment module decrypts the encrypted token information, it transmits the token information to the common execution environment module.
12. The account data interaction device based on a trusted execution environment as claimed in claim 8, in, The trusted execution environment module is also used to obtain the account credentials corresponding to the host terminal, and associate the token information with the account credentials.
13. The account data interaction device based on a trusted execution environment as claimed in claim 8, in, The common execution environment module is also used to initiate an initialization request to the account server; Based on the response of the account server to the initialization request, the common execution environment module receives the account information sent from the account server; Based on the confirmation of the account information by the common execution environment module, an account login request is initiated.
14. The account data interaction device based on a trusted execution environment as claimed in claim 8, in, The common execution environment module is further used to send the token information to the target application server, wherein the target application server makes an account request to the account server based on the token information and performs account login based on the requested account.
15. A computer-readable storage medium, in, The storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of claims 1 to 7 is implemented.
16. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, in, When the processor executes the program, the method described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Identity authentication method, device, apparatus and system
CN110519294A
Token generation and verification method and device
CN112688773A
System account login control method and device, server and readable storage medium
CN115733687A
Account data interaction method based on trusted execution environment
CN116455605A
Application program login method, application program login device and mobile terminal
WO2020093214A1
