Security environment verification
By establishing communication between TEE and anti-theft hardware, verifying the signature results to determine the normal operating status of the physical peripheral, the risk of malicious data parties attacking TEE is solved, real-time monitoring of TEE security and the risk of data leakage is reduced.
Patent Information
- Application Number
- PCT/CN2024/111803
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-05
- Filing Date
- 2024-08-13
- Publication Date
- 2025-03-13
AI Technical Summary
It is difficult for the prior art to effectively verify whether there is a trusted execution environment (TEE) protected by malicious data parties do not set up or attack the physical peripherals, resulting in the risk of data breaches.
By establishing communication between TEE and anti-theft hardware, generating random numbers and using private key signatures, TEE verifies the signature result through a pre-established public key binding relationship to determine the normal operating status of the physical peripheral.
Real-time verification of physical peripherals is achieved, ensuring the security of TEE, reducing the risk of data breaches, and providing transparency to users.
Smart Images

Figure CN2024111803_13032025_PF_FP_ABST
Abstract
Description
Security environment verification Technical Field
[0001] This specification relates to the field of computers, and in particular to a method, device, storage medium, and electronic device for verifying a secure environment. Background Art
[0002] With the development of Internet technology, the amount of data used to perform user tasks has also increased. Due to different user needs, data from multiple data parties may be required for calculation to complete the business requested by the user. For data security, data from multiple data parties can be transferred to the same secure environment for calculation. This secure environment can be established in any of the multiple data parties. Specifically, this secure environment is a Trusted Execution Environment (TEE) built on the device of any data party based on trustzone technology.
[0003] To protect the TEE, physical peripherals are typically set up for the device where the TEE resides. However, if the data party that establishes the TEE is malicious, the data party that establishes the TEE may not set up the physical peripherals to protect the TEE, or may even attack the TEE with the physical peripherals to steal data from other data parties. Since the TEE has no communication with the physical peripherals, other data parties cannot know whether the malicious data party has set up the physical peripherals to protect the TEE or whether the physical peripherals are functioning properly.
[0004] Based on this, this specification provides a method for verifying a secure environment.
[0005] Summary of the Invention
[0006] This specification provides a method, device, storage medium and electronic device for secure environment verification to at least partially solve the above-mentioned problems existing in the prior art.
[0007] This manual adopts the following technical solutions.
[0008] This specification provides a method for verifying a secure environment, which is applied to a trusted execution environment (TEE). The device where the TEE is located is provided with a physical peripheral, which is used to protect the device. The physical peripheral includes anti-theft hardware, including: generating a random number when a specified time arrives; sending the random number to the anti-theft hardware so that the anti-theft hardware signs the random number using its own private key; receiving the signature result returned by the anti-theft hardware; determining the public key bound to the TEE based on a pre-established binding relationship; verifying the signature result using the public key, and verifying whether the physical peripheral is normal based on the verification result; if the verification passes, determining that the physical peripheral is normal; if the verification fails, determining that the physical peripheral is abnormal; and sending the verification result to the user.
[0009] Optionally, pre-establishing a binding relationship specifically includes: receiving a public key sent by the anti-theft hardware; establishing a binding relationship between the public key and the TEE itself, and storing the binding relationship.
[0010] Optionally, when the TEE signature verification fails and it is determined that the physical peripheral device is abnormal, the method further includes: deactivating the service provided by the TEE itself, and / or clearing the current data.
[0011] Optionally, the method further includes: in response to a deactivation request sent by the anti-theft hardware, deactivating the services provided by the TEE itself and / or clearing current data, wherein the deactivation request is sent to the TEE when the anti-theft hardware determines that the physical peripheral device has been physically intruded.
[0012] Optionally, the method further includes: encrypting the data stored in the TEE according to the public key.
[0013] This specification provides a method for verifying a secure environment. The method is applied to anti-theft hardware, which is part of a physical peripheral used to protect a device. The device includes a trusted execution environment (TEE). The method includes: receiving a random number sent by the TEE; signing the random number using the private key of the anti-theft hardware to obtain a signature result; returning the signature result to the TEE so that the TEE verifies the signature result, verifies whether the physical peripheral is normal based on the signature result, and sends the signature result to the user.
[0014] Optionally, the method further includes: determining whether the physical peripheral device has been physically invaded; and if so, clearing the private key.
[0015] Optionally, the method further includes: determining whether the physical peripheral device has been physically invaded; and if so, sending a deactivation request to the TEE.
[0016] This specification provides a device for verifying a secure environment, which is applied to a trusted execution environment (TEE). The device where the TEE is located is provided with a physical peripheral, which is used to protect the device. The physical peripheral includes anti-theft hardware. The device includes: a random number generation module, which is used to generate a random number when a specified time arrives; a random number sending module, which is used to send the random number to the anti-theft hardware, so that the anti-theft hardware uses its own private key to sign the random number; a receiving module, which is used to receive the signature result returned by the anti-theft hardware; a public key determination module, which is used to determine the public key bound to the TEE based on a pre-established binding relationship; a verification module, which is used to verify the signature result using the public key, and verify whether the physical peripheral is normal based on the verification result; if the verification passes, it is determined that the physical peripheral is normal; if the verification fails, it is determined that the physical peripheral is abnormal; and a verification result sending module, which is used to send the verification result to the user.
[0017] Optionally, the representative public key determination module is specifically used to receive the public key sent by the anti-theft hardware; establish a binding relationship between the public key and the TEE itself, and store it.
[0018] Optionally, the device further includes: a first interrupt module, configured to disable the service provided by the TEE itself and / or clear current data when the TEE signature verification fails and the physical peripheral is determined to be abnormal.
[0019] Optionally, the device also includes: a second interrupt module, used to disable the services provided by the TEE itself and / or clear current data in response to a deactivation request sent by the anti-theft hardware, wherein the deactivation request is sent to the TEE when the anti-theft hardware determines that the physical peripheral device has been physically intruded.
[0020] Optionally, the device further includes: an encryption module, configured to encrypt data stored in the TEE based on the public key.
[0021] This specification provides a device for verifying a secure environment. The device is applied to anti-theft hardware, which is part of a physical peripheral used to protect a device. The device includes a trusted execution environment (TEE). The device includes: a random number receiving module for receiving a random number sent by the TEE; a signature module for signing the random number using the private key of the anti-theft hardware to obtain a signature result; a signature result returning module for returning the signature result to the TEE so that the TEE verifies the signature result, verifies whether the physical peripheral is normal based on the signature verification result, and sends the signature verification result to the user.
[0022] Optionally, the device further includes: a first judgment module, configured to judge whether the physical peripheral device has been physically invaded; if so, clear the private key.
[0023] Optionally, the device further includes: a second judgment module, configured to judge whether a physical intrusion occurs to the physical peripheral device; and if so, send a deactivation request to the TEE.
[0024] This specification provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the method for verifying a secure environment is implemented.
[0025] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned security environment verification method when executing the program.
[0026] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects.
[0027] It can be seen from the method of security environment verification provided in this specification that this method directly establishes communication between TEE and anti-theft hardware. TEE verifies whether the physical peripheral is operating normally based on the signature result sent by the anti-theft hardware, and sends the verification result to the user, that is, sends the verification result to other data parties that do not establish the TEE. The user obtains the status of the physical peripheral through the TEE, that is, the user knows through the TEE whether the data party that established the TEE has set up the physical peripheral for protecting the TEE, and whether the physical peripheral is running. In addition, since the TEE communicates directly with the anti-theft hardware, there is no need to know the status of the physical peripheral through other media. Therefore, the obtained status of the physical peripheral will not be tampered with by the data party that established the TEE. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The drawings described herein are used to provide further understanding of this specification and constitute a part of this specification. The illustrative embodiments of this specification and their descriptions are used to explain this specification and do not constitute improper limitations on this specification.
[0029] FIG1 is a flow chart of a method for verifying a secure environment provided in this specification.
[0030] Figure 2 is a schematic diagram of the interaction between TEE and anti-theft hardware provided in this specification.
[0031] FIG3 is a schematic diagram of a device for verifying a secure environment provided in this specification.
[0032] FIG4 is a schematic diagram of an electronic device corresponding to FIG1 provided in this specification. DETAILED DESCRIPTION
[0033] To make the purpose, technical solutions, and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in conjunction with the specific embodiments of this specification and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this application.
[0034] The technical solutions provided by the embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0035] FIG1 is a flow chart of a method for verifying a secure environment provided in this specification, which specifically includes the following steps.
[0036] S100: When the designated time arrives, a random number is generated.
[0037] When the business to be executed requires data from multiple data parties, the data of multiple data parties are usually transferred to the same secure environment for calculation. Among them, the secure environment can be a trusted execution environment TEE established by any data party on the device where the data party itself is located. In addition, in order to protect the TEE, the data party that establishes the TEE can also set up physical peripherals. However, if the data party that establishes the TEE is an intruder, that is, the data party that establishes the TEE does not set up physical peripherals or even attacks the TEE with physical peripherals in order to obtain the data of other data parties in the TEE, and if the TEE does not establish communication with the physical peripherals, then the other data parties cannot know whether the intruder has set up physical peripherals for protecting the TEE and whether the physical peripherals are operating normally. Therefore, this specification provides a method for verifying a secure environment. The execution subject in the embodiments of this specification can be a TEE, or it can be a part of a physical peripheral that establishes communication with the secure environment, such as the anti-theft hardware of the physical peripheral, or it can be a server where other secure environments are located that can perform secure calculations on the data of other data parties. This specification does not limit this. This specification is explained with the execution subject being a TEE and anti-theft hardware.
[0038] FIG2 is a schematic diagram of the interaction between TEE and anti-theft hardware provided in this specification, as shown in FIG2 .
[0039] In one or more embodiments of this specification, the device where the TEE resides is equipped with a physical peripheral device that is used to protect the device. The physical peripheral device includes a sturdy chassis to prevent the device from being opened from the outside by an intruder, a detection component for detecting physical intrusion on the device, a heat dissipation channel for dissipating heat, and anti-theft hardware for communicating with the TEE. Physical intrusion includes disassembling the device using external force, such as using an electric drill to damage the physical peripheral device's housing, using an electric heating device to melt the physical peripheral device's housing, etc. The detection component can be a switch detection device, such as a push-button switch provided inside the housing of the physical peripheral device. When the housing is not opened, the switch is in a pressed state and the switch is turned on. When the housing is opened, the switch is turned off, which is considered a physical intrusion. The detection component can also be a temperature detection device. When the electric heating device is used, the temperature of the housing rises. When the temperature detection device detects that the housing temperature exceeds a threshold, it is considered a physical intrusion. This specification does not limit the type of detection component, as long as the detection component can detect physical intrusion on the physical peripheral device. If the detection component detects a physical intrusion on the physical peripheral device, it sends the detection result to the anti-theft hardware, which determines whether the physical peripheral device has been physically intruded. The anti-theft hardware includes an anti-theft chip. It should be noted that the heat dissipation channel must also be invulnerable, meaning that an intruder cannot steal data from the TEE through the heat dissipation channel. An intruder includes any data party that obtains non-own data from the TEE without the permission of other data parties.
[0040] In order to detect whether the physical peripheral device is operating normally, when the specified time arrives, the TEE generates a random number so that the random number can be used to verify whether the physical peripheral device is operating normally. The specified time can be the time when the TEE responds to the user's security verification request to inquire whether the physical peripheral device is operating normally, or it can be the time when the TEE responds to the preset cycle and the cycle ends. This specification does not limit this. It should be noted that the user in the specific implementation of this specification is not the data party that establishes the TEE and transmits data to the TEE.
[0041] S102: Send the random number to the anti-theft hardware, so that the anti-theft hardware signs the random number using the private key of the anti-theft hardware itself.
[0042] Because the TEE can determine whether a physical peripheral is operating normally using its public and private keys, it can send the random number to the device's anti-theft hardware. The anti-theft hardware receives the random number from the TEE, signs it with its own private key, and returns the signature to the TEE. The TEE then verifies the signature using the public key to determine whether the physical peripheral is operating normally.
[0043] S104: Receive the signature result returned by the anti-theft hardware.
[0044] S106: Determine the public key bound to the TEE based on the pre-established binding relationship.
[0045] A server may contain multiple TEEs. Each TEE can use its public and private keys to determine whether a physical peripheral is functioning properly. Therefore, a server can contain multiple public keys. To facilitate subsequent TEE signature verification using the public key, a binding relationship between the TEE and the public key must be established in advance.
[0046] Specifically, the TEE receives the public key sent by the anti-theft hardware, establishes a binding relationship between the public key and the TEE itself, and stores it. Among them, since the public key is obtained based on the private key, if the public key is provided by the intruder, then the intruder can tamper with the operating status of the physical peripheral based on the public key and private key provided to the TEE. Therefore, the public key bound to the TEE can be generated by the private key of the anti-theft hardware. This specification does not limit how to bind the public key to the TEE, as long as the public key can be bound to the TEE.
[0047] Furthermore, because the private key used by the anti-theft hardware for signing operations corresponds to the public key bound to the TEE, the TEE needs to determine the public key bound to the TEE based on a pre-established binding relationship before using the public key for signature verification. In other words, if the public key used to verify the signature result is not the public key bound to the TEE, then even if the signature result was obtained using the private key corresponding to the public key bound to the TEE, the signature verification will fail. This could result in the user receiving an incorrect status of the physical peripheral.
[0048] For example, there are two TEEs, TEE1 and TEE2, with two pairs of public and private keys, namely public key 1, private key 1, public key 2, and private key 2. Private key 1 corresponds to public key 1, and private key 2 corresponds to public key 2. TEE1 is bound to public key 1, and TEE2 is bound to public key 1. TEE1 needs to determine the status of the physical peripheral. The anti-theft hardware sends the signature result obtained using private key 1 to TEE1. TEE1 does not determine public key 1 based on the binding relationship and directly verifies the signature result using public key 2, resulting in an erroneous result indicating that the physical peripheral is operating abnormally.
[0049] S108: Use the public key to verify the signature result, and verify whether the physical peripheral device is normal according to the signature verification result. If the signature verification passes, it is determined that the physical peripheral device is normal; if the signature verification fails, it is determined that the physical peripheral device is abnormal.
[0050] In one or more embodiments of this specification, if the signature result is not obtained using the private key corresponding to the public key bound to the TEE, the signature verification fails and the physical peripheral device is abnormal. Otherwise, the physical peripheral device is normal.
[0051] S110: Send the verification result to the user.
[0052] Based on the method for verifying the security environment shown in Figure 1, this method directly establishes communication between the TEE and the anti-theft hardware. The TEE verifies whether the physical peripheral is operating normally based on the signature result sent by the anti-theft hardware, and sends the verification result to the user, that is, the verification result is sent to other data parties that do not establish the TEE. The user obtains the status of the physical peripheral through the TEE, that is, the user knows through the TEE whether the data party that established the TEE has set up the physical peripheral for protecting the TEE, and whether the physical peripheral is operating. In addition, since the TEE communicates directly with the anti-theft hardware, there is no need to know the status of the physical peripheral through other media. Therefore, the obtained status of the physical peripheral will not be tampered with by the data party that established the TEE.
[0053] For steps S102 to S108, the TEE can also use a symmetric cryptographic algorithm to determine whether the physical peripheral is operating normally. When establishing a binding relationship, the TEE receives the secret key sent by the anti-theft hardware, establishes a binding relationship between the public key and the TEE itself, and stores it. When obtaining the signature result, the anti-theft hardware signs the random number using its own secret key. When verifying the signature result, the TEE verifies the signature result using the secret key bound to it.
[0054] Regarding step S106, to reduce resource consumption, when multiple TEEs within a server need to simultaneously determine whether a physical peripheral is functioning properly, the random number generated by each TEE is hashed to obtain a hash value. This hash value is then sent to the anti-theft hardware. The anti-theft hardware then signs the hash value with its private key to obtain a signature result. This signature result and the hash value are then returned to each TEE. Each TEE verifies the signature result using its bound public key and determines whether the hash value can be used to obtain the random number generated by each TEE. Thus, the anti-theft hardware only needs to perform a single signature to respond to requests from multiple TEEs to determine whether a physical peripheral is functioning properly.
[0055] Regarding step S108, to protect the data in the TEE, if the TEE signature fails and the physical peripheral is determined to be abnormal, the TEE's services are disabled and / or the current data is cleared. Disabling only the TEE's services can reduce the waste of computing resources. Clearing only the current data prevents the intruder from accessing data that can be used for subsequent steps or the current data, thus reducing data loss.
[0056] In addition to verifying the signature result by the TEE itself to determine whether the physical peripheral is normal, the anti-theft hardware can also be used to determine whether the physical peripheral is normal, and then determine whether to disable the services provided by the TEE itself and / or clear the current data. In other words, the anti-theft hardware determines whether the physical peripheral has been physically invaded. If so, the anti-theft hardware sends a deactivation request to the TEE. The TEE responds to the deactivation request sent by the anti-theft hardware and deactivates the services provided by the TEE itself and / or clears the current data. Among them, the anti-theft hardware can use the detection component of the physical peripheral to determine whether the physical peripheral has been physically invaded.
[0057] To further protect the data in the TEE, the TEE can encrypt the stored data to prevent intruders from obtaining data already stored on the disk.
[0058] Specifically, the data stored in the TEE is encrypted using the public key bound to the TEE itself. When the anti-theft hardware determines that the physical peripheral has been physically invaded, the private key corresponding to the public key bound to the TEE itself is cleared. Then, the intruder cannot obtain the data stored on the disk. In addition, since the private key is cleared, the TEE can verify that the signature result is incorrect based on the public key, and then determine that the physical peripheral is operating abnormally, and then disable the services provided by the TEE itself and / or clear the current data, which also protects the data in the TEE. Of course, before using the public key bound to the TEE itself to encrypt the data stored in the TEE, the stored data can be encrypted using the TEE Seal mechanism that exists in the TEE itself, and this manual does not limit this.
[0059] In addition, communication between TEE and Trusted Platform Module (TPM) can be established. Since TPM has the function of determining whether the verification result sent to the user has been tampered with, TEE can enable the user to obtain the correct verification result through TPM.
[0060] The above is a method for verifying a secure environment provided in one or more embodiments of this specification. Based on the same idea, this specification also provides a corresponding device for verifying a secure environment, as shown in FIG3 .
[0061] Figure 3 is a schematic diagram of a device for secure environment verification provided in this specification, the device is applied to a trusted execution environment (TEE), the device where the TEE is located is provided with a physical peripheral, the physical peripheral is used to protect the device, the physical peripheral includes anti-theft hardware, the device includes: a random number generation module 300, for generating a random number when a specified time arrives; a random number sending module 302, for sending the random number to the anti-theft hardware, so that the anti-theft hardware uses its own private key to sign the random number; a receiving module 304, for receiving the signature result returned by the anti-theft hardware; a public key determination module 306, for determining the public key bound to the TEE based on a pre-established binding relationship; a verification module 308, for verifying the signature result using the public key, and verifying whether the physical peripheral is normal based on the verification result; if the verification passes, the physical peripheral is determined to be normal; if the verification fails, the physical peripheral is determined to be abnormal; and a verification result sending module 310, for sending the verification result to the user.
[0062] Optionally, the representative public key determination module 306 is specifically used to receive the public key sent by the anti-theft hardware; establish a binding relationship between the public key and the TEE itself, and store it.
[0063] Optionally, the apparatus further includes: a first interrupt module 312, configured to disable services provided by the TEE itself and / or clear current data when the TEE signature verification fails and the physical peripheral is determined to be abnormal.
[0064] Optionally, the device also includes: a second interrupt module 314, which is used to disable the services provided by the TEE itself and / or clear current data in response to a deactivation request sent by the anti-theft hardware, wherein the deactivation request is sent to the TEE when the anti-theft hardware determines that the physical peripheral device has been physically intruded.
[0065] Optionally, the device further includes: an encryption module 316, configured to encrypt data stored in the TEE according to the public key.
[0066] This specification provides a device for verifying a secure environment, which is applied to anti-theft hardware, which is part of a physical peripheral used to protect a device. The device includes a trusted execution environment (TEE). The device includes: a random number receiving module 400, which is used to receive a random number sent by the TEE; a signature module 402, which is used to sign the random number using the private key of the anti-theft hardware itself to obtain a signature result; a signature result returning module 404, which is used to return the signature result to the TEE so that the TEE verifies the signature result, verifies whether the physical peripheral is normal based on the signature verification result, and sends the signature verification result to the user.
[0067] Optionally, the apparatus further includes: a first determination module 408, configured to determine whether the physical peripheral device has been physically invaded; if so, clear the private key.
[0068] Optionally, the apparatus further includes: a second judgment module 410, configured to judge whether a physical intrusion occurs to the physical peripheral device; and if so, send a deactivation request to the TEE.
[0069] This specification also provides a computer-readable storage medium, which stores a computer program. The computer program can be used to execute the security environment verification method provided in Figure 1 above.
[0070] This specification also provides a structural diagram of the electronic device shown in Figure 4. As shown in Figure 4, at the hardware level, the unmanned driving device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and of course may also include hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the method of security environment verification described in Figure 1 above. Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0071] In the 1990s, technological improvements could be clearly distinguished as either hardware improvements (for example, improvements to circuit structures like diodes, transistors, and switches) or software improvements (improvements to process flows). However, with the advancement of technology, many process flow improvements today can now be considered direct improvements to hardware circuit structures. Designers almost always create the corresponding hardware circuit structure by programming the improved process flow into the hardware circuit. Therefore, it cannot be said that a process flow improvement cannot be implemented using hardware modules. For example, a programmable logic device (PLD), such as a field programmable gate array (FPGA), is an integrated circuit whose logical function is determined by user programming. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to hire a chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly performed using "logic compiler" software. This is similar to the software compilers used during program development. Before compilation, the original code must be written in a specific programming language, called a hardware description language (HDL). There are not just one HDL, but many, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art will also understand that by simply programming the method flow in one of these hardware description languages and then programming it into an integrated circuit, a hardware circuit that implements the logic method flow can be easily obtained.
[0072] The controller can be implemented in any suitable manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that in addition to implementing the controller in a purely computer-readable program code format, the controller can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules that implement the method and structures within the hardware component.
[0073] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0074] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0075] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0076] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0077] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0078] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0079] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0080] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0081] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0082] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0083] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Thus, this specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0084] This specification may be described in the general context of computer-executable instructions, such as program modules, executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media, including storage devices.
[0085] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.
[0086] The foregoing is merely an embodiment of the present invention and is not intended to limit the present invention. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are intended to be included within the scope of the claims of this application.
Claims
1. A method for verifying a secure environment, the method being applied to a trusted execution environment (TEE), wherein a device where the TEE is located is provided with a physical peripheral, the physical peripheral being used to protect the device, the physical peripheral comprising anti-theft hardware, the method comprising: When the specified time arrives, a random number is generated; Sending the random number to the anti-theft hardware so that the anti-theft hardware signs the random number using the private key of the anti-theft hardware itself; Receiving the signature result returned by the anti-theft hardware; Determine the public key bound to the TEE according to the pre-established binding relationship; Verifying the signature result using the public key, and verifying whether the physical peripheral device is normal according to the verification result; If the signature verification passes, it is determined that the physical peripheral device is normal; If the signature verification fails, it is determined that the physical peripheral device is abnormal; Send the verification result to the user.
2. The method according to claim 1, pre-establishing a binding relationship, specifically comprising: Receiving the public key sent by the anti-theft hardware; A binding relationship between the public key and the TEE itself is established and stored.
3. According to the method of claim 1, when the TEE signature verification fails and it is determined that the physical peripheral is abnormal, the method further comprises: Deactivate the services provided by the TEE itself, and / or clear the current data.
4. The method of claim 1, further comprising: In response to a deactivation request sent by the anti-theft hardware, deactivate services provided by the TEE itself and / or clear current data, wherein the deactivation request is sent to the TEE when the anti-theft hardware determines that a physical intrusion occurs to the physical peripheral device.
5. The method of claim 1, further comprising: The data stored in the TEE is encrypted according to the public key.
6. A method for data protection, the method being applied to anti-theft hardware, the anti-theft hardware being part of a physical peripheral, the physical peripheral being used to protect a device, the device including a trusted execution environment TEE, the method comprising: Receive a random number sent by the TEE; The random number is signed using the private key of the anti-theft hardware itself to obtain a signature result; The signature result is returned to the TEE so that the TEE verifies the signature result, verifies whether the physical peripheral is normal according to the verification result, and sends the verification result to the user.
7. The method of claim 6, further comprising: Determining whether physical intrusion occurs to the physical peripheral device; If so, clear the private key.
8. The method of claim 6, further comprising: Determining whether physical intrusion occurs to the physical peripheral device; If so, a deactivation request is sent to the TEE.
9. A device for verifying a secure environment, the device being applied to a trusted execution environment (TEE), the device where the TEE is located being provided with a physical peripheral, the physical peripheral being used to protect the device, the physical peripheral comprising anti-theft hardware, the device comprising: A random number generation module is used to generate a random number when a specified time arrives; A random number sending module, used for sending the random number to the anti-theft hardware, so that the anti-theft hardware signs the random number using the private key of the anti-theft hardware itself; A receiving module, used to receive the signature result returned by the anti-theft hardware; A public key determination module, used to determine the public key bound to the TEE according to a pre-established binding relationship; A verification module, used to verify the signature result using the public key, and verify whether the physical peripheral device is normal according to the verification result; If the signature verification passes, it is determined that the physical peripheral device is normal; If the signature verification fails, it is determined that the physical peripheral device is abnormal; The verification result sending module is used to send the verification result to the user.
10. In the device as described in claim 9, the public key determination module is specifically used to receive the public key sent by the anti-theft hardware; establish a binding relationship between the public key and the TEE itself, and store it.
11. The apparatus of claim 9, further comprising: The first interrupt module is used to disable the service provided by the TEE itself and / or clear the current data when the TEE signature verification fails and it is determined that the physical peripheral is abnormal.
12. The apparatus of claim 9, further comprising: The second interrupt module is used to respond to the deactivation request sent by the anti-theft hardware, deactivate the services provided by the TEE itself and / or clear the current data, wherein the deactivation request is sent to the TEE when the anti-theft hardware determines that the physical peripheral device is physically intruded.
13. The apparatus of claim 9, further comprising: An encryption module is used to encrypt the data stored in the TEE according to the public key.
14. A device for verifying a secure environment, the device being applied to anti-theft hardware, the anti-theft hardware being part of a physical peripheral, the physical peripheral being used to protect a device, the device including a trusted execution environment TEE, the device comprising: A random number receiving module, used to receive the random number sent by the TEE; A signature module, used to sign the random number using the private key of the anti-theft hardware itself to obtain a signature result; The signature result returning module is used to return the signature result to the TEE so that the TEE verifies the signature result, verifies whether the physical peripheral is normal according to the verification result, and sends the verification result to the user.
15. The apparatus of claim 14, further comprising: A first determination module, used to determine whether a physical intrusion occurs to the physical peripheral device; If so, clear the private key.
16. The apparatus of claim 14, further comprising: A second determination module is used to determine whether a physical intrusion occurs to the physical peripheral device; If so, a deactivation request is sent to the TEE.
17. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the method according to any one of claims 1 to 8.
18. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 8 when executing the program.
Citation Information
Patent Citations
Hardware detection method, device and equipment and storage medium
CN112311718A
Identity authentication method and system based on IBC identification password
CN112887338A
Trusted verification system and device, storage medium and electronic equipment
CN114553428A
Method for preventing APP eavesdropping based on verification signature certificate, electronic equipment and storage medium
CN115348078A
Security environment verification method and device, storage medium and electronic equipment
CN117176358A