A PUF-based TEE trusted root generation, usage method and related device
Through the TEE trusted root generation and use method based on PUF, the problem of easy leakage of trusted root storage media in the prior art is solved, and the device unique authentication and dynamic key calculation are realized to ensure security and prevent leakage.
Patent Information
- Application Number
- CN202411017568.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-07-29
AI Technical Summary
Existing trusted roots are usually stored on device storage media, which can easily cause the problem of trusted root leakage.
Using TEE trusted root generation and use method based on PUF, assign unique ID numbers to TEE devices through the server, and generate first and second PUF outputs through hardware PUF, calculate public and private keys to avoid on physical storage media Save the trusted root and dynamically calculate the encrypted and decryption key only if needed.
It eliminates the problem of trusted root leakage caused by attacks on physical storage media, ensures that only specific devices can pass the authentication, and avoids the leakage of encryption and decryption keys.
Smart Images

Figure CN118555068B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security technology, and more particularly to a PUF-based TEE trusted root generation and use method and related devices. Background Art
[0002] Trusted computing is proposed to address the fact that current computing systems cannot fundamentally solve security problems. It establishes a trust source by integrating dedicated hardware modules in the computing system, establishes a trust chain using cryptographic mechanisms, and builds a trustworthy computing environment to provide a security foundation for computer platform systems.
[0003] Root of Trust technology is a security methodology. The core concept of ensuring network information security is built on a foundation of trust. This foundation is called the root of trust. It is a specially authenticated authoritative entity with the privilege to issue digital certificates. However, existing roots of trust are typically stored on device storage media, which can easily lead to root of trust leaks.
[0004] Therefore, how to realize the generation and use of TEE trusted root based on PUF function to overcome the problem of trusted root leakage is an urgent problem that technicians in this field need to solve. Summary of the Invention
[0005] In view of this, the present invention provides a PUF-based TEE root of trust generation and use method and related devices, which realize the generation and use of TEE root of trust based on PUF function, and eliminate the problem of root of trust leakage caused by attacks on physical storage media.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] In a first aspect, the present invention provides a method for generating a trusted root of TEE based on PUF, comprising:
[0008] The server assigns a unique device ID number to the TEE device and sends the unique device ID number and the server unique ID number to the TEE device;
[0009] The TEE device stores the device unique ID number and performs cryptographic transformation on the device unique ID number and the server unique ID number to generate a first PUF input and a second PUF input respectively;
[0010] Generate a first PUF output and a second PUF output corresponding to the first PUF input and the second PUF input through a hardware PUF;
[0011] The first PUF output is used as the TEE trusted root, and the TEE trusted root is used as the private key to calculate the public key.
[0012] Preferably, it also includes:
[0013] Digitally sign the public key through the TEE trusted root to create a trusted root digital certificate;
[0014] Returning the public key or the trusted root digital certificate and the second PUF output to the server;
[0015] The server stores the public key or the trusted root digital certificate and the second PUF output, and associates them with the corresponding device unique ID number.
[0016] Preferably, when the hardware PUF provides an external service interface, the TEE device further includes:
[0017] Check whether the PUF input is the same as the first PUF input and the second PUF input. If they are the same, perform cryptographic transformation on the PUF input to generate a new PUF input, and then input it into the hardware PUF of the TEE device.
[0018] Preferably, the TEE device stores the device unique ID number in a non-volatile secure storage medium, and the TEE firmware in the TEE device performs cryptographic transformation on the device unique ID number and the server unique ID number.
[0019] In a second aspect, the present invention provides a method for using a PUF-based TEE root of trust, comprising:
[0020] The TEE device reads a unique device ID number from a non-volatile storage medium, and the TEE firmware in the TEE device performs a cryptographic transformation on the unique device ID number to obtain a first PUF input;
[0021] Generate a first PUF output from a first PUF input using a hardware PUF, and use the first PUF output as the TEE root of trust;
[0022] When digitally signing, the signed message is digitally signed by the TEE trusted root, and the TEE trusted root is immediately destroyed after completion;
[0023] When encrypting and decrypting data, the TEE trusted root is cryptographically transformed to obtain the encryption and decryption key and the TEE trusted root is destroyed. The encryption or decryption operation is performed on the data to be processed using the encryption and decryption key, and the encryption and decryption key is destroyed after the operation is completed.
[0024] A method for using a PUF-based TEE root of trust, comprising:
[0025] The server uses the second PUF output as the private key to digitally sign the data to be signed;
[0026] The server sends the server unique ID number and the above digital signature to the TEE device;
[0027] The TEE device performs a cryptographic transformation on the unique ID number of the server to obtain a second PUF input;
[0028] generating a second PUF output from a second PUF input through a hardware PUF;
[0029] The second PUF output is used as a private key to calculate a public key, the digital signature is verified using the public key, and the second PUF output is destroyed after the verification is complete.
[0030] In a third aspect, the present invention provides a PUF-based TEE trusted root generation device, comprising: a communication module, an REE, and a TEE device, wherein the communication module communicates with the TEE device through the REE;
[0031] The communication module is used to communicate with the server;
[0032] The REE is used as an operating environment for common firmware.
[0033] The TEE device is used as an operating environment for secure firmware;
[0034] The TEE device includes a non-volatile secure storage medium for storing data and a hardware PUF module for generating a TEE trusted root and providing external services.
[0035] In a fourth aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the methods of the first or second aspect above when executing the computer program.
[0036] In a fifth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods of the first or second aspects above.
[0037] As can be seen from the above technical solution, compared with the prior art, the present invention discloses a method for generating and using a TEE root of trust based on PUF and related devices, which has the following advantages:
[0038] 1) The root of trust does not need to be stored on the device storage medium, eliminating the root of trust leakage problem caused by attacks on physical storage media;
[0039] 2) The server-side authentication private key is also generated by the PUF on the device, ensuring that only specific devices can pass authentication;
[0040] 3) Encryption and decryption keys do not need to be stored on the device, but are dynamically calculated on demand, which also eliminates the possibility of encryption and decryption key leakage. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0042] Figure 1 This is a flow chart of a method for generating a TEE root of trust based on PUF provided by the present invention.
[0043] Figure 2 A flowchart of a method for generating a TEE root of trust based on PUF in another embodiment of the present invention.
[0044] Figure 3 This is a flow chart of a method for using a PUF-based TEE root of trust provided by the present invention.
[0045] Figure 4 A flowchart of a method for using a PUF-based TEE root of trust in another embodiment of the present invention.
[0046] Figure 5 Schematic diagram of a PUF-based TEE trusted root generation device provided by the present invention. DETAILED DESCRIPTION
[0047] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0048] The embodiment of the present invention discloses a method for generating a trusted root of TEE based on PUF, such as Figure 1 As shown, including:
[0049] The server assigns a unique device ID number to the TEE device and sends the device unique ID number and the server unique ID number to the TEE device;
[0050] The TEE device stores the device's unique ID number, and at the same time performs cryptographic transformation on the device's unique ID number and the server's unique ID number, generating a first PUF input and a second PUF input accordingly; specifically, the TEE device stores the device's unique ID number in a non-volatile secure storage medium, and at the same time, the TEE firmware in the TEE device performs cryptographic transformation on the device's unique ID number and the server's unique ID number.
[0051] Generate a first PUF output and a second PUF output corresponding to the first PUF input and the second PUF input through the hardware PUF;
[0052] The first PUF output is used as the TEE trusted root, and the TEE trusted root is used as the private key to calculate the public key.
[0053] Based on the above embodiment, in this embodiment, if Figure 2 As shown, it also includes:
[0054] Digitally sign the public key using the TEE trusted root to create a trusted root digital certificate. This step is optional and can be performed or not.
[0055] Return the public key or trusted root digital certificate and the second PUF output to the server;
[0056] The server stores the public key or the trusted root digital certificate and the second PUF output, and associates them with the corresponding device unique ID number.
[0057] Based on the above embodiment, in this embodiment, when the hardware PUF provides an external service interface, the TEE device further includes:
[0058] Check whether the PUF input is the same as the first PUF input and the second PUF input. If they are the same, perform a cryptographic transformation on the PUF input to generate a new PUF input, which is then input into the hardware PUF of the TEE device.
[0059] The embodiment of the present invention discloses a method for using a TEE trusted root based on PUF, such as Figure 3 As shown, including:
[0060] The TEE device reads the device's unique ID number from the non-volatile storage medium and performs a cryptographic transformation on the device's unique ID number to obtain a first PUF input;
[0061] Generate a first PUF output from the first PUF input using a hardware PUF, and use the first PUF output as the TEE root of trust;
[0062] When digitally signing, the signed message is digitally signed through the TEE trusted root, and the TEE trusted root is destroyed immediately after completion;
[0063] When encrypting and decrypting data, the TEE root of trust is cryptographically transformed to obtain the encryption and decryption keys and destroy the TEE root of trust. The encryption or decryption keys are used to encrypt or decrypt the data to be processed, and the encryption and decryption keys are destroyed after the operation is completed.
[0064] It should be noted that, according to business needs, when data encryption and decryption as well as digital signatures are required at the same time, the TEE trusted root will be destroyed after both actions are completed. If only digital signatures or data encryption and decryption are required, the above process will be executed accordingly.
[0065] In this embodiment, if Figure 4 As shown, a method for using a PUF-based TEE root of trust includes:
[0066] The server uses the second PUF output as the private key to digitally sign the data to be signed;
[0067] The server sends the server's unique ID number and the above digital signature to the TEE device;
[0068] The TEE device performs a cryptographic transformation on the server's unique ID number to obtain a second PUF input;
[0069] generating a second PUF output from a second PUF input through a hardware PUF;
[0070] Calculate the public key using the second PUF output as the private key, verify the digital signature using the public key, and destroy the second PUF output after verification;
[0071] The verification results are sent to the server for subsequent processing.
[0072] The embodiment of the present invention provides a TEE trusted root generation device based on PUF, such as Figure 5 As shown, it includes: a communication module, REE and TEE device, and the communication module communicates with the TEE device through the REE;
[0073] Communication module: used to communicate with the server;
[0074] REE: Runtime environment for common firmware;
[0075] TEE device: an operating environment for secure firmware;
[0076] TEE devices include non-volatile secure storage media for storing data and hardware PUF modules for generating TEE trusted roots and providing external services.
[0077] An embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable by the processor. When the processor executes the computer program, the above-mentioned TEE trusted root generation method or usage method is implemented.
[0078] For an introduction to a computer device provided by the present invention, please refer to the above method embodiment, and the present invention will not be described in detail here.
[0079] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the above-mentioned TEE trusted root generation method or use method are implemented.
[0080] Storage media include various media that can store program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0081] For an introduction to the computer-readable storage medium provided by the present invention, please refer to the above method embodiment, and the present invention will not go into details here.
[0082] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.
[0083] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for generating a TEE root of trust based on PUF, characterized in that: include: The server assigns a unique device ID number to the TEE device, and sends the unique device ID number and the server unique ID number to the TEE device; The TEE device stores the unique ID number of the device, and cryptographically transforms the unique ID number of the device and the unique ID number of the server to generate a first PUF input and a second PUF input respectively; Generate a first PUF output and a second PUF output corresponding to the first PUF input and the second PUF input through a hardware PUF; The first PUF output is used as the TEE trusted root, and the TEE trusted root is used as the private key to calculate the public key.
2. According to a PUF-based TEE trusted root generation method according to claim 1, it is characterized in that: Also includes: Digitally sign the public key through the TEE trusted root to create a trusted root digital certificate; Returning the public key or the trusted root digital certificate and the second PUF output to the server; The server stores the public key or the trusted root digital certificate and the second PUF output, and associates them with the corresponding unique ID number of the device.
3. A method for generating a TEE root of trust based on PUF according to claim 1, characterized in that: When the hardware PUF provides an external service interface, the TEE device further includes: Check whether the PUF input is the same as the first PUF input and the second PUF input. If they are the same, perform cryptographic transformation on the PUF input to generate a new PUF input, and then input it into the hardware PUF of the TEE device.
4. A method for generating a TEE root of trust based on PUF according to claim 1, characterized in that: The TEE device stores the device unique ID number in a non-volatile secure storage medium, and the TEE firmware in the TEE device performs cryptographic transformation on the device unique ID number and the server unique ID number.
5. A method for using a PUF-based TEE trusted root, characterized in that: include: The TEE device reads a unique device ID number from a non-volatile storage medium, and the TEE firmware in the TEE device performs a cryptographic transformation on the unique device number to obtain a first PUF input; Generate a first PUF output from a first PUF input through a hardware PUF, and use the first PUF output as a TEE trusted root; During digital signing, the TEE trusted root is used to digitally sign the signed message, and the TEE trusted root is destroyed after completion; When encrypting and decrypting data, the TEE trusted root is cryptographically transformed to obtain the encryption and decryption key and destroy the TEE trusted root. The encryption or decryption operation is performed on the data to be processed using the encryption and decryption key, and the encryption and decryption key is destroyed after the operation is completed.
6. A method for using a PUF-based TEE root of trust, characterized in that: include: The server receives a second PUF output sent by the TEE device, where the second PUF output is obtained by the TEE device performing a cryptographic transformation on the unique number of the server to obtain a second PUF input, and converting the second PUF output through hardware PUF; The server uses the second PUF output as the private key to digitally sign the data to be signed; The server sends the server unique ID number and the above digital signature to the TEE device; The TEE device performs cryptographic transformation on the unique ID number of the server to obtain a second PUF input; generating a second PUF output from a second PUF input through a hardware PUF; The second PUF output is used as a private key to calculate a public key, the digital signature is verified by the public key, and the second PUF output is destroyed after the verification is completed.
7. A PUF-based TEE trusted root generation device, which is used to implement any method of claims 1-6, characterized in that: include: A communication module, a REE and a TEE device, wherein the communication module communicates with the TEE device through the REE; The communication module is used to communicate with the server; The REE is used for the operating environment of common firmware; The TEE device is used as an operating environment for secure firmware; The TEE device includes a non-volatile secure storage medium for storing data and a hardware PUF module for generating a TEE trusted root and providing external services.
8. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
