Method and device for creating data

By selecting the appropriate creation mode in virtual or physical TPM based on data characteristics and business scenarios, the problem of low security of virtual TPM solutions is solved, a balance between security and cost of data creation is achieved, and it adapts to the needs of different scenarios.

CN118540709APending Publication Date: 2024-08-23HUAWEI TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310195025.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-23
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

Existing virtual TPM (vTPM) solutions based on open source software have low security issues and are difficult to effectively protect important data in core network elements. Attackers can easily steal and tamper with data stored in memory and hard disks.

Method used

By receiving data instructions, determine the appropriate creation mode according to the mapping relationship and data characteristics, use simulation mode, instance mode or reuse mode to create data to ensure the safe storage of data in virtual or physical TPM, and select the appropriate one according to business scenarios and security requirements. creation model, reducing costs and improving security.

Benefits of technology

It achieves while ensuring data security, reducing data creation costs, avoiding business dysfunction caused by different creation modes, adapting to the needs of different business scenarios, and improving the security and reliability of data storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118540709A
    Figure CN118540709A
Patent Text Reader

Abstract

The invention relates to the field of information security, and provides a data creation method and device.The method comprises the steps that a first data instruction is received, and the first data instruction is used for instructing creation of first data; determining a creation mode of the first data according to a first mapping relationship and the first data, the first mapping relationship being a mapping relationship between M types of data and N types of data creation modes, and the first data being any one of the M types of data, the creation mode of the first data is one corresponding to the first data in the N data creation modes, M is a positive integer greater than 1, and N is a positive integer greater than 1; and creating the first data according to the creation mode of the first data. According to the method, the security of data creation can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information security, and in particular to a method and device for creating data. Background Art

[0002] With the evolution of core network architecture, more and more core network elements are deployed at edge sites. Generally, the security level of edge sites is difficult to compare with that of central computer rooms; attackers can easily gain physical access to core network elements and reside in the core network through various means to steal important data stored in memory, hard disks, and network elements for a long time, and tamper with core network elements.

[0003] The Trusted Computing Group (TCG) proposed a trusted computing technology based on hardware cryptographic modules and cryptographic technologies to establish a trusted root, secure storage, and trust chain mechanism. The Trusted Platform Module (TPM) is a hardware trusted root chip defined by TCG and is the foundation of trusted computing technology. As virtualization technology is widely used in core networks, public clouds and other technical fields, more and more network elements are deployed in virtual machines. Currently, a virtual TPM (vTPM) is proposed as the trusted root of virtual machines.

[0004] The solutions currently proposed by the industry to implement vTPM based on open source software have the problem of low security. Summary of the invention

[0005] In order to improve the security of creating data, the embodiment of the present application provides a method and device for creating data. The technical solution is as follows:

[0006] In a first aspect, a method for creating data is provided, the method comprising: receiving a first data instruction, the first data instruction being used to instruct creation of first data; determining a creation mode of the first data based on a first mapping relationship and the first data, the first mapping relationship being a mapping relationship between M types of data and N types of data creation modes, the first data being any one of the M types of data, the creation mode of the first data being one of the N types of data creation modes corresponding to the first data, the M being a positive integer greater than 1, and the N being a positive integer greater than 1; and creating the first data based on the creation mode of the first data.

[0007] The above method can be executed by an electronic device or a chip in an electronic device. Compared with the current use of vTPM (i.e., using simulation mode) to create M types of data, the M types of data (e.g., first data) in this application can use multiple data creation modes (i.e., M types of data can correspond to N types of data creation modes), and the creation mode of each type of data (e.g., first data) in the M types of data corresponds to one of the N types of data creation modes; the N types of data creation modes can include simulation mode, instance mode, and multiplexing mode, and the electronic device adopts different data creation modes according to the different security requirements of each type of data in the M types of data, thereby reducing the cost of creating data while ensuring the security of the created data.

[0008] Optionally, determining the creation mode of the first data based on the first mapping relationship and the first data includes: determining whether the first data has associated data; when the associated data does not exist for the first data, determining the creation mode of the first data based on the first mapping relationship and the first data; when the associated data exists for the first data, determining the creation mode of the first data based on the first mapping relationship and the associated data.

[0009] The electronic device determines whether there is any associated data with the first data, and then determines the creation mode of the first data. This method can avoid the situation where the business function cannot be realized due to the difference between the creation mode of the first data and the creation mode of the associated data.

[0010] Optionally, determining the creation mode of the first data according to the first mapping relationship and the associated data includes: determining whether second data has been created, the second data being the data of the associated data; when the second data has not been created, determining the creation mode of the first data according to the first mapping relationship and the first data; when the second data has been created, determining the creation mode of the first data according to the creation mode of the second data, wherein the creation method of the first data is the same as the creation mode of the second data.

[0011] The electronic device determines the creation mode of the first data by determining whether the second data has been created, thereby avoiding the situation where the business function cannot operate normally due to the difference between the creation mode of the first data and the creation mode of the second data.

[0012] Optionally, before determining the creation mode of the first data based on the first mapping relationship and the first data, it also includes: determining the business scenario corresponding to the first data; determining the second mapping relationship from the first mapping relationship based on the business scenario corresponding to the first data, the second mapping relationship being a mapping relationship in the first mapping relationship that matches the business scenario corresponding to the first data.

[0013] In the present application, the electronic device determines the business scenario corresponding to the first data and accurately determines a suitable creation mode for the first data according to the business scenario corresponding to the first data, thereby achieving a balance between the security and cost of creating data.

[0014] Optionally, the business scenario corresponding to the first data is: remote attestation, encryption and decryption services, access authentication, secure storage, high-security virtual machine or Pu'an virtual machine.

