An identity authentication method, processor and related device

CN117544319BActive Publication Date: 2026-10-23PHYTIUM TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311649582.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-04
Publication Date
2026-10-23
Estimated Expiration
2043-12-04

AI Technical Summary

Technical Problem

虽然在密钥派生的过程中,会基于密钥申请者提供的密钥对派生算法和派生密钥进行加密,但是,在攻击者假冒密钥申请者的情况下,密钥由攻击者提供,因而无法保证派生密钥不被攻击者获得

Benefits of technology

[0020]本申请公开的身份认证方法、处理器和相关设备,在攻击者假冒密钥申请者的情况下,攻击者无法获得本层隔离域的私钥,或者,攻击者的提供的私钥无法与下层隔离域基于本层隔离域的身份标识从共享空间中获取本层隔离域的公钥匹配,导致数字签名无法通过验证,从而不能生成派生密钥,进而可以避免派生密钥被攻击者获得,进而可以提高设备的安全性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117544319B_ABST
    Figure CN117544319B_ABST
Patent Text Reader

Abstract

The application discloses an identity authentication method, a processor and related equipment, wherein the identity authentication method is applied to the processor, the processor is equipped with at least one execution environment, the execution environment comprises a plurality of isolated domains, and the identity authentication method comprises the following steps: generating a digital signature based on a private key of a current isolated domain and to-be-signed data, adding the digital signature and an identity identifier of the current isolated domain to a key derivation request; a public key of the current isolated domain is bound with the identity identifier of the current isolated domain and stored in a shared space of the plurality of isolated domains; the key derivation request is sent to a lower isolated domain, so that the lower isolated domain acquires the public key of the current isolated domain from the shared space based on the identity identifier of the current isolated domain, and verifies the digital signature based on the public key of the current isolated domain; if the verification is passed, the key derivation request is responded, so that the derived key is prevented from being obtained by an attacker, and the security of the equipment can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of processor technology, specifically to an authentication method, processor, and related devices. Background Technology

[0002] Key derivation technology refers to the technique of generating one or more derived keys from a base key or root key. During key derivation, the key requester sends a key derivation request, including the derivation algorithm, to the key deriver. The key deriver responds to the request, generates a derived key based on the algorithm, and returns the derived key to the key requester. Although the derivation algorithm and derived key are encrypted using the key provided by the key requester during the derivation process, if an attacker impersonates the key requester, the key is provided by the attacker, thus there is no guarantee that the derived key will not be obtained by the attacker. Summary of the Invention

[0003] This application discloses an authentication method, processor, and related devices for authenticating the identity of key applicants and preventing the derived key from being obtained by attackers.

[0004] In a first aspect, this application discloses an authentication method applied to a processor, the processor carrying at least one execution environment, the execution environment including multiple isolation domains, the authentication method comprising: generating a digital signature based on the private key of the current isolation domain and data to be signed; adding the digital signature and the identity identifier of the current isolation domain to a key derivation request; binding the public key of the current isolation domain with the identity identifier of the current isolation domain and storing it in a shared space of the multiple isolation domains; sending the key derivation request to a lower-level isolation domain, so that the lower-level isolation domain obtains the public key of the current isolation domain from the shared space based on the identity identifier of the current isolation domain, and verifies the digital signature based on the public key of the current isolation domain; if the verification is successful, responding to the key derivation request.

[0005] In some optional examples, the local isolation domain is the applicant isolation domain, and adding the digital signature and the identity identifier of the local isolation domain to the key derivation request includes: sending an information retrieval request to the derived root isolation domain to obtain the public key of the derived root isolation domain; the derived root isolation domain is the isolation domain for generating the derived key; encrypting the algorithm information required to generate the derived key based on the session key to generate algorithm information ciphertext; the session key includes a key randomly generated by the applicant isolation domain; encrypting the session key based on the public key of the derived root isolation domain to generate session key ciphertext; and adding the digital signature of the applicant isolation domain, the identity identifier of the applicant isolation domain, the algorithm information ciphertext, and the session key ciphertext to the key derivation request.

[0006] In some optional examples, the method further includes: adding a state mask of the local isolation domain to the key derivation request, the state mask of the local isolation domain being used to indicate at least one state information of the lower isolation domain, so that the lower isolation domain generates a derived key based on the state information, the state information including software state information and / or hardware state information.

[0007] Secondly, this application discloses an authentication method applied to a processor, the processor carrying at least one execution environment, the execution environment including multiple isolation domains, the authentication method comprising: receiving a key derivation request sent by an upper-layer isolation domain, the key derivation request including a digital signature generated based on the private key of the upper-layer isolation domain and data to be signed, and an identity identifier of the upper-layer isolation domain; obtaining the public key of the upper-layer isolation domain from a shared space of the multiple isolation domains based on the identity identifier of the upper-layer isolation domain, the public key of the upper-layer isolation domain being bound to the identity identifier of the upper-layer isolation domain and stored in the shared space; verifying the digital signature based on the public key of the upper-layer isolation domain; and responding to the key derivation request if the verification is successful.

[0008] In some optional examples, before responding to the key derivation request, the method further includes: adding state information of the current isolation domain to the key derivation request, the state information including software state information and / or hardware state information; after responding to the key derivation request, the method further includes: generating a derived key based on the state information, or sending a key derivation request with the state information to a lower isolation domain so that the lower isolation domain responds to the key derivation request and generates a derived key.

