Data processing method, device and equipment
By establishing a secure channel between the terminal device and the server, using a trusted execution environment and encrypting hardware security component management keys, the problem of key leakage risks during business data transmission and processing between the terminal device and the server is solved, and the key leakage risk is improved. Security of data transmission and processing.
Patent Information
- Application Number
- CN202210611945.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-31
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2042-05-31
AI Technical Summary
There is a risk of key leakage during the business data transmission and processing between the terminal equipment and the server, which leads to data security risks and needs to improve the security of the data transmission and processing process.
By establishing a secure channel between the terminal device and the server, using a Trusted Execution Environment (TEE) and encrypting hardware security elements, the service and session keys are generated and managed, ensuring the security of the keys during transmission, and in Encryption and decryption operations are performed in secure elements.
It effectively reduces the risk of key leakage, improves the security of service data during transmission and processing, ensures the confidentiality and integrity of data, and enhances the security of data transmission between terminal equipment and servers.
Smart Images

Figure CN115021911B_ABST
Abstract
Description
Technical Field
[0001] This document relates to the field of data processing technology, and in particular to a data processing method, device and equipment. Background Art
[0002] With the continuous development of computer technology, terminal devices have become a necessity in people's lives and work. Terminal devices can provide more and more services to users. How to ensure the data security when terminal devices interact with servers has received attention and concern from all parties.
[0003] The terminal device and the server can interact and process the business by negotiating keys to encrypt the business data. However, in this way, there is a risk of key leakage, which in turn leads to the leakage of business data. There are great security risks in the transmission and processing of business data. Therefore, a solution is needed to improve the security of the transmission and processing of business data. Summary of the invention
[0004] The purpose of the embodiments of this specification is to provide a solution that can improve the security of business data transmission and processing.
[0005] In order to implement the above technical solution, the embodiments of this specification are implemented as follows:
[0006] In a first aspect, an embodiment of the present specification provides a method for processing data, including: establishing a secure channel with a secure element of a terminal device based on the same channel establishment rules as the secure element of the terminal device; sending a business key and an identifier of the business key to the terminal device through the secure channel, wherein the business key and the identifier of the business key are used to trigger the terminal device to store the business key and the identifier of the business key in the secure element of the terminal device through TEE; receiving a key identifier, business ciphertext information, and a business session key ciphertext of a target business key sent by the terminal device, wherein the business ciphertext information is a key identifier of a target business key, business ciphertext information, and a business session key ciphertext of a target business key sent by the terminal device in the secure element based on The business data of the target business is encrypted with a business session key, and the business session key ciphertext is obtained by the terminal device encrypting the business session key based on the target business key in the security element, and the business session key is a key generated by the terminal device in the TEE and corresponding to the target business; based on the key identifier of the target business key, the target business key is determined, and based on the target business key and the business session key ciphertext, the business session key is obtained, and based on the business session key and the business ciphertext information, the business data of the target business is obtained, so as to perform business processing on the target business based on the business data of the target business.
[0007] In a second aspect, an embodiment of the present specification provides a data processing method, which is applied to a terminal device, wherein the terminal device includes a trusted execution environment TEE and a security element based on encryption hardware, and the method includes: when a business processing request of a target business is obtained, the business data of the target business is obtained through a trusted application in the TEE, and a business session key corresponding to the target business is generated, and the business data of the target business and the business session key are passed to the security element; in the security element, the business data of the target business is encrypting based on the business session key to obtain business ciphertext information, and the business session key is encrypting based on the target business key to obtain a business session key ciphertext; the target business key and the key identifier of the target business key are the terminal device The terminal device receives the target business key from the server through a secure channel and transmits it to the security element through the TEE. The secure channel is a channel established between the security element of the terminal device and the server based on the same channel establishment rules as the server; the key identifier of the target business key, the business ciphertext information, and the business session key ciphertext are sent to the server, the key identifier of the target business key is used to trigger the server to determine the target business key, the target business key is used to trigger the server to decrypt the business session key ciphertext to obtain the business session key, and the business session key is used to trigger the server to decrypt the business ciphertext information to obtain the business data of the target business, so as to perform business processing on the target business based on the business data of the target business.
[0008] In a third aspect, an embodiment of the present specification provides a data processing device, including: a channel establishment module, used to establish a secure channel with a secure element of a terminal device based on the same channel establishment rules as the secure element of the terminal device; a data sending module, used to send a business key and an identifier of the business key to the terminal device through the secure channel, wherein the business key and the identifier of the business key are used to trigger the terminal device to store the business key and the identifier of the business key in the secure element of the terminal device through TEE; a data receiving module, used to receive a key identifier, business ciphertext information, and a business session key ciphertext of a target business key sent by the terminal device, wherein the business ciphertext information is the key identifier of the target business key, and ... The business data of the target business is encrypted in the security element based on the business session key, and the business session key ciphertext is obtained by the terminal device encrypting the business session key based on the target business key in the security element, and the business session key is a key generated by the terminal device in the TEE and corresponding to the target business; a business processing module is used to determine the target business key based on the key identifier of the target business key, and obtain the business session key based on the target business key and the business session key ciphertext, and obtain the business data of the target business based on the business session key and the business ciphertext information, so as to perform business processing on the target business based on the business data of the target business.
[0009] In a fourth aspect, an embodiment of the present specification provides a data processing device, the data processing device includes a trusted execution environment TEE and a security element based on encryption hardware, the method comprising: a data acquisition module, used to obtain the business data of the target business through the trusted application in the TEE when a business processing request of the target business is obtained, and generate a business session key corresponding to the target business, and pass the business data of the target business and the business session key to the security element; a data processing module, used to encrypt the business data of the target business based on the business session key in the security element to obtain business ciphertext information, and encrypt the business session key based on the target business key to obtain business session key ciphertext; the target business key and the key identifier of the target business key are used as the data processing module. The data processing device receives the data from the server through a secure channel and transmits it to the security element through the TEE. The secure channel is a channel established between the security element of the data processing device and the server based on the same channel establishment rules as the server; a data sending module is used to send the key identifier of the target business key, the business ciphertext information, and the business session key ciphertext to the server, the key identifier of the target business key is used to trigger the server to determine the target business key, the target business key is used to trigger the server to decrypt the business session key ciphertext to obtain the business session key, and the business session key is used to trigger the server to decrypt the business ciphertext information to obtain the business data of the target business, so as to perform business processing on the target business based on the business data of the target business.
[0010] In a fifth aspect, an embodiment of the present specification provides a data processing device, the data processing device comprising: a processor; and a memory arranged to store computer executable instructions, wherein the executable instructions, when executed, cause the processor to: establish a secure channel with the secure element of the terminal device based on the same channel establishment rules as the secure element of the terminal device; send a business key and an identifier of the business key to the terminal device through the secure channel, wherein the business key and the identifier of the business key are used to trigger the terminal device to store the business key and the identifier of the business key in the secure element of the terminal device through TEE; receive the key identifier of the target business key, business ciphertext information, and business session key ciphertext information sent by the terminal device. The business ciphertext information is obtained by the terminal device encrypting the business data of the target business based on the business session key in the security element, the business session key ciphertext is obtained by the terminal device encrypting the business session key based on the target business key in the security element, and the business session key is a key generated by the terminal device in the TEE and corresponding to the target business; based on the key identifier of the target business key, the target business key is determined, and based on the target business key and the business session key ciphertext, the business session key is obtained, and based on the business session key and the business ciphertext information, the business data of the target business is obtained, so as to perform business processing on the target business based on the business data of the target business.
[0011] In a sixth aspect, an embodiment of the present specification provides a data processing device, the data processing device includes a trusted execution environment TEE and a security element based on encryption hardware, the data processing device includes: a processor; and a memory arranged to store computer executable instructions, the executable instructions when being executed enable the processor to: upon obtaining a business processing request of a target business, obtain the business data of the target business through a trusted application in the TEE, and generate a business session key corresponding to the target business, and pass the business data of the target business and the business session key to the security element; in the security element, encrypt the business data of the target business based on the business session key to obtain business ciphertext information, and encrypt the business session key based on the target business key to obtain business session key ciphertext; the target business key and The key identifier of the target business key is received by the data processing device from the server through a secure channel and transmitted to the security element through the TEE. The secure channel is a channel established between the security element of the data processing device and the server based on the same channel establishment rules as the server; the key identifier of the target business key, the business ciphertext information, and the business session key ciphertext are sent to the server, the key identifier of the target business key is used to trigger the server to determine the target business key, the target business key is used to trigger the server to decrypt the business session key ciphertext to obtain the business session key, and the business session key is used to trigger the server to decrypt the business ciphertext information to obtain the business data of the target business, so as to perform business processing on the target business based on the business data of the target business.
[0012] In the seventh aspect, an embodiment of the present specification provides a storage medium, which is used to store computer-executable instructions, and the executable instructions implement the following process when executed: based on the same channel establishment rules as the security element of the terminal device, establish a secure channel with the security element of the terminal device; send a business key and an identifier of the business key to the terminal device through the secure channel, and the business key and the identifier of the business key are used to trigger the terminal device to store the business key and the identifier of the business key in the security element of the terminal device through TEE; receive the key identifier of the target business key, business ciphertext information, and business session key ciphertext sent by the terminal device, and the business ciphertext information is The terminal device encrypts the business data of the target business in the security element based on the business session key, and the business session key ciphertext is obtained by the terminal device encrypting the business session key based on the target business key in the security element, and the business session key is a key generated by the terminal device in the TEE and corresponding to the target business; based on the key identifier of the target business key, the target business key is determined, and based on the target business key and the business session key ciphertext, the business session key is obtained, and based on the business session key and the business ciphertext information, the business data of the target business is obtained, so as to perform business processing on the target business based on the business data of the target business.
[0013] In an eighth aspect, an embodiment of the present specification provides a storage medium, which is used to store computer-executable instructions, and the executable instructions implement the following process when executed: when a business processing request of a target business is obtained, the business data of the target business is obtained through a trusted application in the TEE, and a business session key corresponding to the target business is generated, and the business data of the target business and the business session key are passed to the security element; in the security element, the business data of the target business is encrypted based on the business session key to obtain business ciphertext information, and the business session key is encrypted based on the target business key to obtain a business session key ciphertext; the target business key and the key identifier of the target business key are obtained by the terminal device through a secure channel from The server receives it and transmits it to the security element through the TEE. The security channel is a channel established between the security element of the terminal device and the server based on the same channel establishment rules as the server; the key identifier of the target business key, the business ciphertext information, and the business session key ciphertext are sent to the server. The key identifier of the target business key is used to trigger the server to determine the target business key. The target business key is used to trigger the server to decrypt the business session key ciphertext to obtain the business session key. The business session key is used to trigger the server to decrypt the business ciphertext information to obtain the business data of the target business, so as to perform business processing on the target business based on the business data of the target business. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0015] Figure 1A A flowchart of an embodiment of a data processing method of this specification;
[0016] Figure 1B A schematic diagram of a processing process of a data processing method in this specification;
[0017] Figure 2 This is a schematic diagram of establishing a safety channel in this manual;
[0018] Figure 3 A schematic diagram of a processing process of another data processing method of the present specification;
[0019] Figure 4AA flowchart of another data processing method embodiment of the present specification;
[0020] Figure 4B A schematic diagram of a processing process of another data processing method of the present specification;
[0021] Figure 5 A schematic diagram of a processing process of another data processing method of the present specification;
[0022] Figure 6 A schematic diagram of a processing process of another data processing method of the present specification;
[0023] Figure 7 This is a schematic diagram of the structure of a data processing device embodiment of the present specification;
[0024] Figure 8 This is a structural schematic diagram of another data processing device embodiment of the present specification;
[0025] Fig. 9 This is a schematic diagram of the structure of a data processing device in this specification. DETAILED DESCRIPTION
[0026] The embodiments of this specification provide a method, device and equipment for processing data.
[0027] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0028] Embodiment 1
[0029] like Figure 1A and 1B As shown, the embodiment of this specification provides a data processing method, the execution subject of the method may be a server, and the server may be a server, wherein the server may be an independent server or a server cluster composed of multiple servers. The method may specifically include the following steps:
[0030] In S102 , a secure channel is established with the secure element of the terminal device based on the same channel establishment rule as the secure element of the terminal device.
[0031] Among them, Figure 2As shown, the terminal device can include a trusted execution environment (TEE) and a secure element based on cryptographic hardware. TEE can be a secure area on the digital processor (such as CPU) of the terminal device that is separated from the ordinary execution environment (REE). It is composed of a trusted application (TA) and a trusted operating system (TOS). TEE is separated from REE and REE applications to ensure that various sensitive data are stored, processed and protected in a trusted environment to ensure the confidentiality and integrity of data and code. At the same time, TEE provides a secure execution environment for the CA loaded therein to realize secure storage, secure computing and other data processing involving security and privacy. TEE runs in parallel with REE and can interact with REE through a secure API. The secure element based on cryptographic hardware refers to the general term for hardware secure elements with embedded microchips, which are small computing and storage communication entities that can operate independently, and may include but are not limited to secure modules (SecureElement, SE). SE is usually provided in the form of a chip, which has encryption / decryption logic circuits to prevent external malicious parsing attacks and protect data security. SE is a high-security hardware component that can realize the storage and cryptographic operations of sensitive data such as keys. It can also be a security module that combines software, hardware and related protocols, or an embedded smart card-level application. SE includes eSE, inSE, etc. Applet is a program running in SE, a secure application running in SE. For example, SE applets such as resource transfer applications can be installed in the SE of a terminal device. It should be noted that the secure element is an environment that encrypts and protects data based on hardware, while TEE cannot provide a secure key storage and key operation environment at the hardware isolation level. Therefore, the secure element has a higher security level than TEE.
[0032] In implementation, with the continuous development of computer technology, terminal devices have become a necessity for people's lives and work. Terminal devices can provide users with more and more services. How to ensure the data security of terminal devices when performing business interactions with servers has received attention and attention from various organizations. The terminal device and the server can interact by deploying keys in advance to encrypt business data and process the business. For example, when deploying the keys required for business data transmission, the server can negotiate with the trusted execution environment (TEE) set in the terminal device to determine the symmetric key. However, in this way, there is a risk of symmetric keys being leaked, which in turn leads to the leakage of business data. There are great security risks in the transmission and processing of business data. Therefore, a solution that can improve the security of business data transmission and processing is needed. To this end, the embodiments of this specification provide a technical solution that can solve the above problems. For details, please refer to the following content.
[0033] The server can receive a device authentication request from a terminal device, which may include device authentication information of the terminal device (used to characterize the device identity of the terminal device). The server can perform device authentication on the terminal device based on the device authentication information, and after the device authentication is completed, obtain the same channel establishment rules as the terminal device and establish a secure channel with the terminal device.
[0034] The above-mentioned method of authenticating the terminal device is an optional and feasible authentication method. In actual application scenarios, there may be a variety of different device authentication methods, which are not specifically limited in the embodiments of this specification. In addition, there may be a variety of methods for obtaining the same channel establishment rules between the server and the terminal device. For example, the TEE of the terminal device may send a variety of different channel establishment rules to the server, and the server may select a target channel establishment rule from them and encrypt the target channel establishment rule. The terminal device may decrypt the encrypted target channel establishment rule to obtain the target channel establishment rule. The terminal device may establish a secure channel with the server based on the target channel establishment rule. At the same time, the server may also establish a secure channel with the terminal device based on the target channel establishment rule.
[0035] Among them, Figure 2As shown, TEE can establish a secure channel with REE, exchange information with REE through the secure channel, and then REE exchanges information with the server, thereby establishing a secure channel between TEE and the server, and realizing the secure transmission of information exchanged between TEE and the server. In addition, the TA in TEE can perform security authentication with the SE, and after the security authentication is successful, the TA can implement access control to the Applet in the SE, such as the TA can send instructions to the Applet in the SE through a preset interface to implement access control, wherein there are many instructions transmitted between TA and SE, for example, the instruction can be an Application Protocol Data Unit (APDU) instruction, and APDU is an information unit between a smart card and a smart card reader and writer. Finally, a secure channel is established between the SE (i.e., the security element) and the server.
[0036] In S104, the service key and the identifier of the service key are sent to the terminal device through a secure channel.
[0037] Among them, the business key and the business key identifier can be used to trigger the terminal device to store the business key and the business key identifier in the security element of the terminal device through TEE. The business key can be a key (such as a symmetric key) or a pair or more pairs of keys (such as an asymmetric key). For example, the server can send the encryption key and the business key identifier in the business key to the terminal device through a secure channel, which can trigger the terminal device to encrypt data using the encryption key in the business key.
[0038] In implementation, the server may process a variety of different services, and may store business keys of a plurality of different services in the server. Therefore, the server may send a plurality of different business keys and corresponding business key identifiers to the terminal device through a secure channel.
[0039] In addition, the server can also receive the business identifier of the target business to be processed sent by the terminal device through the secure channel. The server can determine the corresponding target business key and the identifier of the target business key based on the business identifier of the target business, and then send the target business key and the identifier of the target business key to the terminal device through the secure channel.
[0040] In S106, a key identifier of a target service key, service ciphertext information, and service session key ciphertext are received from the terminal device.
[0041] Among them, the business ciphertext information can be obtained by encrypting the business data of the target business based on the business session key in the security element of the terminal device. The target business can be a business requested by the user. In actual applications, the target business can include multiple types, such as resource transfer business, privacy risk control business, etc. The business data of the target business can be the business data required for processing the target business. If the target business is a resource transfer business, the business data of the target business can include the resource transfer quantity, resource transfer time and resource transfer object, etc. The business session key ciphertext can be obtained by encrypting the business session key based on the target business key in the security element of the terminal device. The business session key can be a key generated by the terminal device in TEE corresponding to the target business. The business session key can be a key randomly generated by the terminal device in TEE corresponding to the target business, that is, the "one-time one-key" can be achieved through the business session key to ensure the security of data during transmission.
[0042] In S108, based on the key identifier of the target business key, the target business key is determined, and based on the target business key and the business session key ciphertext, the business session key is obtained, and based on the business session key and the business ciphertext information, the business data of the target business is obtained, so as to perform business processing on the target business based on the business data of the target business.
[0043] In implementation, the server can determine the target business key corresponding to the target business based on the key identifier of the received target business key, and then decrypt the business session key ciphertext with the target business key to obtain the business session key. Then, the business ciphertext information is decrypted with the business session key to obtain the business data of the target business. Finally, the server can perform business processing on the target business with the business data of the target business. In this way, the business session key and the target business key can realize dual protection of the business data of the target business, thereby improving the security of the business data of the target business during data transmission.
[0044] Among them, if the business key is a pair of asymmetric keys (i.e., including a public key and a private key), then the server can determine the business key corresponding to the key identifier according to the key identifier of the target business key, and decrypt the business session key ciphertext by the private key in the business key to obtain the business session key. If the business key pair is a symmetric key, then the service can determine the business key corresponding to the key identifier according to the key identifier of the target business key, and directly decrypt the business session key ciphertext by the business key to obtain the business session key. The business session key can be a symmetric key, that is, the data can be encrypted by the business session key, and the data can also be decrypted by the business session key.
[0045] The embodiments of this specification provide a data processing method, which establishes a secure channel with the secure element of the terminal device based on the same channel establishment rules of the secure element of the terminal device, sends a business key and a business key identifier to the terminal device through the secure channel, the business key and the business key identifier are used to trigger the terminal device to store the business key and the business key identifier in the secure element (such as SE) of the terminal device through TEE, receives the key identifier of the target business key, business ciphertext information, and business session key ciphertext sent by the terminal device, the business ciphertext information is obtained by encrypting the business data of the target business in the secure element based on the business session key of the terminal device, the business session key ciphertext is obtained by encrypting the business session key in the secure element based on the target business key of the terminal device, the business session key is a key generated by the terminal device in the TEE corresponding to the target business, determines the target business key based on the key identifier of the target business key, obtains the business session key based on the target business key and the business session key ciphertext, and obtains the business data of the target business based on the business session key and the business ciphertext information, so as to perform business processing on the target business based on the business data of the target business. First, the security of business keys and business key identifiers during transmission can be guaranteed through a secure channel. Secondly, since the security element can provide hardware-level secure storage and ensure that data will not flow out of the chip through physical means, even if the terminal device is acquired by a malicious third party, the data security in the security element can still be guaranteed. Therefore, the security, confidentiality and integrity of the data in the terminal device can be guaranteed through the security element. In addition, the security element can also provide a secure key operating environment. Therefore, the security of the business ciphertext information and the business session key ciphertext generated in the security element is high, and the process of the server processing the target business based on the business ciphertext information and the business session key ciphertext is highly secure. And the terminal device only sends the key identifier of the target business key to the server, which can ensure the security of the business key by preventing the key from leaving the domain, thereby improving the security of the business processing process.
[0046] Embodiment 2
[0047] like Figure 3 As shown, the embodiment of this specification provides a data processing method, and the execution subject of the method can be a server, wherein the server can be an independent server or a server cluster composed of multiple servers. The method can specifically include the following steps:
[0048] In S102 , a secure channel is established with the secure element of the terminal device based on the same channel establishment rule as the secure element of the terminal device.
[0049] In S302, a channel key predetermined with the terminal device is obtained.
[0050] In implementation, the server may initiate a secure channel establishment request to the secure element (such as SE) of the terminal device. In response to the secure channel establishment request, the SE may generate a session key through an initial key, and generate an SE authentication code based on the session key, and then encrypt the SE authentication code based on the session key, and send the encrypted SE authentication code to the server. The server may generate a session key based on the same initial key as the SE, and generate an SE authentication code based on the session key, and authenticate the SE based on the generated SE authentication code, the generated session key, and the encrypted SE authentication code sent by the SE. Similarly, the server may also generate a host authentication code corresponding to the server based on the initial key, etc., and send it to the SE. The SE may also generate a host authentication code corresponding to the server based on the initial key, etc., and authenticate the server based on the received host authentication code and the generated host authentication code. In this way, the secure channel between the SE and the server is established. Since the server and the SE of the terminal device have completed mutual authentication, the server and the SE can update the initial channel key (such as the initial channel key derived by the server and SE based on the same key generation algorithm) through the secure channel to obtain the channel key used to encrypt the transmission data between the server and the SE. That is, the secure channel key can be used between the SE and the server to ensure the secure delivery of data.
[0051] In addition, the channel key between the SE and the server can be a dynamic key, that is, before each data transmission between the SE and the server, a new channel key can be determined in the above manner. In this way, since the SE and the server negotiate a new channel key before each data transmission, and perform data transmission based on the negotiated new channel key, the security of data transmission can be further improved.
[0052] In S304, the service key, the identifier of the service key and the device identity certificate of the terminal device are encrypted based on the channel key to obtain target encrypted information.
[0053] The device identity certificate of the terminal device may be a certificate made by the server based on the device identity key sent by the terminal device through a secure channel, and is used to determine the trusted identity of the terminal device.
[0054] In S306, the target encrypted information is sent to the terminal device through a secure channel.
[0055] The target encrypted information can be used to trigger the terminal device to decrypt the target encrypted information in the security element to obtain the business key, the business key identifier and the device identity certificate of the terminal device, and store the decrypted business key, business key identifier and the device identity certificate of the terminal device in the security element, that is, the attached Figure 2As shown, secure storage of data can be achieved in SE.
[0056] In S106, a key identifier of a target service key, service ciphertext information, and service session key ciphertext are received from the terminal device.
[0057] Among them, the business ciphertext information is obtained by encrypting the business data of the target business based on the randomly generated business session key in the security element of the terminal device. The business session key ciphertext is obtained by encrypting the business session key based on the target business key in the security element of the terminal device. The business session key is a key randomly generated by the terminal device in the TEE for encrypting the business data of the target business, one-time one-key, that is, Figure 2 As shown, data can be securely encrypted in SE. In this way, since SE only sends the key identifier, business ciphertext information, and business session key ciphertext of the target business key to the server, it can ensure that the target business key does not leave SE. SE can provide chip-level isolation protection, thereby ensuring the storage and operation security of the business key.
[0058] In S108, the target service key is determined based on the key identifier of the target service key, and the service session key is obtained based on the target service key and the service session key ciphertext.
[0059] In practical applications, the business ciphertext information can be obtained by encrypting the business data of the target business and the device identity certificate of the terminal device in the security element based on the business session key. Accordingly, the processing method of S108 can also be as follows: Steps 1 to 2.
[0060] Step 1: Based on the service session key and service ciphertext information, obtain the service data of the target service and the device identity certificate of the terminal device.
[0061] In implementation, the server can decrypt the service ciphertext information through the service session key to obtain the service data of the target service and the device identity certificate of the terminal device.
[0062] Step 2: Authenticate the terminal device based on the device identity certificate of the terminal device, and process the target business based on the device identity authentication result and the business data of the target business.
[0063] In implementation, the server can perform device identity authentication on the terminal device based on the stored device identity certificate of the terminal device and the decrypted device identity certificate, and if the device identity authentication result is authentication passed, the server can process the target service based on the service data of the target service. In addition, if the device identity authentication result is authentication failed, a preset alarm message can be returned to the terminal device.
[0064] In addition, to ensure security during data transmission, the first signature information and the user identification of the target user sent by the terminal device can also be received, wherein the first signature information can be obtained by signing the business data of the target business, the device identity certificate of the terminal device, and the key identification of the target business key based on the business identity key in the security element of the terminal device, and the business identity key can be generated by the terminal device in the security element based on the user identification of the target user and the pre-stored device identity key. The target user can be any user, and the target user can be the user who initiates the target business. The user identification of the target user can be the name, account number, etc. of the target user, or it can be information that can uniquely determine the identity of the target user and can be calculated based on one or more of these information. The SE can use the user identification of the target user and the pre-stored device identity key to derive the business identity key used to sign the business data.
[0065] The server can generate a business identity key based on the user identifier of the target user and the device identity key of the terminal device, and generate second signature information based on the business identity key, business data of the target business, the device identity certificate of the terminal device and the key identifier of the target business key.
[0066] Based on the first signature information and the second signature information, the terminal device is signature authenticated, and based on the signature authentication result, the device identity authentication result and the business data of the target business, the target business is processed.
[0067] The server can process the target business based on the business data of the target business when the signature authentication and identity authentication are passed. In this way, the security of the business data of the target business during data transmission can be guaranteed through the dual authentication of device authentication and signature authentication, so as to improve the security of the processing process of the target business.
[0068] The embodiments of the present specification provide a data processing method, which establishes a secure channel with the secure element of the terminal device based on the same channel establishment rules as the secure element of the terminal device, sends a business key and a business key identifier to the terminal device through the secure channel, the business key and the business key identifier are used to trigger the terminal device to store the business key and the business key identifier in the secure element of the terminal device through TEE, receives the key identifier of the target business key, business ciphertext information, and business session key ciphertext sent by the terminal device, the business ciphertext information is obtained by encrypting the business data of the target business in the secure element based on the business session key by the terminal device, the business session key ciphertext is obtained by encrypting the business session key in the secure element based on the target business key by the terminal device, the business session key is a key generated by the terminal device in the TEE corresponding to the target business, determines the target business key based on the key identifier of the target business key, obtains the business session key based on the target business key and the business session key ciphertext, and obtains the business data of the target business based on the business session key and the business ciphertext information, so as to perform business processing on the target business based on the business data of the target business. First, the security of business keys and business key identifiers during transmission can be guaranteed through a secure channel. Secondly, since the security element can provide hardware-level secure storage and ensure that data will not flow out of the chip through physical means, even if the terminal device is acquired by a malicious third party, the data security in the security element can still be guaranteed. Therefore, the security, confidentiality and integrity of the data in the terminal device can be guaranteed through the security element. In addition, the security element can also provide a secure key operating environment. Therefore, the security of the business ciphertext information and the business session key ciphertext generated in the security element is high, and the process of the server processing the target business based on the business ciphertext information and the business session key ciphertext is highly secure. And the terminal device only sends the key identifier of the target business key to the server, which can ensure the security of the business key by preventing the key from leaving the domain, thereby improving the security of the business processing process.
[0069] Embodiment 3
[0070] like Figure 4A and 4B As shown, the embodiment of this specification provides a data processing method, the execution subject of the method can be a terminal device, the terminal device can be a mobile terminal device such as a mobile phone, a tablet computer, etc., and the terminal device can include a trusted execution environment TEE and a security element based on encryption hardware. The method can specifically include the following steps:
[0071] In S402, when the business processing request of the target business is obtained, the business data of the target business is obtained through the trusted application in the TEE, and a business session key corresponding to the target business is generated, and the business data and business session key of the target business are passed to the security element.
[0072] Among them, the service request can be sent by the service party when receiving the service processing request for the target service from the target user. The service party can be an application in the terminal device to which the TEE belongs that can provide a certain service to the user, such as an application running in the REE, or it can be a party that provides a certain service to the user and processes the service requested by the user, such as a resource transfer agency.
[0073] In implementation, the terminal device may include TEE, cryptographic hardware-based secure elements, and REE to support the storage of data at different security levels and the execution of data processing steps at different security levels.
[0074] Considering the different security levels of different information, for example, the basic business data of the target business, such as business processing time and other basic data, has a general security level and can be stored in the storage area corresponding to the business party of the target business running in REE. For the core business data of the target business involving the privacy information of the target user, since the security level of this business data is relatively high. In order to ensure that the privacy information of the target user is not easily tampered with, the core business data of the target business can be stored in the TEE with a higher security level.
[0075] When the terminal device obtains the business processing request of the target business, it can obtain the business data of the target business through the trusted application in the TEE (such as the basic business data of the target business can be obtained from the REE, and the core business data of the target business can be obtained from the TEE), and randomly generate a business session key corresponding to the target business. Then, the terminal device can pass the business data and business session key of the target business to the secure element through the trusted application in the TEE.
[0076] In S404, in the security element, the service data of the target service is encrypted based on the service session key to obtain service ciphertext information, and the service session key is encrypted based on the target service key to obtain service session key ciphertext.
[0077] Among them, the target business key and the key identifier of the target business key can be received by the terminal device from the server through a secure channel and passed to the security element through TEE. The secure channel can be a secure channel of the terminal device established between the server and the server based on the same channel establishment rules as the server.
[0078] In S406, the key identifier of the target service key, the service ciphertext information, and the service session key ciphertext are sent to the server.
[0079] Among them, the key identifier of the target business key can be used to trigger the server to determine the target business key, the target business key can be used to trigger the server to decrypt the business session key ciphertext to obtain the business session key, and the business session key can be used to trigger the server to decrypt the business ciphertext information to obtain the business data of the target business, so as to perform business processing on the target business based on the business data of the target business.
[0080] The embodiment of this specification provides a data processing method. When a business processing request of a target business is obtained, the business data of the target business is obtained through a trusted application in a TEE, and a business session key corresponding to the target business is generated, and the business data and the business session key of the target business are delivered to a secure element. In the secure element, the business data of the target business is encrypted based on the business session key to obtain business ciphertext information, and the business session key is encrypted based on the target business key to obtain business session key ciphertext. The target business key and the key identifier of the target business key are received by a terminal device from a server through a secure channel and delivered to the secure element through the TEE. The secure channel is a channel established between the secure element of the terminal device and the server based on the same channel establishment rules as the server. The key identifier of the target business key, the business ciphertext information, and the business session key ciphertext are sent to the server. The key identifier of the target business key is used to trigger the server to determine the target business key. The target business key is used to trigger the server to decrypt the business session key ciphertext to obtain the business session key. The business session key is used to trigger the server to decrypt the business ciphertext information to obtain the business data of the target business, so as to perform business processing on the target business based on the business data of the target business. First, the security of the target business key and the key identifier of the target business key during transmission can be guaranteed through a secure channel. Secondly, since the security element can provide hardware-level secure storage and ensure that data will not flow out of the chip through physical means, even if the terminal device is acquired by a malicious third party, the data security in the security element can still be guaranteed. Therefore, the security, confidentiality and integrity of the data in the terminal device can be guaranteed by the security element. In addition, the security element can also provide a secure key operating environment. Therefore, the security of the business ciphertext information and the business session key ciphertext generated in the security element is high, and the process of the server processing the target business based on the business ciphertext information and the business session key ciphertext is highly secure. And the terminal device only sends the key identifier of the target business key to the server, which can ensure the security of the business key by preventing the key from leaving the domain, thereby improving the security of the business processing process.
[0081] Embodiment 4
[0082] like Figure 5 As shown, the embodiment of this specification provides a data processing method, the execution subject of the method can be a terminal device, the terminal device can be a mobile terminal device such as a mobile phone, a tablet computer, etc., and the terminal device can include a trusted execution environment TEE and a security element based on encryption hardware. The method can specifically include the following steps:
[0083] In S502 , the secure element establishes a secure channel with the server based on the same channel establishment rule as the server.
[0084] In implementation, the process of establishing a secure channel may refer to the process of establishing a secure channel in S102 of the first embodiment, which will not be described in detail here.
[0085] In S504 , the service key and the key identifier of the service key sent by the server are received through the secure channel, and the service key and the key identifier of the service key are transmitted to the secure element through the TEE.
[0086] In S506 , in the secure element, the service session key is encrypted based on the target service key to obtain a service session key ciphertext.
[0087] In implementation, TA can interact with the key management Applet in SE through APDU instructions. For example, TA can call APDU instructions through the key management interface, encrypt the business session key based on the target business key in SE, and obtain the business session key ciphertext.
[0088] In S508 , the device identity certificate of the terminal device sent by the server through the secure channel between the server and the TEE is received, and the device identity certificate of the terminal device, the service data of the target service, and the service session key are transmitted to the security element.
[0089] Among them, the device identity certificate is used to prove that the terminal device is authentic and trustworthy.
[0090] In S404, in the security element, the device identity certificate of the terminal device and the service data of the target service are encrypted based on the service session key to obtain service ciphertext information.
[0091] In implementation, TA can also call APDU instructions through the key management interface to read the device identity certificate of the terminal device and the business data of the target business from SE, and encrypt the device identity certificate of the terminal device and the business data of the target business based on the business session key to obtain the business ciphertext information.
[0092] In S510 , in the security element, a target service key corresponding to the target service from the stored service keys is obtained, and the service session key is encrypted based on the target service key to obtain a service session key ciphertext.
[0093] In implementation, since the terminal device can handle multiple services, multiple different business keys can be stored in the security element. The terminal device can obtain the target business key corresponding to the target business from the stored business keys in the security element, and encrypt the business session key based on the target business key to obtain the business session key ciphertext.
[0094] In S512, in the secure element, a service identity key is generated based on the user identification of the target user and the pre-stored device identity key.
[0095] The service identity key may be a single key (such as a symmetric key) or a pair of keys (such as an asymmetric key).
[0096] In implementation, the business identity key of the target business may be derived through the key derivation function of the security element based on the user identification of the target user and the pre-stored device identity key.
[0097] In S514, the service data of the target service, the device identity certificate of the terminal device, and the key identifier of the service key are signed based on the service identity key to obtain first signature information.
[0098] In implementation, if the business identity key is a pair of keys, a signature may be performed based on a public key or a private key in the business identity key to obtain the first signature information.
[0099] In S516, the key identifier of the service key, the service ciphertext information, the first signature information and the service session key ciphertext are sent to the server.
[0100] The first signature information may be used to trigger the server to perform signature authentication on the terminal device.
[0101] In S518, the encrypted processing result of the target service returned by the server is received.
[0102] In S520 , the trusted application in the TEE sends the encrypted processing result of the target service to the secure element through the APDU instruction.
[0103] Among them, the encrypted processing result of the target business can be used to trigger the terminal device to decrypt the encrypted processing result of the target business in the security element, obtain the processing result of the target business, and update the business data of the target business based on the processing result of the target business.
[0104] In implementation, if the terminal device is in an offline scenario, the terminal device can send the key identifier of the business key, business ciphertext information, first signature information and business session key ciphertext to the server when it is in an online state, and receive the encrypted processing result of the target business returned by the server.
[0105] The terminal device can decrypt the target business in the security element and update the business data of the target business. For example, if the target business is a resource transfer business, in an offline scenario, the original resource quantity of the target business can be stored in the security element of the terminal device. When receiving the business processing request of the target business, the remaining resource quantity of the processed target business can be generated based on the number of resources to be transferred and the original resource quantity carried in the business processing request. The terminal device can process the remaining resource quantity and the number of resources to be transferred as the business data of the target business, obtain the business ciphertext information and the first signature information, and when the terminal device is in a networked state, the key identifier of the business key, the business ciphertext information, the first signature information and the business session key ciphertext can be sent to the server to trigger the server to check the resource data to be transferred and the remaining resource data, obtain the processing result of the target business, and return the processing result to the terminal device.
[0106] The terminal device may update the service data of the target service according to the processing result of the target service. For example, if the processing result of the target service indicates that the verification is successful, the server may update the original resource quantity to the remaining resource quantity.
[0107] Since most risk control solutions are based on online data for risk control processing, the risk control detection efficiency and risk detection accuracy in offline scenarios are relatively poor. Through the above-mentioned processing process in this manual, the security of data at the hardware level and the security of the data transmission process can be achieved through security elements, that is, the security of business processing in offline scenarios can be improved.
[0108] The embodiment of this specification provides a data processing method. When a business processing request of a target business is obtained, the business data of the target business is obtained through a trusted application in a TEE, and a business session key corresponding to the target business is generated, and the business data and the business session key of the target business are delivered to a secure element. In the secure element, the business data of the target business is encrypted based on the business session key to obtain business ciphertext information, and the business session key is encrypted based on the target business key to obtain business session key ciphertext. The target business key and the key identifier of the target business key are received by a terminal device from a server through a secure channel and delivered to the secure element through the TEE. The secure channel is a channel established between the secure element of the terminal device and the server based on the same channel establishment rules as the server. The key identifier of the target business key, the business ciphertext information, and the business session key ciphertext are sent to the server. The key identifier of the target business key is used to trigger the server to determine the target business key. The target business key is used to trigger the server to decrypt the business session key ciphertext to obtain the business session key. The business session key is used to trigger the server to decrypt the business ciphertext information to obtain the business data of the target business, so as to perform business processing on the target business based on the business data of the target business. First, the security of the target business key and the key identifier of the target business key during transmission can be guaranteed through a secure channel. Secondly, since the security element can provide hardware-level secure storage and ensure that data will not flow out of the chip through physical means, even if the terminal device is acquired by a malicious third party, the data security in the security element can still be guaranteed. Therefore, the security, confidentiality and integrity of the data in the terminal device can be guaranteed by the security element. In addition, the security element can also provide a secure key operating environment. Therefore, the security of the business ciphertext information and the business session key ciphertext generated in the security element is high, and the process of the server processing the target business based on the business ciphertext information and the business session key ciphertext is highly secure. And the terminal device only sends the key identifier of the target business key to the server, which can ensure the security of the business key by preventing the key from leaving the domain, thereby improving the security of the business processing process.
[0109] Embodiment 5
[0110] like Figure 6 As shown, the embodiment of this specification provides a data processing method, the execution subject of the method can be a terminal device, the terminal device can be a mobile terminal device such as a mobile phone, a tablet computer, etc., and the terminal device can include a trusted execution environment TEE and a security element based on encryption hardware. The method can specifically include the following steps:
[0111] In S602 , when a service processing request of a target service is obtained, the security element establishes a secure channel with the server based on the same channel establishment rule as the server.
[0112] In S604, a target business key and a key identifier of the target business key corresponding to the target business sent by the server are received through a secure channel, and the target business key and the key identifier of the target business key are delivered to the secure element through TEE.
[0113] In implementation, the terminal device may send the service identifier of the target service to the server through a secure channel, so that the server determines the target service key corresponding to the target service and the key identifier of the target service key based on the service identifier of the target service.
[0114] In S606, the business data of the target business is obtained through the trusted application in the TEE.
[0115] In S608 , the device identity certificate of the terminal device sent by the server through the secure channel between the server and the security element is received, and the device identity certificate of the terminal device, the service data of the target service, and the service session key are transmitted to the security element.
[0116] In S610, in the security element, the device identity certificate of the terminal device and the service data of the target service are encrypted based on the service session key to obtain service ciphertext information, and the service session key is encrypted based on the target service key to obtain service session key ciphertext.
[0117] In S612, in the secure element, a service identity key is generated based on the user identification of the target user and the pre-stored device identity key.
[0118] In S614, the service data of the target service, the device identity certificate of the terminal device, and the key identifier of the service key are signed based on the service identity key to obtain first signature information.
[0119] In S616, the key identifier of the service key, the service ciphertext information, the first signature information and the service session key ciphertext are sent to the server.
[0120] The first signature information may be used to trigger the server to perform signature authentication on the terminal device.
[0121] In S618, the encrypted processing result of the target service returned by the server is received.
[0122] In S620, the trusted application in the TEE sends the encrypted processing result of the target service to the secure element through the APDU instruction.
[0123] Among them, the encrypted processing result of the target business can be used to trigger the terminal device to decrypt the encrypted processing result of the target business in the security element, obtain the processing result of the target business, and update the business data of the target business based on the processing result of the target business.
[0124] The processing of S612 to S620 mentioned above can refer to the processing of S512 to S520 in the fourth embodiment, which will not be described in detail here.
[0125] The embodiment of the present specification provides a data processing method. When a business processing request of a target business is obtained, the business data of the target business is obtained through a trusted application in a TEE, and a business session key corresponding to the target business is generated, and the business data and the business session key of the target business are delivered to a secure element. In the secure element, the business data of the target business is encrypted based on the business session key to obtain business ciphertext information, and the business session key is encrypted based on the target business key to obtain business session key ciphertext. The target business key and the key identifier of the target business key are received by a terminal device from a server through a secure channel and delivered to the secure element through the TEE. The secure channel is a channel established between the secure element of the terminal device and the server based on the same channel establishment rules as the secure element of the server. The key identifier of the target business key, the business ciphertext information, and the business session key ciphertext are sent to the server. The key identifier of the target business key is used to trigger the server to determine the target business key. The target business key is used to trigger the server to decrypt the business session key ciphertext to obtain the business session key. The business session key is used to trigger the server to decrypt the business ciphertext information to obtain the business data of the target business, so as to perform business processing on the target business based on the business data of the target business. First, the security of the target business key and the key identifier of the target business key during transmission can be guaranteed through a secure channel. Secondly, since the security element can provide hardware-level secure storage and ensure that data will not flow out of the chip through physical means, even if the terminal device is acquired by a malicious third party, the data security in the security element can still be guaranteed. Therefore, the security, confidentiality and integrity of the data in the terminal device can be guaranteed by the security element. In addition, the security element can also provide a secure key operating environment. Therefore, the security of the business ciphertext information and the business session key ciphertext generated in the security element is high, and the process of the server processing the target business based on the business ciphertext information and the business session key ciphertext is highly secure. And the terminal device only sends the key identifier of the target business key to the server, which can ensure the security of the business key by preventing the key from leaving the domain, thereby improving the security of the business processing process.
[0126] Embodiment 6
[0127] The embodiments of this specification provide a data processing system, which may include a terminal device and a server. The terminal device may be a mobile terminal device such as a mobile phone or a tablet computer. The terminal device may include a trusted execution environment TEE and a security element based on encryption hardware. The server may be an independent server or a server cluster composed of multiple servers, wherein:
[0128] The terminal device is used to obtain the business data of the target business through the trusted application in the TEE when obtaining the business processing request of the target business, generate a business session key corresponding to the target business, and pass the business data and business session key of the target business to the security element.
[0129] The server is used to establish a secure channel with the security element of the terminal device based on the same channel establishment rules as the security element of the terminal device, and send the business key and the identification of the business key to the terminal device through the secure channel.
[0130] The terminal device is used to encrypt the business data of the target business based on the business session key in the security element to obtain business ciphertext information, and to encrypt the business session key based on the target business key to obtain the business session key ciphertext.
[0131] Among them, when the terminal device obtains the business processing request of the target business, it can perform device authentication with the server, establish a secure channel with the server based on the same channel establishment rules as the server that completes the device authentication, and receive the target business key and the key identifier of the target business key corresponding to the target business sent by the server through the secure channel, and pass the target business key and the key identifier of the target business key to the security element through TEE.
[0132] Alternatively, before obtaining the business processing request of the target business, the terminal device's security element can establish a secure channel with the server based on the same channel establishment rules as the server, and receive the business key and the key identifier of the business key sent by the server through the secure channel, and pass the business key and the key identifier of the business key to the security element through TEE, and then obtain the target business key and the key identifier of the target business key from the stored business key in the security element.
[0133] Alternatively, before obtaining the business processing request of the target business, the terminal device can also establish a secure channel with the server based on the same channel establishment rules as the server, and send the business identifier of the target business to the server through the secure channel. The server can determine the target business key and the key identifier of the target business key based on the business identifier of the target business, and send the target business key and the key identifier of the target business key to the terminal device through the secure channel. The terminal device transmits the target business key and the key identifier of the target business key to the secure element through TEE.
[0134] The terminal device is also used to send the key identifier of the target business key, business ciphertext information, and business session key ciphertext to the server.
[0135] The server is used to determine the target business key based on the key identifier of the target business key, and obtain the business session key based on the target business key and the business session key ciphertext, and obtain the business data of the target business based on the business session key and the business ciphertext information, so as to perform business processing on the target business based on the business data of the target business.
[0136] The embodiments of this specification provide a method for processing data. First, the security of business keys and business key identifiers during transmission can be guaranteed through a secure channel. Secondly, since the security element can provide hardware-level secure storage and determine that data will not flow out of the chip through physical means, even if the terminal device is acquired by a malicious third party, the data security in the security element can still be guaranteed. Therefore, the security, confidentiality and integrity of the data in the terminal device can be guaranteed by the security element. In addition, the security element can also provide a secure key operating environment. Therefore, the security of the business ciphertext information and the business session key ciphertext generated in the security element is high, and the process of the server processing the target business based on the business ciphertext information and the business session key ciphertext is highly secure. And the terminal device only sends the key identifier of the target business key to the server, which can ensure the security of the business key by preventing the key from leaving the domain, thereby improving the security of the business processing process.
[0137] Embodiment 7
[0138] The above is a data processing method provided in the embodiments of this specification. Based on the same idea, the embodiments of this specification also provide a data processing device, such as Figure 7 shown.
[0139] The data processing device includes: a channel establishment module 701, a data sending module 702, a data receiving module 703 and a service processing module 704, wherein:
[0140] A channel establishment module 701, configured to establish a secure channel with a security element of a terminal device based on the same channel establishment rule as that of the security element of the terminal device;
[0141] A data sending module 702, used to send the business key and the identifier of the business key to the terminal device through the secure channel, wherein the business key and the identifier of the business key are used to trigger the terminal device to store the business key and the identifier of the business key in the secure element of the terminal device through the TEE;
[0142] A data receiving module 703 is used to receive a key identifier, business ciphertext information, and a business session key ciphertext of a target business key sent by the terminal device, wherein the business ciphertext information is obtained by the terminal device encrypting the business data of the target business in the security element based on the business session key, and the business session key ciphertext is obtained by the terminal device encrypting the business session key in the security element based on the target business key, and the business session key is a key generated by the terminal device in the TEE and corresponding to the target business;
[0143] The business processing module 704 is used to determine the target business key based on the key identifier of the target business key, and obtain the business session key based on the target business key and the business session key ciphertext, and obtain the business data of the target business based on the business session key and the business ciphertext information, so as to perform business processing on the target business based on the business data of the target business.
[0144] In the embodiment of this specification, the data sending module 702 is used to:
[0145] Acquire a channel key pre-negotiated and determined with the terminal device;
[0146] Based on the channel key, encrypting the service key, the identifier of the service key and the device identity certificate of the terminal device to obtain target encrypted information;
[0147] Sending the target encrypted information to the terminal device through the secure channel, wherein the target encrypted information is used to trigger the terminal device to decrypt the target encrypted information in the security element to obtain the service key, the identifier of the service key and the device identity certificate of the terminal device;
[0148] The service ciphertext information is obtained by the terminal device encrypting the service data of the target service and the device identity certificate of the terminal device in the security element based on the service session key. The service processing module 704 is used to:
[0149] Based on the service session key and the service ciphertext information, obtaining the service data of the target service and the device identity certificate of the terminal device;
[0150] The terminal device is authenticated based on the device identity certificate of the terminal device, and the target service is processed based on the device identity authentication result and the service data of the target service.
[0151] In the embodiment of this specification, the business processing module 704 is used to:
[0152] receiving first signature information and a user identifier of a target user sent by the terminal device, wherein the first signature information is obtained by the terminal device signing the service data of the target service, the device identity certificate of the terminal device, and the key identifier of the target service key in the security element based on the service identity key, and the service identity key is generated by the terminal device in the security element based on the user identifier of the target user and a pre-stored device identity key;
[0153] Generate a service identity key based on the user identifier of the target user and the device identity key of the terminal device, and generate second signature information based on the service identity key, the service data of the target service, the device identity certificate of the terminal device, and the key identifier of the target service key;
[0154] Based on the first signature information and the second signature information, the terminal device is signature authenticated, and based on the signature authentication result, the device identity authentication result and the business data of the target business, the target business is processed.
[0155] The embodiments of this specification provide a data processing device. First, the security of business keys and business key identifiers during transmission can be ensured through a secure channel. Secondly, since the security element can provide hardware-level secure storage and determine that data will not flow out of the chip through physical means, even if the terminal device is acquired by a malicious third party, the data security in the security element can still be guaranteed. Therefore, the security, confidentiality and integrity of the data in the terminal device can be guaranteed by the security element. In addition, the security element can also provide a secure key operating environment. Therefore, the security of the business ciphertext information and the business session key ciphertext generated in the security element is high, and the process of the server processing the target business based on the business ciphertext information and the business session key ciphertext is highly secure. And the terminal device only sends the key identifier of the target business key to the server, which can ensure the security of the business key by preventing the key from leaving the domain, thereby improving the security of the business processing process.
[0156] Embodiment 8
[0157] The above is a data processing method provided in the embodiment of this specification. Based on the same idea, the embodiment of this specification also provides a data processing device, which includes a trusted execution environment TEE and a security element based on encryption hardware, such as Figure 8 shown.
[0158] The data processing device includes: a data acquisition module 801, a data processing module 802 and a data sending module 803, wherein:
[0159] The data acquisition module 801 is used to obtain the business data of the target business through the trusted application in the TEE when the business processing request of the target business is obtained, and to generate a business session key corresponding to the target business, and to transmit the business data of the target business and the business session key to the security element;
[0160] a data processing module 802, configured to encrypt, in the security element, the business data of the target business based on the business session key to obtain business ciphertext information, and encrypt the business session key based on the target business key to obtain business session key ciphertext; the target business key and the key identifier of the target business key are received by the data processing device from the server through a secure channel and transmitted to the security element through the TEE, and the secure channel is a channel established between the security element of the data processing device and the server based on the same channel establishment rule as the server;
[0161] The data sending module 803 is used to send the key identifier of the target business key, the business ciphertext information, and the business session key ciphertext to the server, the key identifier of the target business key is used to trigger the server to determine the target business key, the target business key is used to trigger the server to decrypt the business session key ciphertext to obtain the business session key, and the business session key is used to trigger the server to decrypt the business ciphertext information to obtain the business data of the target business, so as to perform business processing on the target business based on the business data of the target business.
[0162] In the embodiment of this specification, the device further includes:
[0163] A channel establishment module, configured for the security element to establish the security channel with the server based on the same channel establishment rule as that of the server;
[0164] A first sending module, configured to receive a business key and a key identifier of the business key sent by the server through the secure channel, and transmit the business key and the key identifier of the business key to the security element through the TEE;
[0165] The data processing module 802 is used to:
[0166] The target service key corresponding to the target service in the stored service keys is obtained, and the service session key is encrypting based on the target service key to obtain the service session key ciphertext.
[0167] In the embodiment of this specification, the data acquisition module 801 is used to:
[0168] When obtaining a service processing request of the target service, the security element establishes the security channel with the server based on the same channel establishment rule as the server;
[0169] receiving, through the secure channel, a target business key corresponding to the target business and a key identifier of the target business key sent by the server, and transmitting the target business key and the key identifier of the target business key to the secure element through the TEE;
[0170] The business data of the target business is obtained through the trusted application in the TEE.
[0171] In the embodiment of this specification, the data acquisition module 801 is used to:
[0172] receiving a device identity certificate of the data processing device sent by the server through a secure channel between the server and the security element, and delivering the device identity certificate of the data processing device, the service data of the target service, and the service session key to the security element;
[0173] The encrypting the service data of the target service based on the service session key to obtain service ciphertext information includes:
[0174] The device identity certificate of the data processing device and the business data of the target business are encrypted based on the business session key to obtain the business ciphertext information.
[0175] In the embodiment of this specification, the device further includes:
[0176] A key generation module, configured to generate a service identity key in the security element based on a user identifier of the target user and a pre-stored device identity key;
[0177] A signature processing module, used to sign the business data of the target business, the device identity certificate of the data processing device, and the key identifier of the business key based on the business identity key to obtain first signature information;
[0178] The data sending module 803 is used to:
[0179] The key identifier of the business key, the business ciphertext information, the first signature information and the business session key ciphertext are sent to a server, wherein the first signature information is used to trigger the server to perform signature authentication on the data processing device.
[0180] In the embodiment of this specification, the device further includes:
[0181] A result receiving module, used for receiving the encrypted processing result of the target business returned by the server;
[0182] A business processing module is used for the trusted application in the TEE to send the encrypted processing result of the target business to the security element through an APDU instruction, and the encrypted processing result of the target business is used to trigger the data processing device to decrypt the encrypted processing result of the target business in the security element to obtain the processing result of the target business, and update the business data of the target business based on the processing result of the target business.
[0183] The embodiments of this specification provide a data processing device. First, the security of the target business key and the key identifier of the target business key during transmission can be ensured through a secure channel. Secondly, since the security element can provide hardware-level secure storage and determine that the data will not flow out of the chip through physical means, even if the terminal device is acquired by a malicious third party, the data security in the security element can still be guaranteed. Therefore, the security, confidentiality and integrity of the data in the terminal device can be guaranteed by the security element. In addition, the security element can also provide a secure key operating environment. Therefore, the security of the business ciphertext information and the business session key ciphertext generated in the security element is high, and the process of the server processing the target business based on the business ciphertext information and the business session key ciphertext is highly secure. And the terminal device only sends the key identifier of the target business key to the server, which can ensure the security of the business key by preventing the key from leaving the domain, thereby improving the security of the business processing process.
[0184] Embodiment 9
[0185] Based on the same idea, the embodiment of this specification also provides a data processing device, such as Fig. 9 shown.
[0186] The data processing device may have relatively large differences due to different configurations or performances, and may include one or more processors 901 and memory 902, and the memory 902 may store one or more storage applications or data. Among them, the memory 902 may be a short-term storage or a persistent storage. The application stored in the memory 902 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the data processing device. Furthermore, the processor 901 may be configured to communicate with the memory 902, and execute a series of computer executable instructions in the memory 902 on the data processing device. The data processing device may also include one or more power supplies 903, one or more wired or wireless network interfaces 904, one or more input and output interfaces 905, and one or more keyboards 906.
[0187] Specifically in this embodiment, the data processing device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions for the data processing device, and the one or more programs are configured to be executed by one or more processors, including computer executable instructions for performing the following:
[0188] Establishing a secure channel with the secure element of the terminal device based on the same channel establishment rule as the secure element of the terminal device;
[0189] Sending the service key and the identifier of the service key to the terminal device through the secure channel, wherein the service key and the identifier of the service key are used to trigger the terminal device to store the service key and the identifier of the service key in a secure element of the terminal device through the TEE;
[0190] Receive a key identifier, business ciphertext information, and business session key ciphertext of a target business key sent by the terminal device, where the business ciphertext information is obtained by the terminal device encrypting business data of the target business in the security element based on the business session key, the business session key ciphertext is obtained by the terminal device encrypting the business session key in the security element based on the target business key, and the business session key is a key generated by the terminal device in the TEE and corresponding to the target business;
[0191] Based on the key identifier of the target business key, the target business key is determined, and based on the target business key and the business session key ciphertext, the business session key is obtained, and based on the business session key and the business ciphertext information, the business data of the target business is obtained, so as to perform business processing on the target business based on the business data of the target business.
[0192] Optionally, sending the service key and the identifier of the service key to the terminal device through the secure channel includes:
[0193] Acquire a channel key pre-negotiated and determined with the terminal device;
[0194] Based on the channel key, encrypting the service key, the identifier of the service key and the device identity certificate of the terminal device to obtain target encrypted information;
[0195] Sending the target encrypted information to the terminal device through the secure channel, wherein the target encrypted information is used to trigger the terminal device to decrypt the target encrypted information in the security element to obtain the service key, the identifier of the service key and the device identity certificate of the terminal device;
[0196] The service ciphertext information is obtained by the terminal device encrypting the service data of the target service and the device identity certificate of the terminal device in the security element based on the service session key, and obtaining the service data of the target service based on the service session key and the service ciphertext information, so as to process the target service based on the service data of the target service, including:
[0197] Based on the service session key and the service ciphertext information, obtaining the service data of the target service and the device identity certificate of the terminal device;
[0198] The terminal device is authenticated based on the device identity certificate of the terminal device, and the target service is processed based on the device identity authentication result and the service data of the target service.
[0199] Optionally, the processing the target service based on the device identity authentication result and the service data of the target service includes:
[0200] receiving first signature information and a user identifier of a target user sent by the terminal device, wherein the first signature information is obtained by the terminal device signing the service data of the target service, the device identity certificate of the terminal device, and the key identifier of the target service key in the security element based on the service identity key, and the service identity key is generated by the terminal device in the security element based on the user identifier of the target user and a pre-stored device identity key;
[0201] Generate a service identity key based on the user identifier of the target user and the device identity key of the terminal device, and generate second signature information based on the service identity key, the service data of the target service, the device identity certificate of the terminal device, and the key identifier of the target service key;
[0202] Based on the first signature information and the second signature information, the terminal device is signature authenticated, and based on the signature authentication result, the device identity authentication result and the business data of the target business, the target business is processed.
[0203] In addition, specifically in this embodiment, the data processing device may also include a trusted execution environment TEE and a security element based on encryption hardware. The data processing device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions in the data processing device, and the one or more programs are configured to be executed by one or more processors, including computer executable instructions for performing the following:
[0204] When a service processing request of a target service is obtained, the service data of the target service is obtained through the trusted application in the TEE, and a service session key corresponding to the target service is generated, and the service data of the target service and the service session key are transmitted to the security element;
[0205] In the security element, the business data of the target business is encrypted based on the business session key to obtain business ciphertext information, and the business session key is encrypted based on the target business key to obtain business session key ciphertext; the target business key and the key identifier of the target business key are received by the data processing device from the server through a secure channel and transmitted to the security element through the TEE, and the secure channel is a channel established between the security element of the data processing device and the server based on the same channel establishment rule as the server;
[0206] The key identifier of the target business key, the business ciphertext information, and the business session key ciphertext are sent to the server, the key identifier of the target business key is used to trigger the server to determine the target business key, the target business key is used to trigger the server to decrypt the business session key ciphertext to obtain the business session key, and the business session key is used to trigger the server to decrypt the business ciphertext information to obtain the business data of the target business, so as to perform business processing on the target business based on the business data of the target business.
[0207] Optionally, before obtaining the business data of the target business through the trusted application in the TEE when the business processing request of the target business is obtained, the method further includes:
[0208] The security element establishes the security channel with the server based on the same channel establishment rule as the server that completes device authentication;
[0209] receiving, through the secure channel, a service key and a key identifier of the service key sent by the server, and transmitting the service key and the key identifier of the service key to the secure element through the TEE;
[0210] The step of encrypting the service session key based on the target service key to obtain a service session key ciphertext includes:
[0211] The target service key corresponding to the target service in the stored service keys is obtained, and the service session key is encrypting based on the target service key to obtain the service session key ciphertext.
[0212] Optionally, when a business processing request of a target business is obtained, obtaining business data of the target business through a trusted application in the TEE includes:
[0213] When obtaining a service processing request of the target service, the security element establishes the security channel with the server based on the same channel establishment rule as that of the server that completes the device authentication;
[0214] receiving, through the secure channel, a target business key corresponding to the target business and a key identifier of the target business key sent by the server, and transmitting the target business key and the key identifier of the target business key to the secure element through the TEE;
[0215] The business data of the target business is obtained through the trusted application in the TEE.
[0216] Optionally, delivering the service data of the target service and the service session key to the security element includes:
[0217] receiving a device identity certificate of the data processing device sent by the server through a secure channel between the server and the security element, and delivering the device identity certificate of the data processing device, the service data of the target service, and the service session key to the security element;
[0218] The encrypting the service data of the target service based on the service session key to obtain service ciphertext information includes:
[0219] The device identity certificate of the data processing device and the business data of the target business are encrypted based on the business session key to obtain the business ciphertext information.
[0220] Optionally, before sending the key identifier of the service key, the service ciphertext information, and the service session key ciphertext to the server, the method further includes:
[0221] In the security element, a service identity key is generated based on the user identification of the target user and a pre-stored device identity key;
[0222] Signing the service data of the target service, the device identity certificate of the data processing device, and the key identifier of the service key based on the service identity key to obtain first signature information;
[0223] The sending the key identifier of the business key, the business ciphertext information, and the business session key ciphertext to the server includes:
[0224] The key identifier of the business key, the business ciphertext information, the first signature information and the business session key ciphertext are sent to a server, wherein the first signature information is used to trigger the server to perform signature authentication on the data processing device.
[0225] Optionally, the method further comprises:
[0226] Receiving the encrypted processing result of the target service returned by the server;
[0227] The trusted application in the TEE sends the encrypted processing result of the target business to the security element through the APDU instruction. The encrypted processing result of the target business is used to trigger the terminal device to decrypt the encrypted processing result of the target business in the security element to obtain the processing result of the target business, and update the business data of the target business based on the processing result of the target business.
[0228] The embodiments of this specification provide a data processing device. First, the security of business keys and business key identifiers during transmission can be guaranteed through a secure channel. Secondly, since the security element can provide hardware-level secure storage and determine that data will not flow out of the chip through physical means, even if the terminal device is acquired by a malicious third party, the data security in the security element can still be guaranteed. Therefore, the security, confidentiality and integrity of the data in the terminal device can be guaranteed by the security element. In addition, the security element can also provide a secure key operating environment. Therefore, the security of the business ciphertext information and the business session key ciphertext generated in the security element is high, and the process of the server processing the target business based on the business ciphertext information and the business session key ciphertext is highly secure. And the terminal device only sends the key identifier of the target business key to the server, which can ensure the security of the business key by preventing the key from leaving the domain, thereby improving the security of the business processing process.
[0229] Embodiment 10
[0230] The embodiments of this specification also provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned data processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0231] The embodiment of the present specification provides a computer-readable storage medium, which establishes a secure channel with the secure element of the terminal device based on the same channel establishment rule of the secure element of the terminal device, sends a business key and a business key identifier to the terminal device through the secure channel, the business key and the business key identifier are used to trigger the terminal device to store the business key and the business key identifier in the secure element of the terminal device through TEE, receives the key identifier of the target business key, business ciphertext information, and business session key ciphertext sent by the terminal device, the business ciphertext information is obtained by encrypting the business data of the target business in the secure element based on the business session key of the terminal device, the business session key ciphertext is obtained by encrypting the business session key in the secure element based on the target business key of the terminal device, the business session key is a key corresponding to the target business generated by the terminal device in the TEE, determines the target business key based on the key identifier of the target business key, obtains the business session key based on the target business key and the business session key ciphertext, and obtains the business data of the target business based on the business session key and the business ciphertext information, so as to perform business processing on the target business based on the business data of the target business. First, the security of business keys and business key identifiers during transmission can be guaranteed through a secure channel. Secondly, since the security element can provide hardware-level secure storage and ensure that data will not flow out of the chip through physical means, even if the terminal device is acquired by a malicious third party, the data security in the security element can still be guaranteed. Therefore, the security, confidentiality and integrity of the data in the terminal device can be guaranteed through the security element. In addition, the security element can also provide a secure key operating environment. Therefore, the security of the business ciphertext information and the business session key ciphertext generated in the security element is high, and the process of the server processing the target business based on the business ciphertext information and the business session key ciphertext is highly secure. And the terminal device only sends the key identifier of the target business key to the server, which can ensure the security of the business key by preventing the key from leaving the domain, thereby improving the security of the business processing process.
[0232] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0233] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0234] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0235] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0236] For the convenience of description, the above devices are described in terms of functions and are divided into various units. Of course, when implementing one or more embodiments of this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0237] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, one or more embodiments of this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0238] The embodiments of this specification are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one process or multiple processes in the flowchart and / or one box or multiple boxes in the block diagram.
[0239] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0240] These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0241] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0242] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0243] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0244] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0245] It should be understood by those skilled in the art that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, one or more embodiments of this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0246] One or more embodiments of the present specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0247] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0248] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.
Claims
1. A data processing method, applied to a server, comprising: Establishing a secure channel with the secure element of the terminal device based on the same channel establishment rule as the secure element of the terminal device; Sending the service key and the identifier of the service key to the terminal device through the secure channel, wherein the service key and the identifier of the service key are used to trigger the terminal device to store the service key and the identifier of the service key in a secure element of the terminal device through the TEE; Receive a key identifier, business ciphertext information, and business session key ciphertext of a target business key sent by the terminal device, where the business ciphertext information is obtained by the terminal device encrypting business data of the target business and the device identity certificate of the terminal device in the security element based on the business session key, and the business session key ciphertext is obtained by the terminal device encrypting the business session key in the security element based on the target business key, and the business session key is a key generated by the terminal device in the TEE and corresponding to the target business; Based on the key identifier of the target business key, the target business key is determined, and based on the target business key and the business session key ciphertext, the business session key is obtained, and based on the business session key and the business ciphertext information, the business data of the target business and the device identity certificate of the terminal device are obtained, so as to perform device identity authentication on the terminal device based on the device identity certificate of the terminal device, and perform business processing on the target business based on the device identity authentication result and the business data of the target business.
2. The method according to claim 1, wherein sending the service key and the identifier of the service key to the terminal device through the secure channel comprises: Acquire a channel key pre-negotiated and determined with the terminal device; Based on the channel key, encrypting the service key, the identifier of the service key and the device identity certificate of the terminal device to obtain target encrypted information; The target encrypted information is sent to the terminal device through the secure channel, and the target encrypted information is used to trigger the terminal device to decrypt the target encrypted information in the security element to obtain the business key, the identifier of the business key and the device identity certificate of the terminal device.
3. The method according to claim 2, wherein the processing of the target service based on the device identity authentication result and the service data of the target service comprises: receiving first signature information and a user identifier of a target user sent by the terminal device, wherein the first signature information is obtained by the terminal device signing the service data of the target service, the device identity certificate of the terminal device, and the key identifier of the target service key in the security element based on the service identity key, and the service identity key is generated by the terminal device in the security element based on the user identifier of the target user and a pre-stored device identity key; Generate a service identity key based on the user identifier of the target user and the device identity key of the terminal device, and generate second signature information based on the service identity key, the service data of the target service, the device identity certificate of the terminal device, and the key identifier of the target service key; Based on the first signature information and the second signature information, the terminal device is signature authenticated, and based on the signature authentication result, the device identity authentication result and the business data of the target business, the target business is processed.
4. A data processing method, applied to a terminal device, wherein the terminal device includes a trusted execution environment TEE and a security element based on encryption hardware, the method comprising: When a service processing request of a target service is obtained, the service data of the target service is obtained through the trusted application in the TEE, and a service session key corresponding to the target service is generated, and the service data of the target service and the service session key are transmitted to the security element; In the security element, the service data of the target service and the device identity certificate of the terminal device are encrypted based on the service session key to obtain service ciphertext information, and the service session key is encrypted based on the target service key to obtain service session key ciphertext; The target business key and the key identifier of the target business key are received by the terminal device from the server through a secure channel and transmitted to the security element through the TEE, wherein the secure channel is a channel established between the security element of the terminal device and the server based on the same channel establishment rule as that of the server; The key identifier of the target business key, the business ciphertext information, and the business session key ciphertext are sent to the server, the key identifier of the target business key is used to trigger the server to determine the target business key, the target business key is used to trigger the server to decrypt the business session key ciphertext to obtain the business session key, the business session key is used to trigger the server to decrypt the business ciphertext information to obtain the business data of the target business and the device identity certificate of the terminal device, so as to perform device identity authentication on the terminal device based on the device identity certificate of the terminal device, and perform business processing on the target business based on the device identity authentication result and the business data of the target business.
5. The method according to claim 4, before obtaining the business data of the target business through the trusted application in the TEE when the business processing request of the target business is obtained, further comprises: The security element establishes the security channel with the server based on the same channel establishment rule as the server; receiving, through the secure channel, a service key and a key identifier of the service key sent by the server, and transmitting the service key and the key identifier of the service key to the secure element through the TEE; The step of encrypting the service session key based on the target service key to obtain a service session key ciphertext includes: The target service key corresponding to the target service in the stored service keys is obtained, and the service session key is encrypting based on the target service key to obtain the service session key ciphertext.
6. The method according to claim 4, when obtaining a business processing request of a target business, obtaining business data of the target business through a trusted application in the TEE, comprises: When obtaining a service processing request of the target service, the security element establishes the security channel with the server based on the same channel establishment rule as the server; receiving, through the secure channel, a target business key corresponding to the target business and a key identifier of the target business key sent by the server, and transmitting the target business key and the key identifier of the target business key to the secure element through the TEE; The business data of the target business is obtained through the trusted application in the TEE.
7. The method according to claim 5 or 6, wherein the delivering the service data of the target service and the service session key to the security element comprises: The device identity certificate of the terminal device is received from the server through a secure channel between the server and the security element, and the device identity certificate of the terminal device, the service data of the target service and the service session key are transmitted to the security element.
8. The method according to claim 7, before sending the key identifier of the target service key, the service ciphertext information, and the service session key ciphertext to the server, further comprising: In the security element, a service identity key is generated based on a user identifier of a target user and a pre-stored device identity key; Signing the service data of the target service, the device identity certificate of the terminal device, and the key identifier of the service key based on the service identity key to obtain first signature information; The sending the key identifier of the business key, the business ciphertext information, and the business session key ciphertext to the server includes: The key identifier of the business key, the business ciphertext information, the first signature information and the business session key ciphertext are sent to a server, wherein the first signature information is used to trigger the server to perform signature authentication on the terminal device.
9. The method according to claim 4, further comprising: Receiving the encrypted processing result of the target service returned by the server; The trusted application in the TEE sends the encrypted processing result of the target business to the security element through the APDU instruction. The encrypted processing result of the target business is used to trigger the terminal device to decrypt the encrypted processing result of the target business in the security element to obtain the processing result of the target business, and update the business data of the target business based on the processing result of the target business.
10. A data processing device, the device comprising: A channel establishment module, configured to establish a secure channel with the security element of the terminal device based on the same channel establishment rule as the security element of the terminal device; a data sending module, used to send the business key and the identification of the business key to the terminal device through the secure channel, wherein the business key and the identification of the business key are used to trigger the terminal device to store the business key and the identification of the business key in the security element of the terminal device through the TEE; a data receiving module, configured to receive a key identifier, business ciphertext information, and a business session key ciphertext of a target business key sent by the terminal device, wherein the business ciphertext information is obtained by the terminal device encrypting the business data of the target business and the device identity certificate of the terminal device in the security element based on the business session key, the business session key ciphertext is obtained by the terminal device encrypting the business session key in the security element based on the target business key, and the business session key is a key generated by the terminal device in the TEE and corresponding to the target business; A business processing module is used to determine the target business key based on the key identifier of the target business key, and obtain the business session key based on the target business key and the business session key ciphertext, and obtain the business data of the target business and the device identity certificate of the terminal device based on the business session key and the business ciphertext information, so as to perform device identity authentication on the terminal device based on the device identity certificate of the terminal device, and perform business processing on the target business based on the device identity authentication result and the business data of the target business.
11. A data processing device, the data processing device comprising a trusted execution environment TEE and a security element based on cryptographic hardware, the device comprising: a data acquisition module, configured to, when a business processing request of a target business is obtained, obtain business data of the target business through a trusted application in the TEE, generate a business session key corresponding to the target business, and transmit the business data of the target business and the business session key to the security element; A data processing module, configured to encrypt, in the security element, the service data of the target service and the device identity certificate of the terminal device based on the service session key to obtain service ciphertext information, and to encrypt the service session key based on the target service key to obtain service session key ciphertext; The target business key and the key identifier of the target business key are received by the data processing device from the server through a secure channel and transmitted to the secure element through the TEE, wherein the secure channel is a channel established between the secure element of the data processing device and the server based on the same channel establishment rule as that of the server; A data sending module is used to send the key identifier of the target business key, the business ciphertext information, and the business session key ciphertext to the server, wherein the key identifier of the target business key is used to trigger the server to determine the target business key, and the target business key is used to trigger the server to decrypt the business session key ciphertext to obtain the business session key, and the business session key is used to trigger the server to decrypt the business ciphertext information to obtain the business data of the target business and the device identity certificate of the terminal device, so as to perform device identity authentication on the terminal device based on the device identity certificate of the terminal device, and perform business processing on the target business based on the device identity authentication result and the business data of the target business.
12. A data processing device, the data processing device comprising: processor; as well as a memory arranged to store computer executable instructions which, when executed, cause the processor to: Establishing a secure channel with the secure element of the terminal device based on the same channel establishment rule as the secure element of the terminal device; Sending the service key and the identifier of the service key to the terminal device through the secure channel, wherein the service key and the identifier of the service key are used to trigger the terminal device to store the service key and the identifier of the service key in a secure element of the terminal device through the TEE; Receive a key identifier, business ciphertext information, and business session key ciphertext of a target business key sent by the terminal device, where the business ciphertext information is obtained by the terminal device encrypting business data of the target business and the device identity certificate of the terminal device in the security element based on the business session key, and the business session key ciphertext is obtained by the terminal device encrypting the business session key in the security element based on the target business key, and the business session key is a key generated by the terminal device in the TEE and corresponding to the target business; Based on the key identifier of the target business key, the target business key is determined, and based on the target business key and the business session key ciphertext, the business session key is obtained, and based on the business session key and the business ciphertext information, the business data of the target business and the device identity certificate of the terminal device are obtained, so as to perform device identity authentication on the terminal device based on the device identity certificate of the terminal device, and perform business processing on the target business based on the device identity authentication result and the business data of the target business.
13. A data processing device, the data processing device comprising a trusted execution environment TEE and a security element based on cryptographic hardware, the data processing device comprising: processor; as well as a memory arranged to store computer executable instructions which, when executed, cause the processor to: When a service processing request of a target service is obtained, the service data of the target service is obtained through the trusted application in the TEE, and a service session key corresponding to the target service is generated, and the service data of the target service and the service session key are transmitted to the security element; In the security element, the service data of the target service and the device identity certificate of the terminal device are encrypted based on the service session key to obtain service ciphertext information, and the service session key is encrypted based on the target service key to obtain service session key ciphertext; The target business key and the key identifier of the target business key are received by the data processing device from the server through a secure channel and transmitted to the secure element through the TEE, wherein the secure channel is a channel established between the secure element of the data processing device and the server based on the same channel establishment rule as that of the server; The key identifier of the target business key, the business ciphertext information, and the business session key ciphertext are sent to the server, the key identifier of the target business key is used to trigger the server to determine the target business key, the target business key is used to trigger the server to decrypt the business session key ciphertext to obtain the business session key, the business session key is used to trigger the server to decrypt the business ciphertext information to obtain the business data of the target business and the device identity certificate of the terminal device, so as to perform device identity authentication on the terminal device based on the device identity certificate of the terminal device, and perform business processing on the target business based on the device identity authentication result and the business data of the target business.
14. A storage medium for storing computer executable instructions, wherein the executable instructions implement the following process when executed: Establishing a secure channel with the secure element of the terminal device based on the same channel establishment rule as the secure element of the terminal device; Sending the service key and the identifier of the service key to the terminal device through the secure channel, wherein the service key and the identifier of the service key are used to trigger the terminal device to store the service key and the identifier of the service key in a secure element of the terminal device through the TEE; Receive a key identifier, business ciphertext information, and business session key ciphertext of a target business key sent by the terminal device, where the business ciphertext information is obtained by the terminal device encrypting business data of the target business and the device identity certificate of the terminal device in the security element based on the business session key, and the business session key ciphertext is obtained by the terminal device encrypting the business session key in the security element based on the target business key, and the business session key is a key generated by the terminal device in the TEE and corresponding to the target business; Based on the key identifier of the target business key, the target business key is determined, and based on the target business key and the business session key ciphertext, the business session key is obtained, and based on the business session key and the business ciphertext information, the business data of the target business and the device identity certificate of the terminal device are obtained, so as to perform device identity authentication on the terminal device based on the device identity certificate of the terminal device, and perform business processing on the target business based on the device identity authentication result and the business data of the target business.
15. A storage medium for storing computer executable instructions, wherein the executable instructions implement the following process when executed: When a service processing request of a target service is obtained, the service data of the target service is obtained through a trusted application in the TEE, a service session key corresponding to the target service is generated, and the service data of the target service and the service session key are transmitted to the secure element; In the security element, the service data of the target service and the device identity certificate of the terminal device are encrypted based on the service session key to obtain service ciphertext information, and the service session key is encrypted based on the target service key to obtain service session key ciphertext; The target business key and the key identifier of the target business key are received by the terminal device from the server through a secure channel and transmitted to the security element through the TEE, wherein the secure channel is a channel established between the security element of the terminal device and the server based on the same channel establishment rule as that of the server; The key identifier of the target business key, the business ciphertext information, and the business session key ciphertext are sent to the server, the key identifier of the target business key is used to trigger the server to determine the target business key, the target business key is used to trigger the server to decrypt the business session key ciphertext to obtain the business session key, the business session key is used to trigger the server to decrypt the business ciphertext information to obtain the business data of the target business and the device identity certificate of the terminal device, so as to perform device identity authentication on the terminal device based on the device identity certificate of the terminal device, and perform business processing on the target business based on the device identity authentication result and the business data of the target business.
Citation Information
Patent Citations
Private data processing method, system, device and equipment
CN112329071A
System and method for encryption in a content management environment
US20200127819A1