[0015] In the present application, the business scenarios corresponding to the first data are different, and the importance of the first data is different. Correspondingly, the first data is suitable for different creation modes. The electronic device determines a suitable creation mode for the first data according to the business scenarios corresponding to the first data, which can take into account both hardware costs and improve the security of data creation.

[0016] Optionally, the N data creation modes include at least two of the following creation modes: simulation mode, instance mode and multiplexing mode, wherein the simulation mode refers to a mode for creating data in a virtual trusted platform module vTPM, the instance mode refers to a mode for creating data in a physical trusted platform module TPM, and the multiplexing mode refers to a mode for multiplexing data in a physical TPM.

[0017] In this application, M types of data correspond to N data creation modes, which can meet the needs of using different creation modes for different data in different business scenarios.

[0018] Optionally, when the first data is first category data, the creation mode of the first data is the simulation mode; when the first data is second category data, the creation mode of the first data is the instance mode; when the first data is reusable data, the creation mode of the first data is the reusing mode; wherein the security requirements of the first category data are lower than the security requirements of the second category data.

[0019] In the present application, the security requirements of the first data are different, and the creation modes of the first data are different. The electronic device accurately determines a suitable creation mode for the first data according to the category to which the first data belongs.

[0020] Optionally, the first data is: owner password, encryption key (Encryption key, EK), access key (Access Key, AK), platform configuration register (Platform Configuration Register, PCR), user key, non-volatile random access memory (Non-Volatile Random Access Memory, NVRAM), data binding, access policy, internal entity, session authentication or audit data.

[0021] In the present application, the electronic device determines a suitable creation mode for the first data according to the different data categories to which the first data belongs, which can not only ensure the safe implementation of business functions in the business scenario where the first data is located, but also control the hardware cost required to create the first data.

[0022] In a second aspect, a device for creating data is provided, the device comprising: a receiving module, a determining module and a creating module, the receiving module being used to receive a first data instruction, the first data instruction being used to instruct the creation of first data; the determining module being used to determine a creation mode of the first data based on a first mapping relationship and the first data, the first mapping relationship being a mapping relationship between M types of data and N types of data creation modes, the first data being any one of the M types of data, the creation mode of the first data being one of the N types of data creation modes corresponding to the first data, the M being a positive integer greater than 1, and the N being a positive integer greater than 1; the creating module being used to create the first data based on the creation mode of the first data.

[0023] Optionally, the determination module is specifically used to: determine whether the first data has associated data; when the first data does not have the associated data, determine the creation mode of the first data according to the first mapping relationship and the first data; when the first data has the associated data, determine the creation mode of the first data according to the first mapping relationship and the associated data.

[0024] Optionally, the determination module is also used to: determine whether second data has been created, the second data being the data of the associated data; when the second data has not been created, determine a creation mode of the first data based on the first mapping relationship and the first data; when the second data has been created, determine a creation mode of the first data based on the creation mode of the second data, wherein the creation method of the first data is the same as the creation mode of the second data.

[0025] Optionally, the determination module is also used to: determine the business scenario corresponding to the first data; determine the second mapping relationship from the first mapping relationship according to the business scenario corresponding to the first data, the second mapping relationship being a mapping relationship in the first mapping relationship that matches the business scenario corresponding to the first data.

[0026] Optionally, the business scenario corresponding to the first data is: remote attestation, encryption and decryption services, access authentication, secure storage, high-security virtual machine or Pu'an virtual machine.

[0027] Optionally, the N data creation modes include at least two of the following creation modes: simulation mode, instance mode and multiplexing mode, wherein the simulation mode refers to a mode for creating data in a virtual trusted platform module vTPM, the instance mode refers to a mode for creating data in a physical trusted platform module TPM, and the multiplexing mode refers to a mode for multiplexing data in a physical TPM.

[0028] Optionally, when the first data is first category data, the creation mode of the first data is the simulation mode; when the first data is second category data, the creation mode of the first data is the instance mode; when the first data is reusable data, the creation mode of the first data is the reusing mode; wherein the security requirements of the first category data are lower than the security requirements of the second category data.

[0029] Optionally, the first data is: owner password, encryption key EK, access key AK, platform configuration register PCR, user key, non-volatile random access memory NVRAM, data binding, access policy, internal entity, session authentication or audit data.

[0030] According to a third aspect, a chip system is provided, comprising a processor coupled to a memory, wherein the processor executes a computer program stored in the memory to implement any one of the methods in the first aspect.

[0031] According to a fourth aspect, an electronic device is provided, comprising a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that the electronic device executes any one of the methods according to the first aspect.

[0032] According to a fifth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes any one of the methods in the first aspect.

[0033] In a sixth aspect, a computer program product is provided, the computer program product comprising: a computer program code, when the computer program code is executed by a terminal device, the terminal device executes any one of the methods in the first aspect.

[0034] The beneficial effects of the technical solutions in the second, third, fourth, fifth and sixth aspects of the present application are the same as the beneficial effects of the technical solution in the first aspect and will not be repeated herein. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1A schematic diagram of a solution for implementing vTPM using open source software provided in an embodiment of the present application;

[0036] Figure 2 A schematic diagram of the system structure of an electronic device provided in an embodiment of the present application;

[0037] Figure 3 A schematic diagram of a method for creating data provided in an embodiment of the present application;

[0038] Figure 4 A schematic diagram of specific process steps of a method for creating data provided in an embodiment of the present application;

[0039] Figure 5 A schematic diagram of a device for creating data provided in an embodiment of the present application;

[0040] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0041] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0042] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0043] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0044] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0045] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0046] The electronic devices involved in this application include but are not limited to general servers and chips in general servers.