[0009] In some optional examples, adding the state information of the local isolation domain to the key derivation request includes: adding the state information of the local isolation domain to the path information of the key derivation request; generating the derived key based on the state information includes: generating the derived key based on the path information containing the state information.

[0010] In some optional examples, the key derivation request includes the state mask of the upper-layer isolation domain, and before adding the state information of the local isolation domain to the key derivation request, the method further includes: determining the state information of the local isolation domain based on the state mask of the upper-layer isolation domain and the state mask of the local isolation domain, wherein the state mask of the upper-layer isolation domain and the state mask of the local isolation domain are respectively used to indicate at least one state information of the local isolation domain.

[0011] In some optional examples, the local isolation domain is a derived root isolation domain, the key derivation request includes session key ciphertext and algorithm information ciphertext, and the generation of the derived key based on the state information includes: decrypting the session key ciphertext based on the private key of the derived root isolation domain to obtain the session key; decrypting the algorithm information ciphertext based on the session key to obtain the algorithm information; and generating the derived key based on the state information and the algorithm information.

[0012] In some optional examples, the method further includes: receiving an information retrieval request sent by the upper-layer isolation domain; responding to the information retrieval request by returning the public key of the derived root isolation domain to the upper-layer isolation domain, so that the applicant isolation domain can obtain the public key of the derived root isolation domain from the upper-layer isolation domain, and encrypting the session key based on the public key of the derived root isolation domain, wherein the session key includes a key randomly generated by the applicant isolation domain.

[0013] In some optional examples, generating a derived key based on the state information and the algorithm information includes generating a derived key based on the state information, the algorithm information, and the identity identifier of the derived root isolation domain.

[0014] In some optional examples, after generating the derived key based on the state information, the method further includes: generating a verification code for the derived key based on the session key; encrypting the derived key and the verification code using the session key to obtain the derived key ciphertext, and returning the derived key ciphertext to the upper-layer isolation domain so that the applicant isolation domain can obtain the derived key ciphertext from the upper-layer isolation domain.

[0015] In some optional examples, before sending the key derivation request with the state information to the lower-level isolation domain, the method further includes: regenerating a digital signature based on the private key of the current isolation domain and the data to be signed; and adding the identity identifier of the current isolation domain and the regenerated digital signature to the key derivation request.

[0016] In some optional examples, before sending the key derivation request with the state information to the lower-level isolation domain, the method further includes: adding the state mask of the current-level isolation domain to the key derivation request.

[0017] Thirdly, this application discloses a processor configured to perform the authentication method as described in any of the preceding claims.

[0018] Fourthly, this application discloses a computer device, comprising: a memory for storing instructions; and a processor for executing the authentication method described in any of the preceding claims according to the instructions stored in the memory.

[0019] Fifthly, this application discloses a computer-readable storage medium having instructions stored thereon for performing the authentication method as described in any of the preceding claims.

[0020] The authentication method, processor, and related devices disclosed in this application prevent attackers from obtaining the private key of the current isolation domain when the attacker impersonates the key applicant. Alternatively, the private key provided by the attacker cannot match the public key of the lower isolation domain obtained from the shared space based on the identity identifier of the current isolation domain. This results in the digital signature failing verification and thus preventing the generation of a derived key. Consequently, the derived key can be prevented from being obtained by the attacker, thereby improving the security of the device. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of this application or the background art, the accompanying drawings used in the embodiments of this application or the background art will be described below.

[0022] Figure 1 This is a flowchart of an identity authentication method disclosed in an embodiment of this application.

[0023] Figure 2 This is a flowchart of another identity authentication method disclosed in an embodiment of this application.

[0024] Figure 3 This is a flowchart of another identity authentication method disclosed in an embodiment of this application.

[0025] Figure 4 This is a flowchart of another identity authentication method disclosed in an embodiment of this application.

[0026] Figure 5 This is a flowchart of another identity authentication method disclosed in an embodiment of this application.

[0027] Figure 6 This is a flowchart of another identity authentication method disclosed in an embodiment of this application.

[0028] Figure 7 This is a schematic diagram of the structure of a computer device disclosed in an embodiment of this application. Detailed Implementation

[0029] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0030] With increasing security demands, more and more security technologies are being applied to various computer devices. Generating derived keys based on a Hardware Unique Key (HUK) not only binds the derived keys to the device containing the HUK, making them undecryptable outside the HUK's device and further enhancing data security, but also allows for the generation of multiple derived keys based on a single HUK and various derivation algorithms. This satisfies the key requirements of diverse application scenarios. Therefore, the method of generating derived keys based on the HUK has gained widespread acceptance and use.

[0031] During key derivation, the key requester sends a key derivation request, including the derivation algorithm, to the key deriver. This algorithm can use the chip identifier and a key string as parameters. The key deriver responds to the request, generating a derived key based on the derivation algorithm and a base key such as HUK, and returns the derived key to the key requester. Although the derivation algorithm and the derived key are encrypted using the key provided by the key requester during the derivation process, if an attacker impersonates the key requester, the key is provided by the attacker, thus there is no guarantee that the derived key will not be obtained by the attacker.

[0032] Based on this, this application discloses an identity authentication scheme in which the key applicant generates a digital signature based on the private key and the data to be signed, and adds the digital signature and its identity identifier to the key derivation request. This allows the key deriver and others to obtain the public key from the shared space based on the identity identifier after receiving the key derivation request, and to verify the digital signature based on the public key in order to authenticate the key applicant.

