A method and system for proving that a key pair is hardware protected
By issuing a hardware security environment certificate and generating a certificate chain before the device leaves the factory, the key pair generation location is verified, which solves the problem of untrusted key pair generation location in the existing technology, reduces costs and ensures information security.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING WATCH DATA SYSTEM CO LTD
- Filing Date
- 2021-11-09
- Publication Date
- 2026-05-12
AI Technical Summary
In existing technologies, it is difficult to effectively prove whether asymmetric key pairs are generated in a legitimate hardware security environment, and existing methods may increase system management and storage costs.
By issuing a hardware security environment certificate before the device leaves the factory and providing a certificate chain when generating key pairs during the usage phase, the device manufacturer's root certificate is used to verify the generation location of the key pairs, ensuring that the key pairs are generated within a hardware security environment.
It achieves trusted proof of the key pair generation location, reduces system management and storage costs, ensures that confidential information is protected by a hardware security environment, and guarantees the non-repudiation of signatures.
Smart Images

Figure CN114221768B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of cryptography and information security, and specifically relates to a method and system for providing external proof of key generation when generating asymmetric key pairs, which can prove that the key pairs are generated within a hardware security environment. Background Technology
[0002] Common applications of public-key cryptography (also known as asymmetric cryptography) in the field of information security include:
[0003] 1) Data encryption: Party A generates a public-private key pair and discloses the public key to Party B; Party B uses this key (Party A's public key) to encrypt confidential information and sends it to Party A; Party A uses its own private key to decrypt the encrypted information;
[0004] 2) Data signing: Party A generates a public-private key pair and discloses the public key to Party B; Party A uses its private key to sign the confidential information and sends it to Party B; Party B uses Party A's public key to sign and verify the data sent by Party A.
[0005] In public-key cryptography, participants typically need to generate a public-private key pair. The public key is made public to other participants, while the private key is kept secret. In applications with high security requirements, asymmetric key pairs and confidential information are usually generated and processed in a dedicated hardware security environment (such as a secure chip or trusted execution environment). The private key and other confidential information are protected by the hardware security environment from unauthorized access or disclosure. In this case, verifying that the key pair used in the system was generated by a legitimate hardware security environment is crucial.
[0006] 1) In data encryption scenarios, if the key pair of the information recipient is generated in an insecure environment, the confidential information encrypted with its public key may also be decrypted in an insecure environment, and the confidential information may be leaked.
[0007] 2) In data signature scenarios, if the signer's key pair is generated in an insecure environment, its private key may be used without authorization, and the non-repudiation of the signature is compromised (it cannot be resisted).
[0008] Therefore, when using public-key cryptography in a high-security system, it may be necessary to prove whether the key pair was generated within a legitimate hardware security environment to ensure that confidential information in the system is always protected by the hardware security environment and that signatures in the system are non-repudiable.
[0009] In existing technologies, when a mobile smart terminal uses a security chip to generate an asymmetrical key pair, the public key is bound to information such as the security chip's unique identifier and the terminal's unique identifier for transmission, in order to describe the security environment in which the key pair is generated. However, this approach constitutes non-cryptographic proof, and the identifiers associated with the public key may be tampered with during transmission.
[0010] Alternatively, in existing technologies, when a mobile smart terminal has an embedded security chip supporting the GP JavaCard specification, a secure channel can be established after the security chip authenticates with an external entity. Operations such as key pair generation, private key signing, and private key decryption, performed under control within this secure channel, can be confidently performed within the security chip. However, this approach only allows external entities possessing the security domain key to establish a secure channel with the security chip; other participants cannot verify the key pair generation location through this mechanism. Furthermore, managing and storing the security domain root key within the system incurs additional costs. Summary of the Invention
[0011] To address the shortcomings of existing technologies, the present invention aims to provide a method and system for proving that a key pair is hardware-protected. This method and system overcome the deficiencies of existing technologies, proving that the key pair used in the system is generated within a hardware-secure environment, and verifying the authenticity of the hardware-secure environment that generates the key pair.
[0012] To achieve the above objectives, the present invention provides a method for proving that a key pair is hardware protected, for supporting a single business application on the same device, comprising the following steps:
[0013] (1) Devices with a hardware security environment must have a hardware security environment certificate issued and injected before leaving the factory;
[0014] (2) During the usage phase, when the device needs to generate a business key pair for the application system in a hardware security environment, the hardware security environment issues a key certificate certificate and generates a certificate chain based on the certificate request.
[0015] (5) The public key of the key proof certificate in the certificate chain is the public key in the newly generated business key pair.
[0016] Optionally, in step (1), the device with a hardware security environment needs to complete the issuance and injection of a hardware security environment certificate before leaving the factory. Specifically,
[0017] Before leaving the factory, a hardware security environment key pair and certificate request are generated in the device's hardware security environment. The device manufacturer's root certificate is used to sign the certificate request and inject it into the device's hardware security environment.
[0018] Optionally, in step (2), when the device needs to generate a business key pair for the application system in a hardware security environment, the hardware security environment issues a key verification certificate and generates a certificate chain, specifically,
[0019] The hardware security environment first generates a business key pair, then generates a certificate request. Using the hardware security environment certificate injected before shipment, it issues a key verification certificate to the newly generated certificate request and generates a certificate chain. The public key in the key verification certificate is the same as the public key in the newly generated business key pair.
[0020] Optionally, the hardware security environment is a Trusted Execution Environment (TEE) and / or a Secure Element (SE).
[0021] This invention further provides a method for proving that a key pair is hardware protected, for supporting multiple business applications on the same device, comprising the following steps:
[0022] (1) Devices with a hardware security environment must have a hardware security environment certificate issued and injected before leaving the factory;
[0023] (3) During device initialization, an application domain key pair is generated in the device's hardware security environment, and an application domain certificate is issued using the hardware security environment certificate;
[0024] (4) During the usage phase, when the device needs to generate a business key pair for the application system in a hardware security environment, the hardware security environment issues a key certificate and generates a certificate chain based on the application domain certificate.
[0025] (5) The public key of the key proof certificate in the certificate chain is the public key in the newly generated business key pair.
[0026] Optionally, in step (1), the device with a hardware security environment needs to complete the issuance and injection of a hardware security environment certificate before leaving the factory. Specifically,
[0027] Before leaving the factory, a hardware security environment key pair and a first certificate request are generated in the device's hardware security environment. The device manufacturer's root certificate is used to sign the first certificate request and inject it into the device's hardware security environment.
[0028] Optionally, in step (3), during the device initialization phase, the hardware security environment generates an application domain key pair and issues an application domain certificate based on the hardware security environment certificate. Specifically,
[0029] In a hardware-secure environment, generate an application domain key pair and a second certificate request;
[0030] In a hardware-secure environment, the application domain certificate is issued for the second certificate request using the hardware-secure environment certificate and stored within the hardware-secure environment.
[0031] Optionally, in step (4), during the usage phase, when the device needs to generate a business key pair for the application system in a hardware security environment, the hardware security environment issues a key verification certificate and generates a certificate chain based on the application domain certificate. Specifically,
[0032] In a hardware-secure environment, generate business key pairs and third-party certificate requests;
[0033] In a hardware-secure environment, the application domain certificate requests a third-party certificate to issue a key verification certificate and generate a certificate chain, which is then stored within the hardware-secure environment.
[0034] Optionally, the hardware security environment is a Trusted Execution Environment (TEE) and / or a Secure Element (SE).
[0035] Optionally, the application domain corresponds to one or more applications of a service provider.
[0036] The present invention further provides a system for proving that a key pair is protected by hardware, including a hardware security environment on the device, an application (APP) on the device, and an application system, and uses the above-described method to prove the key.
[0037] The advantages of this invention are as follows: When using public-key cryptography in a high-security system, the method and system described herein may require proof that the key pair was generated within a legitimate hardware security environment to ensure that confidential information in the system is always protected by the hardware security environment and that signatures in the system are non-repudiable. Existing key proof methods are non-cryptographic, and the identifier associated with the public key may be tampered with during transmission. Existing key proof methods require that only external entities possessing the security domain key can establish a secure channel with the security chip; other participants cannot verify the key pair's generation location through this mechanism. Furthermore, managing and storing the security domain root key in the system increases additional costs. The method and system of this invention, when the device needs to disclose to external entities that the key pair it generates for the application system was generated within a hardware security environment, outputs a key proof certificate chain from the hardware security environment, replacing the public key output in traditional technologies. This provides cryptographic proof that "the key pair was generated within a hardware security environment" and "the hardware security environment that generated the key pair is authentic and trustworthy," and only the device manufacturer's root certificate is needed to verify this proof, reducing costs. Attached Figure Description
[0038] Figure 1 This refers to the key and certificate structure in the hardware security environment in a specific embodiment of the present invention;
[0039] Figure 2 This refers to the key and certificate structure in a hardware security environment under the scenario of multiple application domains in a specific embodiment of the present invention.
[0040] Figure 3 The specific embodiment of this invention describes the process of verifying key proof in a public-key cryptography application system. Detailed Implementation
[0041] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. The present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0042] Hardware security environments on mobile smart terminals include Trusted Execution Environments (TEEs) and Secure Elements (SEs, typically provided as chips). The TEE is a secure area residing on the main processor of the mobile smart terminal, providing security services such as secure storage of sensitive data and approved cryptographic algorithms. The Secure Element (SE) provides a secure execution environment for secure applications. The SE can securely store data and code logic, while also providing security services such as cryptographic algorithms and key protection.
[0043] Example 1
[0044] Please see Figure 1 This is a schematic diagram of a key and certificate structure in a hardware security environment according to this application. In this embodiment, the key and certificate structure in a hardware security environment involves the following parties: device manufacturers and devices.
[0045] Optionally, the equipment manufacturer possesses a root key and a root certificate. Furthermore, the equipment manufacturer can use the root key to generate the root certificate. The method of using the root key to generate the root certificate is a conventional method in the art and will not be elaborated upon here.
[0046] Optionally, the device includes a hardware security environment. This hardware security environment may include a Trusted Execution Environment (TEE) and / or a Secure Element (SE) or a combination thereof. The device manufacturer may inject its root certificate into the device's hardware security environment. Devices with a hardware security environment must have their hardware security environment certificate issued and injected before leaving the factory.
[0047] In this embodiment, the method for generating key proof includes:
[0048] S1. Before leaving the factory, complete the issuance and injection of the hardware security environment certificate for the device with hardware security environment;
[0049] Optionally, before shipment, a hardware security environment key pair and certificate request are generated in the device's hardware security environment, and a hardware security environment certificate is issued using the device manufacturer's root certificate. The obtained hardware security environment certificate is then injected into the device's hardware security environment.
[0050] S2. During the usage phase, when the device needs to generate a business key pair for the application system in a hardware security environment: The hardware security environment first generates the business key pair, then generates a certificate request, and uses the hardware security environment certificate injected before leaving the factory to issue a key verification certificate to the newly generated certificate request and generate a certificate chain. The public key in the key verification certificate is the same as the public key in the newly generated business key pair.
[0051] Example 2
[0052] Please see Figure 2 This is a schematic diagram of the key and certificate structure in a hardware security environment under a multi-application domain scenario, as described in this application. In this embodiment, the participants in the key and certificate structure of the hardware security environment under a multi-application domain scenario include: the device manufacturer and the device.
[0053] Optionally, the equipment manufacturer possesses a root key and a root certificate. Furthermore, the equipment manufacturer can use the root key to generate the root certificate. The method of using the root key to generate the root certificate is a conventional method in the art and will not be elaborated upon here.
[0054] Optionally, the device includes a hardware security environment. Unlike Embodiment 1, this embodiment includes multiple application domains within the hardware security environment to support multiple business applications on the same device. Each application domain can correspond to one or more applications from a service provider.
[0055] In this embodiment, the method for generating key proof includes:
[0056] S1. In the hardware security environment of the device, generate a hardware security environment key pair and certificate request A;
[0057] S2. The equipment manufacturer uses its root certificate to issue a hardware security environment certificate to certificate request A and injects it into the hardware security environment.
[0058] S3, In a hardware security environment, generate application domain key pairs and certificate request B;
[0059] S4. In a hardware security environment, an application domain certificate is issued to certificate request B using a hardware security environment certificate and stored in the hardware security environment.
[0060] S5. During the usage phase, when the device needs to generate a business key pair for the application system in a hardware security environment: The hardware security environment first generates the business key pair, then generates a certificate request, and uses the corresponding application domain certificate to issue a key verification certificate for the newly generated certificate request and generate a certificate chain. The key verification certificate chain includes: the device manufacturer's root certificate, the hardware security environment certificate, the application domain certificate, and the key verification certificate. The public key in the key verification certificate is the same as the public key in the newly generated key pair.
[0061] Example 3
[0062] Please see Figure 3 This diagram illustrates an example of the process by which a public-key cryptography application system verifies the aforementioned key proof. In this embodiment, the participants in the process of a public-key cryptography application system verifying the aforementioned key proof include: the security environment on the device, the application (APP) on the device, and the application system.
[0063] When a device needs to disclose the public key of the key pair it generates for an application system to an external entity, the hardware security environment will output a key verification certificate chain, replacing the public key output in traditional technologies.
[0064] The application system has access to the certificate information of the device manufacturer's root certificate and the certificate information of the hardware security environment certificate (optional). The application system can first verify the signature of the key proof certificate chain level by level; after the signature verification is successful, it checks whether the root certificate of the certificate chain is the device manufacturer's root certificate; then it checks the certificate information of the hardware security environment certificate in the certificate chain (optional); if the verification is successful, it can prove that the key pair to which the public key in the last-level certificate of the certificate chain belongs was generated in the hardware security environment, and at the same time, it can prove the authenticity of the hardware security environment that generated the key pair; otherwise, the key pair is considered untrustworthy.
[0065] Specifically, during the initialization phase, a hardware security environment certificate is injected into the device's hardware security environment, and the application domain certificate is issued using the hardware security environment certificate and stored within the hardware security environment.
[0066] During the usage phase, the application (APP) on the device requests the generation of a business key pair from the hardware security environment. The hardware security environment on the device generates the business key pair, issues a key verification certificate, and generates a certificate chain, returning the certificate chain to the application (APP). The application (APP) on the device then transmits the key verification certificate chain to the application system. The application system first verifies the key verification certificate chain level by level. After successful verification, it checks whether the root certificate of the certificate chain is the device manufacturer's root certificate; then it checks the certificate information of the hardware security environment certificate in the certificate chain (optional). If the verification passes, it proves that the key pair to which the public key in the last-level certificate of the certificate chain belongs was generated in the hardware security environment.
[0067] Those skilled in the art should understand that the methods and systems described and implemented in this invention are not limited to the embodiments described in the specific implementation details. The above detailed description is merely for illustrative purposes and is not intended to limit the invention. Other implementation methods derived by those skilled in the art based on the technical solutions of this invention also fall within the scope of the technical innovation of this invention. The scope of protection of this invention is defined by the claims and their equivalents.
Claims
1. A method for proving that a key pair is hardware protected, used to support a single business application or multiple business applications on the same device, characterized in that, Includes the following steps: (1) Devices with a hardware security environment must complete the issuance and injection of a hardware security environment certificate before leaving the factory; when supporting a single business application, execute steps (2) and (5); when supporting multiple business applications, execute steps (3), (4) and (5). (2) During the usage phase, when the device needs to generate a business key pair for the application system in a hardware security environment, the hardware security environment issues a key certificate certificate and generates a certificate chain based on the certificate request. (3) During device initialization, the device generates an application domain key pair in the hardware security environment and issues an application domain certificate using the hardware security environment certificate; (4) During the usage phase, when the device needs to generate a business key pair for the application system in a hardware security environment, the hardware security environment issues a key certificate and generates a certificate chain based on the application domain certificate. (5) The public key of the key proof certificate in the certificate chain is the public key in the newly generated business key pair.
2. The method for proving that a key pair is hardware protected as described in claim 1, characterized in that: When supporting a single business application, in step (1), the device with a hardware security environment needs to complete the issuance and injection of a hardware security environment certificate before leaving the factory. Specifically, Before leaving the factory, a hardware security environment key pair and certificate request are generated in the device's hardware security environment. The device manufacturer's root certificate is used to sign the certificate request and inject it into the device's hardware security environment.
3. The method for proving that a key pair is hardware protected as described in claim 1, characterized in that: When supporting a single business application, in step (2), when the device needs to generate a business key pair for the application system in a hardware security environment, the hardware security environment issues a key verification certificate, specifically, The hardware security environment first generates a business key pair, then generates a certificate request. The hardware security environment certificate injected before leaving the factory is used to issue a key proof certificate to the newly generated certificate request and generate a certificate chain. The public key in the key proof certificate is the public key in the newly generated business key pair.
4. The method for proving that a key pair is hardware protected as described in claim 1, characterized in that: When supporting multiple business applications, in step (1), the device with a hardware security environment needs to complete the issuance and injection of a hardware security environment certificate before leaving the factory. Specifically, Before leaving the factory, a hardware security environment key pair and a first certificate request are generated in the hardware security environment of the device. The device manufacturer's root certificate is used to sign the first certificate request and inject it into the hardware security environment of the device.
5. A method for proving that a key pair is hardware protected as described in claim 1, characterized in that: When multiple business applications are supported, in step (3), during the device initialization phase, the hardware security environment generates application domain key pairs and issues application domain certificates based on the hardware security environment certificate. Specifically, In a hardware-secure environment, generate an application domain key pair and a second certificate request; In a hardware-secure environment, the application domain certificate is issued for the second certificate request using the hardware-secure environment certificate and stored within the hardware-secure environment.
6. The method for proving that a key pair is hardware protected as described in claim 1, characterized in that: When multiple business applications are supported, in step (4), during the usage phase, when the device needs to generate a business key pair for the application system in a hardware security environment, the hardware security environment issues a key certificate and generates a certificate chain based on the application domain certificate. Specifically, In a hardware-secure environment, generate business key pairs and third-party certificate requests; In a hardware-secure environment, the application domain certificate requests a third-party certificate to issue a key verification certificate and generate a certificate chain, which is then stored within the hardware-secure environment.
7. A method for proving that a key pair is hardware protected as described in any one of claims 1-5, characterized in that: The hardware security environment is a trusted execution environment and / or a secure element, and the application domain corresponds to one or more applications of a service provider.
8. A system for proving key pairs is hardware protected, comprising a hardware security environment on the device, an application (APP) on the device, and an application system, characterized in that... Key verification is performed using the method described in any one of claims 1-7.