[0047] like Figure 1 As shown in the figure, the scheme of implementing vTPM based on open source software proposed by the industry currently has the problem of low security. The scheme of implementing vTPM with open source software mainly includes physical chip, physical driver, vTPM process, QEMU process and virtual machine, among which, the physical chip is in the hardware device of the server and provides TPM interface for the host to facilitate host access and call; the physical driver is in the kernel space of the host, and the host application can access the physical chip through the physical driver; the vTPM process, as a process on the host, has the same life cycle as the virtual machine, and will be created, started, shut down, destroyed and migrated with the virtual machine manager (Virtual Machine Manager, VMM); each virtual machine simulator (Quick Emulator, QEMU) process on the host is for one virtual machine, and the communication between the virtual machine and the vTPM process is realized through the QEMU process; the virtual machine is the caller of the vTPM process in the host, and the application in the virtual machine communicates with the vTPM process in the host through the vTPM driver in the kernel of the virtual machine. Figure 1 In the architecture shown, TPM data such as user keys, encryption keys EK, access keys AK and PCR are created in the host's vTPM process (e.g., vTPM process 1); since the vTPM process is in the host user state, important data created in the vTPM can be easily stolen by attackers. Therefore, in order to improve the security of creating data, the embodiments of the present application provide a method and device for creating data.

[0048] Figure 2 It is a method for creating data provided by an embodiment of the present application. The method 200 may specifically include S201, S202 and S203.

[0049] S201, an electronic device receives a first data instruction, where the first data instruction is used to instruct creation of first data.

[0050] It should be noted that the electronic devices that execute the above-mentioned method of creating data include but are not limited to general servers and chips in general servers.

[0051] The first data is a type of TPM data.

[0052] The TPM data includes Owner password, EK, AK, PCR, user key, NVRAM, data binding, access policy, internal entity, session authentication or audit data.

[0053] For example, the first data may be one of the owner password, EK, AK, PCR, user key, NVRAM, data binding, access policy, internal entity, session authentication or audit data.

[0054] In the present application, the electronic device determines a suitable creation mode for the first data according to the different data categories to which the first data belongs, which can not only ensure the safe implementation of business functions in the business scenario where the first data is located, but also control the hardware cost required to create the first data.

[0055] The above-mentioned first data instruction includes: Owner password instruction, EK instruction, AK instruction, PCR instruction, user key instruction, NVRAM instruction, data binding instruction, access policy instruction, internal entity instruction, session authentication instruction or audit data instruction.

[0056] For example, the first data instruction is an EK instruction, and the electronic device creates EK type data according to the EK instruction.

[0057] S202, the electronic device determines a creation mode of the first data based on a first mapping relationship and the first data, where the first mapping relationship is a mapping relationship between M types of data and N types of data creation modes, the first data is any one of the M types of data, the creation mode of the first data is one of the N types of data creation modes corresponding to the first data, M is a positive integer greater than 1, and N is a positive integer greater than 1.

[0058] The M types of data mentioned above include some or all types of data in the TPM data.

[0059] For example, the M types of data include Owner password, EK, AK, PCR, user key, NVRAM, data binding, and access policy.

[0060] The first data is any one of M types of data. For example, the first data is NVRAM.

[0061] In one embodiment, the above-mentioned N data creation modes include at least two data creation modes of simulation mode, multiplexing mode and instance mode; wherein the simulation mode refers to a mode of creating data in a virtual trusted platform module vTPM, the instance mode refers to a mode of creating data in a physical TPM, and the multiplexing mode refers to a mode of multiplexing data in a physical TPM.

[0062] In this embodiment, M types of data correspond to more than two data creation modes, which not only meets the needs of creating M types of data using different creation modes in different business scenarios, but also improves the security of creating M types of data in different business scenarios.

[0063] It should be understood that each of the M types of data can be created using one of the N=3 data creation modes; for example, PCR is one type of data among the M types of data, and the creation mode of PCR is different in different business scenarios; in some business scenarios (such as remote attestation), PCR can be created in an instance manner, and in some business scenarios (such as encryption and decryption services), PCR can be created in a multiplexing mode.

[0064] The creation mode of the first data may be one of N data creation modes. For example, in a high-security virtual machine scenario, the first data is AK, and the creation mode of the first data is instance mode.

[0065] In one embodiment, when the electronic device determines the creation mode of the first data according to the first mapping relationship and the first data, it also needs to determine the business scenario corresponding to the first data. In one possible implementation, the electronic device obtains the business scenario corresponding to the first data when receiving the first instruction. In another possible implementation, the virtual machine 101 is created for a specific business scenario (for example, remote attestation), and the electronic device pre-stores the configuration parameters of the virtual machine 101 for the specific business scenario. The electronic device can determine the business scenario in which the first data instruction indicates to create the first data, and the creation mode of the first data used to create the first data in the business scenario according to the configuration parameters.

[0066] The first mapping relationship is used to indicate the mapping relationship between M types of data and N types of data creation modes.

[0067] In one embodiment, a first mapping relationship indicates a mapping relationship between M types of data and N types of data creation modes in a business scenario. For example, the first mapping relationship indicates a mapping relationship between M types of data and N types of data creation modes in a first business scenario, wherein the first business scenario is a business scenario corresponding to the first data, and the first data is any one of the M types of data. The electronic device can determine the creation mode of the first data in the first business scenario based on the first mapping relationship.

[0068] In another embodiment, the above-mentioned first mapping relationship indicates the mapping relationship between M types of data and N types of data creation modes in multiple business scenarios; the first mapping relationship can be indicated in the form of Table 1.

[0069] Table 1

[0070]

[0071] As shown in Table 1, the M types of data include Owner password, EK, AK, PCR, user key, Non-Volatile Random Access Memory (NVRAM), data binding, access policy, internal entity, session authentication and audit data, and the N types of data creation modes include simulation mode, reuse mode and instance mode. When the virtual machine is in the remote attestation scenario, the Owner password is created using the instance mode, the user key is created using the simulation mode, etc.; when the virtual machine is in the access authentication scenario, the EK is created using the reuse mode, the user key is created using the instance mode, etc.