[0033] As an optional implementation of the disclosure in this application, an embodiment of this application discloses an authentication method applied to a processor, the processor being equipped with at least one execution environment, the execution environment including multiple isolation domains.

[0034] It should be noted that a processor can be equipped with one execution environment, such as a Trusted Execution Environment (TEE), or multiple execution environments, such as a Trusted Execution Environment, a Rich Execution Environment (REE), and a System Control Processor (SCP) execution environment.

[0035] Each execution environment can be further divided into kernel mode, user mode, services, processes, threads, and other elements, which can be collectively referred to as partitions. In other words, each execution environment can be further divided into kernel mode, user mode partitions, service partitions, process partitions, thread partitions, etc. Each partition has a defined logical boundary; or rather, there are isolation mechanisms between partitions, and partitions can only interact through predefined interfaces.

[0036] Each isolation domain has a key derivation requirement. For example, the device authentication service in SCP, the secure storage service in TEE, and the key repository service at the Trusted Application (TA) level all have key derivation requirements. The client application (CA) on the REE side also uses the cryptographic derivation service provided by the TA on the REE side. Therefore, it is necessary to ensure the security of key derivation in each isolation domain.

[0037] like Figure 1 As shown in the embodiment of this application, an identity authentication method includes:

[0038] S101: Generate a digital signature based on the private key of this isolation domain and the data to be signed;

[0039] In some embodiments of this application, the base key, such as HUK, is stored in a trusted isolation domain of the trusted execution environment. This trusted isolation domain is hereinafter referred to as the root derivation isolation domain; that is, the root derivation isolation domain is the isolation domain for generating derived keys. When other isolation domains have key derivation needs, they can send a key derivation request to the root derivation isolation domain. The root derivation isolation domain can respond to the key derivation request, generate the corresponding derived key based on the base key, such as HUK, and feed back the generated derived key to the isolation domain with the key derivation need, hereinafter referred to as the applicant isolation domain. The key applicant can be located in the applicant isolation domain, and the key deriver can be located in the root derivation isolation domain.

[0040] It is understandable that before the applicant isolation domain sends a key derivation request to the derived root isolation domain, the applicant isolation domain is the current isolation domain, and the isolation domain receiving the key derivation request is the lower-level isolation domain of the current isolation domain. It should be noted that this lower-level isolation domain can be the derived root isolation domain, or it can be an intermediate isolation domain between the applicant isolation domain and the derived root isolation domain. This intermediate isolation domain is used to forward requests or data between the applicant isolation domain and the derived root isolation domain on the communication path between them.

[0041] In some embodiments of this application, when each isolation domain is established, each isolation domain generates its own asymmetric key using asymmetric cryptography. This asymmetric key includes a public key and a private key. Encryption using the public key of any isolation domain can be performed using the private key of that isolation domain. Similarly, a digital signature generated using the private key of any isolation domain and the data to be signed can be verified using the public key of that isolation domain. It is understood that the public and private keys are generated autonomously by the isolation domain, thus eliminating the need for additional key storage mechanisms and certificates. Furthermore, the private key cannot be obtained by third parties such as attackers, thereby ensuring the security of identity authentication.

[0042] S102: Add the digital signature and the identity identifier of this isolation domain to the key derivation request; the public key of this isolation domain is bound to the identity identifier of this isolation domain and stored in the shared space of multiple isolation domains;

[0043] In some embodiments of this application, the current isolation domain is the applicant isolation domain. Before sending a key derivation request to the derived root isolation domain, the applicant isolation domain generates a digital signature based on its private key and the data to be signed, and adds the applicant isolation domain's digital signature and identity identifier to the key derivation request. The data to be signed may include algorithm information or other information required by the key derivation request.

[0044] Of course, this application is not limited to this. In some other embodiments, in order to ensure the security of key derivation, the identity of each layer of isolation domain on the communication path between the applicant isolation domain and the derived root isolation domain will be verified to ensure that attackers cannot impersonate the identity on the same path.

[0045] In other words, the current isolation domain can be either the applicant isolation domain or an intermediate isolation domain. Before sending a key derivation request to the next lower isolation domain, either the applicant isolation domain or an intermediate isolation domain will generate a digital signature based on the private key of its current isolation domain and the data to be signed, and add the digital signature and identity identifier of its current isolation domain to the key derivation request. Therefore, regardless of which isolation domains exist between the applicant isolation domain and the root derivation domain, a third party, i.e., an attacker, cannot compromise the confidentiality of the information and thus cannot impersonate the root derivation domain to generate a derived key.

[0046] S103: Send a key derivation request to the lower-level isolation domain so that the lower-level isolation domain can obtain the public key of the lower-level isolation domain from the shared space based on the identity of the lower-level isolation domain, and verify the digital signature based on the public key of the lower-level isolation domain. If the verification is successful, respond to the key derivation request.

[0047] In some embodiments of this application, such as Figure 2As shown, before sending a key derivation request to the root isolation domain, the applicant isolation domain generates a digital signature based on its private key and the data to be signed, and adds the applicant isolation domain's digital signature and identity identifier to the key derivation request. Upon receiving the key derivation request, the root isolation domain retrieves the applicant isolation domain's public key from the shared space of multiple isolation domains based on the applicant isolation domain's identity identifier. The applicant isolation domain's public key is bound to its identity identifier and stored in the shared space of multiple isolation domains. Then, based on the applicant isolation domain's public key, the root isolation domain verifies the applicant isolation domain's digital signature. If the verification passes, the applicant isolation domain's identity authentication is successful, and the root isolation domain responds to the key derivation request. If the verification fails, the applicant isolation domain's identity authentication fails, and the root isolation domain does not respond to the key derivation request.

