WO2019165931A1 - 一种管理方法、终端和服务器 - Google Patents
一种管理方法、终端和服务器 Download PDFInfo
- Publication number
- WO2019165931A1 WO2019165931A1 PCT/CN2019/075765 CN2019075765W WO2019165931A1 WO 2019165931 A1 WO2019165931 A1 WO 2019165931A1 CN 2019075765 W CN2019075765 W CN 2019075765W WO 2019165931 A1 WO2019165931 A1 WO 2019165931A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- decryption key
- target
- terminal
- identifier
- message
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3234—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving additional secure or trusted devices, e.g. TPM, smartcard, USB or software token
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/06—Network architectures or network communication protocols for network security for supporting key management in a packet data network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/0869—Network architectures or network communication protocols for network security for authentication of entities for achieving mutual authentication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/0819—Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3247—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3263—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements
Definitions
- the invention designs a data security field, and in particular relates to a management method, a terminal and a server.
- TEE the general execution environment refers to the operating environment that does not have specific security functions; the other is the trust execution environment (TEE).
- the TEE has security functions that meet certain security requirements and can be implemented at the same time.
- the operating mechanism of REE isolation. TEE runs independently of REE and defines strict security protection measures, which are higher than REE's security level, and can protect assets (such as data, software, etc.) in a trusted execution environment from general software attacks (generalsoftware attacts). ), resisting certain types of security threats. Only authorized trusted applications (TAs) can be executed in the TEE, protecting the security of the security software resources and data. Thanks to protection mechanisms such as TEE isolation and access control, TEE better protects resources and data than REE.
- the open trust protocol provides a set of open, secure, and reliable remote principle mechanisms for PKI based on public key infrastructure.
- OWE external entity
- OWE When an external entity (OWE) remotely manages TEE, for example, When performing a privileged operation such as creating a security domain (SD) or installing a trusted application, authentication and authorization verification based on the PKI mechanism is required.
- OWE When OWE generates management instructions, The OWE private key is used to sign the management command and is encrypted by the TEE public key obtained from the TEE certificate.
- the encryption uses a digital envelope mechanism.
- the content is signed and encrypted based on the JSON Web Signature/JSON Web Encryption mechanism specified by RFC7516-7518.
- the TEE uses the trusted root certificate to verify the OWE certificate (chain). To ensure that the management instructions are sent by the authorized OWE, and then use the TEE private key pair to encapsulate the CEK Decrypting, the encrypted data and decrypts management instruction using the CEK, to thereby carry out management instructions.
- OWE needs to authenticate the TEE and encrypt the JEK CEK with the TEE public key. That is to say, the TEE management of the TEE must perform real-time interaction or communication between the OWE and the TEE. , that is, "online" communication.
- the invention provides a management method, a terminal and a server, and realizes off-line management of TEE under OTrP.
- a management method which is applied to management of a trusted execution environment TEE supporting an open trust protocol OTrP, and the management method may include:
- the terminal acquires an application data packet, where the application data packet includes an offline management instruction, and the offline management instruction includes a target security domain SD identifier, a decryption key identifier, and an encrypted data, and the decryption key corresponding to the decryption key identifier is used to decrypt the encrypted data, and the encrypted data is encrypted by
- the external entity OWE is generated using an encryption key, and the decryption key and the encryption key are key pairs generated by the external entity OWE;
- the terminal decrypts the encrypted data using the decryption key, and performs an offline management operation based on the decrypted encrypted data.
- the TEE offline management of OTrP is realized by the provided management method.
- the management method further includes:
- the terminal When the decryption key is not included in the target SD, the terminal sends a first message to the OWE, where the first message includes a decryption key identifier, and is used to obtain a decryption key corresponding to the decryption key identifier;
- the terminal saves the decryption key in the target SD of the TEE module
- the terminal decrypts the encrypted data using a decryption key, and performs an offline management operation based on the decrypted encrypted data.
- the management method further includes:
- the terminal determines, according to the target SD identifier, whether the target SD corresponding to the target SD identifier is included in the terminal TEE module.
- the management method further includes:
- the terminal TME module When the terminal TME module does not include the target SD corresponding to the target SD identifier, the terminal sends a third message to the OWE.
- the third message includes indication information, and the third message is used to request the target SD corresponding to the installation target SD identifier, and the indication information is used. Instructing to deploy a decryption key corresponding to the decryption key identifier in the target SD requesting installation;
- the terminal receives the fourth message sent by the OWE through the OTRP in an online management manner, the fourth message includes an installation target SD instruction, and the installation target SD instruction includes a decryption key;
- the terminal installs the target SD corresponding to the target SD identifier according to the installation target SD instruction, and saves the decryption key in the installed target SDTEE module.
- the first message and the third message respectively include a decryption key identifier or an offline management instruction carried in the offline management instruction
- the identifier of the installation target SD instruction includes a decryption key corresponding to the decryption key identifier.
- the second message And the fourth message further includes an attribute parameter of the decryption key
- the management method further includes:
- the terminal updates the association information according to the attribute parameter, and the updated association information includes a correspondence between the target SD and the decryption key.
- offline management The instruction further includes application information; after the terminal acquires the application data package, the management method further includes:
- the terminal determines, according to the application information TEE information, whether an offline management instruction needs to be executed, where the TEE information is application information corresponding to the application installed in the TEE module of the terminal.
- the offline management instruction further includes a key calculation Parameters, the terminal decrypts the encrypted data using the decryption key, including:
- the terminal calculates the session key using the decryption key to identify the corresponding decryption key and the key calculation parameter, and decrypts the encrypted data using the session key.
- the management method further includes:
- the terminal sends a fifth message to the OWE, where the fifth message is used by the OWE to configure a decryption key to at least one SD in the terminal;
- the terminal stores at least one decryption key, and generates association information according to the attribute parameter of the decryption key; the association information includes one or two of the following manners: at least one decryption key has a one-to-one correspondence with at least one SD, Or each of the at least one decryption key has a correspondence with a plurality of SDs in the at least one SD.
- a management method which is applied to management of a trusted execution environment TEE supporting an open trust protocol OTrP, and the management method may include:
- the external entity OWE generates an offline management instruction, where the offline management instruction includes a target security domain SD identifier, a decryption key identifier, and encrypted data; wherein the decryption key identifier corresponding to the decryption key is used to decrypt the encrypted data, and the encrypted data is encrypted by the OWE.
- Key generation, decryption key and encryption key are key pairs generated by OWE; offline management instructions are used when the terminal acquires an application data packet containing an offline management instruction, and uses the decryption key to identify the corresponding decryption key to decrypt the encrypted data. And perform offline management operations based on the decrypted encrypted data.
- the TEE offline management of OTrP is realized by the provided management method.
- the management method further includes:
- the OWE receives the first message sent by the terminal, where the first message includes a decryption key identifier, and is used to obtain a decryption key corresponding to the decryption key identifier;
- the OWE performs bidirectional authentication with the TEE of the terminal through the OTHP in an online management manner. After the authentication is passed, the OWE sends a second message to the terminal, the second message includes a decryption key, and the second message is used by the terminal to save the decryption key in the TEE.
- the associated information is updated, and the associated information includes the correspondence between the target SD and the decryption key.
- the management method further includes:
- the OWE receives the third message sent by the terminal, the third message includes the indication information, and the third message is used to request the target SD corresponding to the installation target SD identifier, where the indication information is used to indicate that the decryption key identifier is deployed in the target SD that is requested to be installed.
- Decryption key
- the OWE performs bidirectional authentication with the TEE of the terminal through the OTHP in an online management manner. After the authentication is passed, the OWE sends a fourth message to the terminal.
- the fourth message includes an installation target SD instruction, and the installation target SD instruction includes a decryption key; the fourth message
- the decryption key is saved in the installed target TED module in the SD, and the associated information is updated, and the associated information includes the correspondence between the target SD and the decryption key.
- the first message and the third message respectively include a decryption key identifier or an offline management instruction carried in the offline management instruction
- the identifier of the installation target SD instruction includes a decryption key corresponding to the decryption key identifier.
- the management The method also includes:
- the OWE receives a fifth message sent by the terminal, where the fifth message is used by the OWE to configure a decryption key to at least one SD in the terminal;
- the OWE performs bidirectional authentication with the terminal. After the authentication is passed, the OWE sends a sixth message to the terminal.
- the sixth message includes at least one attribute parameter of the decryption key and the decryption key.
- the sixth message is used by the terminal to save at least one decryption. Key, and generating association information according to the attribute parameter of the decryption key; the association information includes one or two of the following manners: at least one decryption key has a one-to-one correspondence with at least one SD, or at least one decryption key Each decryption key has a corresponding relationship with a plurality of SDs in at least one SD.
- the external entity OWE generates an offline management instruction, include:
- the OWE encrypts the data using the generated encryption key to obtain encrypted data, and packages the encrypted data and the decryption key identifier to generate the offline management instruction;
- the OWE generates a session key using the generated encryption key and key calculation parameters, encrypts the data using the session key to obtain encrypted data, and adds a key calculation parameter, the encrypted data, and a decryption key identifier to the offline management instruction. .
- a management method which is applied to management of a trusted execution environment TEE supporting an open trust protocol OTrP, and the management method may include:
- the TEE module receives an offline management instruction sent by the rich execution environment REE module of the terminal, and the offline management instruction includes a target security domain SD identifier, a decryption key identifier and encrypted data, and a decryption key corresponding to the decryption key identifier is used to decrypt the encrypted data, and the encryption is performed.
- the data is generated by the external entity OWE using an encryption key, and the decryption key and the encryption key are key pairs generated by the external entity OWE;
- the TEE module decrypts the encrypted data using the decryption key, and performs an offline management operation based on the decrypted encrypted data.
- the TEE offline management of OTrP is realized by the provided management method.
- the management method further includes:
- the TEE module sends a first message to the OWE through the REE module, where the first message includes a decryption key identifier, and is used to obtain a decryption key corresponding to the decryption key identifier;
- the TEE module receives, by using the REE module, a second message that is sent by the OWE through the OTRP in an online management manner, where the second message includes a decryption key;
- the TEE module saves the decryption key to the target SD
- the TEE module decrypts the encrypted data using a decryption key, and performs an offline management operation based on the decrypted encrypted data.
- the management method further includes:
- the TEE module determines whether the target SD corresponding to the target SD identifier is included in the TEE module according to the target SD identifier.
- the management method further includes:
- the TEE module sends a third message to the OWE through the REE module, where the third message includes indication information, and the third message is used to request the target SD corresponding to the installation target SD identifier.
- the information is used to indicate that the decryption key corresponding to the decryption key identifier is deployed in the target SD that is requested to be installed;
- the TEE module receives a fourth message sent by the OWE through the OTRP in an online management manner, the fourth message includes an installation target SD instruction, and the installation target SD instruction includes a decryption key;
- the TEE module installs the target SD corresponding to the target SD identifier according to the installation target SD instruction, and saves the decryption key to the installed target SD.
- the first message and the third message respectively include a decryption key identifier or an offline management instruction carried in the offline management instruction
- the identifier of the installation target SD instruction includes a decryption key corresponding to the decryption key identifier.
- the management method further includes:
- the TEE module updates the association information according to the attribute parameter, and the updated association information includes the correspondence between the target SD and the decryption key.
- the management instruction further includes application information; after the TEE module receives the offline management instruction sent by the rich execution environment REE module of the terminal, the management method further includes:
- the TEE module determines whether it is necessary to execute an offline management instruction according to the application information and the TEE information; wherein the TEE information is application information corresponding to the application installed in the TEE module of the terminal.
- the offline management instruction further includes a key calculation Parameters, the TEE module decrypts the encrypted data using the decryption key, including:
- the TEE module calculates the session key using the decryption key to identify the corresponding decryption key and key calculation parameters, and uses the session key to decrypt the encrypted data.
- the management method before the module receives the offline management instruction sent by the rich execution environment REE module of the terminal, the management method further includes:
- the TEE module sends a fifth message to the OWE through the REE module, where the fifth message is used by the OWE to configure a decryption key to at least one SD in the terminal;
- the TEE module receives, by the REE module, a sixth message that is sent by the OWE through the OTRP in an online management manner, and the sixth message includes at least one attribute parameter of the decryption key and the decryption key;
- the TEE module saves at least one decryption key, and generates pipeline information according to the attribute parameter of the decryption key; the association information includes one or two of the following manners: at least one decryption key has a one-to-one correspondence with at least one SD, or Each of the at least one decryption key has a correspondence with a plurality of SDs in the at least one SD.
- a fourth aspect provides a terminal, which is applied to management of a trusted execution environment TEE supporting an open trust protocol OTrP, where the terminal includes:
- An obtaining unit configured to acquire an application data packet, where the application data packet includes an offline management instruction, the offline management instruction includes a target security domain SD identifier, a decryption key identifier, and an encrypted data, and the decryption key identifier corresponding to the decryption key is used to decrypt the encrypted data.
- the encrypted data is generated by the external entity OWE using an encryption key, and the decryption key and the encryption key are key pairs generated by the external entity OWE;
- a processing unit configured to determine whether a decryption key corresponding to the decryption key identifier is included in the target SD corresponding to the target SD identifier;
- the processing unit decrypts the encrypted data using the decryption key, and performs an offline management operation based on the decrypted encrypted data.
- the TEE offline management of OTrP is realized by the provided management method.
- a server for managing a trusted execution environment TEE supporting an open trust protocol OTrP, the server comprising:
- a processing unit configured to generate an offline management instruction, where the offline management instruction includes a target security domain SD identifier, a decryption key identifier, and encrypted data; wherein the decryption key identifier corresponding to the decryption key is used to decrypt the encrypted data, and the encrypted data is used by the OWE.
- the encryption key generation, the decryption key and the encryption key are key pairs generated by the OWE; the offline management instruction is used when the terminal acquires the application data packet including the offline management instruction, and decrypts the corresponding decryption key by using the decryption key identifier. Encrypt data and perform offline management operations based on the decrypted encrypted data.
- the TEE offline management of OTrP is realized by the provided management method.
- the sixth aspect provides a terminal, which is applied to the management of a trusted execution environment TEE that supports the open trust protocol OTrP.
- the terminal includes a TEE module and a rich execution environment REE module, and the TEE module includes:
- a receiving unit configured to receive an offline management instruction sent by the REE module, where the offline management instruction includes a target security domain SD identifier, a decryption key identifier, and an encrypted data, and the decryption key corresponding to the decryption key identifier is used to decrypt the encrypted data, and the encrypted data is used by the
- the external entity OWE is generated using an encryption key, and the decryption key and the encryption key are key pairs generated by the external entity OWE;
- a processing unit configured to determine whether a decryption key corresponding to the decryption key identifier is included in the target SD corresponding to the target SD identifier;
- the processing unit is further configured to decrypt the encrypted data using the decryption key when the decryption key is included in the target SD, and perform an offline management operation according to the decrypted encrypted data.
- the TEE offline management of OTrP is realized by the provided management method.
- a terminal includes a receiver, a transmitter, a processor, and a memory, and the receiver, the transmitter, the processor, and the memory are connected to each other for completing communication with each other, and the terminal can complete
- a server comprising a transceiver, a processor and a memory, the transceiver, the processor and the memory being interconnected for completing communication with each other, the server may complete the second aspect or A management method provided in any of the possible ways of the second aspect.
- a computer readable storage medium comprising instructions that, when run on a device, cause the device to perform any of the first to third aspects, or any of the first to third aspects A method in a way that might be implemented.
- a computer program product or computer program comprising instructions which, when run on a computer, cause the computer to perform any of the first to third aspects, or any of the first to third aspects A method in a way that might be implemented.
- a communication device for example, a chip, the communication device being configurable in a terminal, the communication device comprising a processor and an interface.
- the processor is configured to support the method in which the communication device performs the manner of any of the first to third aspects described above.
- the interface is used to support communication between the communication device and other communication devices or other network elements.
- the communication device can also include a memory for coupling with the processor that retains the program instructions and data necessary for the communication device.
- a twelfth aspect a system comprising the terminal of the fourth aspect or the sixth aspect, and the server of the fifth aspect; or the system comprising the terminal and the eighth aspect of the seventh aspect The server described in the aspect.
- the decryption key is configured in the target SD of the terminal in advance by the OWE, and after receiving the offline management instruction, the encrypted data in the offline management instruction is decrypted by the decryption key, and decrypted according to the decryption key.
- the encrypted data is managed offline, and the offline management of TEE under OTrP is realized.
- FIG. 1 is a schematic diagram of an internal structure of a TEE supporting OTRP according to an embodiment of the present invention
- FIG. 2 is a schematic diagram of a TEE save decryption key and SD association information according to an embodiment of the present invention
- FIG. 3 is a schematic diagram of another TEE save decryption key and SD association information according to an embodiment of the present invention.
- FIG. 4 is a schematic diagram of two manners of acquiring an offline management instruction according to an embodiment of the present invention.
- FIG. 5 is a schematic flowchart of two-way authentication of OWE and TEE according to an embodiment of the present invention
- FIG. 6 is a schematic flowchart of a management method according to an embodiment of the present disclosure.
- FIG. 7 is a schematic flowchart of an online installation target SD according to an embodiment of the present invention.
- FIG. 8 is a schematic flowchart of another online acquisition decryption key according to an embodiment of the present invention.
- FIG. 9 is a schematic flowchart diagram of another management method according to an embodiment of the present disclosure.
- 10(a) and 10(b) are schematic flowcharts of still another management method according to an embodiment of the present invention.
- FIG. 11 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure.
- FIG. 12 is a schematic structural diagram of a server according to an embodiment of the present disclosure.
- FIG. 13 is a schematic structural diagram of another terminal according to an embodiment of the present disclosure.
- FIG. 14 is a schematic structural diagram of still another terminal according to an embodiment of the present disclosure.
- FIG. 15 is a schematic structural diagram of another terminal according to an embodiment of the present disclosure.
- FIG. 16 is a schematic structural diagram of another server according to an embodiment of the present disclosure.
- FIG. 17 is a schematic diagram of a communication device according to an embodiment of the present invention.
- the TEE will perform the corresponding management operations after the various management commands of the OWE, such as creating the SD and installing the TA, need to be authenticated and authenticated. This process is generally carried out through a cryptographic mechanism.
- OTrP it is based on the public key infrastructure (PKI) trust architecture, providing an open, high interoperability protocol to implement SD/TA management in TEE.
- PKI public key infrastructure
- an OWE whitelist is stored in each root security domain rSD in the terminal's TEE, and the whitelist includes at least one TEE (Original Equipment Manufacture) ), OEM)/TEE vendor)
- TEE Oil Engineering Manufacture
- OEM OEM/TEE vendor
- the root certificate of the trusted certificate authority which can be used to authenticate the authenticity of the OWE certificate (chain), thereby ensuring that only the OWE that legally holds the certificate authority can issue the certificate.
- Remote management of the TEE of the root certificate of the trusted certificate authority is initiated.
- the authentication and authorization verification in OTrP is the process by which TEE uses the OWE whitelist to verify the OWE signature and certificate chain.
- OWE is an entity with TEE management capabilities, usually referred to as a Trusted Service Manager (TSM).
- TSM Trusted Service Manager
- the service provider SP implements the management of its TA by entrusting an OWE.
- OWE implements the management of the SP's TA by creating one or more SDs under rSD.
- the TEE records the association between the OWE and the SD/TA created by it, and ensures that the OWE can only It is managed by the SD/TA installed by it.
- the embodiment of the present invention Based on the management of the TEE based on the OTrP, the embodiment of the present invention provides a management method, a terminal, and a server.
- the OWE firstly performs authentication and authorization verification on the TEE based on the PKI or other manners of the signature mechanism, and then uses the management mechanism introduced in the embodiment of the present invention to complete the encryption of the offline management instruction. And decryption.
- the process of authenticating and authorizing the TEE based on the PKI or other manners is not focused, and will not be described in detail in the embodiments of the present invention.
- the process of deploying the decryption key by the OWE in the TEE may also be referred to as the process of configuring the decryption key by the OWE as the SD in the TEE.
- the following The terms “deployment” and “configuration” are used to mean the same thing.
- the root security domain (rSD) in the TEE needs to save a list of root certificates for verifying the OWE certificate (chain) for authentication and authorization of the OWE in online and offline mode. Verification to ensure the legality of OWE can be verified in an online or offline scenario.
- the TEE of the terminal has the capability of processing the offline management command sent by the REE, and can determine whether the target SD has the ability to parse the encrypted data in the offline management command according to the offline management instruction and the property of the SD (hereinafter collectively referred to as "SD" Whether there is offline management function”), and execute different processing logic according to the judgment result.
- SD Whether there is offline management function
- the terminal can apply to the OWE to activate the offline management function of the SD, that is, the ability to activate the SD decryption offline management command to the OWE, and then the OWE uses the online management process of the OTrP (GetDeviceTEEState request and response).
- the OWE uses the online management process of the OTrP (GetDeviceTEEState request and response).
- Perform two-way authentication with TEE For details, please refer to Figure 5.
- OWE deploys the decryption key (depoly) in the target SD included in the TEE by creating an SD instruction or updating the SD instruction.
- the offline management function of the target SD is activated; when the terminal TEE receives the offline management instruction for the target SD, after the OWE authentication is passed, the decrypted key is used to decrypt the encrypted data obtained by using the encryption key in the offline management instruction, and then decrypted according to the decryption key.
- the encrypted data is then managed offline.
- the offline management operations include, but are not limited to, installing a Trusted Application (TA), updating a TA, and deleting a TA.
- TA Trusted Application
- the offline management instruction may include TA installation information, encrypted TA data (TA binary), signature and certificate chain and other offline authentication information.
- the TA installation information may include a target SD identifier corresponding to the target SD and a decryption key identifier.
- the TA installation information may further include basic information such as a TA identifier, a version number, and the like.
- the encryption key of the encrypted data and the decryption key deployed in the SD are the key pairs (encryption key Key_enc and decryption key Key_dek) generated by OWE according to its own algorithm.
- the encryption key is used to encrypt the data to be encrypted, thereby generating an offline management command; the decryption key is deployed by the OWE into the SD within the TEE.
- the OWE generates a session key by using an encryption key and a key calculation parameter, and encrypts the data to be encrypted by using the session key.
- the offline management instruction needs to include the secret.
- the key calculates parameters so that after the subsequent TEE receives the offline management, the session key is calculated using the decryption key and the key calculation parameters, and the encrypted data in the offline management instruction is decrypted.
- Two encryption methods are exemplified herein. In the embodiment of the present invention, the technical solutions of the embodiments of the present invention may be implemented by using more encryption methods.
- the data to be encrypted is included in the data to be encrypted of the offline management instruction, for example, if the data to be encrypted includes TA data (TAbinary) that has been encrypted once, then The decryption key information used to decrypt the encrypted TA data and the corresponding key calculation parameters are carried in the data to be encrypted according to the encryption method.
- the OWE then encrypts the encrypted data using the above two encryption methods or other methods, generates encrypted data in the offline management instruction, and attaches the decryption key identifier for decrypting the encrypted data and the key calculation parameters that may exist. In the offline management instruction.
- the terminal decrypts the encrypted data, first decrypting the encrypted data by using a decryption key identifier in the offline management instruction, and then acquiring the second encrypted data from the decrypted data.
- the relevant key and key calculation parameters are used to decrypt the second encrypted data.
- the use of the encryption key to generate the offline management instruction and the OWE to deploy the decryption key in the SD of the TEE are two mutually non-interference processes.
- the OWE generation offline management instruction may be generated before the terminal acquires offline management from the application management server, and the offline management instruction is placed on the application management server.
- the OWE deploying the decryption key for the SD may include the following situations: 1.
- the OWE configures the decryption key in advance in the SD before the TEE receives the offline management command. After receiving the offline management command, the TEE may directly use the decryption key pair included in the SD.
- the encrypted data in the offline management instruction is decrypted; 2. After receiving the offline management instruction, the TEE obtains the decryption key from the OWE online, and then decrypts the encrypted data in the offline management instruction.
- the OWE may deploy the decryption key in the SD of the TEE according to a management manner that may be implemented by the OWE.
- the decryption key may be configured in the following two manners: Method 1: OWE may be associated with the same. Each SD deploys a different decryption key (Key_dek); mode 2, OWE can also configure the same decryption key (Key_dek) for multiple SDs associated with one OWE. If double encryption of the TA data is required, the decryption key may further include a decryption key for decrypting the TA data and a decryption key for decrypting the offline management instruction encrypted data.
- FIG 3 show possible ways for the two terminals to store the association relationship between the decryption key and the SD, wherein OWE1 selects different decryption keys for SP1SD and SP2SD, and decrypts the same configuration for SP3SD and SP4SD. Key (or SP3SD, SP4SD share a decryption key).
- offline management instructions such as offline installation or update TA instruction
- OWE can deploy the offline installation TA command in the following two ways, as shown in Figure 4.
- Method 1 The offline installation TA command is packaged with the client application (CA) to obtain the CA installation package, that is, the application data package, and the application data package is placed in the server.
- CA client application
- the Android installation package is placed in the Android.
- Method 2 Place the offline installation TA command on the TA application management server; when the REE CA needs to install a TA, obtain the offline installation TA command of the corresponding TA from the TA application management server and use the offline installation TA command to perform the offline installation of the TA. .
- the CA installation package placed on the application management server and the offline management instruction placed on the TA application management server are referred to as application data packages.
- the REE obtains the offline management command to obtain the offline management command through the two methods shown in Figure 4. It does not need to interact with the TSM of the SP or TEE issuer and initiate the application to create the SD, install the remote management process of the TA, and reduce the load on the server side; In other words, when the TA offline management command is packaged and installed with the CA's APK, there is no need to temporarily download the TA during use, reducing the waiting time, and there is no case of re-downloading due to communication interruption/error.
- the offline management command in the application data packet is sent to the TEE of the terminal, and the TEE determines whether to execute the offline management instruction.
- the TEE determines whether the target SD is The offline management function is adopted, that is, the TEE determines whether the target SD exists according to the target SD identifier and the decryption key identifier in the offline management instruction, and the decryption key corresponding to the decryption key identifier is included in the target SD.
- the TEE authenticates the offline management instructions to ensure that the offline management instructions are generated by the authorized OWE. After the verification is passed, the decrypted key is used to decrypt the encrypted data, and the corresponding management operation is performed according to the decrypted encrypted data.
- the target SD does not have the offline management function, the target SD corresponding to the target SD identifier in the offline management command is not included in the TEE, or the target SD corresponding to the target SD identifier is included in the TEE, but the target SD does not include the decryption key identifier.
- the terminal applies to the OWE to activate the offline management function of the target SD through the OTHP in an online management manner, and after the offline management function is activated, the offline management instruction is verified and decrypted, and then the offline management operation is performed.
- the OWE to the SD/TA in the TEE the online remote management process based on the OTrP protocol is started by the GetDeviceTEEState command and the response.
- the GetDeviceTEEState instruction and the response can simultaneously perform a two-way authentication process between the OWE and the TEE. As shown in Figure 5.
- the two-way authentication includes the following steps:
- the terminal sends a management process request to the OWE.
- the CA installed in the REE of the terminal initiates a management process to the OWE according to the preset judgment logic.
- the OWE sends an instruction for acquiring the TEE state of the device to the TEE through the CA.
- GetDeviceTEEStateTBSRequest After receiving the management flow request, the OWE generates an acquisition device TEE status pending check instruction (GetDeviceTEEStateTBSRequest), where the TBS is To be signed.
- GetDeviceTEEStateTBSRequest includes the protocol number, rid (instruction type identifier), service flow number (transaction id), online certificate status protocol (OCSP) data, and algorithm type required by the server.
- the transaction id acts as a random number; the OCSP data is used to provide an OWE certificate status certificate.
- OWE uses the OWE private key to sign the data in GetDeviceTEEStateTBSRequest, and encapsulates the original data, signature, server certificate and certificate chain according to the data format specified by the OTrP protocol to obtain the GetDeviceTEEState command.
- the server certificate here is an OWE certificate
- the certificate chain means that the OWE certificate is issued by an intermediate CA, which is issued by the root CA and/or one or more intermediate CAs authenticated by the root CA.
- the interaction data between OWE and TEE is based on the JSON WebEncryption mechanism, and is encrypted by the content encryption key.
- the content encryption key is encrypted by the public key of the communication peer, because OWE does not know TEE at this time.
- the identity of the TEE public key cannot be obtained, so the instruction to obtain the TEE state of the device including GetDeviceTEEStateRequest is sent in plain text.
- the CA in the REE forwards the instruction for acquiring the TEE state of the device to the rSD in the TEE.
- the CA in the REE forwards the instruction to obtain the TEE state of the device to the rSD in the TEE through the client application interface (client API).
- the instruction information for obtaining the state of the device TEE may be in a (JavaScript Object Notation, JSON) format.
- JSON is a lightweight data exchange format that stores and represents data in a text format that is completely independent of the programming language.
- JSON-formatted instructions depending on the instruction, encapsulate different content in each JSON type, especially the payload.
- An OTrP instruction in JSON format contains the following structure:
- the "payload” encapsulates the main parameters (signed parameters) that have been signed in the offline management instruction
- header contains the certificate (certificate chain) information
- signature contains the signature value of the offline management instruction.
- Payload generally includes but is not limited to the following parameters. :
- the prior art OTrP online management protocol uses JWE (JSON Web Encryption) to encrypt, and then the content encryption key CEK and HMAC KEY (if any) are encrypted using the peer public key, and the digital envelope is used to complete the need. Encrypted information is protected.
- the content includes the encrypted ciphertext and corresponding parameters for describing the encryption algorithm. For example, when using the RSA encryption algorithm, the format of the content-encryption-type is as follows:
- ENCRYPTION-PRIMITIVE-TYPE describes the encryption algorithm, mode and HMAC algorithm used by JWE; "KEYWRAP-PRIMITIVE-TYPE” is the algorithm used when encapsulating CEK with the peer public key; "PRINTABLE-STRING-PRIMITIVE- TYPE” is the encapsulated CEK.
- ENCRYPTED-CONTENT is CEK-encrypted data. It can be seen that in the online mode OTrP command/response, the content encryption key CEK is transmitted with the OTrP command/response. In the embodiment of the present invention, the CEK does not perform package transmission with the offline management instruction, and the offline management instruction includes a decryption key identifier for decrypting the data.
- the rSD in the TEE After receiving the instruction to obtain the TEE status of the device, the rSD in the TEE first verifies the signature of the JSON data to ensure that the data sent by the OWE has not been tampered with. It is then determined that the OWE server certificate is issued by a root certificate authority in the OWE whitelist (if the OWE certificate is issued by the intermediate certificate authority, then the OWE is required to provide a complete certificate chain in the instruction to obtain the device TEE status); using OCSP data Ensure that the certificates in the certificate chain are valid. Then, rSD uses the root certificate authority's root certificate to verify the certificate chain, ensuring that the OWE certificate is issued by the root certificate or a secondary CA that can be finally verified by the root certificate.
- the rSD determines that the OWE that sends the instruction to obtain the TEE state of the device is an entity authenticated by a certificate authority that it trusts, and the OWE has a certain TEE management capability, that is, the OWE has SD/TA management. Permissions (corresponding to the management instructions for SD and TA can be authorized to execute).
- the TEE authentication of the OWE in the terminal is completed.
- the TEE of the terminal responds to the OWE sending an instruction to obtain the TEE status of the device.
- the TEE queries the saved mapping relationship information, and obtains all SD information and TA information associated with the OWE.
- mapping relationship information of SD and TA created by OWE in the TEE is recorded in the TEE. All SD information and TA information associated with the OWE are queried according to the OWE identifier in the server certificate.
- the OWE logo is unique.
- the TEE generates an encryption key, and generates a GetDevice TEE Status Response (GetDeviceTEEStateResponse) message.
- the TEE randomly generates a content encryption key CEK for device state information (DeviceStateInformation) including all SD information associated with the OWE, all TA information associated with the OWE, a TEE certificate, and a TEE-SP-AIK public key (list). Encryption is performed, and the content encryption key is encrypted by using the OWE public key included in the OWE certificate, and then the information is signed by the TEE private key to generate and encapsulate the JEE format acquisition device TEE status response (GetDeviceTEEStateResponse) message.
- GetDeviceTEEStateResponse JEE format acquisition device TEE status response
- TEE-SP-AIK is when the OWE generates SD for the service provider SP, if the generated SD is the first SD of the SP, the TEE generates the public key pair, and the public key is used for sending to the OWE for
- the OWE corresponding to the SP performs encryption of the TA code and the TA personalization data, that is, in the installation TA (install TA), the TA code is twice encrypted.
- the two encryptions are described by taking the contents of the management instructions in the following format as an example:
- the encryption part of the OTrP installation TA command includes the following:
- the content filled in "encrypted_ta_bin” and/or “encrypted_ta_data” contains an algorithm for encapsulating CEK1 (encrypting TA code and/or TA personalization data), and content encryption key CEK1 encapsulated by TEE-SP-AIK. And the TA code and/or TA personalization data encrypted by CEK1, the contents of these two parameters are already in an encrypted state before the installation TA instruction is not encrypted. Subsequently, OWE uses the JWE encryption mechanism to encrypt all the parameters in the above installed TA command using CEK2, and the algorithm for encapsulating CEK2 is attached to the instruction, CEK2 encapsulated by TEE public key and installed TA instruction encrypted by CEK2. .
- the TEE sends a Get Equipment TEE Status Response (GetDeviceTEEStateResponse) message to the REE.
- GetDeviceTEEStateResponse GetDeviceTEEStateResponse
- the REE forwards the device TEE status response (GetDeviceTEEStateResponse) message to the OWE.
- the OWE After receiving the GetDeviceTEEStateResponse message, the OWE first decrypts the encapsulated content encryption key using the OWE private key, decrypts the DSI data by using the content encryption key, obtains the TEE certificate, and verifies the TEE private key by using the TEE public key in the TEE certificate.
- the signed data is determined to be generated by the TEE.
- the root CA certificate for authenticating the TEE is used to verify that the TEE certificate is issued by the certificate authority to ensure the legality of the TEE certificate and signature.
- OWE can determine the legality of the TEE. At this time, the two-way authentication authentication is completed between the TEE and the OWE.
- the management of the SD/TA in the TEE can be initiated according to the obtained device status information of the terminal TEE, such as creating/updating/deleting the SD, and installing/updating/deleting the TA.
- the content that needs to be encrypted in the payload is encrypted by using JWE, and the content encryption key and the HMAC key are digitally encrypted by using the public key in the obtained peer certificate ( Or digital envelopes, ensuring that encrypted content can only be decrypted by the peer holding the private key.
- the signature and certificate chain of the OWE can be realized.
- the TEE can confirm that the OWE certificate can be verified by the root CA certificate, then the OWE can be confirmed to have the TEE.
- the offline management of the TEE that is, the OWE does not perform real-time two-way interaction with the TEE
- the two-way authentication mechanism and the subsequent instruction interaction described in FIG. 5 are used to perform digital envelopes on the JWE key using the peer public key. Processing the way to encrypt the content of the instruction is no longer applicable.
- the OWE generates a key pair in advance: an encryption key and a decryption key.
- the encryption key is used by the OWE to encrypt the data that needs to be encrypted in the offline management instruction payload.
- the offline management instruction may include the encrypted data encrypted by using the encryption key, the decryption key identifier, the target SD identifier, the OWE certificate, and the OWE.
- the private key pairs information such as part of the data to be signed in the payload.
- the offline management instructions can be placed in the application management server in two ways as shown in FIG.
- the decryption key is used to decrypt the encrypted data in the offline management instructions.
- OWE deploys the decryption key in SD to enable SD to have offline management capabilities.
- the SD may not have an offline management function at the beginning.
- the OWE deploys the decryption key for the SD according to the management mode that may be implemented, the OWE may deploy the decryption key to the SD when the SD is created, and indicate that the decryption key can provide offline management for one or more SDs managed by the OWE. Function; it can also be the subsequent OWE to activate the offline management function of SD by updating the SD.
- the OWE may (actively perform activation of the SD offline management function according to preset logic before acquiring the offline instruction.) receiving the fifth message sent by the terminal (or called acquiring the decryption key) The request message is configured to request the OWE to configure the decryption key; after receiving the fifth message, the OWE uses the OTrP GetDeviceState interaction process to perform bidirectional authentication with the terminal, and obtains device information (such as SD/TA information) associated with the OWE in the terminal TEE.
- device information such as SD/TA information
- the OWE sends a sixth message (or an SD creation instruction or an update SD instruction) to the terminal, where the sixth message includes at least one decryption key and a key attribute parameter, and the key attribute parameter includes at least an access authority of the key, such as Indicates whether the decryption key can be shared, which SD shares can be shared, etc., so that the TEE can generate the association relationship between the key and the SD according to the key attribute parameter; and perform the access authority of the stored decryption key.
- the sixth message includes at least one decryption key and a key attribute parameter
- the key attribute parameter includes at least an access authority of the key, such as Indicates whether the decryption key can be shared, which SD shares can be shared, etc.
- the association information includes one or more of the following manners: at least one decryption key has a one-to-one correspondence with at least one SD, or at least one decryption key Each decryption key has a corresponding relationship with a plurality of SDs associated with at least one SD; or at least one decryption key has a correspondence relationship with an SD, and the TEE of the terminal saves at least one decryption key respectively corresponding thereto The target SD storage area is saved with associated information.
- the target SD is associated with the decryption key deployed by the same OWE to other SDs in the TEE, that is, the target SD can access the decryption key of other SD
- the target SD has an offline management function and can execute the target. SD and the decryption key identifies the matching offline management instruction.
- the terminal determines whether the decryption key corresponding to the decryption key identifier is included in the target SD corresponding to the target SD identifier.
- the key includes the following two situations: 1.
- the decryption key corresponding to the decryption key identifier A is stored in the target SD, or 2.
- OWE1 has configured decryption corresponding to the decryption key identifier A for some other SD in the TEE.
- the key, and the target SD is associated with the decryption key, and having the access authority of the decryption key, the target SD can decrypt the offline management instruction.
- the OWE configures a decryption key for the SD in the TEE of the terminal, and after the offline management command is placed in the application management server, the technical solution can execute the management method shown in FIG. 6, and the management method can include the following steps:
- the terminal acquires an application data packet.
- the REE of the terminal acquires an application data packet from the CA APK server or the application management server in FIG. 4, and the application data packet includes an offline management instruction, and the offline management instruction may include a target SD identifier, a decryption key identifier, and encrypted data.
- the decryption key identifier is used to indicate a corresponding decryption key, and the terminal TEE decrypts the encrypted data using the decryption key; the encrypted data is generated by the OWE using the encryption key; in the embodiment of the present invention, the encryption key and the decryption key It can be a symmetric key or an asymmetric key.
- the terminal saves the private key, and the OWE can implement the offline encryption method introduced by the present invention by configuring the same private key for a batch of devices.
- the application data packet is generated by the OWE and placed in the CA APK server or the application management server.
- the OWE encrypts the data to be encrypted by using an encryption key, and generates an offline management instruction and the OWE deploys the decryption key to the SD of the terminal, which are two irrelevant processes.
- the TEE of the terminal directly decrypts the encrypted data using the decryption key to identify the corresponding decryption key.
- the TEE of the terminal calculates the session key using the key calculation parameter included in the offline management instruction and the decryption key corresponding to the decryption key identifier, and decrypts the encrypted data using the session key.
- This session key can also be referred to as a content encryption key.
- the terminal determines whether the decryption key corresponding to the decryption key identifier is included in the target SD corresponding to the target SD identifier.
- the terminal may determine whether the target SD has a relationship with the decryption key according to the association information saved by the TEE, or determine whether the target SD has the access right to the decryption key.
- the association information may include a correspondence between the target SD identifier and the decryption key identifier or a correspondence between the target SD and the decryption key, as shown in Table 1.
- the terminal determines that the target SD has a relationship with the decryption key, it is considered that the storage area of the target SD corresponding to the target SD identifier includes the decryption key corresponding to the decryption key identifier, or the target SD has the same OWE. Access to the decryption key deployed to other SDs it manages.
- OWE1 deploys different decryption keys Key1 and Key3 for SD1 and SD5 respectively;
- OWE2 deploys the decryption key Key2 to one SD of SD2, SD3, and SD4, and uses Key attribute parameters to key2 and the three SDs. Association, sharing Key2 by the 3 SDs.
- OWE decides to use the different encryption keys for secondary encryption of the offline management instructions of SD1, it is necessary to deploy the corresponding two decryption keys in SD1.
- the association information is recorded by the TEE when the OWE deploys the decryption key in the TEE of the terminal.
- Table 1 is only for explaining the correspondence between the target SD and the decryption key, and does not limit whether the association information includes the correspondence relationship between the decryption key and the target SD, or the correspondence between the identifier of the decryption key and the target SD identifier.
- Table 1 is only an expression of the association relationship, and the specific form of the association information is not limited in the embodiment of the present invention.
- the same OWE1 can select different SD to deploy different decryption keys; the same OWE2 can also select different decryption keys shared by different SD deployments.
- OWE can configure the decryption key for the SD when the terminal is shipped from the factory or when the SD is created.
- the way the OWE configures the decryption key can be configured in the manner shown in Figure 2 and Figure 3.
- the OWE can configure a different decryption key for each SD, or configure the same decryption key for multiple SDs associated with one OWE.
- the terminal decrypts the encrypted data by using the decryption key, and performs an offline management operation according to the decrypted encrypted data.
- the process of decrypting the encrypted data may directly decrypt the encrypted data according to the decryption key according to the selected encryption protocol/method, and may be a key calculation parameter and a decryption key in the offline management instruction, and the content is exported.
- the encryption key decrypts the encrypted data.
- the offline management operation may include, but is not limited to, installing a TA and updating a TA.
- the encrypted data may be other encrypted data including an encrypted TA installation package or a TA update package (refer to the encrypted content and the secondary encryption structure in the installation TA command described in S106).
- the data that is secondarily encrypted also includes the corresponding second decryption key identifier and/or key calculation parameters.
- the terminal TEE first decrypts the encrypted data according to the first decryption key identifier in the offline instruction, and after decrypting, obtains the second decryption key according to the second decryption key identifier in the secondary encrypted data, and performs secondary encrypted data. Decrypt.
- the terminal directly decrypts the encrypted data using the decryption key, and then performs an offline management operation based on the decrypted encrypted data.
- the terminal derives a content encryption key/data encryption key for encrypting data using a decryption key and a key calculation parameter in the instruction, and then decrypts the encrypted data using the content encryption key. And then perform offline management operations based on the decrypted data.
- the terminal acquires, by using the OTrP, the decryption key corresponding to the decryption key identifier from the OWE in an online management manner.
- the terminal When the target SD does not have the decryption key and cannot decrypt the encrypted data, the terminal establishes a communication connection with the OWE, and acquires the decryption key from the OWE in the manner of OTrP online management.
- the terminal and the OWE perform two-way authentication. After the two-way authentication is completed, the terminal receives the decryption key sent by the OWE through the OthP in an online management manner (for example, update SD or other instructions to send personalized data to the SD). Then, the terminal decrypts the encrypted data in the offline management command according to the decryption key, and performs an offline management operation according to the decrypted encrypted data, that is, S230 is executed.
- the process for the terminal to acquire the decryption key from the OWE in an online management manner by using the OTrP may include:
- the terminal sends a first message to the OWE.
- the first message includes a decryption key identifier for obtaining a decryption key corresponding to the decryption key identifier.
- the first message may be referred to as a decryption key request or other name, which is not limited in the embodiment of the present invention.
- the OWE and the terminal perform two-way authentication.
- the terminal receives the second message that is sent by the OWE through the OTRP in an online management manner.
- the second message includes a decryption key.
- the second message may be an update SD instruction, and the decryption key is configured in the target SD by updating the SD.
- the decryption key may be encrypted by the TEE-SP-AIK generated when the SP first creates the SD or directly by using the TEE public key.
- the terminal saves the decryption key to the secure storage area of the target SD, and updates the associated information.
- the terminal saves the decryption key to the target SD in the TEE and updates the associated information stored in the TEE. Update associated information such as:
- the terminal acquires the decryption key Key4 online and updates the associated information, and the updated associated information is Table 2.
- the second message includes a key attribute parameter of the decryption key, so that the TEE updates the associated information and the access authority of the key according to the attribute parameter.
- OWE sets Key4 as a non-shareable decryption key, and TEE saves Key4 and establishes the association between Key4 and SD7.
- the offline management instruction may further include application information of the encrypted data; after the terminal acquires the application data package, the method may further include:
- the terminal determines, according to the application information and the TEE information, whether the TEE module needs to execute the offline management instruction.
- the TEE information is application information corresponding to the application installed in the TEE module of the terminal.
- the application information may be version information of the application, a name of the application, and the like.
- the application information may be an application identifier or an application name of the TA; if the offline management instruction is used to update the TA, the application information may be the name and version information of the TA.
- the terminal executes S260.
- the application corresponding to the application information is already installed in the terminal TEE, the offline management instruction is not executed.
- the offline management command is to update the TA
- it is checked whether the target TA exists, and if the target TA exists and the installed TA version in the TEE is lower than the version of the TA in the offline management command. If it is lower, execute S230.
- the terminal determines, according to the target SD identifier, a target SD corresponding to the target SD identifier in the TEE of the terminal.
- the terminal executes 230.
- S270 is performed.
- S270 The terminal installs the target SD in an online management manner through the OTrP and acquires the decryption key from the OWE.
- the terminal establishes a communication connection with the OWE and performs two-way authentication. After the two-way authentication is completed, the terminal receives the installation target SD instruction sent by the OWE through the OTrP online management, acquires the decryption key from the OWE, installs the target SD, and acquires the decryption key. After that, S230 is executed.
- the terminal installs the target SD in an online management manner by using OTrP and obtains a decryption key from the OWE, including:
- the terminal sends a third message to the OWE
- the third message may include the target SD identifier and the indication information, the third message is used to request the target SD corresponding to the installation target SD identifier, and the indication information is used to indicate that the decryption key is obtained from the OWE.
- the third message may be referred to as a request message for acquiring the target SD.
- the indication information may be an identifier of the decryption key.
- the terminal receives a fourth message that is sent by the OWE through the OTRP in an online management manner.
- the fourth message includes an installation target SD instruction, and the installation target SD instruction includes a decryption key corresponding to the decryption key identifier.
- the terminal installs the target SD, saves the decryption key in the installed target SD, and updates the associated information.
- the management method of the embodiment of the present invention can implement the management of the TEE in an offline situation.
- the terminal determines whether the terminal installs the corresponding application according to the application information, the terminal determines whether the terminal includes the target SD according to the target SD identifier, and determines whether the target SD corresponding to the target SD identifier includes the decryption key identifier.
- the decryption key can be implemented in two ways. See Figure 9, Figure 10(a) and Figure 10(b) for details.
- FIG. 9 is a schematic flowchart diagram of a management method according to an embodiment of the present invention. As shown in FIG. 9, the method may include the following steps:
- the REE in the terminal acquires an application data packet.
- the application data packet includes an offline management instruction, and the offline management instruction includes a target SD identifier, a decryption key identifier, encrypted data (for example, a TA installation package or a TA update package), application information corresponding to the encrypted data, a signature, and an OWE certificate.
- the application information may be version information of the application, or an application identifier or an application name.
- the REE of the terminal sends an offline management command in the application data packet to the TEE of the terminal.
- the client application in the REE sends an offline management instruction to the TEE, and the TEE determines whether the offline management instruction needs to be executed.
- the TEE of the terminal determines, according to the application information and the TEE information, whether the offline management instruction needs to be executed.
- the TEE information is application information corresponding to the application installed in the TEE module of the terminal.
- the offline management operation corresponding to the offline management instruction may be a TA with an application name of 1234, and the TEE determines whether the TA with the application name of 1234 has been installed, and if it is already installed, cancels the related operation of the offline management instruction; If it is installed, execute S304.
- the TEE of the terminal determines whether the target SD corresponding to the target SD identifier is included in the terminal.
- the TEE When the target SD is included in the terminal, the TEE performs S305. When the target SD is not included in the terminal, the terminal performs S307 to S311.
- the TEE of the terminal determines whether the decryption key corresponding to the decryption key identifier is included in the target SD.
- the terminal executes S306. Otherwise, S312 to S316 are performed.
- the terminal decrypts the encrypted data in the offline management instruction by using the decryption key, and performs an offline management operation according to the decrypted encrypted data.
- TEE uses the CA certificate in the OWE whitelist to verify the OWE certificate in the offline management command, and obtains the OWE public key in the OWE certificate, and uses the OWE public key to verify the signature of the OWE private key.
- the offline management instructions are generated by the trusted OWE and execute the offline management instructions.
- the offline management instruction is to install the TA, the TA code and the TA data are decrypted to perform the TA installation operation; if the offline management instruction is to update the TA, the TA code and the TA data are decrypted to perform the TA update operation.
- the communication between the REE and the OWE is established in the online management mode of the OTrP, and the terminal needs to establish a communication connection with the OWE. After the two-way authentication, the OWE sends the REE request to the REE. Information.
- the process of the two-way authentication is the same as the process of the two-way authentication shown in FIG. 5, and is not described here for brevity.
- the TEE sends a request message for installing the target SD to the REE, where the request message includes the target SD identifier and the decryption key identifier.
- the REE forwards the request message of the installation target SD to the OWE.
- the OWE sends an installation target SD instruction to the REE, where the installation target SD instruction includes a decryption key corresponding to the decryption key identifier.
- the OWE After receiving the request message of the installation target SD sent by the REE, the OWE performs the two-way authentication with the TEE.
- the process of the authentication is the same as the two-way authentication process in FIG. 5, which is not described here.
- OWE sends the installation target SD command to the REE.
- the REE forwards the installation target SD instruction to the TEE.
- the TEE installs the target SD, saves the decryption key in the installed target SD, and updates the associated information, and then executes S306.
- the TEE sends a decryption key request message to the REE, where the decryption key request message includes a decryption key identifier.
- the REE forwards the decryption key request message to the OWE.
- the OWE sends a response message for obtaining a decryption key request message to the REE, where the response message includes a decryption key.
- the OWE After receiving the decryption key request message sent by the REE, the OWE performs the two-way authentication with the TEE.
- the process of the authentication is the same as the two-way authentication process in FIG. 5, which is not described here.
- the OWE sends a response message to the REE to obtain the decryption key request message.
- the TEE saves the decryption key to the target SD, and updates the associated information, and then executes S306.
- the management method of the embodiment of the present invention can implement the management of the TEE in an offline situation.
- FIG. 10(a) and 10(b) are schematic flowcharts of another management method according to an embodiment of the present invention. As shown in FIG. 10(a) and FIG. 10(b), the method may include the following steps:
- the REE in the terminal acquires an application data packet.
- the application data packet includes an offline management instruction, and the offline management instruction includes a target SD identifier, a decryption key identifier, encrypted data (TA installation package or TA update package), application information corresponding to the encrypted data, a signature, and an OWE certificate.
- the application information may be version information of the application, or an application identifier or an application name.
- the offline management operation corresponding to the offline management instruction is to update the TA
- the application information is the TA of version 3.0.
- REE needs to determine if the TEE has installed a TA with a version higher than 3.0. If so, the operation of updating the TA is terminated.
- the REE sends a request message for acquiring application information to the TEE of the terminal to determine whether the execution condition of the offline management instruction is met.
- the request message for acquiring the application information includes the application information corresponding to the encrypted data.
- the TEE sends a response message for acquiring the application information to the REE.
- the response message includes TEE information, that is, information of all TAs that the TEE has installed.
- the response message is whether the TEE includes an application corresponding to the application information.
- the REE compares the TEE information in the response message with the application information included in the offline management instruction to determine whether the condition for executing the offline management instruction is met.
- the REE determines, according to the response message and the application information, whether an offline management instruction needs to be executed.
- the offline management instruction includes application information
- the application information may include TA identifier and version information of the TA to be installed or updated.
- the response message obtained by the REE from the TEE includes the application information corresponding to all the TAs installed by the TEE, and also includes the TA identifier and version information of the TA installed by the TEE.
- the REE determines whether an offline management instruction needs to be executed based on the response message and the application information in the offline management instruction.
- the offline management command is an offline installation TA command
- the REE is based on the TA identifier of the application information in the offline installation TA command
- the TA of the TA installed by the TEE in the response message received by the REE from the TEE The identifier determines whether the offline installation TA command needs to be executed. If the TA corresponding to the TA identifier in the offline installation TA command is not installed in the TEE, the offline installation TA command needs to be executed.
- the offline management command is an offline update TA command
- the REE is based on the TA version information of the application information in the offline installation TA command
- the REE is installed in the TEE from the TEE.
- the version information determines whether the offline update TA instruction needs to be executed. If the installed version information in the TEE is lower than the TA version information corresponding to the offline update TA instruction, the offline update TA instruction needs to be executed to update the TA.
- the REE sends a request message for acquiring the SD information to the TEE.
- the request message for acquiring the SD information includes the target SD identifier.
- the TEE sends a response message for acquiring the SD information to the REE.
- the response message for obtaining the SD information includes information of all SDs that the TEE has included.
- the response message for acquiring the SD information is that the TEE includes the target SD corresponding to the target SD identifier or the information that does not include the target SD corresponding to the target SD identifier.
- the REE determines, according to the response message that the SD information is obtained, whether the TEE includes the target SD corresponding to the target SD identifier.
- the target SD corresponding to the target SD identifier When the target SD corresponding to the target SD identifier is not included in the TEE, the target SD corresponding to the target SD identifier is installed in the OTrP online management mode, and S S411 to S414 are specifically executed; when the target SD corresponding to the target SD identifier is included in the TEE, the execution map is executed. S408 in 10(b).
- the REE determines whether the decryption key corresponding to the decryption key identifier is included in the target SD.
- the response message for acquiring the SD information may include an SD that the TEE has included, and a decryption key identifier included in each SD.
- the REE may send a request for acquiring a decryption key in the target SD to the TEE, the request includes the target SD identifier, and obtain the decryption key identifier of the target SD from the TEE, and then determine the target SD. Whether to include the decryption key corresponding to the decryption key identifier in the offline management instruction.
- the acquisition target SD information request may include a decryption key identifier in the offline management instruction, and the TEE responds to the REE with information of the decryption key corresponding to the decryption key identifier in the target SD.
- the REE sends an offline management instruction to the TEE.
- the TEE decrypts the encrypted data by using a decryption key, and performs an offline management operation according to the decrypted encrypted data.
- TEE uses the CA certificate in the OWE whitelist to verify the OWE certificate in the offline management command, and obtains the OWE public key in the OWE certificate, and uses the OWE public key to verify the signature of the OWE private key.
- the offline management instruction is generated by the trusted OWE, and the offline management instruction is determined to be a valid instruction.
- the decrypted key is then used to decrypt the encrypted data, and an offline management operation is performed based on the decrypted encrypted data.
- the REE sends a request message for installing the target SD to the OWE, where the request message includes the target SD identifier and the decryption key identifier.
- the OWE sends an installation target SD instruction to the REE, where the installation target SD instruction includes a decryption key corresponding to the decryption key identifier.
- the OWE After receiving the request message of the installation target SD sent by the REE, the OWE performs the two-way authentication with the TEE.
- the process of the authentication is the same as the two-way authentication process in FIG. 5, which is not described here.
- OWE sends the installation target SD command to the REE.
- the REE forwards the installation target SD instruction to the TEE.
- the TEE installs the target SD, saves the decryption key in the installed target SD, and updates the associated information, and then executes S409.
- the REE sends a decryption key request message to the OWE, where the decryption key request message includes a decryption key identifier.
- the OWE sends a response message for obtaining a decryption key request message to the REE, where the response message includes a decryption key.
- the OWE After receiving the decryption key request message sent by the REE, the OWE performs the two-way authentication with the TEE.
- the process of the authentication is the same as the two-way authentication process in FIG. 5, which is not described here.
- the OWE sends a response message to the REE to obtain the decryption key request message.
- the REE forwards the response message to the TEE.
- the TEE saves the decryption key in the target SD, and updates the associated information, and then executes S409.
- the management method of the embodiment of the present invention can implement the management of the TEE in an offline situation.
- the OWE generates an offline management command, and after obtaining the offline management command, if the terminal determines that the terminal target SD does not have the function of executing the offline management command, the terminal obtains the decryption key by installing the SD or updating the SD in an online manner.
- the decrypted key is used to decrypt the encrypted data in the offline management instruction.
- the decryption key corresponding to the offline management instruction may be one-time, that is, when performing the management methods of FIG. 6 to FIG. 10(a) and FIG. 10(b), Both need to obtain the decryption key from OWE through OTrP online management.
- the OWE can be implemented by indicating that the TEE does not save the key and the association relationship, or by using different decryption keys in different offline management commands, which is not limited by the present invention.
- the offline management instruction may further include a key calculation parameter.
- the TEE can obtain the content encryption key actually used to encrypt the data using the primary decryption key and the key calculation parameter, and then decrypt the content encryption key.
- the encrypted data is then subjected to offline management operations based on the decrypted encrypted data.
- FIG. 11 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure.
- the terminal is applied to the management of a trusted execution environment TEE that supports the open trust protocol OTrP.
- the terminal may include an obtaining unit 601 and a processing unit 602.
- the obtaining unit 601 is configured to acquire an application data packet, where the application data packet includes an offline management instruction, where the offline management instruction includes a target security domain SD identifier, a decryption key identifier, and an encrypted data, and the decryption key identifier corresponding to the decryption key is used for decryption and encryption.
- the encrypted data is generated by the external entity OWE using an encryption key
- the decryption key and the encryption key are key pairs generated by the external entity OWE.
- the processing unit 602 is configured to determine whether a decryption key corresponding to the decryption key identifier is included in the target SD corresponding to the target SD identifier.
- the processing unit 602 decrypts the encrypted data using the decryption key, and performs an offline management operation based on the decrypted encrypted data.
- the TEE offline management of OTrP is realized by the provided management method.
- the terminal further includes a sending unit 603, a receiving unit 604, and a storage unit 605.
- the sending unit 603 is configured to send a first message to the OWE when the target SD does not include the decryption key, where the first message includes a decryption key identifier, and is used to obtain a decryption key corresponding to the decryption key identifier.
- the receiving unit 604 is configured to receive a second message that is sent by the OWE in an online management manner by using the OTHP, where the second message includes a decryption key.
- the storage unit 605 is configured to save the decryption key in the target SD; the processing unit 602 decrypts the encrypted data using the decryption key, and performs an offline management operation according to the decrypted encrypted data.
- the processing unit 602 is further configured to determine, according to the target SD identifier, whether the target SD corresponding to the target SD identifier is included in the terminal.
- the sending unit 603 is configured to send a third message to the OWE when the terminal does not include the target SD corresponding to the target SD identifier, where the third message includes indication information, and the third message
- the target SD corresponding to the installation target SD identifier is used to indicate that the decryption key corresponding to the decryption key identifier is not deployed in the target SD that is requested to be installed.
- the receiving unit 604 is configured to receive a fourth message that is sent by the OWE in an online management manner by using the OTHP, where the fourth message includes an installation target SD instruction, and the installation target SD instruction includes a decryption key.
- the processing unit 602 is further configured to install the target SD corresponding to the target SD identifier according to the installation target SD instruction, and the storage unit 605 saves the decryption key in the installed target SD.
- the indication information includes a decryption key identifier carried in the offline management instruction
- the installation target SD instruction includes a decryption key corresponding to the decryption key identifier
- the second message and the fourth message further include an attribute parameter of the decryption key
- the processing unit 602 is further configured to update the association information, where the updated association information includes the target SD. Correspondence with the decryption key.
- the offline management instruction further includes application information; the processing unit 602 is further configured to determine, according to the application information and the TEE information, whether an offline management instruction needs to be executed; wherein the TEE information is installed Application information corresponding to the application in the TEE module of the terminal.
- the offline management instruction further includes a key calculation parameter
- the processing unit 602 decrypts the encrypted data by using a decryption key, including:
- the processing unit 602 calculates the session key using the decryption key identification corresponding decryption key and key calculation parameters, and decrypts the encrypted data using the session key.
- the sending unit 603 is configured to send a fifth message to the OWE, where the fifth message is used by the OWE to configure a decryption key to at least one SD in the terminal.
- the receiving unit 604 is configured to receive a sixth message that is sent by the OWE in an online management manner by using the OTHP, where the sixth message includes at least one attribute parameter of the decryption key and the decryption key, and generates association information according to the attribute parameter of the decryption key;
- the information includes one or two of the following ways: at least one decryption key has a one-to-one correspondence with at least one SD, or each of the at least one decryption key exists with a plurality of SDs in at least one SD Correspondence relationship.
- the storage unit 605 is configured to save at least one decryption key and associated information.
- the functions of the functional units in the terminal can be implemented by the steps performed by the terminal in the embodiment shown in FIG. 5 to FIG. 10(a) and FIG. 10(b). Therefore, the embodiment of the present invention provides The specific working process of the terminal is not repeated here.
- FIG. 12 is a schematic structural diagram of a server according to an embodiment of the present invention.
- the server is applied to the management of a trusted execution environment TEE supporting an open trust protocol OTrP, and the server may include:
- a processing unit configured to generate an offline management instruction, where the offline management instruction includes a target security domain SD identifier, a decryption key identifier, and encrypted data; wherein the decryption key identifier corresponding to the decryption key is used to decrypt the encrypted data, and the encrypted data is configured by
- the OWE uses the encryption key to generate, the decryption key and the encryption key are key pairs generated by the OWE; the offline management instruction is used when the terminal acquires the application data packet including the offline management instruction, and uses the decryption key to identify the corresponding decryption key.
- the key decrypts the encrypted data and performs an offline management operation based on the decrypted encrypted data.
- the server further includes a receiving unit 702 and a transmitter 703;
- the receiving unit 702 is configured to receive a first message sent by the terminal, where the first message includes a decryption key identifier, and is used to obtain a decryption key corresponding to the decryption key identifier.
- the processing unit 701 is further configured to perform bidirectional authentication with the TEE of the terminal in an online management manner by using the OTrP. After the authentication is passed, the sending unit 703 sends a second message to the terminal, where the second message includes a decryption key, and the second message is used. The terminal saves the decryption key in the target SD and updates the associated information, and the associated information includes the correspondence between the target SD and the decryption key.
- the receiving unit 702 is configured to receive a third message sent by the terminal, where the third message includes indication information, where the third message is used to request the target SD corresponding to the installation target SD identifier, and the indication The information is used to indicate that the decryption key corresponding to the decryption key identifier is deployed in the target SD that requests the installation.
- the processing unit 701 is configured to perform bidirectional authentication with the TEE of the terminal in an online management manner by using the OTrP. After the authentication is passed, the sending unit 703 sends a fourth message to the terminal, where the fourth message includes an installation target SD instruction, and the installation target SD instruction includes The decryption key is used for the terminal installation target SD, the decryption key is saved in the installed target SD, and the associated information is updated, and the associated information includes the correspondence between the target SD and the decryption key.
- the indication information includes a decryption key identifier
- the installation target SD instruction includes a decryption key corresponding to the decryption key identifier
- the receiving unit 702 is configured to receive a fifth message sent by the terminal, where the fifth message is used by the OWE to configure a decryption key to at least one SD in the terminal.
- the server and the terminal perform two-way authentication.
- the sending unit 703 sends a sixth message to the terminal, where the sixth message includes at least one attribute parameter of the decryption key and the decryption key; and the sixth message is used by the terminal to save at least a decryption key, and generating association information according to the attribute parameter of the decryption key; the association information includes one or two of the following manners: at least one decryption key has a one-to-one correspondence with at least one SD, or at least one decryption key Each decryption key in the key has a corresponding relationship with a plurality of SDs in at least one SD.
- the functions of the functional units in the server can be implemented by the steps performed by the OWE in the embodiment shown in FIG. 5 to FIG. 10(a) and FIG. 10(b). Therefore, the embodiment of the present invention provides The specific working process of OWE will not be repeated here.
- FIG. 13 is a schematic structural diagram of another terminal, which is applied to management of a trusted execution environment TEE supporting an open trust protocol OTrP, the terminal including a TEE module and a rich execution environment REE module, the TEE module including a receiving unit 801 and Processing unit 802.
- the receiving unit 801 is configured to receive an offline management instruction sent by the REE module, where the offline management instruction includes a target security domain SD identifier, a decryption key identifier, and an encrypted data, and the decryption key corresponding to the decryption key identifier is used to decrypt the encrypted data, and the encrypted data is used.
- the encryption key is generated by the external entity OWE, and the decryption key and the encryption key are key pairs generated by the external entity OWE.
- the processing unit 802 is configured to determine whether a decryption key corresponding to the decryption key identifier is included in the target SD corresponding to the target SD identifier.
- the processing unit 802 is further configured to decrypt the encrypted data using the decryption key when the decryption key is included in the target SD, and perform an offline management operation according to the decrypted encrypted data.
- the TEE offline management of OTrP is realized by the provided management method.
- the TEE module further includes a transmitting unit 803 and a storage unit 804.
- the sending unit 803 is configured to send a first message to the OWE through the REE module when the decryption key is not included in the target SD, where the first message includes a decryption key identifier, and is used to obtain a decryption key corresponding to the decryption key identifier.
- the processing unit 802 is further configured to receive, by using the REE module, a second message that is sent by the OWE through the OTRP in an online management manner, where the second message includes a decryption key.
- the storage unit 804 is configured to save the decryption key into the target SD; the processing unit 802 decrypts the encrypted data using the decryption key, and performs an offline management operation according to the decrypted encrypted data.
- the processing unit 802 is further configured to determine, according to the target SD identifier, whether the target SD corresponding to the target SD identifier is included in the TEE module.
- the sending unit 803 is configured to: when the target SD corresponding to the target SD identifier is not included in the TEE module, the TEE module sends a third message to the OWE through the REE module, where the third message includes The indication information is used to request the target SD corresponding to the installation target SD identifier, and the indication information is used to indicate that the decryption key corresponding to the decryption key identifier is deployed in the target SD that is requested to be installed.
- the receiving unit 801 is configured to receive a fourth message that is sent by the OWE in an online management manner by using the OTHP, where the fourth message includes an installation target SD instruction, and the installation target SD instruction includes a decryption key.
- the processing unit 802 is further configured to install the target SD corresponding to the target SD identifier according to the installation target SD instruction, and save the decryption key to the installed target SD.
- the indication information includes a decryption key identifier
- the installation target SD instruction includes a decryption key corresponding to the decryption key identifier
- the first message and the fourth message further include an attribute parameter of the decryption key
- the processing unit 802 is further configured to update the association information, where the updated association information includes the target SD. Correspondence with the decryption key.
- the offline management instruction further includes application information
- the processing unit 802 is further configured to determine, according to the application information and the TEE information, whether an offline management instruction needs to be executed; wherein the TEE information is installed in the terminal.
- the offline management instruction further includes a key calculation parameter
- the processing unit 802 decrypts the encrypted data by using the decryption key, including:
- the processing unit 802 calculates the session key using the decryption key identification corresponding decryption key and key calculation parameters, and decrypts the encrypted data using the session key.
- the processing unit 802 is further configured to send, by using the REE module, a fifth message to the OWE, where the fifth message is used by the OWE to configure a decryption key to the at least one SD in the terminal.
- the sending unit 803 is configured to receive, by using the REE module, a sixth message that is sent by the OWE through the OTRP in an online management manner, where the sixth message includes at least one attribute parameter of the decryption key and the decryption key.
- the processing unit 802 generates association information according to the attribute parameter of the decryption key; the association information includes one or two of the following manners: at least one decryption key has a one-to-one correspondence with at least one SD, or at least one of the decryption keys Each decryption key has a correspondence with a plurality of SDs in at least one SD.
- the storage unit 804 is configured to save at least one decryption key and associated information.
- the embodiment of the present invention further provides a terminal.
- the terminal includes a receiver, a transmitter, a processor, and a memory.
- the receiver, the transmitter, the processor, and the memory are interconnected to complete each other.
- Communication, the terminal has a method performed by the terminal in FIGS. 5 to 10(a) and 10(b).
- the processor of the terminal is used to perform the following operations:
- the application data packet includes an offline management instruction
- the offline management instruction includes a target security domain SD identifier, a decryption key identifier, and an encrypted data
- the decryption key identifier corresponding to the decryption key is used to decrypt the encrypted data
- the encrypted data is externally
- the entity OWE is generated using an encryption key
- the decryption key and the encryption key are key pairs generated by the external entity OWE;
- the decryption key When the decryption key is included in the target SD, the encrypted data is decrypted using the decryption key, and an offline management operation is performed based on the decrypted encrypted data.
- the functions of the functional units in the terminal can be implemented by the steps performed by the terminal in the embodiment shown in FIG. 5 to FIG. 10(a) and FIG. 10(b). Therefore, the embodiment of the present invention provides The specific working process of the terminal is not repeated here.
- the present invention further provides another terminal, as shown in FIG. 15, the terminal includes a TEE module and a rich execution environment REE module, and the TEE module includes a receiver and a processor;
- the receiver is configured to receive an offline management instruction sent by the rich execution environment REE module of the terminal, where the offline management instruction includes the target security domain SD identifier, the decryption key identifier and the encrypted data, and the decryption key corresponding to the decryption key identifier is used for decryption and encryption.
- the encrypted data is generated by the external entity OWE using an encryption key
- the decryption key and the encryption key are key pairs generated by the external entity OWE;
- a processor configured to determine whether a decryption key corresponding to the decryption key identifier is included in the target SD corresponding to the target SD identifier;
- the processor decrypts the encrypted data using the decryption key, and performs an offline management operation based on the decrypted encrypted data.
- the terminal provided in Figures 14 and 15 can be a mobile phone.
- the processor is the control center of the mobile phone, and connects various parts of the entire mobile phone by using various interfaces and lines, and executes each mobile phone by running or executing software programs and/or modules stored in the memory, and calling data stored in the memory. The function and processing of data to monitor the phone as a whole.
- the processor may be a central processing unit (CPU), a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), or a field programmable gate array (field). Programmable gate array (FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof.
- the processor may implement or perform various illustrative logical blocks, modules and circuits described in connection with the present disclosure.
- the processor can also be a combination of computing functions, for example, including one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
- the processor can include one or more processor units.
- the processor may further integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application, and the like, and the modem processor mainly processes the wireless communication. It can be understood that the above modem processor may not be integrated into the processor.
- the memory can be used to store software programs and modules, and the processor executes various functional applications and data processing of the mobile phone by running software programs and modules stored in the memory.
- the memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the storage data area may be stored according to Data created by the use of the mobile phone (such as audio data, phone book, etc.).
- the memory may include volatile memory such as non-volatile volatile random access memory (NVRAM), phase change random access memory (PRAM), and magnetoresistive random access memory ( Magetoresistive RAM, MRAM), etc.; memory 620 may also include non-volatile memory, such as at least one disk storage device, electrically erasable programmable read-only memory (EEPROM), flash memory device, such as NOR flash memory or NAND flash memory, semiconductor devices such as Solid State Disk (SSD).
- EEPROM electrically erasable programmable read-only memory
- flash memory device such as NOR flash memory or NAND flash memory
- SSD Solid State Disk
- the memory may also include a combination of the above types of memories.
- the embodiment of the present invention further provides a server.
- the server includes a transceiver, a processor, and a memory.
- the transceiver, the processor, and the memory are connected to each other for completing communication with each other.
- the server has a method performed by performing OWE in FIGS. 5 to 10(a) and 10(b).
- the processor is configured to: generate an offline management instruction, where the offline management instruction includes a target security domain SD identifier, a decryption key identifier, and encrypted data; wherein the decryption key identifier corresponds to a decryption key used to decrypt the encryption Data, the encrypted data is generated by the OWE using an encryption key, the decryption key and the encryption key are key pairs generated by the OWE; and the offline management instruction is used by the terminal to acquire the offline When managing the application data packet of the instruction, the decryption key is used to identify the corresponding decryption key to decrypt the encrypted data, and the offline management operation is performed according to the decrypted encrypted data.
- the offline management instruction includes a target security domain SD identifier, a decryption key identifier, and encrypted data
- the decryption key identifier corresponds to a decryption key used to decrypt the encryption Data
- the encrypted data is generated by the OWE using an encryption key
- the functions of the functional units in the server can be implemented by the steps performed by the server in the embodiment shown in FIG. 5 to FIG. 10(a) and FIG. 10(b). Therefore, the embodiment of the present invention provides The specific working process of the terminal is not repeated here.
- FIG. 17 is a schematic diagram of a communication apparatus according to an embodiment of the present invention.
- the communication apparatus 1700 may be a chip, and the chip includes a processing unit and a communication unit.
- the processing unit may be a processor 1710, which may be various types of processors as described above.
- the communication unit may for example be an input/output interface 1720, a pin or a circuit, etc., which may comprise or be connected to a system bus.
- the communication device further includes a storage unit, and the storage unit may be a memory 1730 inside the chip, such as a register, a cache, a random access memory (RAM), an EEPROM, or a FLASH.
- RAM random access memory
- EEPROM electrically erasable programmable read-only memory
- the memory unit may also be a memory external to the chip, which may be various types of memory as described above.
- the processor is coupled to the memory, and the processor can execute instructions stored in the memory to cause the communication device to perform the method performed by the terminal of Figures 5-10(a) and 10(b) above.
- Embodiments of the present invention also provide a computer readable storage medium comprising instructions that, when run on a device, cause the device to perform the method as performed in FIGS. 5-10(a) and 10(b) .
- Embodiments of the present invention also provide a computer program product or computer program comprising instructions, which when executed on a computer, cause the computer to perform the method as performed in Figures 5-10(a) and 10(b) .
- the embodiment of the present invention further provides a system, which may include the terminal described in FIG. 11 or FIG. 13 and the server described in FIG. 12; or, the terminal may include the terminal described in FIG. 14 or FIG.
- the present invention may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
- software it may be implemented in whole or in part in the form of a computer program product.
- the computer program product includes one or more computer instructions.
- the computer program instructions When the computer program instructions are loaded and executed on a computer, the processes or functions described in accordance with embodiments of the present invention are generated in whole or in part.
- the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
- the computer instructions can be stored in a computer readable storage medium or transferred from one computer readable medium to another computer readable medium, for example, the computer instructions can be wired from a website site, computer, server or data center (for example, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (eg infrared, wireless, microwave, etc.) to another website site, computer, server or data center.
- the computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that includes one or more available media.
- the usable medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state hard disk) or the like.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Storage Device Security (AREA)
- Telephonic Communication Services (AREA)
Abstract
本发明实施例提供了一种管理方法,应用于支持开放信任协议OTrP的可信执行环境TEE的管理,该管理方法包括:终端获取应用数据包,应用数据包包括离线管理指令,离线管理指令包括目标安全域SD标识,解密密钥标识和加密数据,解密密钥标识对应的解密密钥用于解密加密数据,加密数据由外部实体OWE使用加密密钥生成,解密密钥和加密密钥是由外部实体OWE生成的密钥对;终端确定目标SD标识对应的目标SD中是否包括解密密钥标识对应的解密密钥;当目标SD中包括解密密钥时,终端使用解密密钥解密加密数据,并根据解密后的加密数据进行离线管理操作。采用提供的管理方法实现了OTrP的TEE离线管理。
Description
本申请要求于2018年2月28日提交中国专利局、申请号为201810167314.9、申请名称为“一种管理方法、终端和服务器”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本发明设计数据安全领域,尤其涉及一种管理方法、终端和服务器。
随着电子产品的发展,以及用户对数据安全性的需求,目前在硬件的支持下,许多终端,可以同时存在两个执行环境,一个是普通执行环境,或者称之为富执行环境(rich execution environment,REE),普通执行环境泛指不具备特定安全功能的运行环境;另一个是可信执行环境(trust execution environment,TEE),TEE具有安全功能,满足了一定的安全要求,同时可以实现与REE相隔离的运行机制。TEE独立于REE运行,定义了严格的安全保护措施,比REE的安全级别要高,能够保护可信执行环境中的资源(assets)(如数据、软件等)免受一般的软件攻击(generalsoftware attacts),抵抗特定类型的安全威胁。只有授权的可信应用(trusted application,TA)才能在TEE中执行,保护了安全软件的资源和数据的机密性。由于TEE隔离和权限控制等保护机制,使TEE比REE更好的保护了资源和数据的安全性。
开放信任协议(open trust protocol,OTrP)提供了一套基于公钥基础设施的PKI对TEE开放、安全、可靠的远程原理机制,当外部实体(outside world entity,OWE)对TEE进行远程管理,例如执行创建安全域(security domain,SD),或者安装可信应用等特权操作(privileged operations)时,需要基于PKI机制进行鉴别(Authentication)和授权(Authorization)验证,例如,,OWE生成管理指令时,采用OWE私钥对管理指令进行签名,并利用从TEE证书中得到的TEE公钥进行加密(加密采用数字信封机制,对内容的签名和加密基于RFC7516-7518指定的JSON Web Signature/JSON Web Encryption机制,并利用TEE公钥对内容加密密钥(content encryption key,CEK)进行加密),然后将这些信息发送给TEE,TEE接收到这些信息后,使用信任的根证书对OWE证书(链)进行验证,以确保管理指令时由经授权的OWE发送的,随后利用TEE私钥对封装的CEK进行解密,并利用CEK对管理指令中的加密数据进行解密,进而执行管理指令。OTrP机制中,在发送管理指令之前,OWE需要对TEE进行鉴权且利用TEE公钥对JWE的CEK进行加密,这也就是说利用OTrP对TEE进行管理必须进行OWE与TEE之间的实时交互或通信,即“在线”通信。
发明内容
本发明提供了一种管理方法、终端和服务器,实现了OTrP下TEE的离线管理。
第一方面,提供了一种管理方法,应用于支持开放信任协议OTrP的可信执行环境TEE的管理,该管理方法可以包括:
终端获取应用数据包,应用数据包包括离线管理指令,离线管理指令包括目标安全域SD标识,解密密钥标识和加密数据,解密密钥标识对应的解密密钥用于解密加密数据,加密数据由外部实体OWE使用加密密钥生成,解密密钥和加密密钥是由外部实体OWE生成的密钥对;
终端确定目标SD标识对应的目标SD中是否包括解密密钥标识对应的解密密钥;
当目标SD中包括解密密钥时,终端使用解密密钥解密加密数据,并根据解密后的加密数据进行离线管理操作。采用提供的管理方法实现了OTrP的TEE离线管理。
结合第一方面,在第一种可能实现的方式中,该管理方法还包括:
当目标SD中不包括解密密钥时,终端向OWE发送第一消息,第一消息包括解密密钥标识,用于获取解密密钥标识对应的解密密钥;
终端接收OWE通过OTrP以在线管理方式发送的第二消息,第二消息包括解密密钥;
终端将解密密钥保存在TEE模块目标SD中;
终端使用解密密钥解密所述加密数据,并根据解密后的加密数据进行离线管理操作。
结合第一方面,或者第一方面的第一种可能实现的方式,在第一方面的第二种可能实现的方式中,在终端确定目标SD标识对应的目标SD中是否包括解密密钥标识对应的解密密钥之前,该管理方法还包括:
终端根据目标SD标识确定终端TEE模块中是否包括目标SD标识对应的目标SD。
结合第一方面的第二种可能实现的方式,在第一方面的第三种可能实现的方式中,该管理方法还包括:
当终端TEE模块中不包括目标SD标识对应的目标SD时,终端向OWE发送第三消息,第三消息包括指示信息,第三消息用于请求安装目标SD标识对应的目标SD,指示信息用于指示在请求安装的目标SD中部署解密密钥标识对应的解密密钥;
终端接收OWE通过OTrP以在线管理方式发送的第四消息,第四消息包括安装目标SD指令,安装目标SD指令包括解密密钥;
终端根据安装目标SD指令安装目标SD标识对应的目标SD,将解密密钥保存在安装的目标SDTEE模块中。
结合第一方面的第三种可能实现的方式,在第一方面的第四种可能实现的方式中,第一消息和第三消息分别包括离线管理指令中携带的解密密钥标识或者离线管理指令的标识,安装目标SD指令包括解密密钥标识对应的解密密钥。
结合第一方面的第一种可能实现的方式至第一方面的第四种可能实现的方式中的任一可能实现的方式,在第一方面的第五种可能实现的方式中,第二消息和第四消息中还分别包括解密密钥的属性参数,该管理方法还包括:
终端根据所述属性参数更新关联信息,更新后的关联信息包括目标SD与解密密钥的对应关系。
结合第一方面,或者第一方面的第一种可能实现的方式至第五种可能实现的方式 中的任一可能实现的方式,在第一方面的第六种可能实现的方式中,离线管理指令中还包括应用信息;在终端获取应用数据包之后,该管理方法还包括:
终端根据应用信息TEE信息确定是否需要执行离线管理指令;其中,TEE信息为安装在终端的TEE模块中的应用对应的应用信息。
结合第一方面或者第一方面的第一种至第六种可能实现方式中的任一可能实现的方式,在第一方面的第七种可能实现的方式中,离线管理指令还包括密钥计算参数,终端使用解密密钥解密加密数据,包括:
终端使用解密密钥标识对应的解密密钥和密钥计算参数计算会话密钥,并使用会话密钥对加密数据进行解密。
结合第一方面,或者第一方面的第一种可能实现的方式至第七种可能实现的方式中的任一可能实现的方式,在第一方面的第八种可能实现的方式中,在终端获取应用数据包之前,该管理方法还包括:
终端向OWE发送第五消息,第五消息用于OWE向终端中的至少一个SD配置解密密钥;
终端接收OWE通过OTrP以在线管理方式发送的第六消息,第六消息包括至少一个解密密钥和解密密钥的属性参数;
所述终端保存至少一个解密密钥,并根据解密密钥的属性参数生成关联信息;关联信息包括以下方式中的一种或两种:至少一个解密密钥与至少一个SD存在一一对应关系,或者至少一个解密密钥中的每一个解密密钥与至少一个SD中的多个SD存在对应关系。
第二方面,提供了一种管理方法,应用于支持开放信任协议OTrP的可信执行环境TEE的管理,该管理方法可以包括:
外部实体OWE生成离线管理指令,离线管理指令包括目标安全域SD标识,解密密钥标识和加密数据;其中,解密密钥标识对应的解密密钥用于解密加密数据,加密数据由OWE使用加密密钥生成,解密密钥和加密密钥是由OWE生成的密钥对;离线管理指令用于终端获取到包含离线管理指令的应用数据包时,使用解密密钥标识对应的解密密钥解密加密数据,并根据解密后的加密数据进行离线管理操作。采用提供的管理方法实现了OTrP的TEE离线管理。
结合第二方面,在第二方面的第一种可能实现的方式中,该管理方法还包括:
OWE接收终端发送的第一消息,第一消息包括解密密钥标识,用于获取解密密钥标识对应的解密密钥;
OWE通过OTrP以在线管理方式与终端的TEE进行双向鉴权,鉴权通过后,OWE向终端发送第二消息,第二消息包括解密密钥,第二消息用于终端将解密密钥保存在TEE模块目标SD中,并更新关联信息,关联信息包括目标SD与解密密钥的对应关系。
结合第二方面或者第二方面的第一种可能实现的方式,在第二方面的第二种可能实现的方式中,该管理方法还包括:
OWE接收终端发送的第三消息,第三消息包括指示信息,第三消息用于请求安装目标SD标识对应的目标SD,指示信息用于指示在请求安装的目标SD中部署解密密 钥标识对应的解密密钥;
OWE通过OTrP以在线管理方式与终端的TEE进行双向鉴权,鉴权通过后,OWE向终端发送第四消息,第四消息包括安装目标SD指令,安装目标SD指令包括解密密钥;第四消息用于终端安装目标SD,将解密密钥保存安装的目标SD中TEE模块,并更新关联信息,关联信息包括目标SD与解密密钥的对应关系。
结合第二方面的第二种可能实现的方式,在第二方面的第三种可能实现的方式中,第一消息和第三消息分别包括离线管理指令中携带的解密密钥标识或者离线管理指令的标识,安装目标SD指令中包括解密密钥标识对应的解密密钥。
结合第二方面,或者第二方面的第一种可能实现的方式至第三种可能实现的方式中的任一可能实现的方式,在第二方面的第四种可能实现的方式中,该管理方法还包括:
OWE接收终端发送的第五消息,第五消息用于OWE向终端中的至少一个SD配置解密密钥;
OWE与终端进行双向鉴权,鉴权通过后,OWE向终端发送第六消息,第六消息包括至少一个解密密钥和解密密钥的属性参数;所述第六消息用于终端保存至少一个解密密钥,并根据解密密钥的属性参数生成关联信息;关联信息包括以下方式中的一种或两种:至少一个解密密钥与至少一个SD存在一一对应关系,或者至少一个解密密钥中的每一个解密密钥与至少一个SD中的多个SD存在对应关系。
结合第二方面或者第二方面的第一种至第四种可能实现方式中的任一可能实现的方式,在第二方面的第五种可能实现的方式中,外部实体OWE生成离线管理指令,包括:
OWE使用生成的加密密钥加密数据得到加密数据,并将加密数据和解密密钥标识打包生成所述离线管理指令;或者,
OWE使用生成的加密密钥和密钥计算参数生成会话密钥,使用会话密钥加密数据得到加密数据,并将密钥计算参数、所述加密数据和解密密钥标识添加到所述离线管理指令。
第三方面,提供了一种管理方法,应用于支持开放信任协议OTrP的可信执行环境TEE的管理,该管理方法可以包括:
TEE模块接收终端的富执行环境REE模块发送的离线管理指令,离线管理指令包括目标安全域SD标识,解密密钥标识和加密数据,解密密钥标识对应的解密密钥用于解密加密数据,加密数据由外部实体OWE使用加密密钥生成,解密密钥和加密密钥是由外部实体OWE生成的密钥对;
TEE模块确定目标SD标识对应的目标SD中是否包括解密密钥标识对应的解密密钥;
当目标SD中包括解密密钥时,TEE模块使用解密密钥解密加密数据,并根据解密后的加密数据进行离线管理操作。采用提供的管理方法实现了OTrP的TEE离线管理。
结合第三方面,在第三方面的第一种可能实现的方式中,该管理方法还包括:
当目标SD中不包括解密密钥时,TEE模块通过REE模块向OWE发送第一消息,第一消息包括解密密钥标识,用于获取解密密钥标识对应的解密密钥;
TEE模块通过REE模块接收OWE通过OTrP以在线管理方式发送的第二消息,第二消息包括解密密钥;
TEE模块将解密密钥保存到目标SD中;
TEE模块使用解密密钥解密所述加密数据,并根据解密后的所述加密数据进行离线管理操作。
结合第三方面,或者第三方面的第一种可能实现的方式,在第三方面的第二种可能实现的方式中,在TEE模块确定目标SD标识对应的目标SD中是否包括解密密钥标识对应的解密密钥之前,该管理方法还包括:
TEE模块根据目标SD标识确定TEE模块中是否包括目标SD标识对应的目标SD。
结合第三方面的第二种可能实现的方式,在第三方面的第三种可能实现的方式中,该管理方法还包括:
当TEE模块中不包括目标SD标识对应的目标SD时,TEE模块通过REE模块向OWE发送第三消息,第三消息包括指示信息,第三消息用于请求安装目标SD标识对应的目标SD,指示信息用于指示在请求安装的目标SD中部署解密密钥标识对应的解密密钥;
TEE模块接收OWE通过OTrP以在线管理方式发送的第四消息,第四消息包括安装目标SD指令,安装目标SD指令包括解密密钥;
TEE模块根据安装目标SD指令安装目标SD标识对应的目标SD,并将解密密钥保存到安装的目标SD中。
结合第三方面的第三种可能实现的方式,在第三方面的第四种可能实现的方式中,第一消息和第三消息分别包括离线管理指令中携带的解密密钥标识或者离线管理指令的标识,安装目标SD指令包括解密密钥标识对应的解密密钥。
结合第三方面的第一种可能实现的方式至第四种可能实现的方式中的任一可能实现的方式,在第三方面的第五种可能实现的方式中,第二消息和第四消息中还分别包括解密密钥的属性参数;该管理方法还包括:
TEE模块根据属性参数更新关联信息,更新后的关联信息包括目标SD与解密密钥的对应关系。
结合第三方面,或者第三方面的第一种可能实现的方式至第五种可能实现的方式中的任一种可能实现的方式,在第三方面的第六种可能实现的方式中,离线管理指令还包括应用信息;在TEE模块接收终端的富执行环境REE模块发送的离线管理指令之后,该管理方法还包括:
TEE模块根据应用信息和TEE信息确定是否需要执行离线管理指令;其中,TEE信息为安装在终端的TEE模块中的应用对应的应用信息。
结合第三方面或第三方面的第一种至第六种可能实现方式中的任一可能实现的方式,在第三方面的第七种可能实现的方式中,离线管理指令还包括密钥计算参数,TEE模块使用解密密钥解密加密数据,包括:
TEE模块使用解密密钥标识对应的解密密钥和密钥计算参数计算会话密钥,并使 用会话密钥对加密数据进行解密。
结合第三方面,或者第三方面的第一种可能实现的方式至第七种可能实现的方式中的任一可能实现的方式,在第三方面的第八种可能实现的方式中,在TEE模块接收终端的富执行环境REE模块发送的离线管理指令之前,该管理方法还包括:
TEE模块通过REE模块向OWE发送第五消息,第五消息用于OWE向终端中的至少一个SD配置解密密钥;
TEE模块通过REE模块接收OWE通过OTrP以在线管理方式发送的第六消息,第六消息包括至少一个解密密钥和解密密钥的属性参数;
TEE模块保存至少一个解密密钥,并根据解密密钥的属性参数生成管线信息;关联信息包括以下方式中的一种或两种:至少一个解密密钥与至少一个SD存在一一对应关系,或者至少一个解密密钥中的每一个解密密钥与至少一个SD中的多个SD存在对应关系。
第四方面,提供了一种终端,应用于支持开放信任协议OTrP的可信执行环境TEE的管理,该终端包括:
获取单元,用于获取应用数据包,应用数据包包括离线管理指令,离线管理指令包括目标安全域SD标识,解密密钥标识和加密数据,解密密钥标识对应的解密密钥用于解密加密数据,加密数据由外部实体OWE使用加密密钥生成,解密密钥和加密密钥是由外部实体OWE生成的密钥对;
处理单元,用于确定目标SD标识对应的目标SD中是否包括解密密钥标识对应的解密密钥;
当目标SD中包括解密密钥时,处理单元使用解密密钥解密加密数据,并根据解密后的加密数据进行离线管理操作。采用提供的管理方法实现了OTrP的TEE离线管理。
第五方面,提供了一种服务器,应用于支持开放信任协议OTrP的可信执行环境TEE的管理,该服务器包括:
处理单元,用于生成离线管理指令,离线管理指令包括目标安全域SD标识,解密密钥标识和加密数据;其中,解密密钥标识对应的解密密钥用于解密加密数据,加密数据由OWE使用加密密钥生成,解密密钥和加密密钥是由OWE生成的密钥对;离线管理指令用于终端获取到包含离线管理指令的应用数据包时,使用解密密钥标识对应的解密密钥解密加密数据,并根据解密后的加密数据进行离线管理操作。采用提供的管理方法实现了OTrP的TEE离线管理。
第六方面,提供了一种终端,应用于支持开放信任协议OTrP的可信执行环境TEE的管理,该终端包括TEE模块和富执行环境REE模块,该TEE模块包括:
接收单元,用于接收REE模块发送的离线管理指令,离线管理指令包括目标安全域SD标识,解密密钥标识和加密数据,解密密钥标识对应的解密密钥用于解密加密数据,加密数据由外部实体OWE使用加密密钥生成,解密密钥和加密密钥是由外部 实体OWE生成的密钥对;
处理单元,用于确定目标SD标识对应的目标SD中是否包括解密密钥标识对应的解密密钥;
处理单元,还用于当目标SD中包括解密密钥时,使用解密密钥解密加密数据,并根据解密后的加密数据进行离线管理操作。采用提供的管理方法实现了OTrP的TEE离线管理。
第七方面,提供了一种终端,该终端包括接收器、发送器、处理器和存储器,接收器、发送器、处理器和存储器相互连接,用于完成相互之间的通信,该终端可以完成第一方面或者第一方面的任一可能实现的方式,以及第三方面或者第三方面的任一可能实现的方式中提供的管理方法。
第八方面,提供了一种服务器,该服务器包括收发器、处理器和存储器,所述收发器、处理器和存储器相互连接,用于完成相互之间的通信,该服务器可以完成第二方面或者第二方面的任一可能实现的方式中提供的管理方法。
第九方面,提供了一种计算机可读存储介质,包括指令,当其在设备上运行时,使得该设备执行如第一方面至第三方面,或者第一方面至第三面中的任一可能实现的方式中的方法。
第十方面,提供了一种包含指令的计算机程序产品或计算机程序,当其在计算机上运行时,使得计算机执行如第一方面至第三方面,或者第一方面至第三面中的任一可能实现的方式中的方法。
第十一方面,提供了一种该通信装置可以例如是芯片,该通信装置可以设置于终端中,该通信装置包括处理器和接口。该处理器被配置为支持该通信装置执行上述第一方面至第三方面中的任一可能实现的方式中的方法。该接口用于支持该通信装置与其他通信装置或其他网元之间的通信。该通信装置还可以包括存储器,该存储器用于与处理器耦合,其保存该通信装置必要的程序指令和数据。
第十二方面,提供了一种系统,该系统包括第四方面或者第六方面所述的终端,以及第五方面所述的服务器;或者,该系统包括第七方面所述的终端和第八方面所述的服务器。
基于提供的一种管理方法、终端和服务器,通过OWE预先在终端的目标SD中配置解密密钥,当接收到离线管理指令后,通过解密密钥解密离线管理指令中的加密数据,并根据解密后的加密数据进行离线管理,实现了OTrP下的TEE的离线管理。
图1为本发明实施例提供的一种支持OTrP的TEE内部结构示意图;
图2为本发明实施例提供的一种TEE保存解密密钥和SD关联信息的示意图;
图3为本发明实施例提供的另一种TEE保存解密密钥和SD关联信息的示意图;
图4为本发明实施例提供的一种获取离线管理指令的两种方式示意图;
图5为本发发明实施例提供的一种OWE和TEE双向鉴权的流程示意图;
图6为本发明实施例提供的一种管理方法的流程示意图;
图7为本发明实施例提供的一种在线安装目标SD的流程示意图;
图8为本发明实施例提供的另一种在线获取解密密钥的流程示意图;
图9为本发明实施例提供的另一种管理方法的流程示意图;
图10(a)和图10(b)为本发明实施例提供的又一种管理方法的流程示意图;
图11为本发明实施例提供的一种终端的结构示意图;
图12为本发明实施例提供的一种服务器的结构示意图;
图13为本发明实施例提供的另一种终端的结构示意图;
图14为本发明实施例提供的又一种终端结构示意图;
图15为本发明实施例提供的另一种终端的结构示意图;
图16为本发明实施例提供的另一种服务器的结构示意图;
图17为本发明实施例提供的一种通信装置示意图。
首先对本发明实施例提到的几个概念进行说明:
为了保证TEE的安全性,TEE对OWE的各种管理指令,如创建SD、安装TA都需要进行鉴别(Authentication)和授权(Authorization)验证后,才会执行相应的管理操作。该过程一般是通过密码学机制来进行的。对于OTrP,是基于公钥基础设施(Public Key Infrastructure,PKI)的信任架构,提供开放式、高互操性的协议实现对TEE中的SD/TA的管理。
在OTrP中,如图1所示,终端的TEE中的每个根安全域rSD中保存有一个OWE白名单(Whitelist),该白名单中包括了至少一个TEE(原始设备制造商(Original Equipment Manufacture),OEM)/TEE厂商)信任的证书机构(Certificate Authority)的根证书,利用该根证书即可认证OWE证书(链)的真伪,进而确保只有合法持有证书机构颁发证书的OWE,才能对预置信任证书机构根证书的TEE发起远程管理。OTrP中鉴别与授权的验证就是TEE使用OWE白名单验证OWE签名和证书链的过程。
在OTrP中,OWE是具有TEE管理功能的实体,通常是指一个可信服务管理服务器(Trusted Service Manager,TSM)。在OTrP中,服务提供商SP通过委托一个OWE来实现其TA的管理。取决于OWE选择使用的管理模式,OWE在rSD下通过创建一个或多个SD来实现对SP的TA的管理,TEE记录OWE与由其创建的SD/TA的关联关系,并确保OWE只能对由其安装的SD/TA进行管理。
在基于OTrP对TEE的管理基础上,本发明实施例提供了一种管理方法、终端和服务器。在该离线管理方法中,OWE在构造离线管理指令时首先基于PKI或者其他方式的签名机制向TEE进行鉴权和授权的证明,再使用本发明实施例介绍的管理机制完成对离线管理指令的加密和解密。需要说明的是,在本发明实施例中,基于PKI或者其他方式的签名机制向TEE进行鉴权和授权的过程并不是重点,在本发明实施例中不作详细描述。
还需要说明的是,在本发明实施例中,OWE为TEE中的SD部署解密密钥的过程也可以称为OWE为TEE中的SD配置解密密钥的过程,在本发明实施例中,下文提 到的“部署”和“配置”表达相同的意思。
在使用该管理方法之前,TEE中的根安全域(root security domain,rSD)内还需要保存用于验证OWE证书(链)的根证书列表,用于在线和离线模式下对OWE进行鉴别与授权验证,以确保在线或离线场景下能够验证OWE的合法性。
同时,终端的TEE具备处理REE发送的离线管理指令的能力,并能够根据离线管理指令以及SD的属性(property),判断目标SD是否具备解析离线管理指令中加密数据的能力(下文统称为“SD是否具备离线管理功能”),并根据判断结果执行不同的处理逻辑。
当TEE判断SD不具备离线管理功能时,终端可以向OWE申请激活SD的离线管理功能,即向OWE发起激活SD解密离线管理指令的能力,然后OWE使用OTrP的在线管理流程(GetDeviceTEEState请求与响应)与TEE完成双向鉴权,具体描述请参见图5;双向鉴权完成后OWE通过创建SD指令或者更新(update)SD指令将解密密钥部署(depoly)在TEE包括的目标SD中,以此来激活目标SD的离线管理功能;当终端TEE接收到针对目标SD的离线管理指令,对OWE鉴权通过后,使用解密密钥解密离线管理指令中使用加密密钥加密得到的加密数据,然后根据解密后的加密数据进行离线管理操作。在本发明实施例中,离线管理操作包括但不限于安装可信应用(Trusted Application,TA)、更新TA、删除TA。
例如,离线管理指令为离线安装TA指令,那么离线管理指令可以包括TA安装信息,加密TA数据(TA binary)、签名和证书链等离线鉴权信息。其中,TA安装信息可以包括目标SD对应的目标SD标识、解密密钥标识。可选地,在本发明的一个实施例中TA安装信息还可以可以包括TA标识、版本号等基本信息。
在本发明实施例中,采用的加密数据的加密密钥以及部署在SD中的解密密钥为OWE根据自身的算法生成的密钥对(加密密钥Key_enc和解密密钥Key_dek)。在本发明的一个实施例中,加密密钥用于加密所要加密的数据,进而生成离线管理指令;解密密钥由OWE部署到TEE内的SD中。在本发明的另一个实施例中,OWE采用加密密钥和密钥计算参数生成会话密钥,采用会话密钥加密所要加密的数据,OWE在生成离线管理指令时,离线管理指令中需要包括密钥计算参数,以便于后续TEE接收到离线管理之后,采用解密密钥和密钥计算参数计算所述会话密钥,并对离线管理指令中的加密数据进行解密。这里举例说明了两种加密方式,在本发明实施例中,还可以采用更多种的加密方式实现本发明实施例的技术方案。
在本发明另一个实施例中,如果在离线管理指令的待加密数据中,包含了已经被加密过的数据,比如,在待加密的数据包括已经被加密过一次的TA数据(TAbinary),则需要根据其加密方式,在待加密数据中携带用于解密所述已加密的TA数据的解密密钥信息和相应的密钥计算参数。OWE随后使用上述两种加密方式或其他方式对待加密数据进行加密,生成离线管理指令中的加密数据,并将用于解密所述加密数据的解密密钥标识和可能存在的密钥计算参数附加在所述离线管理指令中。当终端解密所述加密数据时,首先利用离线管理指令中的解密密钥标识对应的解密密钥解密所述加密数据,然后从解密的数据中获取用于解密所述二次加密过的数据的相关密钥和密钥计算参数,并对二次加密的数据进行解密。
需要说明的是,在本发明实施例的技术方案中,采用加密密钥生成离线管理指令与OWE将解密密钥部署在TEE的SD中是两个互不干涉的过程。
OWE生成离线管理指令可以在终端从应用管理服务器获取离线管理之前生成,并将离线管理指令放置在应用管理服务器。OWE为SD部署解密密钥可能包括以下情况:1、OWE在TEE接收到离线管理指令之前在SD提前配置解密密钥,TEE接收到离线管理指令后,直接可以根据SD内包括的解密密钥对离线管理指令中的加密数据进行解密;2、TEE接收到离线管理指令后,在线从OWE获取解密密钥,进而解密离线管理指令中的加密数据。
在本发明实施例中,OWE可以根据OWE可能实现的管理方式将解密密钥部署在TEE的SD内,例如可以采用以下两种方式完成解密密钥的配置:方式一、OWE可以为与其关联的每个SD部署不同的解密密钥(Key_dek);方式二、OWE也可以为与一个OWE相关联的多个SD配置相同的解密密钥(Key_dek)。如果需要实现对TA数据的双重加密,则所述解密密钥还可以包括用于解密TA数据的解密密钥和用于解密离线管理指令加密数据的解密密钥。图2和图3示出了两种终端保存解密密钥和SD的关联关系的可能方式,其中,OWE1分别选择为SP1SD、SP2SD配置不同的解密密钥、OWE2选择为SP3SD、SP4SD配置相同的解密密钥(或SP3SD、SP4SD共享一把解密密钥)。
在本发明实施例中,在进行离线管理之前,还需要将OWE生成的离线管理指令(如离线安装或更新TA指令)放置在各个应用管理服务器中,实现服务提供商SP的TA的快速部署。以安装TA为例,OWE可以将离线安装TA指令通过以下两种方式进行部署,如图4所示。方式一、将离线安装TA指令与客户端应用(Client Application,CA)一起打包得到CA安装包,即应用数据包,将应用数据包放置在服务器中,例如,安卓(Android)安装包放置在安卓应用管理服务器上,如Google play等常规的手机应用市场或CA应用官网;REE从应用管理服务器中获取CA安装包,并安装CA后,能同时获取离线安装TA指令并利用离线安装TA指令进行TA的离线安装。方式二、将离线安装TA指令放置在TA应用管理服务器上;当REE的CA需要安装某TA时,从TA应用管理服务器获取相应TA的离线安装TA指令并利用离线安装TA指令进行TA的离线安装。在本发明实施例中,将放置在应用管理服务器上的CA安装包,以及放置在TA应用管理服务器上的离线管理指令的数据均称为应用数据包。
REE获取离线管理指令可以通过图4所示的两种方式来获取离线管理指令,无需与SP或TEE issuer的TSM交互并发起申请创建SD、安装TA的远程管理流程,减轻服务器侧负载;对于用户来说,当TA离线管理指令与CA的APK打包安装,无需在使用时临时去下载TA,减少等待时间,也不会出现因为通信传输中断/错误而重新下载的情况。
当REE获取到应用数据包时,将应用数据包中的离线管理指令发送到终端的TEE中,TEE确定是否执行该离线管理指令,当TEE确定需要执行该离线管理指令时,TEE确定目标SD是否具有离线管理功能,即TEE根据离线管理指令中的目标SD标识、解密密钥标识确定是否存在目标SD,以及目标SD中包括解密密钥标识对应的解密密钥。
当目标SD具有离线管理功能时,TEE对离线管理指令进行鉴权,确保离线管理指令由经授权的OWE生成的。验证通过后,使用解密密钥解密加密数据,并根据解密后的加密数据执行相应的管理操作。当目标SD不具有离线管理功能时,即TEE中不包括离线管理指令中目标SD标识对应的目标SD,或者TEE中包括目标SD标识对应的目标SD,但目标SD中不包括解密密钥标识对应的解密密钥时,终端通过OTrP以在线管理方式向OWE申请激活目标SD的离线管理功能,并在激活离线管理功能后对离线管理指令进行验证、解密,进而执行离线管理操作。
在本发明实施例中,OWE对TEE内的SD/TA,基于OTrP协议的在线远程管理流程由GetDeviceTEEState指令与响应开始。该GetDeviceTEEState指令与响应同时能够起到OWE与TEE进行双向鉴权的过程。如图5所示。该双向鉴权包括以下步骤:
S101,终端向OWE发送管理流程请求。
在终端的REE中安装的CA按照预设的判断逻辑,向OWE发起一个管理流程。
S102,OWE通过CA向TEE发送获取设备TEE状态的指令。
OWE接收到管理流程请求后,生成获取设备TEE状态待签指令(GetDeviceTEEStateTBSRequest),其中,TBS为待签名(To be signed)。GetDeviceTEEStateTBSRequest包括协议号、rid(指令种类标识)、业务流水号(transaction id)、在线证书状态协议(onlinecertificate status protocol,OCSP)数据、服务器要求的算法类型等参数。其中,transaction id起到随机数的作用;OCSP数据用于提供OWE证书状态证明。OWE使用OWE私钥对GetDeviceTEEStateTBSRequest中的数据进行签名,并将原数据、签名、服务器证书和证书链按照OTrP协议规定的数据格式进行封装得到GetDeviceTEEState指令。这里的服务器证书为OWE证书,证书链指OWE证书由中间CA签发,该中间CA证书由根CA和/或由根CA认证过的一个或多个中间CA签发。需要说明的是,OTrP协议中,OWE与TEE之间的交互数据基于JSON WebEncryption机制,使用内容加密密钥加密,内容加密密钥由通信对端的公钥进行加密,因为此时OWE还不知道TEE的身份,无法获取TEE公钥,所以包括GetDeviceTEEStateRequest的获取设备TEE状态的指令明文发送。
S103,REE中的CA向TEE中的rSD转发获取设备TEE状态的指令。
REE中的CA通过客户端应用程序接口(client API)向TEE中的rSD转发获取设备TEE状态的指令。
S104,TEE中的rSD验证签名、验证OWE证书。
在S102中,获取设备TEE状态的指令息可以采用(JavaScript Object Notation,JSON)格式。JSON是一种轻量级的数据交换格式,采用完全独立于编程语言的文本格式来存储和表示数据。在OTrP中,JSON格式的指令,根据指令不同,会在每个JSON类型,特别是负载(payload)中封装不同的内容。
一个JSON格式的OTrP指令包含下述结构:
其中,“payload”中封装了离线管理指令中被签名过的主要参数(被签名参数);
“protected”包含了进行签名的算法;
“header”包含了证书(证书链)信息;
“signature”包含离线管理指令的签名值。
Payload中,一般可以包括但不限于以下参数。:
现有技术的OTrP在线管理协议中使用JWE(JSON Web Encryption)的方式进行加密,然后内容加密密钥CEK与HMAC KEY(如果存在)使用对端公钥进行加密,通过数字信封的方式完成对需要加密的信息进行保护。其中,content中包含了加密的密文和用于描述加密算法的相应参数。例如当使用RSA加密算法时,该content-encryption-type的格式如下:
其中,ENCRYPTION-PRIMITIVE-TYPE描述JWE使用的加密算法、模式和使用的HMAC算法;"KEYWRAP-PRIMITIVE-TYPE"为使用对端公钥对CEK进行封装时使用的算法;"PRINTABLE-STRING-PRIMITIVE-TYPE"为被封装的CEK。 ENCRYPTED-CONTENT为经过CEK加密的数据。可以看到,在线模式的OTrP指令/响应中,内容加密密钥CEK随OTrP指令/响应传输。在本发明实施例中,CEK并不随离线管理指令进行封装传输,离线管理指令包括用于解密数据的解密密钥标识。
TEE中的rSD接收到获取设备TEE状态的指令后,首先验证JSON数据的签名,确保由OWE发送的数据没有被篡改。然后确定OWE的服务器证书是由OWE白名单中的一个根证书机构签发的(如果OWE证书由中间证书机构签发,那么需要OWE在获取设备TEE状态的指令中提供完整的证书链);利用OCSP数据确保证书链中的证书都处于有效状态,随后,rSD使用根证书机构的根证书对证书链进行验证,确保OWE证书是由根证书或能够最终被根证书验证的次级CA颁发的。
如果证书链和签名验证通过,那么rSD确定发送该获取设备TEE状态的指令的OWE是经过它信任的一个证书机构认证过的实体,该OWE具有一定的TEE管理能力,即OWE具有SD/TA管理权限(相应的对SD、TA的管理指令能够被授权执行)。此时完成了终端中TEE对OWE的鉴权。终端的TEE对OWE发送获取设备TEE状态的指令进行响应。
S105,TEE查询保存的映射关系信息,获取与OWE关联的所有SD信息和TA信息。
TEE中记录有OWE在TEE内创建的SD、TA的的映射关系信息。根据服务器证书中OWE标识查询与OWE关联的所有SD信息和TA信息。其中OWE标识具有唯一性。
S106,TEE生成加密密钥,并生成获取设备TEE状态响应(GetDeviceTEEStateResponse)消息。
TEE随机生成内容加密密钥CEK,用于对包括OWE关联的所有SD信息、与OWE关联的所有TA信息、TEE证书、TEE-SP-AIK公钥(列表)等数据的设备状态信息(DeviceStateInformation)进行加密,并采用OWE证书中包含的OWE公钥对内容加密密钥进行加密,然后采用TEE私钥对这些信息进行签名,生成并封装JSON格式的获取设备TEE状态响应(GetDeviceTEEStateResponse)消息。这里的TEE-SP-AIK是当OWE为服务提供商SP生成SD时,如果该生成的SD为该SP的第一个SD时,TEE生成该公钥对,公钥用于发送给OWE用于对应SP的OWE进行TA代码、TA个人化数据进行加密,即在安装TA(installTA)中,对TA代码经过了两次加密。该两次加密以如下述格式的管理指令中内容为例进行说明:
OTrP安装TA指令中的加密部分包括以下内容:
其中,“encrypted_ta_bin”和/或“encrypted_ta_data”中填充的内容包含用于封装CEK1(对TA代码和/或TA个人化数据进行加密)的算法、被TEE-SP-AIK封装的内容加密密钥CEK1以及被CEK1加密过的TA代码和/或TA个人化数据,这两个参数中的内容在安装TA指令未被加密前已经处于加密状态。随后,OWE使用JWE加密机制,使用CEK2对上述安装TA指令中的所有参数进行加密,并在指令中附带用于封装CEK2的算法,被TEE公钥封装的CEK2和被CEK2加密过的安装TA指令。
S107,TEE向REE发送获取设备TEE状态响应(GetDeviceTEEStateResponse)消息。
S108,REE向OWE转发获取设备TEE状态响应(GetDeviceTEEStateResponse)消息。
S109,OWE对获取设备TEE状态响应(GetDeviceTEEStateResponse)消息进行验证
OWE在接收到GetDeviceTEEStateResponse消息后,首先使用OWE私钥解密被封装的内容加密密钥,再采用内容加密密钥对DSI数据进行解密,获取TEE证书并采用TEE证书中的TEE公钥验证TEE私钥签名的数据,确定签名是由TEE生成的,验证签名后使用对TEE进行认证的根CA证书验证TEE证书是由该证书机构颁发的,以确保TEE证书和签名的合法性。TEE证书和签名验证通过后,OWE即可确定TEE的合法性,此时,TEE和OWE之间完成了双向鉴权认证。
OWE和终端的TEE完成双向鉴权后,即可根据获得的终端TEE的设备状态信息发起对TEE内SD/TA的管理,比如创建/更新/删除SD,安装/更新/删除TA。在后续指令交互流程中(类似的JSON结构),对于payload中需要加密的内容,使用JWE进行加密,并利用获得的对端证书中的公钥对内容加密密钥、HMAC密钥进行数字加密(或称为数字信封),确保加密内容只能由持有私钥的对端才能够解密。
对于OTrP指令的授权验证,通过对OWE的签名及证书链即可实现,TEE只要确认一个经验证过(authenticated)的OWE的证书最终能够被根CA证书验证,那么就能够确认该OWE具备对TEE内与该OWE有关联的SD/TA的管理权限。
如果要实现对TEE的离线管理,即OWE不与TEE进行实时双向交互的情况下完成管理,图5介绍的双向鉴权机制以及后续指令交互中对使用对端公钥对JWE密钥进行数字信封处理实现对指令内容加密的方式不再适用。
在本发明实施例中,OWE会预先生成密钥对:加密密钥和解密密钥。其中,加密密钥用于OWE对离线管理指令payload中需要加密的数据进行加密,离线管理指令可以包括使用加密密钥加密的加密数据,解密密钥标识,目标SD标识,OWE证书,以及采用OWE私钥对payload中部分待签数据签名等信息。离线管理指令可通过图4所示的两种方式放置在应用管理服务器中。
解密密钥用于解密离线管理指令中的加密数据。OWE将解密密钥部署在SD中,以使SD具有离线管理能力。在本发明实施例中,对于现有的OTrP标准,SD开始可能不具备离线管理功能。在OWE根据可能实现的管理方式为SD部署解密密钥时, OWE可以在创建SD时,通过向SD部署解密密钥,并指示解密密钥可以为该OWE管理的一个或多个SD提供离线管理功能;也可以是后续OWE通过更新SD的方式激活SD的离线管理功能。
在本发明的一个实施例中,OWE可以(在未获取离线指令前,根据预设的逻辑主动进行SD离线管理功能的激活。)接收终端发送的第五消息(或称为获取解密密钥的请求消息),以请求OWE配置解密密钥;OWE接收到第五消息后使用OTrP GetDeviceState交互流程与终端进行双向鉴权,并获取终端TEE内与该OWE关联的设备信息,如SD/TA信息,OWE向终端发送第六消息(或称为创建SD指令或更新SD指令),第六消息包括至少一个解密密钥和密钥属性参数,所述密钥属性参数至少包括密钥的访问权限,如指示解密密钥是否可以共享,在可共享的情况下可以由哪些SD共享等,以使TEE根据该密钥属性参数生成密钥与SD的关联关系;并对存储的解密密钥的访问权限进行设置;该关联信息包括以下方式中的一种或多种:至少一个解密密钥与至少一个SD存在一一对应关系,或者至少一个解密密钥中的每一个解密密钥与至少一个SD中相关的多个SD存在对应关系;或者至少一个解密密钥与一个SD存在对应关系,终端的TEE将至少一个解密密钥分别保存在与之对应的目标SD存储区域中,并保存关联信息。
需要说明的是,只要目标SD与TEE内由同一OWE部署到其他SD的解密密钥存在关联关系,即目标SD能够访问其他SD的解密密钥,那么目标SD具备离线管理功能,能够执行针对目标SD且解密密钥标识匹配的离线管理指令。
即,在这种场景下,当终端接收到来自OWE1的离线管理指令(包含解密密钥标识A)后,终端判断目标SD标识对应的目标SD中是否包括所述解密密钥标识对应的解密密钥,包含了以下两种情况:1.目标SD内保存了解密密钥标识A对应的解密密钥,或者2.OWE1已经为TEE内的某个其他SD配置了解密密钥标识A对应的解密密钥,并且目标SD已与该解密密钥关联,具备该解密密钥的访问权限,则目标SD能够解密该离线管理指令。
OWE为终端的TEE中的SD配置了解密密钥,且将离线管理指令放置在应用管理服务器中后该技术方案可以执行图6所示的管理方法,该管理方法可以包括以下步骤:
S210,终端获取应用数据包。
终端的REE从图4中的CA APK服务器或者应用管理服务器中获取应用数据包,应用数据包中包括离线管理指令,离线管理指令中可以包括目标SD标识,解密密钥标识和加密数据。解密密钥标识用于指示对应的解密密钥,终端TEE使用该解密密钥对加密数据解密;加密数据是OWE使用加密密钥生成的;在本发明实施例中,加密密钥和解密密钥可以是对称密钥也可以是非对称密钥。当加密密钥和解密密钥为为对称密钥时,终端保存私钥,OWE可以通过对一批设备配置相同私钥的方式实现本发明介绍的离线加密方法。
在本发明实施例中,应用数据包是OWE生成并放置在CA APK服务器或者应用管理服务器中,该过程请参见图4的描述。另外还需说明的是,在本发明实施例中,OWE采用加密密钥加密所要加密的数据,并生成离线管理指令和OWE将解密密钥部署到终端的SD中是两个不相干的过程。
在本发明的一个实施例中,终端的TEE使用解密密钥标识对应的解密密钥直接解密加密数据。在本发明的另一个实施例中,终端的TEE使用离线管理指令中包括的密钥计算参数和解密密钥标识对应的解密密钥计算得到会话密钥,使用会话密钥解密加密数据。该会话密钥也可以称为内容加密密钥。
S220,终端确定目标SD标识对应的目标SD中是否包括解密密钥标识对应的解密密钥。
在本发明实施例中,终端可以根据TEE保存的关联信息确定目标SD与解密密钥是否存在关联关系,或判断目标SD是否具备对解密密钥的访问权限。关联信息可以包括目标SD标识和解密密钥标识的对应关系或者目标SD与解密密钥的对应关系,例如表1所示。在本发明实施例中当终端确定目标SD与解密密钥存在关联关系时,认为目标SD标识对应的目标SD的存储区域中包括解密密钥标识对应的解密密钥,或者目标SD具备对同一OWE部署到其管理的其他SD中的解密密钥的访问权限。
表1
其中,OWE1为SD1、SD5分别部署了不同的解密密钥Key1、Key3;OWE2向SD2、SD3、SD4中的一个SD部署了解密密钥Key2,并通过密钥属性参数将Key2与该3个SD关联,由该3个SD共享Key2。更进一步,若OWE决定针对SD1的离线管理指令使用不同的加密密钥进行二次加密,则需要在SD1内部署相应的两把解密密钥。
关联信息是根据OWE在终端的TEE中部署解密密钥时TEE记录的。表1仅仅是为了说明目标SD与解密密钥的对应关系,并不限定关联信息中包括的是解密密钥和目标SD的对应关系,还是解密密钥的标识与目标SD标识的对应关系。另外表1也仅仅是关联关系的一种表达方式,在本发明实施例中不限定关联信息的具体形式。
在本发明实施例中,表1所示,相同的OWE1可以选择不同的SD部署不同的解密密钥;相同的OWE2也可以选择不同的SD部署共用的解密密钥。
OWE可以在终端出厂时,或者创建SD时为SD配置解密密钥,OWE配置解密密钥的方式可以通过图2和图3所示的方式进行配置。OWE可以为每个SD配置不同的解密密钥,或者为一个OWE相关联的多个SD配置相同的解密密钥。
当目标SD标识对应的目标SD包括解密密钥标识对对应的解密密钥时,执行S230,否则执行S240。
S230,终端使用解密密钥解密加密数据,并根据解密后的加密数据进行离线管理操作。
对加密数据进行解密操作的过程,根据选择的加密协议/方式的不同,可以是根据解密密钥直接对加密数据进行解密,可以是离线管理指令中的密钥计算参数和解密密 钥,导出内容加密密钥对加密数据进行解密。
在本发明实施例中,离线管理操作可以包括但不限于安装TA、更新TA。加密数据可以为包括加密的TA安装包或者TA更新包等已加密的其他数据(可以参考S106中介绍的安装TA指令中的加密内容和二次加密结构)。
对于存在二次加密的情况,被二次加密的数据同样包括相应的第二解密密钥标识和/或密钥计算参数。终端TEE首先根据离线指令中的第一解密密钥标识对加密数据进行解密,解密后根据被二次加密数据中的第二解密密钥标识,获取第二解密密钥对二次加密的数据进行解密。
在本发明的一个实施例中,终端使用解密密钥直接解密加密数据,然后根据解密后的加密数据进行离线管理操作。
在本发明的另一个实施例中,终端使用解密密钥和指令中的密钥计算参数导出用于加密数据的内容加密密钥/数据加密密钥,然后使用内容加密密钥对加密数据进行解密,再根据解密后的数据进行离线管理操作。
S240,终端通过OTrP以在线管理方式从OWE获取解密密钥标识对应的解密密钥。
当目标SD不具备解密密钥,无法对加密数据进行解密时,终端与OWE建立通信连接,以OTrP在线管理的方式向OWE获取解密密钥。终端与OWE进行双向鉴权,双向鉴权完成后,终端接收OWE通过OTrP以在线管理方式(例如update SD或其他指令向SD发送个人化数据)发送的解密密钥。之后终端根据解密密钥解密离线管理指令中的加密数据,根据解密后的加密数据进行离线管理操作,即执行S230。
在本发明的一个实施例中,如图7所示,终端通过OTrP以在线管理方式从OWE获取解密密钥的过程可以包括:
S241,终端向OWE发送第一消息。
第一消息包括解密密钥标识,用于获取解密密钥标识对应的解密密钥。在本发明实施例中,第一消息可以称为获取解密密钥请求或者其他名称,在本发明实施例中,对此不作限制。
S242,OWE与终端进行双向鉴权。
在本发明实施例中S240的过程与图5的过程相同,为简洁描述,在此不再赘述。
S243,终端接收OWE通过OTrP以在线管理方式发送的第二消息。
第二消息中包括解密密钥。第二消息可以为更新SD指令,通过更新SD的方式向目标SD中配置解密密钥。
所述解密密钥可以由SP首次创建SD时生成的TEE-SP-AIK或直接使用TEE公钥进行加密。
S244,终端将解密密钥保存到目标SD的安全存储区中,并更新关联信息。
终端将解密密钥保存到TEE中目标SD中,并更新TEE中保存的关联信息。更新关联信息例如:
假设目标SD为SD7,而需要获取的解密密钥标识对应的解密密钥为Key4,则终端在线获取解密密钥Key4,并更新关联信息,更新后的关联信息为表2。
表2
可选地,所述第二消息中包括解密密钥的密钥属性参数,以使TEE根据所述属性参数更新关联信息与密钥的访问权限。在表2的示例中,OWE设置Key4为不可共享的解密密钥,TEE保存Key4并建立Key4与SD7的关联关系。
可选地,如图6所示,在本发明实施例中,离线管理指令中还可以包括加密数据的应用信息;在终端获取应用数据包之后,该方法还可以包括:
S250,终端根据应用信息和TEE信息确定TEE模块是否需要执行所述离线管理指令。
其中,TEE信息为安装在终端的TEE模块中的应用对应的应用信息。在本发明实施例中,应用信息可以为应用的版本信息,应用的名称等信息。
例如,如果离线管理指令用于安装TA,那么应用信息可以为TA的应用标识或者应用名称;如果离线管理指令用于更新TA,那么应用信息可以为TA的名称和版本信息。
当离线管理指令为安装TA时,当终端的TEE中不包括应用信息对应的应用时,终端执行S260。当终端TEE中已安装了应用信息对应的应用,则不执行所述离线管理指令。
当离线管理指令为更新TA时,检查目标TA是否存在,若目标TA存在且TEE内已安装TA版本低于离线管理指令中TA的版本。若低于,则执行S230.
S260,终端根据目标SD标识确定终端的TEE中包括目标SD标识对应的目标SD。
当TEE中包括目标SD标识对应的目标SD时,终端执行230。当TEE中不包括目标SD标识对应的目标SD时,执行S270。
S270,终端通过OTrP以在线管理方式安装目标SD并从OWE获取解密密钥。
终端与OWE建立通信连接,并进行双向鉴权,双向鉴权完成后,终端接收OWE通过OTrP在线管理发送的安装目标SD指令,并从OWE获取解密密钥,安装目标SD并获取到解密密钥后,执行S230。
在本发明实施例中,如图8所示,终端通过OTrP以在线管理方式安装目标SD并从OWE获取解密密钥,包括:
S271,终端向OWE发送第三消息
第三消息可以包括目标SD标识和指示信息,第三消息用于请求安装目标SD标识对应的目标SD,指示信息用于指示向OWE获取解密密钥。在本发明实施例中第三消息可以称为获取目标SD的请求消息。可选地,本发明的一个实施例中,指示信息可以为解密密钥的标识。
S272,OWE与终端进行双向鉴权。
在本发明实施例中S2720的过程与图5的过程相同,为简洁描述,在此不再赘述。
S273,终端接收OWE通过OTrP以在线管理方式发送的第四消息。
第四消息包括安装目标SD指令,安装目标SD指令中包括解密密钥标识对应的解密密钥。
S274,终端安装目标SD,将解密密钥保存在安装的目标SD中,并更新关联信息。
采用本发明实施例的管理方法可以实现离线情况下TEE的管理。
在本发明实施例中,终端根据应用信息确定终端是否安装对应的应用,终端根据目标SD标识确定终端是否包括目标SD,以及终端确定目标SD标识对应的目标SD中是否包括解密密钥标识对应的解密密钥可以通过两种方式实现,具体请参见图9、图10(a)和图10(b)所示。
图9为本发明实施例提供的一种管理方法的流程示意图。如图9所示,该方法可以包括以下步骤:
S301,终端中的REE获取应用数据包。
应用数据包中包括离线管理指令,离线管理指令包括目标SD标识、解密密钥标识、加密数据(例如TA安装包或者TA更新包)、加密数据对应的应用信息、签名和OWE证书等信息。其中,应用信息可以为应用的版本信息,或应用标识或应用名称等。
S302,终端的REE将应用数据包中的离线管理指令发送给终端的TEE。
REE中的客户端应用将离线管理指令发送到TEE,由TEE判断是否需要执行所述离线管理指令。
S303,终端的TEE根据应用信息和TEE信息确定是否需要执行所述离线管理指令。
其中,TEE信息为安装在终端的TEE模块中的应用对应的应用信息。例如,离线管理指令对应的离线管理操作可以为安装应用名称为1234的TA,TEE确定是否已经安装了应用名称为1234的TA,若已经安装,则取消该离线管理指令的相关操作;若还未安装,则执行S304。
S304,终端的TEE确定终端中是否包括目标SD标识对应的目标SD。
当终端中包括目标SD时,TEE执行S305。当终端中不包括目标SD时,终端执行S307至S311。
S305,终端的TEE确定目标SD中是否包括解密密钥标识对应的解密密钥。
当目标SD中包括解密密钥标识对应的解密密钥时,终端执行S306。否则,执行S312至S316。
S306,终端使用解密密钥解密离线管理指令中的加密数据,根据解密后的加密数据进行离线管理操作。
TEE使用OWE白名单中的CA证书对该离线管理指令中的OWE证书进行验证,并获取OWE证书中的OWE公钥,采用OWE公钥对使用OWE私钥的签名进行验证,验证通过后证明该离线管理指令由可信的OWE生成的,执行所述离线管理指令。
如果离线管理指令是安装TA,则解密TA代码和TA数据进行TA的安装操作; 如果离线管理指令是更新TA,则解密TA代码和TA数据进行TA的更新操作。在本发明实施例中,S307至S316中,REE与OWE之间进行通信建立在OTrP的在线管理模式下,需要终端与OWE建立通信连接,进行双向鉴权后,OWE才向REE发送REE所请求的信息。双向鉴权的过程与图5所示的双向鉴权的过程相同,为简洁描述,在此不再赘述。
S307,TEE向REE发送安装目标SD的请求消息,该请求消息中包括目标SD标识和解密密钥标识。
S308,REE向OWE转发安装目标SD的请求消息。
S309,OWE向REE发送安装目标SD指令,该安装目标SD指令中包括解密密钥标识对应的解密密钥。
OWE接收到REE发送的安装目标SD的请求消息后,与TEE进行双向鉴权,鉴权的过程如图5的双向鉴权过程相同,为简洁描述,在此不再赘述。双向鉴权通过后,OWE向REE发送安装目标SD指令。
S310,REE向TEE转发安装目标SD指令。
S311,TEE安装目标SD,将解密密钥保存在安装的目标SD中,并更新关联信息,之后执行S306。
S312,TEE向REE发送获取解密密钥请求消息,该获取解密密钥请求消息中包括解密密钥标识。
S313,REE向OWE转发获取解密密钥请求消息。
S314,OWE向REE发送获取解密密钥请求消息的响应消息,响应消息包括解密密钥。
OWE接收到REE发送的获取解密密钥请求消息后,与TEE进行双向鉴权,鉴权的过程如图5的双向鉴权过程相同,为简洁描述,在此不再赘述。双向鉴权通过后,OWE向REE发送获取解密密钥请求消息的响应消息。
S315,REE向TEE转发响应消息。
S316,TEE将解密密钥保存到目标SD中,并更新关联信息,之后执行S306。
采用本发明实施例的管理方法可以实现离线情况下TEE的管理。
图10(a)和图10(b)为本发明实施例提供的另一种管理方法的流程示意图。如图10(a)和图10(b)所示,该方法可以包括以下步骤:
S401,终端中的REE获取应用数据包。
应用数据包中包括离线管理指令,离线管理指令包括目标SD标识、解密密钥标识、加密数据(TA安装包或者TA更新包)、加密数据对应的应用信息、签名和OWE证书等信息。其中,应用信息可以为应用的版本信息,或应用标识或应用名称等。
例如,离线管理指令对应的离线管理操作为更新TA,应用信息为版本为3.0的TA。REE需要确定TEE是否已经安装了版本高于3.0的TA。若是,终止执行更新TA的操作。
S402,REE向终端的TEE发送获取应用信息的请求消息,以判断是否满足离线管理指令的执行条件。
在本发明的一个实施例中,获取应用信息的请求消息中包括加密数据对应的应用 信息。
S403,TEE向REE发送获取应用信息的响应消息。
在本发明的一个实施例中,响应消息中包括TEE信息,即TEE已安装的所有的TA的信息。
在本发明的另一个实施例中,响应消息为TEE是否包括应用信息对应的应用。
REE获取到相应消息后,将响应消息中的TEE信息与离线管理指令中包含的应用信息进行对比,来判断是否满足执行离线管理指令的条件。
S404,REE根据响应消息和应用信息确定是否需要执行离线管理指令。
在本发明的一个实施例中,离线管理指令中包括应用信息,应用信息可以包括所要安装或更新的TA的TA标识和版本信息。
REE从TEE中获取的响应消息中包括TEE安装的所有的TA对应的应用信息,同样包括TEE所安装的TA的TA标识和版本信息。然后REE根据响应消息和离线管理指令中的应用信息确定是否需要执行离线管理指令。
若响应消息中不存在应用信息对应的TA的信息或响应消息为TEE不包括应用信息对应的应用,则执行S405。
例如,在本发明的一个实施例中,离线管理指令为离线安装TA指令,REE根据离线安装TA指令中的应用信息的TA标识,以及REE从TEE接收到的响应消息中TEE安装的TA的TA标识确定是否需要执行该离线安装TA指令,若TEE中未安装离线安装TA指令中TA标识对应的TA,则需要执行该离线安装TA指令。
在本发明的另一实施例中,例如离线管理指令为离线更新TA指令,REE根据离线安装TA指令中的应用信息的TA版本信息,以及REE从TEE接收到的响应消息中TEE安装的TA的版本信息确定是否需要执行该离线更新TA指令,若TEE中已安装版本信息低于离线更新TA指令对应的TA版本信息,则需要执行该离线更新TA指令更新该TA。
S405,REE向TEE发送获取SD信息的请求消息。
在本发明的一个实施例中,获取SD信息的请求消息中包括目标SD标识。
S406,TEE向REE发送获取SD信息的响应消息。
在本发明的一个实施例中,获取SD信息的响应消息包括TEE已经包括的所有SD的信息。在本发明的另一实施例中,获取SD信息的响应消息为TEE包括目标SD标识对应的目标SD或者不包括目标SD标识对应的目标SD的信息。
S407,REE根据获取SD信息的响应消息确定TEE是否包括目标SD标识对应的目标SD。
当TEE中不包括目标SD标识对应的目标SD时,通过OTrP在线管理方式安装目标SD标识对应的目标SD,具体执行S S411至S414;当TEE中包括目标SD标识对应的目标SD时,执行图10(b)中的S408。
S408,REE确定目标SD中是否包括解密密钥标识对应的解密密钥。
在本发明的一个实施例中,在S406中,获取SD信息的响应消息中可以包括TEE已包括的SD,以及每个SD中包括的解密密钥标识。
在本发明的另一实施例中,REE可以向TEE发送获取目标SD中解密密钥的请求, 请求中包括目标SD标识,并从TEE中获取目标SD的解密密钥标识,然后确定目标SD中是否包括离线管理指令中解密密钥标识对应的解密密钥。
在本发明的另一个实施例中,获取目标SD信息请求中可以包括离线管理指令中的解密密钥标识,TEE向REE响应目标SD中是否包括解密密钥标识对应的解密密钥的信息。
当目标SD中包括离线管理指令中的解密密钥标识对应的解密密钥时,执行S409,否则执行图10(b)中的S415至S418。
S409,REE向TEE发送离线管理指令。
S410,TEE使用解密密钥解密加密数据,并根据解密后的加密数据进行离线管理操作。
TEE使用OWE白名单中的CA证书对该离线管理指令中的OWE证书进行验证,并获取OWE证书中的OWE公钥,采用OWE公钥对使用OWE私钥的签名进行验证,验证通过后证明该离线管理指令由可信的OWE生成的,确定该离线管理指令为有效指令。然后使用解密密钥解密加密数据,并根据解密后的加密数据进行离线管理操作。
在本发明实施例中,S411至S418中,REE与OWE之间进行通信建立在OTrP的在线管理模式下,需要终端与OWE建立通信连接,进行双向鉴权后,OWE才向REE发送REE所请求的信息。双向鉴权的过程与图5所示的双向鉴权的过程相同,为简洁描述,在此不再赘述。
S411,REE向OWE发送安装目标SD的请求消息,该请求消息中包括目标SD标识和解密密钥标识。
S412,OWE向REE发送安装目标SD指令,该安装目标SD指令中包括解密密钥标识对应的解密密钥。
OWE接收到REE发送的安装目标SD的请求消息后,与TEE进行双向鉴权,鉴权的过程如图5的双向鉴权过程相同,为简洁描述,在此不再赘述。双向鉴权通过后,OWE向REE发送安装目标SD指令。
S413,REE向TEE转发安装目标SD指令。
S414,TEE安装目标SD,将解密密钥保存在安装的目标SD中,并更新关联信息,之后执行S409。
S415,REE向OWE发送获取解密密钥请求消息,该获取解密密钥请求消息中包括解密密钥标识。
S416,OWE向REE发送获取解密密钥请求消息的响应消息,响应消息中包括解密密钥。
OWE接收到REE发送的获取解密密钥请求消息后,与TEE进行双向鉴权,鉴权的过程如图5的双向鉴权过程相同,为简洁描述,在此不再赘述。双向鉴权通过后,OWE向REE发送获取解密密钥请求消息的响应消息。
S417,REE向TEE转发响应消息。
S418,TEE将解密密钥保存在目标SD中,并更新关联信息,之后执行S409。
采用本发明实施例的管理方法可以实现离线情况下TEE的管理。OWE生成离线管理指令,终端在获取到离线管理指令后,如果判断终端目标SD不具备执行离线管 理指令的功能,则通过在线的方式向OWE申请以安装SD或更新SD的方式获取解密密钥,并利用解密密钥对离线管理指令中的加密数据进行解密。
可选地,在本发明的另一实施例中,离线管理指令对应的解密密钥可以为一次性的,即在执行图6至图10(a)和图10(b)的管理方法时,均需要通过OTrP在线管理的方式从OWE获取解密密钥。OWE可以通过指示TEE不保存密钥及关联关系的方式实现,或是在不同的离线管理指令中使用不同的解密密钥的方式实现,本发明不做限定。
可选地,在本发明的另一实施例中,离线管理指令中还可以包括密钥计算参数。当目标SD中存储的是解密密钥标识对应的主解密密钥,TEE可以使用主解密密钥和密钥计算参数获得实际用来加密数据的内容加密密钥,然后采用该内容加密密钥解密加密的数据,然后根据解密后的加密数据进行离线管理操作。
图11为本发明实施例提供的一种终端结构示意图,该终端应用于支持开放信任协议OTrP的可信执行环境TEE的管理,该终端可以包括获取单元601、处理单元602。
获取单元601,用于获取应用数据包,应用数据包包括离线管理指令,离线管理指令包括目标安全域SD标识,解密密钥标识和加密数据,解密密钥标识对应的解密密钥用于解密加密数据,加密数据由外部实体OWE使用加密密钥生成,解密密钥和加密密钥是由外部实体OWE生成的密钥对。
处理单元602,用于确定目标SD标识对应的目标SD中是否包括解密密钥标识对应的解密密钥。
当目标SD中包括解密密钥时,处理单元602使用解密密钥解密加密数据,并根据解密后的加密数据进行离线管理操作。采用提供的管理方法实现了OTrP的TEE离线管理。
在本发明的一个实施例中,该终端还包括发送单元603、接收单元604和存储单元605。
发送单元603,用于当目标SD中不包括解密密钥时,向OWE发送第一消息,第一消息包括解密密钥标识,用于获取解密密钥标识对应的解密密钥。
接收单元604,用于接收OWE通过OTrP以在线管理方式发送的第二消息,第二消息包括解密密钥。
存储单元605,用于将解密密钥保存在目标SD中;处理单元602使用解密密钥解密加密数据,并根据解密后的加密数据进行离线管理操作。
可选地,在本发明的一个实施例中,处理单元602,还用于根据目标SD标识确定终端中是否包括目标SD标识对应的目标SD。
可选地,在本发明的一个实施例中,发送单元603,用于当终端中不包括目标SD标识对应的目标SD时,向OWE发送第三消息,第三消息包括指示信息,第三消息用于请求安装目标SD标识对应的目标SD,指示信息用于指示在请求安装的目标SD中不部署解密密钥标识对应的解密密钥。
接收单元604,用于接收OWE通过OTrP以在线管理方式发送的第四消息,第四消息包括安装目标SD指令,安装目标SD指令包括解密密钥。
处理单元602,还用于根据安装目标SD指令安装目标SD标识对应的目标SD,存储单元605将解密密钥保存在安装的目标SD中。
可选地,在本发明的一个实施例中,指示信息包括离线管理指令中携带的解密密钥标识,安装目标SD指令包括解密密钥标识对应的解密密钥。
可选地,在本发明的一个实施例中,第二消息和第四消息中还分别包括解密密钥的属性参数;处理单元602,还用于更新关联信息,更新后的关联信息包括目标SD与解密密钥的对应关系。
可选地,在本发明的一个实施例中,离线管理指令中还包括应用信息;处理单元602,还用于根据应用信息和TEE信息确定是否需要执行离线管理指令;其中,TEE信息为安装在终端的TEE模块中的应用对应的应用信息。
可选地,在本发明的一个实施例中,离线管理指令还包括密钥计算参数,处理单元602使用解密密钥解密所述加密数据,包括:
处理单元602使用解密密钥标识对应的解密密钥和密钥计算参数计算会话密钥,并使用会话密钥对加密数据进行解密。
可选地,在本发明的一个实施例中,发送单元603,用于向OWE发送第五消息,第五消息用于OWE向终端中的至少一个SD配置解密密钥。
接收单元604,用于接收OWE通过OTrP以在线管理方式发送的第六消息,第六消息包括至少一个解密密钥和解密密钥的属性参数,并根据解密密钥的属性参数生成关联信息;关联信息包括以下方式中的一种或两种:至少一个解密密钥与至少一个SD存在一一对应关系,或者至少一个解密密钥中的每一个解密密钥与至少一个SD中的多个SD存在对应关系。
存储单元605,用于保存至少一个解密密钥和关联信息。
该终端中的各功能单元的功能,可以通过图5至图10(a)和图10(b)图中所示实施例中的终端所执行的各步骤来实现,因此,本发明实施例提供的终端的具体工作过程,在此不复赘述。
图12为本发明实施例提供的一种服务器的结构示意图,该服务器应用于支持开放信任协议OTrP的可信执行环境TEE的管理,该服务器可以包括:
处理单元,用于生成离线管理指令,离线管理指令包括目标安全域SD标识,解密密钥标识和加密数据;其中,解密密钥标识对应的解密密钥用于解密所述加密数据,加密数据由OWE使用加密密钥生成,解密密钥和加密密钥是由OWE生成的密钥对;离线管理指令用于终端获取到包含离线管理指令的应用数据包时,使用解密密钥标识对应的解密密钥解密加密数据,并根据解密后的加密数据进行离线管理操作。
在本发明的一个实施例中,该服务器还包括接收单元702和发送器703;
接收单元702,用于接收终端发送的第一消息,第一消息包括解密密钥标识,用于获取解密密钥标识对应的解密密钥。
处理单元701,还用于通过OTrP以在线管理方式与终端的TEE进行双向鉴权,鉴权通过后,发送单元703向终端发送第二消息,第二消息包括解密密钥,第二消息用于终端将解密密钥保存在目标SD中,并更新关联信息,关联信息包括目标SD与解密密钥的对应关系。
可选地,在本发明的一个实施例中,接收单元702,用于接收终端发送的第三消息,第三消息包括指示信息,第三消息用于请求安装目标SD标识对应的目标SD,指示信息用于指示在请求安装的目标SD中部署解密密钥标识对应的解密密钥。
处理单元701,用于通过OTrP以在线管理方式与终端的TEE进行双向鉴权,鉴权通过后,发送单元703向终端发送第四消息,第四消息包括安装目标SD指令,安装目标SD指令包括解密密钥;第四消息用于终端安装目标SD,将解密密钥保存安装的目标SD中,并更新关联信息,关联信息包括目标SD与解密密钥的对应关系。
可选地,在本发明的一个实施例中,指示信息包括解密密钥标识,安装目标SD指令中包括解密密钥标识对应的解密密钥。
可选地,在本发明的一个实施例中,接收单元702,用于接收终端发送的第五消息,第五消息用于OWE向终端中的至少一个SD配置解密密钥。
服务器与终端进行双向鉴权,鉴权通过后,发送单元703向终端发送第六消息,第六消息包括至少一个解密密钥和解密密钥的属性参数;所述第六消息用于终端保存至少一个解密密钥,并根据解密密钥的属性参数生成关联信息;关联信息包括以下方式中的一种或两种:至少一个解密密钥与至少一个SD存在一一对应关系,或者至少一个解密密钥中的每一个解密密钥与至少一个SD中的多个SD存在对应关系。
该服务器中的各功能单元的功能,可以通过图5至图10(a)和图10(b)图中所示实施例中的OWE所执行的各步骤来实现,因此,本发明实施例提供的OWE的具体工作过程,在此不复赘述。
图13提供了另一种终端的结构示意图,该终端应用于支持开放信任协议OTrP的可信执行环境TEE的管理,该终端包括TEE模块和富执行环境REE模块,该TEE模块包括接收单元801和处理单元802。
接收单元801,用于接收REE模块发送的离线管理指令,离线管理指令包括目标安全域SD标识,解密密钥标识和加密数据,解密密钥标识对应的解密密钥用于解密加密数据,加密数据由外部实体OWE使用加密密钥生成,解密密钥和加密密钥是由外部实体OWE生成的密钥对。
处理单元802,用于确定目标SD标识对应的目标SD中是否包括解密密钥标识对应的解密密钥。
处理单元802,还用于当目标SD中包括解密密钥时,使用解密密钥解密加密数据,并根据解密后的加密数据进行离线管理操作。采用提供的管理方法实现了OTrP的TEE离线管理。
在本发明的一个实施例中,TEE模块还包括发送单元803和存储单元804。
发送单元803,用于当目标SD中不包括解密密钥时,通过REE模块向OWE发送第一消息,第一消息包括解密密钥标识,用于获取解密密钥标识对应的解密密钥。
处理单元802,还用于通过REE模块接收OWE通过OTrP以在线管理方式发送的第二消息,第二消息包括解密密钥。
存储单元804,用于将解密密钥保存到目标SD中;处理单元802使用解密密钥解密加密数据,并根据解密后的加密数据进行离线管理操作。
可选地,在本发明的一个实施例中,处理单元802,还用于根据目标SD标识确定TEE模块中是否包括目标SD标识对应的目标SD。
可选地,在本发明的一个实施例中,发送单元803,用于当TEE模块中不包括目标SD标识对应的目标SD时,TEE模块通过REE模块向OWE发送第三消息,第三消息包括指示信息,第三消息用于请求安装目标SD标识对应的目标SD,指示信息用于指示在请求安装的目标SD中部署解密密钥标识对应的解密密钥。
接收单元801,用于接收OWE通过OTrP以在线管理方式发送的第四消息,第四消息包括安装目标SD指令,安装目标SD指令包括解密密钥。
处理单元802,还用于根据安装目标SD指令安装目标SD标识对应的目标SD,并将解密密钥保存到安装的目标SD中。
可选地,在本发明的一个实施例中,指示信息包括解密密钥标识,安装目标SD指令包括解密密钥标识对应的解密密钥。
可选地,在本发明的一个实施例中,第一消息和第四消息中还分别包括解密密钥的属性参数;处理单元802,还用于更新关联信息,更新后的关联信息包括目标SD与解密密钥的对应关系。
可选地,在本发明的一个实施例中,离线管理指令还包括应用信息;处理单元802,还用于根据应用信息和TEE信息确定是否需要执行离线管理指令;其中,TEE信息为安装在终端的TEE模块中的应用对应的应用信息。
可选地,在本发明的一个实施例中,离线管理指令还包括密钥计算参数,处理单元802使用所述解密密钥解密所述加密数据,包括:
处理单元802使用解密密钥标识对应的解密密钥和密钥计算参数计算会话密钥,并使用会话密钥对加密数据进行解密。
可选地,在本发明的一个实施例中,处理单元802,还用于通过REE模块向OWE发送第五消息,第五消息用于OWE向终端中的至少一个SD配置解密密钥。
发送单元803,用于通过REE模块接收OWE通过OTrP以在线管理方式发送的第六消息,第六消息包括至少一个解密密钥和解密密钥的属性参数。
处理单元802根据解密密钥的属性参数生成关联信息;关联信息包括以下方式中的一种或两种:至少一个解密密钥与至少一个SD存在一一对应关系,或者至少一个解密密钥中的每一个解密密钥与至少一个SD中的多个SD存在对应关系。
存储单元804,用于保存至少一个解密密钥和关联信息。
本发明实施例还提供了一种终端,如图14所示,该终端包括接收器、发送器、处理器和存储器,接收器、发送器、处理器和存储器相互连接,用于完成相互之间的通信,该终端具有执行图5至图10(a)和图10(b)中终端所执行的方法。
其中,该终端的处理器用于执行以下操作:
获取应用数据包,应用数据包包括离线管理指令,离线管理指令包括目标安全域SD标识,解密密钥标识和加密数据,解密密钥标识对应的解密密钥用于解密加密数据,加密数据由外部实体OWE使用加密密钥生成,解密密钥和加密密钥是由外部实体OWE生成的密钥对;
确定目标SD标识对应的目标SD中是否包括解密密钥标识对应的解密密钥;
当目标SD中包括解密密钥时,使用解密密钥解密所述加密数据,并根据解密后的加密数据进行离线管理操作。
该终端中的各功能单元的功能,可以通过图5至图10(a)和图10(b)图中所示实施例中的终端所执行的各步骤来实现,因此,本发明实施例提供的终端的具体工作过程,在此不复赘述。
本发明还提供了另一种终端,如图15所示,该终端包括TEE模块和富执行环境REE模块,TEE模块包括接收器和处理器;
接收器,用于接收终端的富执行环境REE模块发送的离线管理指令,离线管理指令包括目标安全域SD标识,解密密钥标识和加密数据,解密密钥标识对应的解密密钥用于解密加密数据,加密数据由外部实体OWE使用加密密钥生成,解密密钥和加密密钥是由外部实体OWE生成的密钥对;
处理器,用于确定目标SD标识对应的目标SD中是否包括解密密钥标识对应的解密密钥;
当目标SD中包括解密密钥时,处理器使用解密密钥解密加密数据,并根据解密后的加密数据进行离线管理操作。
如图14和图15提供的终端可以为手机。处理器是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器内的软件程序和/或模块,以及调用存储在存储器内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。处理器可以是中央处理器(central processing unit,CPU)、通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现场可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件,硬件部件或者其任意组合。处理器可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等。可选的,处理器可包括一个或多个处理器单元。可选的,处理器还可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器中。
存储器可用于存储软件程序以及模块,处理器通过运行存储在存储器的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图象播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器可以包括易失性存储器,例如非挥发性动态随机存取内存(Nonvolatile Random Access Memory,NVRAM)、相变化随机存取内存(Phase Change RAM,PRAM)、磁阻式随机存取内存(Magetoresistive RAM,MRAM)等;存储器620还可以包括非易失性存储器,例如至少一个磁盘存储器件、电子可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、闪存器件,例如反或闪存(NOR flash memory)或是反与闪存(NAND flash memory)、半导体器件,例如固态硬盘(Solid State Disk,SSD)等。所 述存储器还可以包括上述种类的存储器的组合。
本发明实施例还提供了一种服务器,如图16所示,该服务器包括收发器、处理器和存储器,所述收发器、处理器和存储器相互连接,用于完成相互之间的通信,该服务器具有执行图5至图10(a)和图10(b)中OWE所执行的方法。
其中,处理器用于:生成离线管理指令,所述离线管理指令包括目标安全域SD标识,解密密钥标识和加密数据;其中,所述解密密钥标识对应的解密密钥用于解密所述加密数据,所述加密数据由所述OWE使用加密密钥生成,所述解密密钥和所述加密密钥是由OWE生成的密钥对;所述离线管理指令用于终端获取到包含所述离线管理指令的应用数据包时,使用所述解密密钥标识对应的解密密钥解密所述加密数据,并根据所述解密后的所述加密数据进行离线管理操作。
该服务器中的各功能单元的功能,可以通过图5至图10(a)和图10(b)图中所示实施例中的服务器所执行的各步骤来实现,因此,本发明实施例提供的终端的具体工作过程,在此不复赘述。
图17为本发明实施例提供的一种通信装置示意图,如图17所示,所述通信装置1700可以是芯片,所述芯片包括处理单元和通信单元。所述处理单元可以是处理器1710,所述处理器可以是前文所述的各种类型的处理器。所述通信单元例如可以是输入/输出接口1720、管脚或电路等,所述通信单元可以包括系统总线或者与系统总线连接。可选地,所述通信装置还包括存储单元,所述存储单元可以是所述芯片内部的存储器1730,例如寄存器、缓存、随机存取存储器(random access memory,RAM)、EEPROM或者FLASH等;所述存储单元还可以是位于所述芯片外部的存储器,该存储器可以是前文所述的各种类型的存储器。处理器连接到存储器,该处理器可以运行存储器存储的指令,以使该通信装置执行上述图5至图10(a)和图10(b)中终端所执行的方法。
本发明实施例还提供了一种计算机可读存储介质,包括指令,当其在设备上运行时,使得该设备执行如图5至图10(a)和图10(b)中所执行的方法。
本发明实施例还提供了一种包含指令的计算机程序产品或者计算机程序,当其在计算机上运行时,使得计算机执行如图5至图10(a)和图10(b)中所执行的方法。
本发明实施例还提供了一种系统,该系统可以包括图11或图13中描述的终端,以及图12中描述的服务器;或者,该可以包括包括图14或图15中描述的终端,以及图16中描述的服务器。
在上述各个本发明实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读介质向另一个计算机可读介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无 线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如,固态硬盘)等。
以上所述,仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求的保护范围为准。
Claims (45)
- 一种管理方法,其特征在于,应用于支持开放信任协议OTrP的可信执行环境TEE的管理,所述管理方法包括:终端获取应用数据包,所述应用数据包包括离线管理指令,所述离线管理指令包括目标安全域SD标识,解密密钥标识和加密数据,所述解密密钥标识对应的解密密钥用于解密所述加密数据,所述加密数据由外部实体OWE使用加密密钥生成,所述解密密钥和所述加密密钥是由外部实体OWE生成的密钥对;所述终端确定所述目标SD标识对应的目标SD中是否包括所述解密密钥标识对应的解密密钥;当所述目标SD中包括所述解密密钥时,所述终端使用所述解密密钥解密所述加密数据,并根据解密后的所述加密数据进行离线管理操作。
- 根据权利要求1所述的管理方法,其特征在于,所述管理方法还包括:当所述目标SD中不包括所述解密密钥时,所述终端向所述OWE发送第一消息,所述第一消息用于获取所述解密密钥标识对应的解密密钥;所述终端接收所述OWE通过所述OTrP以在线管理方式发送的第二消息,所述第二消息包括所述解密密钥;所述终端使用所述解密密钥解密所述加密数据,并根据解密后的所述加密数据进行离线管理操作。
- 根据权利要求1或2所述的管理方法,其特征在于,在所述终端确定所述目标SD标识对应的目标SD中是否包括所述解密密钥标识对应的解密密钥之前,所述管理方法还包括:所述终端根据所述目标SD标识确定所述终端中是否包括所述目标SD标识对应的目标SD。
- 根据权利要求3所述的管理方法,其特征在于,所述管理方法还包括:当所述终端中不包括所述目标SD标识对应的目标SD时,所述终端向所述OWE发送第三消息,所述第三消息包括指示信息,所述第三消息用于请求安装所述目标SD标识对应的目标SD,所述指示信息用于指示在请求安装的目标SD中部署所述解密密钥标识对应的解密密钥;所述终端接收所述OWE通过所述OTrP以在线管理方式发送的第四消息,所述第四消息包括安装目标SD指令,所述安装目标SD指令包括所述解密密钥;所述终端根据所述安装目标SD指令安装所述目标SD标识对应的目标SD,将所述解密密钥保存在安装的目标SD中。
- 根据权利要求4所述的管理方法,其特征在于,所述第一消息和所述第三消息中分别包括所述离线管理指令中携带的解密密钥标识或者所述离线管理指令的标识,所述安装目标SD指令包括所述解密密钥标识对应的解密密钥。
- 根据权利要求2至5任一项所述的管理方法,其特征在于,所述第二消息和所述第四消息中还分别包括解密密钥的属性参数;所述管理方法还包括:所述终端根据所述属性参数更新关联信息,更新后的关联信息包括所述目标SD与所述解密密钥的对应关系。
- 根据权利要求1至6任一项所述的管理方法,其特征在于,所述离线管理指令中包括应用信息;在所述终端获取应用数据包之后,所述管理方法还包括:所述终端根据所述应用信息和TEE信息确定是否需要执行所述离线管理指令;其中,所述TEE信息为安装在所述终端的TEE模块中的应用对应的应用信息。
- 根据权利要求1至7所述的管理方法,其特征在于,所述离线管理指令还包括密钥计算参数,所述终端使用解密密钥解密所述加密数据,包括:所述终端使用所述解密密钥标识对应的解密密钥和所述密钥计算参数计算会话密钥,并使用所述会话密钥对所述加密数据进行解密。
- 根据权利要求1至8所述的管理方法,其特征在于,在所述终端获取应用数据包之前,所述管理方法还包括:所述终端向所述OWE发送第五消息,所述第五消息用于所述OWE向所述终端中的至少一个SD配置解密密钥;所述终端接收所述OWE通过所述OTrP以在线管理方式发送的第六消息,所述第六消息包括至少一个解密密钥和解密密钥的属性参数;所述终端保存所述至少一个解密密钥,并根据解密密钥的属性参数生成关联信息;所述关联信息包括以下方式中的一种或两种:所述至少一个解密密钥与所述至少一个SD存在一一对应关系,或者所述至少一个解密密钥中的每一个解密密钥与所述至少一个SD中的多个SD存在对应关系。
- 一种管理方法,其特征在于,应用于支持开放信任协议OTrP的可信执行环境TEE的管理,所述管理方法包括:外部实体OWE生成离线管理指令,所述离线管理指令包括目标安全域SD标识,解密密钥标识和加密数据;其中,所述解密密钥标识对应的解密密钥用于解密所述加密数据,所述加密数据由所述OWE使用加密密钥生成,所述解密密钥和所述加密密钥是由OWE生成的密钥对;所述离线管理指令用于终端获取到包含所述离线管理指令的应用数据包时,使用所述解密密钥标识对应的解密密钥解密所述加密数据,并根据所述解密后的所述加密数据进行离线管理操作。
- 根据权利要求10所述的管理方法,其特征在于,所述管理方法还包括:所述OWE接收所述终端发送的第一消息,所述第一消息用于所述终端获取所述解密密钥标识对应的解密密钥;所述OWE通过所述OTrP以在线管理方式与所述终端的TEE进行双向鉴权,并在对TEE鉴权通过后,所述OWE向所述终端发送第二消息,所述第二消息包括所述解密密钥,所述第二消息用于所述终端将所述解密密钥保存在目标SD中,并更新关联信息,所述关联信息包括所述目标SD与所述解密密钥的对应关系。
- 根据权利要求10或11所述的管理方法,其特征在于,所述管理方法还包括:所述OWE接收所述终端发送的第三消息,所述第三消息包括指示信息,所述第三消息用于请求安装目标SD标识对应的目标SD,所述指示信息用于指示在请求安装的目标SD中部署所述解密密钥标识对应的解密密钥;所述OWE通过所述OTrP以在线管理方式与所述终端的TEE进行双向鉴权,并在对TEE鉴权通过后,所述OWE向所述终端发送第四消息,所述第四消息包括安装目标SD指令,所述安装目标SD指令包括所述解密密钥;所述第四消息用于所述终端安装所述目标SD,将所述解密密钥保存安装的目标SD中,并更新关联信息,所述关联信息包括所述目标SD与所述解密密钥的对应关系。
- 根据权利要求12所述的管理方法,其特征在于,所述所述第一消息或者第三消息分别包括所述离线管理指令中携带的所述解密密钥标识或所述离线管理指令的标识,所述安装目标SD指令中包括所述解密密钥标识对应的解密密钥。
- 根据权利要求10至13所述的管理方法,其特征在于,所述管理方法还包括:所述OWE接收所述终端发送的第五消息,所述第五消息用于所述OWE向所述终 端中的至少一个SD配置解密密钥;所述OWE与所述终端进行双向鉴权,鉴权通过后,所述OWE向所述终端发送第六消息,所述第六消息包括至少一个解密密钥和解密密钥的属性参数;所述第六消息用于所述终端保存所述至少一个解密密钥,并根据所述解密密钥的属性参数生成关联信息;所述关联信息包括以下方式中的一种或两种:所述至少一个解密密钥与所述至少一个SD存在一一对应关系,或者所述至少一个解密密钥中的每一个解密密钥与所述至少一个SD中的多个SD存在对应关系。
- 根据要求10至14任一项所述的管理方法,其特征在于,所述外部实体OWE生成离线管理指令,包括:所述OWE使用生成的加密密钥加密数据得到加密数据,并将所述加密数据和解密密钥标识打包生成所述离线管理指令;或者,所述OWE使用生成的加密密钥和密钥计算参数生成会话密钥,使用所述会话密钥加密数据得到加密数据,并将所述密钥计算参数、所述加密数据和解密密钥标识添加到所述离线管理指令。
- 一种管理方法,其特征在于,应用于支持开放信任协议OTrP的可信执行环境TEE的管理,所述管理方法包括:TEE模块接收终端的富执行环境REE模块发送的离线管理指令,所述离线管理指令包括目标安全域SD标识,解密密钥标识和加密数据,所述解密密钥标识对应的解密密钥用于解密所述加密数据,所述加密数据由外部实体OWE使用加密密钥生成,所述解密密钥和所述加密密钥是由外部实体OWE生成的密钥对;所述TEE模块确定所述目标SD标识对应的目标SD中是否包括所述解密密钥标识对应的解密密钥;当所述目标SD中包括所述解密密钥时,所述TEE模块使用所述解密密钥解密所述加密数据,并根据所述解密后的所述加密数据进行离线管理操作。
- 根据权利要求16所述的管理方法,其特征在于,所述管理方法还包括:当所述目标SD中不包括所述解密密钥时,所述TEE模块通过所述REE模块向所述OWE发送第一消息,所述第一消息用于获取所述解密密钥标识对应的解密密钥;所述TEE模块通过所述REE模块接收所述OWE通过所述OTrP以在线管理方式发送的第二消息,所述第二消息包括所述解密密钥;所述TEE模块使用所述解密密钥解密所述加密数据,并根据解密后的所述加密数据进行离线管理操作。
- 根据权利要求16或17所述的管理方法,其特征在于,在所述TEE模块确定所述目标SD标识对应的目标SD中是否包括所述解密密钥标识对应的解密密钥之前,所述管理方法还包括:所述TEE模块根据所述目标SD标识确定所述TEE模块中是否包括所述目标SD标识对应的目标SD。
- 根据权利要求18所述的管理方法,其特征在于,所述管理方法还包括:当所述TEE模块中不包括所述目标SD标识对应的目标SD时,所述TEE模块通过所述REE模块向所述OWE发送第三消息,所述第三消息包括指示信息,所述第三消息用于请求安装所述目标SD标识对应的目标SD,所述指示信息用于指示在请求安装的目标SD中部署所述解密密钥标识对应的解密密钥;所述TEE模块接收所述OWE通过所述OTrP以在线管理方式发送的第四消息,所述第四消息包括安装目标SD指令,所述安装目标SD指令包括所述解密密钥;所述TEE模块根据所述安装目标SD指令安装所述目标SD标识对应的目标SD,并将所述解密密钥保存到安装的目标SD中。
- 根据权利要求19所述的管理方法,其特征在于,所述第一消息和所述第三消息分别包括所述离线管理指令中携带的所述解密密钥标识或者所述离线管理指令的标识,所述安装目标SD指令包括所述解密密钥标识对应的解密密钥。
- 根据权利要求17至20任一项所述的管理方法,其特征在于,所述第二消息和所述第四消息中还分别包括解密密钥的属性参数;所述管理方法还包括:所述TEE模块根据所述属性参数更新关联信息,更新后的关联信息包括所述目标SD与所述解密密钥的对应关系。
- 根据权利要求16至21任一项所述的管理方法,其特征在于,所述离线管理指令还包括应用信息;在所述TEE模块接收终端的富执行环境REE模块发送的离线管理指令之后,所述管理方法还包括:所述TEE模块根据所述应用信息和TEE信息确定是否需要执行所述离线管理指令;其中,所述TEE信息为安装在所述终端的TEE模块中的应用对应的应用信息。
- 根据权利要求16至22所述的管理方法,其特征在于,所述离线管理指令还包括密钥计算参数,所述TEE模块使用所述解密密钥解密所述加密数据,包括:所述TEE模块使用所述解密密钥标识对应的解密密钥和所述密钥计算参数计算会话密钥,并使用所述会话密钥对所述加密数据进行解密。
- 根据权利要求16至23所述的管理方法,其特征在于,在所述TEE模块接收终端的富执行环境REE模块发送的离线管理指令之前,所述管理方法还包括:所述TEE模块通过REE模块向所述OWE发送第五消息,所述第五消息用于所述OWE向所述终端中的至少一个SD配置解密密钥;所述TEE模块通过所述REE模块接收所述OWE通过OTrP以在线管理方式发送的第六消息,所述第六消息包括至少一个解密密钥和解密密钥的属性参数;所述TEE模块保存所述至少一个解密密钥,并根据所述解密密钥的属性参数生成关联信息;所述关联信息包括以下方式中的一种或两种:所述至少一个解密密钥与所述至少一个SD存在一一对应关系,或者所述关联关系包括所述至少一个解密密钥中的每一个解密密钥与所述至少一个SD中的多个SD存在对应关系。
- 一种终端,其特征在于,应用于支持开放信任协议OTrP的可信执行环境TEE的管理,所述终端包括:获取单元,用于获取应用数据包,所述应用数据包包括离线管理指令,所述离线管理指令包括目标安全域SD标识,解密密钥标识和加密数据,所述解密密钥标识对应的解密密钥用于解密所述加密数据,所述加密数据由外部实体OWE使用加密密钥生成,所述解密密钥和所述加密密钥是由外部实体OWE生成的密钥对;处理单元,用于确定所述目标SD标识对应的目标SD中是否包括所述解密密钥标识对应的解密密钥;当所述目标SD中包括所述解密密钥时,所述处理单元使用所述解密密钥解密所述加密数据,并根据解密后的所述加密数据进行离线管理操作。
- 根据权利要求25所述的终端,其特征在于,所述终端还包括发送单元、接收单元和存储单元;所述发送单元,用于当所述目标SD中不包括所述解密密钥时,向所述OWE发送第一消息,所述第一消息用于获取所述解密密钥标识对应的解密密钥;所述接收单元,用于接收所述OWE通过所述OTrP以在线管理方式发送的第二消 息,所述第二消息包括所述解密密钥;所述处理单元使用所述解密密钥解密所述加密数据,并根据解密后的所述加密数据进行离线管理操作。
- 根据权利要求25或26所述的终端,其特征在于,所述处理单元,还用于根据所述目标SD标识确定所述终端中是否包括所述目标SD标识对应的目标SD。
- 根据权利要求27所述的终端,其特征在于,发送单元,用于当所述终端中不包括所述目标SD标识对应的目标SD时,向所述OWE发送第三消息,所述第三消息包括指示信息,所述第三消息用于请求安装所述目标SD标识对应的目标SD,所述指示信息用于指示在请求安装的目标SD中部署所述解密密钥标识对应的解密密钥;接收单元,用于接收所述OWE通过所述OTrP以在线管理方式发送的第四消息,所述第四消息包括安装目标SD指令,所述安装目标SD指令包括所述解密密钥;所述处理单元,还用于根据所述安装目标SD指令安装所述目标SD标识对应的目标SD,存储单元将所述解密密钥保存在安装的目标SD中。
- 根据权利要求28所述的终端,其特征在于,所述第一消息或者第三消息分别包括所述离线管理指令中携带的解密密钥标识或者所述离线管理指令的标识,所述安装目标SD指令包括所述解密密钥标识对应的解密密钥。
- 根据权利要求26至29任一项所述的终端,其特征在于,所述第二消息和所述第四消息中还分别包括解密密钥的属性参数;所述处理单元,还用于根据所述属性参数更新关联信息,更新后的关联信息包括所述目标SD与所述解密密钥的对应关系。
- 根据权利要求25至30任一项所述的终端,其特征在于,所述离线管理指令中还包括应用信息;所述处理单元,还用于根据所述应用信息和TEE信息确定是否需要执行所述离线管理指令;其中,所述TEE信息为安装在所述终端的TEE模块中的应用对应的应用信息。
- 根据权利要求25至31所述的管终端,其特征在于,所述离线管理指令还包括密钥计算参数,所述处理单元使用解密密钥解密所述加密数据,包括:所述处理单元使用所述解密密钥标识对应的解密密钥和所述密钥计算参数计算会话密钥,并使用所述会话密钥对所述加密数据进行解密。
- 根据权利要求25至32所述的终端,其特征在于,所述终端的发送单元,用于向所述OWE发送第五消息,所述第五消息用于所述OWE向所述终端中的至少一个SD配置解密密钥;所述接收单元,用于接收所述OWE通过所述OTrP以在线管理方式发送的第六消息,所述第六消息包括至少一个解密密钥和解密密钥的属性参数,并根据解密密钥的属性参数生成关联信息;所述关联信息包括以下方式中的一种或两种:所述至少一个解密密钥与所述至少一个SD存在一一对应关系,或者所述至少一个解密密钥中的每一个解密密钥与所述至少一个SD中的多个SD存在对应关系;存储单元,用于保存所述至少一个解密密钥和所述关联信息。
- 一种服务器,其特征在于,应用于支持开放信任协议OTrP的可信执行环境TEE的管理,所述服务器包括:处理单元,用于生成离线管理指令,所述离线管理指令包括目标安全域SD标识, 解密密钥标识和加密数据;其中,所述解密密钥标识对应的解密密钥用于解密所述加密数据,所述加密数据由所述OWE使用加密密钥生成,所述解密密钥和所述加密密钥是由OWE生成的密钥对;所述离线管理指令用于终端获取到包含所述离线管理指令的应用数据包时,使用所述解密密钥标识对应的解密密钥解密所述加密数据,并根据所述解密后的所述加密数据进行离线管理操作。
- 根据权利要求34所述的服务器,其特征在于,所述服务器还包括接收单元和发送单元;所述接收单元,用于接收所述终端发送的第一消息,所述第一消息用于获取所述解密密钥标识对应的解密密钥;所述处理单元,还用于通过所述OTrP以在线管理方式与所述终端的TEE进行双向鉴权,鉴权通过后,所述发送单元向所述终端发送第二消息,所述第二消息包括所述解密密钥,所述第二消息用于所述终端将所述解密密钥保存在目标SD中,并更新关联信息,所述关联信息包括所述目标SD与所述解密密钥的对应关系。
- 根据权利要求34或35所述的服务器,其特征在于,接收单元,用于接收所述终端发送的第三消息,所述第三消息包括指示信息,所述第三消息用于请求安装目标SD标识对应的目标SD,所述指示信息用于指示在请求安装的目标SD中部署所述解密密钥标识对应的解密密钥;所述处理单元,用于通过所述OTrP以在线管理方式与所述终端的TEE进行双向鉴权,鉴权通过后,发送单元向所述终端发送第四消息,所述第四消息包括安装目标SD指令,所述安装目标SD指令包括所述解密密钥;所述第四消息用于所述终端安装所述目标SD,将所述解密密钥保存安装的目标SD中,并更新关联信息,所述关联信息包括所述目标SD与所述解密密钥的对应关系。
- 根据权利要求36所述的服务器,其特征在于,所述第一消息或者第三消息分别包括所述离线管理指令中携带的所述解密密钥标识或者所述离线管理指令的标识,所述安装目标SD指令中包括所述解密密钥标识对应的解密密钥。
- 根据权利要求34至37所述的服务器,其特征在于,接收单元,用于接收所述终端发送的第五消息,所述第五消息用于所述OWE向所述终端中的至少一个SD配置解密密钥;所述服务器与所述终端进行双向鉴权,鉴权通过后,发送单元向所述终端发送第六消息,所述第六消息包括至少一个解密密钥和解密密钥的属性参数;所述第六消息用于所述终端保存所述至少一个解密密钥,并根据所述解密密钥的属性参数生成关联信息;所述关联信息包括以下方式中的一种或两种:所述至少一个解密密钥与所述至少一个SD存在一一对应关系,或者所述至少一个解密密钥中的每一个解密密钥与所述至少一个SD中的多个SD存在对应关系。
- 根据要求34至38任一项所述的服务器,其特征在于,所述处理单元用于生成离线管理指令,包括:所述处理单元使用生成的加密密钥加密数据得到加密数据,并将所述加密数据和解密密钥标识打包生成所述离线管理指令;或者,所述处理单元使用生成的加密密钥和密钥计算参数生成会话密钥,使用所述会话密钥加密数据得到加密数据,并将所述密钥计算参数、所述加密数据和解密密钥标识打包生成所述离线管理指令。
- 一种终端,其特征在于,应用于支持开放信任协议OTrP的可信执行环境TEE的管理,所述终端包括TEE模块和富执行环境REE模块,所述TEE模块包括:接收单元,用于接收所述REE模块发送的离线管理指令,所述离线管理指令包括目标安全域SD标识,解密密钥标识和加密数据,所述解密密钥标识对应的解密密钥用于解密所述加密数据,所述加密数据由外部实体OWE使用加密密钥生成,所述解密密钥和所述加密密钥是由外部实体OWE生成的密钥对;处理单元,用于确定所述目标SD标识对应的目标SD中是否包括所述解密密钥标识对应的解密密钥;所述处理单元,还用于当所述目标SD中包括所述解密密钥时,使用所述解密密钥解密所述加密数据,并根据所述解密后的所述加密数据进行离线管理操作。
- 一种终端,其特征在于,应用于支持开放信任协议OTrP的可信执行环境TEE的管理,所述终端包括处理器,所述处理器用于:获取应用数据包,所述应用数据包包括离线管理指令,所述离线管理指令包括目标安全域SD标识,解密密钥标识和加密数据,所述解密密钥标识对应的解密密钥用于解密所述加密数据,所述加密数据由外部实体OWE使用加密密钥生成,所述解密密钥和所述加密密钥是由外部实体OWE生成的密钥对;确定所述目标SD标识对应的目标SD中是否包括所述解密密钥标识对应的解密密钥;当所述目标SD中包括所述解密密钥时,使用所述解密密钥解密所述加密数据,并根据解密后的所述加密数据进行离线管理操作。
- 一种服务器,其特征在于,应用于支持开放信任协议OTrP的可信执行环境TEE的管理,所述服务器处理器,所述处理器用于:生成离线管理指令,所述离线管理指令包括目标安全域SD标识,解密密钥标识和加密数据;其中,所述解密密钥标识对应的解密密钥用于解密所述加密数据,所述加密数据由所述OWE使用加密密钥生成,所述解密密钥和所述加密密钥是由OWE生成的密钥对;所述离线管理指令用于终端获取到包含所述离线管理指令的应用数据包时,使用所述解密密钥标识对应的解密密钥解密所述加密数据,并根据所述解密后的所述加密数据进行离线管理操作。
- 一种终端,其特征在于,应用于支持开放信任协议OTrP的可信执行环境TEE的管理,所述终端包括TEE模块和富执行环境REE模块,所述TEE模块包括接收器和处理器;所述接收器,用于接收终端的富执行环境REE模块发送的离线管理指令,所述离线管理指令包括目标安全域SD标识,解密密钥标识和加密数据,所述解密密钥标识对应的解密密钥用于解密所述加密数据,所述加密数据由外部实体OWE使用加密密钥生成,所述解密密钥和所述加密密钥是由外部实体OWE生成的密钥对;所述处理器,用于确定所述目标SD标识对应的目标SD中是否包括所述解密密钥标识对应的解密密钥;当所述目标SD中包括所述解密密钥时,所述处理器使用所述解密密钥解密所述加密数据,并根据所述解密后的所述加密数据进行离线管理操作。
- 一种计算机可读存储介质,其特征在于,包括指令,当其在设备上运行时,使得该设备执行如权利要求1至24中任一项所述的方法。
- 一种通信装置,其特征在于,包括处理器,所述处理器被配置为支持所述通信装置执行根据权利要求1至9任一项所述的方法。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP19759944.2A EP3748902A4 (en) | 2018-02-28 | 2019-02-22 | MANAGEMENT PROCESS, TERMINAL AND SERVER |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810167314.9A CN110213039B (zh) | 2018-02-28 | 2018-02-28 | 一种管理方法、终端和服务器 |
CN201810167314.9 | 2018-02-28 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019165931A1 true WO2019165931A1 (zh) | 2019-09-06 |
Family
ID=67778689
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/075765 WO2019165931A1 (zh) | 2018-02-28 | 2019-02-22 | 一种管理方法、终端和服务器 |
Country Status (3)
Country | Link |
---|---|
EP (1) | EP3748902A4 (zh) |
CN (1) | CN110213039B (zh) |
WO (1) | WO2019165931A1 (zh) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112149134A (zh) * | 2020-09-11 | 2020-12-29 | 支付宝(杭州)信息技术有限公司 | 可信应用管理方法及装置 |
CN117784988A (zh) * | 2022-09-28 | 2024-03-29 | 荣耀终端有限公司 | 应用接续方法和终端设备 |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110838919B (zh) * | 2019-11-01 | 2021-04-13 | 广州小鹏汽车科技有限公司 | 通信方法、存储方法、运算方法及装置 |
CN112565289B (zh) * | 2020-12-21 | 2022-06-24 | 北京航空航天大学 | 基于区块链的医疗证照可信签发与验证系统及方法 |
CN115021911A (zh) * | 2022-05-31 | 2022-09-06 | 支付宝(杭州)信息技术有限公司 | 数据的处理方法、装置及设备 |
CN117992993B (zh) * | 2024-04-07 | 2024-06-14 | 蓝象智联(杭州)科技有限公司 | 基于可信执行环境的数据管控方法和系统 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090210703A1 (en) * | 2008-01-18 | 2009-08-20 | Epstein William C | Binding a digital certificate to multiple trust domains |
CN101770794A (zh) * | 2008-12-26 | 2010-07-07 | 同方股份有限公司 | 一种数字视盘系统的数字版权保护方法及其管理装置 |
CN104468111A (zh) * | 2013-09-25 | 2015-03-25 | 同方股份有限公司 | 一种用usbkey公钥矩阵实现密钥及数据交换的方法 |
CN105340236A (zh) * | 2013-06-28 | 2016-02-17 | 高通股份有限公司 | 用于减少IoT资源接入网中的控制负载的信任启发式模型 |
CN106936774A (zh) * | 2015-12-29 | 2017-07-07 | 中国电信股份有限公司 | 可信执行环境中的认证方法和系统 |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9124563B2 (en) * | 2013-08-19 | 2015-09-01 | Gemalto Sa | Method for asynchronously provisioning keys from one secure device to another |
CN106980972B (zh) * | 2016-12-29 | 2021-02-02 | 中国银联股份有限公司 | 基于tee的线下支付方法及其支付系统、移动终端 |
-
2018
- 2018-02-28 CN CN201810167314.9A patent/CN110213039B/zh active Active
-
2019
- 2019-02-22 WO PCT/CN2019/075765 patent/WO2019165931A1/zh unknown
- 2019-02-22 EP EP19759944.2A patent/EP3748902A4/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090210703A1 (en) * | 2008-01-18 | 2009-08-20 | Epstein William C | Binding a digital certificate to multiple trust domains |
CN101770794A (zh) * | 2008-12-26 | 2010-07-07 | 同方股份有限公司 | 一种数字视盘系统的数字版权保护方法及其管理装置 |
CN105340236A (zh) * | 2013-06-28 | 2016-02-17 | 高通股份有限公司 | 用于减少IoT资源接入网中的控制负载的信任启发式模型 |
CN104468111A (zh) * | 2013-09-25 | 2015-03-25 | 同方股份有限公司 | 一种用usbkey公钥矩阵实现密钥及数据交换的方法 |
CN106936774A (zh) * | 2015-12-29 | 2017-07-07 | 中国电信股份有限公司 | 可信执行环境中的认证方法和系统 |
Non-Patent Citations (1)
Title |
---|
See also references of EP3748902A4 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112149134A (zh) * | 2020-09-11 | 2020-12-29 | 支付宝(杭州)信息技术有限公司 | 可信应用管理方法及装置 |
CN117784988A (zh) * | 2022-09-28 | 2024-03-29 | 荣耀终端有限公司 | 应用接续方法和终端设备 |
Also Published As
Publication number | Publication date |
---|---|
CN110213039A (zh) | 2019-09-06 |
EP3748902A1 (en) | 2020-12-09 |
EP3748902A4 (en) | 2021-03-17 |
CN110213039B (zh) | 2021-01-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019165931A1 (zh) | 一种管理方法、终端和服务器 | |
JP7416775B2 (ja) | 周辺デバイス | |
US11218299B2 (en) | Software encryption | |
US8458480B2 (en) | Method and apparatus for binding TPM keys to execution entities | |
KR101539448B1 (ko) | 보안 키 생성 | |
KR102407066B1 (ko) | 집적 회로를 위한 상이한 엔티티들의 특권들의 관리 | |
US8065517B2 (en) | Method and system for transferring information to a device | |
US9124561B2 (en) | Method of transferring the control of a security module from a first entity to a second entity | |
US9959394B2 (en) | Device for decrypting and providing content of a provider and method for operating the device | |
US20140281502A1 (en) | Method and apparatus for embedding secret information in digital certificates | |
US20100031026A1 (en) | Method and system for transferring information to a device | |
US9722992B2 (en) | Secure installation of software in a device for accessing protected content | |
CN116671062A (zh) | 硬件安全模块的远程管理 | |
CN113614720A (zh) | 一种动态配置可信应用程序访问控制的装置和方法 | |
WO2019120231A1 (zh) | 确定tpm可信状态的方法、装置及存储介质 | |
WO2019170111A1 (zh) | 一种离线管理指令的管理方法和终端 | |
WO2022127510A1 (zh) | 认证方法及装置 | |
WO2023240587A1 (zh) | 一种设备权限配置方法及装置、终端设备 | |
WO2023073198A1 (en) | Method to store data persistently by a software payload | |
KR20200090490A (ko) | 디지털 키 공유 시스템에서 이모빌라이저 토큰을 업데이트하는 장치 및 방법 | |
KR20240045160A (ko) | 신뢰 루트(Root-of-Trust) 기반의 보안을 갖는 암호화되고 인증된 펌웨어 제공 방법 및 시스템 | |
EP4175219A1 (en) | Method to establish a secure channel | |
US9729333B2 (en) | Revocation of a root certificate stored in a device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19759944 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
ENP | Entry into the national phase |
Ref document number: 2019759944 Country of ref document: EP Effective date: 20200902 |