[0072] In one implementation, the first mapping relationship is a mapping relationship between M types of data and N types of creation modes pre-designed by technicians based on the different importance of M types of data in different business scenarios. The first mapping relationship can be created and stored in an electronic device through a virtual machine; the electronic device can query the first mapping relationship according to the first data instruction to determine the creation mode of the first data.

[0073] It should be understood that the implementation method of the first mapping relationship can also be generated by an electronic device. For example, the electronic device can determine the mapping relationship between M types of data and N data creation modes (i.e., the first mapping relationship) by inputting multiple business scenarios, M types of data, importance assessment results of the M types of data, reusability of each type of data in the M types of data, and N types of data creation modes.

[0074] For example, in business scenario 1, the M types of data include PCR and AK, and the importance assessment results of PCR and AK indicate that PCR is more important than AK; in business scenario 2, the M types of data include user key and EK, and the importance assessment results of user key and EK indicate that the user key is more important than EK, and EK can be shared by multiple virtual machines; the electronic device can determine that PCR is created using instance mode and AK is created using simulation mode based on the fact that PCR is more important than AK in business scenario 1; the electronic device can determine that the user key is created using instance mode and EK is created using multiplexing mode based on the fact that the user key is more important than EK in business scenario 2 and that EK can be shared by multiple virtual machines.

[0075] In one possible implementation, the importance assessment results of the above-mentioned M types of data include first-category data, second-category data and reusable data, wherein the security requirements of the first-category data are lower than those of the second-category data; for example, the importance of the first-category data to some business scenarios is low, and even if the first-category data is stolen by an attacker, it will not seriously affect the realization of business functions; the importance of the second-category data to some business scenarios is high, and if the second-category data is stolen, it will seriously damage the realization of business functions.

[0076] When the importance assessment result indicates that the first data is first-category data, it means that the security requirement of the first data is low. The electronic device can determine that the creation mode of the first data is a simulation mode. Under the premise of ensuring a certain level of security, creating the first data in a simulation mode can reduce the creation and storage cost of the first data.

[0077] When the importance assessment result indicates that the first data is second-category data, it means that the security requirement of the first data is high, and the creation mode of the first data is instance mode. Since the instance mode is the first data created by the electronic device through the physical TPM, the electronic device stores the first data in the physical TPM, which can improve the security of the first data.

[0078] When the importance evaluation result indicates that the first data is reusable data, the electronic device determines that the creation mode of the first data is the reusing mode, and the electronic device can reduce the creation and storage cost of the first data by reusing the first data in the physical TPM.

[0079] In the present application, the security requirements of the first data are different, and the creation modes of the first data are different. The electronic device accurately determines a suitable creation mode for the first data according to the category to which the first data belongs.

[0080] In an optional embodiment, the business scenario corresponding to the above-mentioned first data is: remote certification, encryption and decryption services, access authentication, secure storage, high-security virtual machine or Pu'an virtual machine.

[0081] After receiving the first data instruction, the electronic device obtains the current business scenario of the virtual machine 101 (ie, the business scenario corresponding to the first data), and determines the data creation mode corresponding to the first data in the current business scenario from the pre-created Table 1 according to the current business scenario.

[0082] For example, the first data is PCR, the first data instruction is a PCR instruction, the business scenario corresponding to the first data (i.e., the current business scenario of virtual machine 101) is remote attestation, and the electronic device determines that the data creation mode of PCR in the remote attestation scenario is instance mode according to Table 1.

[0083] In this application, the business scenarios corresponding to the first data are different, and the creation modes of the first data are different, which can avoid the problem of low data creation security or high data creation cost caused by using the same data creation mode for the first data in different business scenarios.

[0084] S203: The electronic device creates the first data according to the creation mode of the first data.

[0085] The electronic device determines the creation mode of the first data by querying the first mapping relationship; for example, the first mapping relationship is shown in Table 1, the first data is a PCR in a remote attestation business scenario, and the electronic device determines that the creation mode corresponding to the PCR is an instance mode according to Table 1. The electronic device creates the PCR according to the instance mode and stores the PCR in the physical TPM.

[0086] For another example, the first data is a user key in a remote attestation business scenario, and the electronic device determines that the creation mode corresponding to the user key is the simulation mode according to Table 1. The electronic device creates the user key according to the simulation mode and stores the user key in the vTPM.

[0087] It can be seen that, as shown in Table 1, in the same business scenario or different business scenarios, the M types of data (for example, the first data) in the present application can use multiple data creation modes (that is, the M types of data can correspond to N data creation modes), and the creation mode of each type of data in the M types of data (for example, the first data) corresponds to one of the N data creation modes; the N types of data creation modes include simulation mode, instance mode and multiplexing mode; the electronic device adopts different data creation modes according to the different security requirements of each type of data in the M types of data, thereby reducing the cost of creating data while ensuring the security of created data.

[0088] As a possible implementation method in the above embodiment, step S202 includes: the electronic device determines whether the first data has associated data; when the first data does not have associated data, the electronic device determines the creation mode of the first data based on the first mapping relationship and the first data; when the first data has associated data, the electronic device determines the creation mode of the first data based on the first mapping relationship and the associated data.

[0089] It should be noted that the above-mentioned associated data refers to the data among the M types of data that are interdependent due to the business implementation logic. For example, PCR and AK are a pair of interrelated data, and PCR and AK need to use the same data creation mode. For another example, the user key among the M types of data is a data that is not associated with other data except itself, and the user key can adopt any one of the N types of data creation modes.