[0048] Of course, this application is not limited to this; in other embodiments, such as... Figure 3 As shown, before sending a key derivation request to the root isolation domain, the applicant isolation domain generates a digital signature based on its private key and the data to be signed, and adds the applicant isolation domain's digital signature and identity identifier to the key derivation request. Upon receiving the key derivation request, the intermediate isolation domain retrieves the applicant isolation domain's public key from the shared space of multiple isolation domains based on the applicant isolation domain's identity identifier. Then, based on the applicant isolation domain's public key, it verifies the applicant isolation domain's digital signature. If the verification fails, the applicant isolation domain's authentication fails, and the intermediate isolation domain does not forward the key derivation request. If the verification succeeds, the applicant isolation domain's authentication succeeds, and the intermediate isolation domain regenerates the digital signature based on its own private key and the data to be signed, adds the intermediate isolation domain's digital signature and identity identifier to the key derivation request, and then sends the key derivation request to the root isolation domain. After receiving a key derivation request, the derived root isolation domain retrieves the public key of the intermediate isolation domain from the shared space of multiple isolation domains based on the identity identifier of the intermediate isolation domain. The public key of the intermediate isolation domain is bound to the identity identifier of the intermediate isolation domain and stored in the shared space of multiple isolation domains. Then, based on the public key of the intermediate isolation domain, the digital signature of the intermediate isolation domain is verified. If the verification is successful, the identity authentication of the intermediate isolation domain is successful, and the derived root isolation domain responds to the key derivation request. If the verification fails, the identity authentication of the intermediate isolation domain fails, and the derived root isolation domain does not respond to the key derivation request.

[0049] It should be noted that in some embodiments of this application, after each isolation domain generates its own asymmetric key, it binds the public key with its identity identifier and stores it in the shared space. However, this application is not limited to this. In other embodiments, the public keys of each intermediate isolation domain can be bound with their identities and stored in the shared space in the initial stage. In the key derivation stage, the applicant isolation domain then binds its public key with its identity identifier and stores it in the shared space. After the applicant isolation domain receives the derived key from the root isolation domain, it can remove its public key and identity identifier from the shared space.

[0050] If an attacker impersonates a key applicant, the attacker cannot obtain the private key of this isolation domain, or the private key provided by the attacker cannot match the public key of the lower isolation domain obtained from the shared space based on the identity of this isolation domain. This causes the digital signature to fail verification, thus preventing the generation of a derived key. This can prevent the derived key from being obtained by the attacker, thereby improving the security of the device.

[0051] In some embodiments of this application, the current isolation domain is the applicant isolation domain. Before sending a key derivation request to the derived root isolation domain, the applicant isolation domain adds the algorithm information required to generate the derived key to the key derivation request. To ensure the security of the algorithm information, the applicant isolation domain encrypts the algorithm information using symmetric encryption technology. Specifically, the applicant isolation domain generates a session key and encrypts the algorithm information based on the session key to generate ciphertext of the algorithm information. The session key includes a key randomly generated by the applicant isolation domain. In some embodiments, the ciphertext of the algorithm information also includes a timestamp when encryption begins, so as to determine whether there has been a prolonged period of no response to the encryption service; if so, the encryption service is considered to have failed.

[0052] Furthermore, in order to ensure that the derived root isolation domain can decrypt the algorithm information ciphertext to obtain the algorithm information, the applicant isolation domain will encrypt the session key based on the public key of the lower-level isolation domain where the key deriver is located, i.e., the derived root isolation domain, to generate session key ciphertext. The session key ciphertext and the algorithm information ciphertext, along with their digital signature and identity identifier, are added to the key derivation request, and the key derivation request is sent to the derived root isolation domain.

[0053] In some embodiments, before the applicant isolation domain sends a key derivation request to the root isolation domain, it also sends an information retrieval request to the root isolation domain to obtain the root isolation domain's public key. Based on this, after receiving the key derivation request, the root isolation domain can decrypt the session key ciphertext using its own private key to obtain the session key, decrypt the algorithm information ciphertext using the session key to obtain the algorithm information, and generate a derived key based on the state information and the algorithm information.

[0054] In some embodiments, the derived root isolation domain also returns a digital signature generated based on its private key and the data to be signed to the applicant isolation domain. The applicant isolation domain can then verify the received public key of the derived root isolation domain based on the digital signature of the derived root isolation domain. The data to be signed is the public key of the derived root isolation domain.

[0055] In some embodiments, when the applicant isolation domain receives the public key returned by the derived root isolation domain, it also obtains the path information between the applicant isolation domain and the derived root isolation domain. The applicant isolation domain saves the path information obtained initially and compares it with the path information obtained initially after each subsequent acquisition. If they match, the applicant isolation domain sends a key derivation request to the derived root isolation domain; if they do not match, the applicant isolation domain does not send a key derivation request to the derived root isolation domain.