[0090] After receiving the first data instruction, the electronic device will determine whether the first data has associated data; if the first data does not have associated data, the electronic device determines the creation mode of the first data based on the above-mentioned first mapping relationship and the first data. For specific steps, please refer to the relevant description in the implementation above.

[0091] If the first data has associated data, the electronic device determines the creation mode of the first data based on the above-mentioned first mapping relationship and the associated data; for example, the first data is PCR and the associated data is AK, if the data creation mode of AK is instance mode, the electronic device determines that the data creation mode of PCR is also instance mode.

[0092] In this embodiment, the electronic device determines whether there is any associated data of the first data, and then determines the creation mode of the first data. This method can avoid the situation where the business function cannot be realized due to the difference between the creation mode of the first data and the creation mode of the associated data.

[0093] As another possible implementation method in the above embodiment, determining the creation mode of the first data according to the first mapping relationship and the associated data includes: the electronic device determines whether the second data has been created, the second data being the data of the associated data; when the second data has not been created, the electronic device determines the creation mode of the first data according to the first mapping relationship and the first data; when the second data has been created, the electronic device determines the creation mode of the first data according to the creation mode of the second data, wherein the creation mode of the first data is the same as the creation mode of the second data.

[0094] It should be noted that the creation mode of the second data refers to the relevant description of the creation mode of the first data, which will not be repeated here.

[0095] After the electronic device receives the first data instruction, when it is determined that the first data has associated data (i.e., the second data), the electronic device determines the creation mode of the first data based on whether the second data is created; if the electronic device determines that the second data is not created, the electronic device determines the creation mode of the first data based on the first mapping relationship and the first data, and the specific implementation method refers to the above embodiment; if the electronic device determines that the second data has been created, the electronic device determines the creation mode of the first data based on the creation mode of the second data.

[0096] In this embodiment, the electronic device determines the creation mode of the first data by determining whether the second data has been created, thereby avoiding the situation where the business function cannot operate normally due to the difference in the creation mode of the first data and the creation mode of the second data.

[0097] As another possible implementation method in the above embodiment, before step S202, method 200 also includes: the electronic device determines the business scenario corresponding to the first data; the electronic device determines a second mapping relationship from the first mapping relationship according to the business scenario corresponding to the first data, and the second mapping relationship is a mapping relationship in the first mapping relationship that matches the business scenario corresponding to the first data.

[0098] After the electronic device receives the first data instruction, it needs to determine the creation mode of the first data according to the first data instruction; since the creation modes of the same type of data may be different in different business scenarios, as shown in Table 1, the electronic device needs to determine the creation mode of the first data according to the business scenario corresponding to the first data.

[0099] After receiving the first data instruction, the electronic device determines the business scenario corresponding to the first data. The manner in which the electronic device determines the business scenario corresponding to the first data can be referred to the above description and will not be repeated here.

[0100] The electronic device determines a second mapping relationship from the first mapping relationship (eg, Table 1) according to a business scenario corresponding to the first data; the second mapping relationship indicates a creation mode of the first data corresponding to the first data in the business scenario corresponding to the first data.

[0101] For example, the first mapping relationship is shown in Table 1 above, the first data is a user key, and the business scenario corresponding to the first data is secure storage. The electronic device determines that the creation mode of the user key in the secure storage scenario is the instance mode based on the first mapping relationship shown in Table 1.

[0102] In this embodiment, the electronic device determines the business scenario corresponding to the first data and accurately determines a suitable creation mode for the first data according to the business scenario corresponding to the first data, thereby achieving a balance between the security and cost of creating data.

[0103] In an achievable embodiment, the electronic device for executing the method for creating data may include: Figure 3 The structure shown. It should be noted that Figure 3 The system architecture of the electronic device shown does not constitute a specific limitation on the structure of the electronic device applicable to the present application. Figure 3 More or fewer components than those shown, or the electronic device may include Figure 3 Combinations of some of the components shown, or the electronic device may include Figure 3 Subassemblies of some of the components shown.

[0104] like Figure 3As shown, the system structure 300 of the electronic device includes: a virtual machine 301, a host user state 302, a host kernel state 303 and a server 304, wherein the virtual machine 301 includes a virtual machine user state 3011 and a virtual machine kernel state 3012, wherein the virtual machine user state 3011 is used to install various application programs 01, and the application program 01 is an application that needs to access the vTPME. For example, in an encryption and decryption scenario, the application program 01 is an application that needs to call the encryption and decryption keys in the vTPME; the virtual machine kernel state 3012 is used to deploy an enhanced virtual trusted platform module (Virtual Trusted Platform Module Enhance, vTPME) driver 02, and the vTPME driver 02 is used to provide an interface for the application program 01 to access the vTPME.

[0105] The host user state 302 includes QEMU04 and vTPME06. The QEMU04 implements communication between the virtual machine 301 and the vTPME06 process through the socket communication 05. The QEMU04 corresponds to the virtual machine 301 one by one. It should be understood that each virtual machine has its own QEMU.

[0106] As a process of the host user state 302, vTPME06 has the same life cycle as the virtual machine 301. The vTPME06 provides three modes, namely, simulation mode, reuse mode and instance mode. Among them, the simulation mode refers to the mode of creating TPM data based on the vTPM deployed in the host user state 302. The vTPM is used to create TPM data such as PCR, AK and EK; the reuse mode refers to the mode of reusing data in the physical TPM, that is, the reuse mode also refers to multiple virtual machines using the TPM data in the same physical TPM; the instance mode refers to TPM data created based on the physical TPM; in addition, each type of data in the TPM data can be created by simulation, reuse or instance.

[0107] It should be noted that, since the simulation mode creates and stores TPM data (for example, the first data) in the vTPM in the host user state 3011, the cost of creating and storing TPM data in the simulation mode is low, but the security is also low; while the instance mode creates and stores TPM data (for example, the first data) in the physical chip (ie, the physical TPM), the cost of creating and storing TPM data in the instance mode is high, but the security is also high.

[0108] The host kernel state 303 is used to deploy the physical TPM driver 07, which is used to provide an interface for upper layer applications (such as vTPME06) to access the physical TPM 08. It should be understood that the physical TPM is a physical chip that can implement the TPM function.

[0109] The server 304 is used to deploy a physical TPM08, which is used to create TPM data such as user keys, PCRs, AKs, and EKs.

[0110] The following describes the interaction process between different parts in the system structure 300 of the electronic device by taking examples.

[0111] For example, taking vTPME06 creating PCR data in TPM data as an example, application 01 sends a PCR request to vTPME driver 02; the vTPME driver 02 generates a PCR instruction according to the PCR request; the PCR instruction is sent to vTPME06 through Socket communication 05, and vTPME06 determines the PCR creation mode according to the PCR instruction; if vTPME06 determines to create the PCR using the instance mode, vTPME06 will generate a PCR creation instruction according to the PCR instruction, and send the PCR creation instruction to the physical TPM driver 07; the physical TPM driver 07 generates a PCR drive instruction according to the PCR creation instruction, and sends the PCR drive instruction to the physical TPM08; the physical TPM08 creates the PCR according to the PCR drive instruction, and stores the PCR in the storage space allocated by the physical TPM08. If vTPME06 determines to create the PCR using the simulation mode, vTPME06 will generate a PCR creation instruction according to the PCR instruction, and send the PCR creation instruction to the vTPM; the vTPM creates the PCR according to the PCR creation instruction, and stores the PCR in the storage space allocated by the vTPM.

[0112] It should be understood that in the system structure 300 of the electronic device, vTPME06 can be used as the execution subject of the above method for creating data.

[0113] For ease of understanding, the following describes the initialization process of creating the virtual machine 101. The initialization process is divided into the following steps:

[0114] Step 1: The VMM creates a virtual machine 101 on the host. After starting the creation process of the virtual machine 101, the VMM calls the vTPME lifecycle management application interface (Application Programming Interface, API) to instantiate the vTPME process; the virtual machine 101 corresponds to the vTPME process one by one, and each virtual machine has its own vTPME process. The command to create the vTPME process contains 11 types of data mode tables (i.e., Table 1 above); if the VMM instantiates the vTPME process successfully, proceed to step 2; if it fails, proceed directly to step 3.

[0115] Step 2: After the vTPME process is instantiated successfully, the vTPME checks the received Table 1 and uses different creation modes according to Table 1 to implement data of a specified type (eg, first data).

[0116] For data created in simulation mode, vTPME will instantiate a vTPM process. There is a one-to-one correspondence between vTPM and vTPME, and each virtual machine has its own vTPM process and data space.

[0117] For data created in instance mode, vTPME passes commands to the physical TPM, and the physical TPM allocates data space for the specified data (for example, the first data). Each virtual machine has its own data space.

[0118] For data created in the multiplexing mode, the vTPME transmits commands to the physical TPM, and the virtual machine 101 directly multiplexes the relevant data in the physical TPM.

[0119] Step 3: vTPME collects the initialization results of the data (eg, failure results), and returns the initialization results to the VMM.

[0120] Next, combine Figure 4 Taking the creation of a user key (ie, the first data) as an example, the specific process steps of the method for creating data are introduced:

[0121] S401: Application 01 sends a command to create a user key to vTPME via the Owner password. Application 01 in virtual machine 101 uses the Owner password to transmit a command to create a user key (ie, a first data instruction) and sends the command to create a user key to vTPME.

[0122] S402: After receiving the command to create a user key, the vTPME queries Table 1 according to the user key and the corresponding business scenario.

[0123] S403: vTPME forwards a command to create a user key to vTPM. If vTPME uses simulation mode to create a user key, vTPME forwards the command to create a user key to vTPM; vTPM creates (i.e., instantiates) the user key and stores the user key in the local file system (i.e., the local file system of the host).

[0124] S404: vTPME forwards a command to create a user key to the physical TPM. If vTPME uses the instance mode to create the user key, vTPME forwards the command to create the user key to the physical TPM, and the physical TPM creates (ie, instantiates) the user key and stores it in the memory space of the physical TPM.

[0125] S405: vTPME forwards the command to create the user key to the physical TPM. If vTPME uses the multiplexing mode to create the user key, vTPME forwards the command to create the user key to the physical TPM, and the virtual machine 101 directly uses (ie, multiplexes) the user key in the physical TPM.

[0126] S406: vTPME returns the creation result to application 01. vTPME collects the creation result of the user key and returns the creation result to application 01.

[0127] Figure 5 The present application provides a schematic diagram of the structure of a device 500 for creating data; the device 500 includes: a receiving module 501, a determining module 502 and a creating module 503;

[0128] The receiving module 501 is used to receive a first data instruction, where the first data instruction is used to instruct the creation of first data.

[0129] Determination module 502 is used to determine the creation mode of the first data based on the first mapping relationship and the first data, the first mapping relationship is a mapping relationship between M types of data and N types of data creation modes, the first data is any one of the M types of data, the creation mode of the first data is one of the N types of data creation modes corresponding to the first data, M is a positive integer greater than 1, and N is a positive integer greater than 1.

[0130] The creation module 503 is used to create the first data according to the creation mode of the first data.

[0131] The specific method of the method for executing data encoding by the device 500 and the beneficial effects produced can be found in Figure 2 Related description in the method embodiment shown.