[0056] In some embodiments of this application, the local isolation domain also adds its own state mask to the key derivation request. The state mask indicates at least one state information of the lower-level isolation domain, enabling the lower-level isolation domain to generate a derived key based on the state information. The state information includes software state information and / or hardware state information. This local isolation domain can be the applicant's isolation domain or an intermediate isolation domain.

[0057] like Figure 4 As shown in the embodiments of this application, another identity authentication method includes:

[0058] S201: Receive a key derivation request sent by the upper-layer isolation domain. The key derivation request includes a digital signature generated based on the private key of the upper-layer isolation domain and the data to be signed, as well as the identity identifier of the upper-layer isolation domain.

[0059] S202: Based on the identity identifier of the upper-level isolation domain, obtain the public key of the upper-level isolation domain from the shared space of multiple isolation domains. The public key of the upper-level isolation domain is bound to the identity identifier of the upper-level isolation domain and stored in the shared space.

[0060] S203: Verify digital signatures based on the public key of the upper-layer isolation domain;

[0061] S204: If the verification is successful, respond to the key derivation request.

[0062] In this embodiment, the current isolation domain can be a derived root isolation domain or an intermediate isolation domain, and the upper isolation domain can be the applicant isolation domain or an intermediate isolation domain.

[0063] Taking a scenario where the current isolation domain is the derived root isolation domain and the upper-level isolation domain is the applicant isolation domain as an example, such as... Figure 2As shown, after receiving the key derivation request from the applicant's isolation domain, the derived root isolation domain will obtain the applicant's public key from the shared space of multiple isolation domains based on the identity identifier of the applicant's isolation domain in the key derivation request. Then, based on the applicant's public key, it will verify the applicant's digital signature. If the verification is successful, the applicant's isolation domain is authenticated and the derived root isolation domain responds to the key derivation request. If the verification fails, the applicant's isolation domain is authenticated but not, and the derived root isolation domain does not respond to the key derivation request.

[0064] Taking the current isolation domain as an intermediate isolation domain and the upper isolation domain as the applicant's isolation domain as an example, such as Figure 3 As shown, after receiving the key derivation request from the applicant's isolation domain, the intermediate isolation domain retrieves the applicant's public key from the shared space of multiple isolation domains based on the applicant's isolation domain's identity identifier in the key derivation request. Then, based on the applicant's isolation domain's public key, it verifies the applicant's isolation domain's digital signature. If the verification fails, the applicant's isolation domain's identity authentication fails, and the intermediate isolation domain does not forward the key derivation request. If the verification passes, the applicant's isolation domain's identity authentication passes, and the intermediate isolation domain regenerates the digital signature based on its private key and the data to be signed. It then adds the intermediate isolation domain's digital signature and identity identifier to the key derivation request and sends the key derivation request to the derived root isolation domain.

[0065] Taking a scenario where the current isolation level is a derived root isolation level and the upper-level isolation level is an intermediate isolation level, as an example... Figure 3 As shown, after receiving a key derivation request, the derived root isolation domain will obtain the public key of the intermediate isolation domain from the shared space of multiple isolation domains based on the identity identifier of the intermediate isolation domain. Then, based on the public key of the intermediate isolation domain, it will verify the digital signature of the intermediate isolation domain. If the verification is successful, the identity authentication of the intermediate isolation domain is successful, and the derived root isolation domain responds to the key derivation request. If the verification fails, the identity authentication of the intermediate isolation domain fails, and the derived root isolation domain does not respond to the key derivation request.

[0066] In some embodiments of this application, before responding to a key derivation request, the current isolation domain adds its own state information to the key derivation request. This state information includes software state information and / or hardware state information. After responding to the key derivation request, if the current isolation domain is a root isolation domain, it generates a derived key based on the state information; if the current isolation domain is an intermediate isolation domain, it sends the key derivation request with the state information to the next lower isolation domain.

[0067] In some embodiments, such as Figure 5As shown, when the current isolation domain is a derived root isolation domain, after the applicant isolation domain is authenticated by the derived root isolation domain, the derived root isolation domain adds its state information to the key derivation request, responds to the key derivation request, generates a derived key based on the state information, and returns the derived key to the applicant isolation domain. Of course, this application is not limited to this; in other embodiments, such as... Figure 6 As shown, when the current isolation domain is an intermediate isolation domain, after the applicant isolation domain is authenticated by the intermediate isolation domain, the intermediate isolation domain will regenerate the digital signature based on its private key and the data to be signed, add its status information, digital signature, and identity identifier to the key derivation request, and send the key derivation request to the lower isolation domain. This allows the lower isolation domain, like the derived root isolation domain, to authenticate the intermediate isolation domain, add its status information to the key derivation request, respond to the key derivation request, generate a derived key based on the status information, and return the derived key to the applicant isolation domain.

[0068] Understandably, the lower-level isolation domain can be a derived root isolation domain or an intermediate isolation domain. After receiving a key derivation request from its own isolation domain, the lower-level isolation domain transforms into the upper-level isolation domain, and the lower-level isolation domain transforms back into its own isolation domain. Then, it repeats the steps of adding the state information of its own isolation domain to the key derivation request, responding to the key derivation request, generating a derived key based on the state information, or sending a key derivation request with state information to the lower-level isolation domain, until a derived key is generated.

[0069] It should be noted that, Figure 3 and Figure 6 This paper only uses the example of an intermediate isolation domain between the applicant isolation domain and the derived root isolation domain. However, this application is not limited to this. In other embodiments, there may be multiple layers of intermediate isolation domains between the applicant isolation domain and the derived root isolation domain, which will not be described in detail here.