[0132] In the device 500, the determination module 502 is specifically used to: determine whether the first data has associated data; when the first data does not have associated data, determine the creation mode of the first data according to the first mapping relationship and the first data; when the first data has associated data, determine the creation mode of the first data according to the first mapping relationship and the associated data. The beneficial effects of this part can be seen in the above embodiments.

[0133] In the device 500, the determination module 502 is further used to: determine whether the second data has been created, the second data being the data of the associated data; when the second data has not been created, determine the creation mode of the first data according to the first mapping relationship and the first data; when the second data has been created, determine the creation mode of the first data according to the creation mode of the second data, wherein the creation mode of the first data is the same as the creation mode of the second data. The beneficial effects of this part can be referred to the above embodiments.

[0134] In the device 500, the determination module 502 is further used to: determine the business scenario corresponding to the first data; determine the second mapping relationship from the first mapping relationship according to the business scenario corresponding to the first data, and the second mapping relationship is a mapping relationship in the first mapping relationship that matches the business scenario corresponding to the first data. The beneficial effects of this part can be seen in the above embodiments.

[0135] In the device 500, the business scenario corresponding to the first data is: remote certification, encryption and decryption service, access authentication, secure storage, high-security virtual machine or general security virtual machine. The beneficial effects of this part can be referred to the above embodiments.

[0136] In the device 500, the N data creation modes include at least two of the following creation modes: simulation mode, instance mode and reuse mode, wherein the simulation mode refers to a mode for creating data in a virtual trusted platform module vTPM, the instance mode refers to a mode for creating data in a physical trusted platform module TPM, and the reuse mode refers to a mode for reusing data in a physical TPM. The beneficial effects of this part can be seen in the above embodiments.

[0137] In the device 500, when the first data is the first type of data, the creation mode of the first data is the simulation mode; when the first data is the second type of data, the creation mode of the first data is the instance mode; when the first data is reusable data, the creation mode of the first data is the reusable mode; wherein the security requirement of the first type of data is lower than the security requirement of the second type of data. The beneficial effects of this part can be referred to the above embodiments.

[0138] In the device 500, the first data is: owner password, encryption key EK, access key AK, platform configuration register PCR, user key, non-volatile random access memory NVRAM, data binding, access policy, internal entity, session authentication or audit data. The beneficial effects of this part can refer to the above embodiments.

[0139] Figure 6 A schematic diagram of the structure of another electronic device provided by the present application is shown. Figure 6 The dotted line in the figure indicates that the unit or the module is optional. The electronic device 600 can be used to implement the method described in the above method embodiment. The electronic device 600 can be a server or a chip (system).

[0140] The electronic device 600 includes one or more processors 601, which can support the electronic device 600 to implement Figure 2The method in the corresponding method embodiment. The processor 601 can be a general-purpose processor or a special-purpose processor. For example, the processor 601 can be a central processing unit (CPU). The CPU can be used to control the electronic device 600, execute software programs, and process data of software programs. The electronic device 600 can also include a communication unit 605 to implement signal input (reception) and output (transmission).

[0141] The electronic device 600 may be a chip (system) including a memory and a processor, wherein the processor is configured to execute a computer program stored in the memory to implement the methods shown in the above embodiments.

[0142] The communication unit 605 may be an input and / or output circuit of the chip (system), or the communication unit 605 may be a communication interface of the chip (system), and the chip (system) may be a component of the electronic device 600 .

[0143] For another example, the communication unit 605 may be a transceiver of the electronic device 600 , or the communication unit 605 may be a transceiver circuit of the electronic device 600 .

[0144] The electronic device 600 may include one or more memories 602, on which a program 604 is stored. The program 604 can be executed by the processor 601 to generate an instruction 603, so that the processor 601 performs the method described in the above method embodiment according to the instruction 603. Optionally, data may also be stored in the memory 602. Optionally, the processor 601 may also read the data stored in the memory 602, and the data may be stored at the same storage address as the program 604, or the data may be stored at a different storage address from the program 604.

[0145] The processor 601 and the memory 602 may be provided separately or integrated together, for example, integrated on a system on chip (System On Chip, SOC) of the electronic device.

[0146] The specific manner in which the processor 601 executes the method for creating data can refer to the relevant description in the method embodiment.

[0147] It should be understood that each step of the above method embodiment can be completed by a hardware-based logic circuit or a software-based instruction in the processor 601. The processor 601 can be a CPU, a digital signal processor (DSP), a field programmable gate array (FPGA), or other programmable logic devices, such as discrete gates, transistor logic devices, or discrete hardware components.

[0148] The present application also provides a computer program product, which, when executed by the processor 601, implements the method of any method embodiment in the present application.

[0149] The computer program product may be stored in the memory 602 , for example, a program 604 , which is converted into an executable target file that can be executed by the processor 601 after preprocessing, compiling, assembling, and linking.

[0150] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a computer, the method of any method embodiment of the present application is implemented. The computer program can be a high-level language program or an executable target program.

[0151] The computer-readable storage medium is, for example, a memory 602. The memory 602 may be a volatile memory or a nonvolatile memory, or the memory 602 may include both a volatile memory and a nonvolatile memory. Among them, the nonvolatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SynchLink DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DRRAM).

[0152] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described devices and equipment and the technical effects produced can refer to the corresponding processes and technical effects in the aforementioned method embodiments, and will not be repeated here.

[0153] In several embodiments provided in the present application, the disclosed systems, devices and methods can be implemented in other ways. For example, some features of the method embodiments described above can be ignored or not executed. The device embodiments described above are merely schematic, and the splitting of the units is only a logical function splitting. There may be other splitting methods in actual implementation, and multiple units or components may be combined or integrated into another system. In addition, the coupling between the units or the coupling between the components may be direct coupling or indirect coupling, and the above coupling includes electrical, mechanical or other forms of connection.