[0070] Because when a device is attacked or maliciously accessed, the software execution environment of the computer device will change from a normal state to a fault or alarm state. The state information of the isolation domain, namely the software state information and / or hardware state information, will be different between the normal state and the fault or alarm state. Therefore, the derived key generated based on the state information when the device is attacked or maliciously accessed is different from the derived key generated based on the state information when the device is not attacked or maliciously accessed. In other words, when the device is attacked or maliciously accessed, the derived key cannot be correctly reproduced. This not only ensures the security of key derivation but also ensures that the device's important data is not leaked, thereby improving the device's security.

[0071] In some embodiments of this application, software state information and / or hardware state information that changes with the software environment can be added as state information to the key derivation request. The software state information may include stack information, software version information, software lifecycle information, software developer information, or software licensing information, etc., while the hardware state information may include device security lifecycle states, etc. The device security lifecycle states may include assembly state, injection state, security state, debugging state, and obsolescence state, etc.

[0072] For example, assuming the state information is stack information, when the device is not attacked or maliciously accessed, the device's software execution environment is in a normal state. The state information obtained by this isolation layer is the first stack information A. The derived key is generated using A as the algorithm parameter. However, when the device is attacked or maliciously accessed, the device's software execution environment is in a fault or alarm state. The state information obtained by this isolation layer is the second stack information B. The derived key is generated using B as the algorithm parameter. Because the algorithm parameters are different, the generated derived keys are different. Therefore, the derived key generated based on A is not the same as the derived key generated based on B. Consequently, when the device is attacked or maliciously accessed, the derived key cannot be correctly reproduced.

[0073] In some embodiments of this application, the derived key can be generated based solely on the state information of the derived root isolation domain. However, this application is not limited to this; in other embodiments, the derived key can be generated based on the state information of the derived root isolation domain and the state information of each intermediate isolation domain.

[0074] In some embodiments, adding the state information of the local isolation domain to the key derivation request includes: adding the state information of the local isolation domain to the path information of the key derivation request; generating a derived key based on the state information of the local isolation domain includes: generating a derived key based on the path information containing the state information of the local isolation domain.

[0075] Understandably, the path information of a key derivation request includes information about each layer of isolation domains along the communication path between the applicant isolation domain and the derived root isolation domain. After receiving the key derivation request, each layer of isolation domain adds its status information to the path information corresponding to its own layer of isolation domain. Thus, after the derived root isolation domain receives the key derivation request, the path information of the key derivation request will contain the status information of each layer of isolation domains along its communication path, excluding the applicant isolation domain. The derived root isolation domain can generate a derived key based on the path information including the status information of each layer of isolation domains, excluding the applicant isolation domain. This ensures that the derived key cannot be correctly reproduced if any intermediate isolation domain or the derived root isolation domain is attacked, thereby further guaranteeing the security of key derivation.

[0076] In some embodiments of this application, before adding the state information of the current isolation domain to the key derivation request, the current isolation domain can determine its state information based on its state mask. For example, the current isolation domain can determine that its state information is stack information based on its state mask. However, this application is not limited to this. In other embodiments, to further ensure the security of key derivation, before adding the state information of the current isolation domain to the key derivation request, the current isolation domain can determine its state information based on the state mask of its upper-level isolation domain and the state mask of its own isolation domain.

[0077] The state mask of the upper-level isolation domain and the state mask of the current-level isolation domain are used to indicate at least one type of state information of the current-level isolation domain. Assuming the state mask of the upper-level isolation domain indicates software lifecycle information, and the state mask of the current-level isolation domain indicates stack information, then the state information of the current-level isolation domain can be determined to be both software lifecycle information and stack information. It should be noted that the state mask of the upper-level isolation domain is a pre-defined inherent parameter of the upper-level isolation domain, and the state mask of the current-level isolation domain is a pre-defined inherent parameter of the current-level isolation domain.

[0078] It should be noted that the key derivation request received by this isolation layer includes the state mask of the upper isolation layer. In other words, before sending the key derivation request to this isolation layer, the upper isolation layer adds its state mask to the request. Similarly, before sending a key derivation request with state information to the lower isolation layer, this isolation layer adds its own state mask to the request, so that the lower isolation layer can determine its state information based on its own state mask and the state mask of this isolation layer.

[0079] Specifically, before sending a key derivation request, the applicant isolation domain adds its own state mask to the request. Before sending a key derivation request, any intermediate isolation domain adds its own state mask to the request, so that any intermediate or derived root isolation domain can determine its state information based on its own state mask and the state mask of its upper-level isolation domain.

[0080] In some embodiments of this application, in addition to using status information as algorithm parameters, algorithm information also needs to be specified as algorithm parameters. This algorithm information may be chip identifier and key strings, etc., and this algorithm information may be specified by the applicant's isolation domain.

[0081] In some embodiments of this application, before the applicant isolation domain sends a key derivation request to the derived root isolation domain, the applicant isolation domain adds the algorithm information required to generate the derived key to the key derivation request. To ensure the security of the algorithm information, the applicant isolation domain encrypts the algorithm information based on symmetric encryption technology. Specifically, the applicant isolation domain generates a session key and encrypts the algorithm information based on the session key to generate ciphertext of the algorithm information.

[0082] Furthermore, in order to ensure that the derived root isolation domain can decrypt the algorithm information ciphertext to obtain the algorithm information, the applicant isolation domain will encrypt the session key based on the public key of the lower-level isolation domain where the key deriver is located, i.e., the derived root isolation domain, to generate session key ciphertext. The session key ciphertext and the algorithm information ciphertext, along with their digital signature and identity identifier, are added to the key derivation request, and the key derivation request is sent to the derived root isolation domain.

[0083] Based on this, when the current isolation domain is a derived root isolation domain, the current isolation domain will decrypt the session key ciphertext based on its private key to obtain the session key, decrypt the algorithm information ciphertext based on the session key to obtain the algorithm information, and generate a derived key based on the state information and the algorithm information.

[0084] When the current isolation domain is a derived root isolation domain, after receiving a message retrieval request from the upper isolation domain, the current isolation domain will respond by returning its public key (i.e., the public key of the derived root isolation domain) to the upper isolation domain. This allows the upper isolation domain to encrypt the session key based on the public key of the current isolation domain. The upper isolation domain can be either the requester's isolation domain or an intermediate isolation domain.

[0085] In some embodiments of this application, when the local isolation domain is a derived root isolation domain, to further ensure the security of key derivation, the local isolation domain can generate derived keys not only based on state information and algorithm information, but also based on state information, algorithm information, and the identity identifier of the local isolation domain (i.e., the derived root isolation domain), to distinguish derived keys from different derived root isolation domains. Because the identity identifier of the isolation domain is also used as an algorithm parameter for key derivation, the path traversed when obtaining the derived key must be completely identical to reproduce the derived key. Of course, in other embodiments, derived keys can also be generated based on other information, which will not be elaborated here.

[0086] In some embodiments of this application, when the current isolation domain is a derived root isolation domain, after generating a derived key based on the state information of the current isolation domain, a verification code for the derived key is also generated based on the session key. The derived key and the verification code are then encrypted using the session key to obtain the ciphertext of the derived key, which is then returned to the upper isolation domain, i.e., the applicant's isolation domain. The verification code can be an HMAC message authentication code generated using the HMAC algorithm, and the algorithm key for the HMAC algorithm can be the hash value of the algorithm information. Of course, this application is not limited to this; in other embodiments, the derived key can also be directly encrypted based on the session key to obtain the ciphertext of the derived key, which will not be elaborated here.

[0087] After the derived root isolation domain returns the derived key ciphertext to the applicant isolation domain, the applicant isolation domain can decrypt the derived key ciphertext based on its own stored session key to obtain the derived key and verification code. Then, it generates a verification code based on its own stored session key and compares the verification code with the verification code. If the two match, the session key verification is successful, and encryption operations can be performed based on the obtained derived key.

[0088] As an optional implementation of the disclosure in this application, an embodiment of this application discloses a processor configured to execute the authentication method disclosed in any of the above embodiments. The processor may be a general-purpose processor, such as a general-purpose central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the program in this application. It may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0089] As an optional implementation of the disclosure in this application, an embodiment of this application discloses a computer device. For example... Figure 7 As shown, a computer device may include one or more processors 20 and one or more memories 30. It is understood that the computer device may include other components as needed.

[0090] A computer device may load and therefore include one or more applications. These applications are sets of instructions (e.g., computer program code) that, when read by one or more processors 20, control the operation of the computer device. For this purpose, one or more memories 30 may include instructions / data executable by one or more processors 20, thereby enabling the computer device to perform the methods disclosed according to at least one embodiment of this disclosure.

[0091] As an optional implementation of the disclosure in this application, an embodiment of this application discloses a computer program product, which includes computer program instructions. When the computer program instructions are run by a processor, the processor executes the authentication method disclosed in any of the above embodiments.

[0092] Computer program products can be written in any combination of one or more programming languages ​​to perform the operations of the embodiments of this application. The programming languages ​​include object-oriented programming languages ​​such as Python and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0093] As an optional implementation of the disclosure in this application, embodiments of this application disclose a computer-readable storage medium storing instructions thereon for performing the authentication method disclosed in any of the above embodiments.

[0094] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this specification can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0095] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0096] The above embodiments are merely illustrative of several implementation methods described in detail, but they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this specification, and these all fall within the scope of protection of this specification. Therefore, the scope of protection of this patent should be determined by the appended claims.

Claims

1. An identity authentication method, characterized in that, Applied to a processor, the processor having at least one execution environment, the execution environment including multiple isolation domains, each isolation domain being an element within the execution environment with defined logical boundaries, the authentication method includes: A digital signature is generated based on the private key of this isolation domain and the data to be signed; The digital signature and the identity identifier of the current isolation domain are added to the key derivation request; the public key of the current isolation domain is bound to the identity identifier of the current isolation domain and stored in the shared space of the multiple isolation domains; The key derivation request is sent to the lower-level isolation domain so that the lower-level isolation domain can obtain the public key of the lower-level isolation domain from the shared space based on the identity identifier of the lower-level isolation domain, and verify the digital signature based on the public key of the lower-level isolation domain. If the verification is successful, the key derivation request is responded to.