[0154] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application is described in detail with reference to the above embodiments, a person skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features can be replaced by equivalents, and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

[0155] Finally, the above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for creating data, characterized in that, The method comprises: receiving a first data instruction, wherein the first data instruction is used to instruct creation of first data; Determining a creation mode of the first data according to a first mapping relationship and the first data, wherein the first mapping relationship is a mapping relationship between M types of data and N types of data creation modes, the first data is any one of the M types of data, the creation mode of the first data is one of the N types of data creation modes corresponding to the first data, M is a positive integer greater than 1, and N is a positive integer greater than 1; The first data is created according to a creation mode of the first data.

2. The method according to claim 1, characterized in that The determining the creation mode of the first data according to the first mapping relationship and the first data includes: Determine whether there is associated data for the first data; When the associated data does not exist in the first data, determining a creation mode of the first data according to the first mapping relationship and the first data; When the associated data exists for the first data, a creation mode of the first data is determined according to the first mapping relationship and the associated data.

3. The method according to claim 2, characterized in that The determining the creation mode of the first data according to the first mapping relationship and the associated data includes: determining whether second data has been created, the second data being data of the associated data; When the second data is not created, determining a creation mode of the first data according to the first mapping relationship and the first data; When the second data has been created, the creation mode of the first data is determined according to the creation mode of the second data, wherein the creation mode of the first data is the same as the creation mode of the second data.

4. The method according to any one of claims 1 to 3, characterized in that Before determining the creation mode of the first data according to the first mapping relationship and the first data, the method further includes: Determining a business scenario corresponding to the first data; The second mapping relationship is determined from the first mapping relationship according to the business scenario corresponding to the first data, and the second mapping relationship is a mapping relationship in the first mapping relationship that matches the business scenario corresponding to the first data.

5. The method according to claim 4, characterized in that The business scenario corresponding to the first data is: Remote attestation, encryption and decryption services, access authentication, secure storage, high-security virtual machines or Infor virtual machines.

6. The method according to any one of claims 1 to 5, characterized in that The N data creation modes include at least two of the following creation modes: Simulation mode, instance mode and multiplexing mode, wherein the simulation mode refers to a mode for creating data in a virtual trusted platform module vTPM, the instance mode refers to a mode for creating data in a physical trusted platform module TPM, and the multiplexing mode refers to a mode for multiplexing data in a physical TPM.

7. The method according to claim 6, characterized in that When the first data is the first type of data, the creation mode of the first data is the simulation mode; When the first data is the second type of data, the creation mode of the first data is the instance mode; When the first data is multiplexable data, the creation mode of the first data is the multiplexing mode; The security requirement of the first category of data is lower than the security requirement of the second category of data.

8. The method according to any one of claims 1 to 7, characterized in that The first data is: Owner password, encryption key EK, access key AK, platform configuration register PCR, user key, non-volatile random access memory NVRAM, data binding, access policy, internal entity, session authentication or audit data.

9. A device for creating data, characterized in that: The device comprises: a receiving module, a determining module and a creating module. The receiving module is used to receive a first data instruction, where the first data instruction is used to instruct the creation of first data; The determining module is used to determine a creation mode of the first data according to a first mapping relationship and the first data, wherein the first mapping relationship is a mapping relationship between M types of data and N types of data creation modes, the first data is any one of the M types of data, the creation mode of the first data is one of the N types of data creation modes corresponding to the first data, M is a positive integer greater than 1, and N is a positive integer greater than 1; The creation module is used to create the first data according to the creation mode of the first data.

10. The device according to claim 9, characterized in that The determination module is specifically used for: Determine whether there is associated data for the first data; When the associated data does not exist in the first data, determining a creation mode of the first data according to the first mapping relationship and the first data; When the associated data exists for the first data, a creation mode of the first data is determined according to the first mapping relationship and the associated data.

11. The device according to claim 10, characterized in that The determining module is also used for: determining whether second data has been created, the second data being data of the associated data; When the second data is not created, determining a creation mode of the first data according to the first mapping relationship and the first data; When the second data has been created, the creation mode of the first data is determined according to the creation mode of the second data, wherein the creation mode of the first data is the same as the creation mode of the second data.

12. The device according to any one of claims 9 to 11, characterized in that The determining module is also used for: Determining a business scenario corresponding to the first data; The second mapping relationship is determined from the first mapping relationship according to the business scenario corresponding to the first data, and the second mapping relationship is a mapping relationship in the first mapping relationship that matches the business scenario corresponding to the first data.

13. The device according to claim 12, characterized in that The business scenario corresponding to the first data is: Remote attestation, encryption and decryption services, access authentication, secure storage, high-security virtual machines or Infor virtual machines.

14. The device according to any one of claims 9 to 13, characterized in that The N data creation modes include at least two of the following creation modes: Simulation mode, instance mode and multiplexing mode, wherein the simulation mode refers to a mode for creating data in a virtual trusted platform module vTPM, the instance mode refers to a mode for creating data in a physical trusted platform module TPM, and the multiplexing mode refers to a mode for multiplexing data in a physical TPM.

15. The device according to claim 14, characterized in that When the first data is the first type of data, the creation mode of the first data is the simulation mode; When the first data is the second type of data, the creation mode of the first data is the instance mode; When the first data is multiplexable data, the creation mode of the first data is the multiplexing mode; The security requirement of the first category of data is lower than the security requirement of the second category of data.

16. The device according to any one of claims 9 to 15, characterized in that The first data is: Owner password, encryption key EK, access key AK, platform configuration register PCR, user key, non-volatile random access memory NVRAM, data binding, access policy, internal entity, session authentication or audit data.

17. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that the electronic device executes the method according to any one of claims 1 to 8.

18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 8.

Citation Information

Cited By

  • Remote attestation method for trusted data space

    CN120498700A