2. The identity authentication method according to claim 1, characterized in that, The current isolation domain is the applicant's isolation domain. Adding the digital signature and the identity identifier of the current isolation domain to the key derivation request includes: Send a message retrieval request to the derived root isolation domain to obtain the public key of the derived root isolation domain; the derived root isolation domain is the isolation domain that generates the derived key; Based on the session key, the algorithm information required to generate the derived key is encrypted to generate ciphertext of the algorithm information; the session key includes a key randomly generated by the applicant's isolation domain. Based on the public key of the derived root isolation domain, the session key is encrypted to generate session key ciphertext; Add the digital signature of the applicant's isolation domain, the identity identifier of the applicant's isolation domain, the ciphertext of the algorithm information, and the ciphertext of the session key to the key derivation request.

3. The identity authentication method according to claim 1 or 2, characterized in that, Also includes: The state mask of the current isolation domain is added to the key derivation request. The state mask of the current isolation domain is used to indicate at least one state information of the lower isolation domain so that the lower isolation domain can generate a derived key based on the state information. The state information includes software state information and / or hardware state information.

4. An identity authentication method, characterized in that, Applied to a processor, the processor having at least one execution environment, the execution environment including multiple isolation domains, each isolation domain being an element within the execution environment with defined logical boundaries, the authentication method includes: Receive a key derivation request sent by the upper-layer isolation domain, the key derivation request including a digital signature generated based on the private key of the upper-layer isolation domain and the data to be signed, and the identity identifier of the upper-layer isolation domain; Based on the identity identifier of the upper-layer isolation domain, the public key of the upper-layer isolation domain is obtained from the shared space of the multiple isolation domains. The public key of the upper-layer isolation domain is bound to the identity identifier of the upper-layer isolation domain and stored in the shared space. The digital signature is verified based on the public key of the upper-layer isolation domain; If the verification is successful, the key derivation request will be responded to.

5. The identity authentication method according to claim 4, characterized in that, Before responding to the key derivation request, the method further includes: adding the status information of the current isolation domain to the key derivation request, wherein the status information includes software status information and / or hardware status information; After responding to the key derivation request, the method further includes: generating a derived key based on the state information, or sending a key derivation request with the state information to a lower-level isolation domain, so that the lower-level isolation domain responds to the key derivation request and generates a derived key.

6. The identity authentication method according to claim 5, characterized in that, Adding the state information of the current isolation domain to the key derivation request includes adding the state information of the current isolation domain to the path information of the key derivation request; The process of generating a derived key based on the state information includes: generating a derived key based on path information containing the state information.

7. The identity authentication method according to claim 5, characterized in that, The key derivation request includes the state mask of the upper-layer isolation domain. Before adding the state information of the current-layer isolation domain to the key derivation request, the process further includes: The state information of the current isolation domain is determined based on the state mask of the upper isolation domain and the state mask of the current isolation domain. The state mask of the upper isolation domain and the state mask of the current isolation domain are respectively used to indicate at least one state information of the current isolation domain.

8. The identity authentication method according to claim 5, characterized in that, The local isolation domain is a derived root isolation domain, the key derivation request includes session key ciphertext and algorithm information ciphertext, and the generation of the derived key based on the state information includes: Based on the private key of the derived root isolation domain, the session key ciphertext is decrypted to obtain the session key; Based on the session key, the ciphertext of the algorithm information is decrypted to obtain the algorithm information; A derived key is generated based on the state information and the algorithm information.

9. The identity authentication method according to claim 8, characterized in that, Also includes: Receive the information retrieval request sent by the upper-layer isolation domain; In response to the information retrieval request, the public key of the derived root isolation domain is returned to the upper-level isolation domain so that the applicant isolation domain can obtain the public key of the derived root isolation domain from the upper-level isolation domain and encrypt the session key based on the public key of the derived root isolation domain. The session key includes a key randomly generated by the applicant isolation domain.

10. The identity authentication method according to claim 8, characterized in that, The process of generating the derived key based on the state information and the algorithm information includes: A derived key is generated based on the state information, the algorithm information, and the identity identifier of the derived root isolation domain.

11. The identity authentication method according to claim 8, characterized in that, After generating the derived key based on the state information, the process further includes: Based on the session key, a verification code for the derived key is generated; Using the session key, the derived key and the verification code are encrypted to obtain the derived key ciphertext, and the derived key ciphertext is returned to the upper-layer isolation domain so that the applicant isolation domain can obtain the derived key ciphertext from the upper-layer isolation domain.

12. The identity authentication method according to claim 5, characterized in that, Before sending the key derivation request with the state information to the lower-level isolation domain, the method further includes: Based on the private key of the isolated domain and the data to be signed, a digital signature is regenerated; Add the identity identifier of the current isolation domain and the regenerated digital signature to the key derivation request.

13. The identity authentication method according to claim 5 or 12, characterized in that, Before sending the key derivation request with the state information to the lower-level isolation domain, the method further includes: Add the state mask of the current isolation domain to the key derivation request.

14. A processor, characterized in that, It is configured to perform the authentication method as described in any one of claims 1 to 3 or 4 to 13.

15. A computer device, characterized in that, include: Memory, used to store instructions; A processor is configured to execute the authentication method as described in any one of claims 1 to 3 or 4 to 13, according to instructions stored in the memory.

16. A computer-readable storage medium, characterized in that, It stores instructions for performing the authentication method as described in any one of claims 1 to 3 or 4 to 13.

Citation Information

Patent Citations

  • Cross-domain secure multi-party computing method and device based on trusted execution environment

    CN111082934A

  • Key management method, key management device and computing equipment

    CN113821835A