A blockchain system and data storage method based on trusted hardware
By introducing trusted hardware and encryption technologies into the blockchain system, blockchain storage and trust problems are solved, and large-scale data is securely stored and privacy protection is realized, ensuring the security of data in the blockchain network.
Patent Information
- Application Number
- CN202010458360.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-27
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2040-05-27
AI Technical Summary
Blockchain technology cannot effectively store large quantities of data, and there is a lack of trust among nodes participating in consensus, making it difficult to achieve data privacy and security guarantees.
Using a blockchain system based on trusted hardware, communication with the node server through the client system, using a trusted execution environment and high-trustworthy hardware for data encryption storage and calculation, combining with the blockchain network to achieve consensus, and using hidden frequency protection Sequential encryption algorithm and ciphertext indexing method ensure data security.
It solves the problems of large-scale data storage and trust, realizes high-trust storage and privacy protection of data, supports encryption and real-time linking of sensitive data, and ensures data privacy and security in blockchain systems.
Smart Images

Figure CN113742766B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of blockchain, and in particular relates to a blockchain system and a data storage method based on trusted hardware. Background Art
[0002] This section is intended to provide a background or context to embodiments of the invention that are recited in the claims. No description herein is admitted to be prior art by inclusion in this section.
[0003] As a distributed ledger supporting digital currency, blockchain technology has the characteristics of decentralization, immutability, openness, transparency, consensus and traceability, and has received widespread attention in recent years. However, with the continuous development and in-depth research of blockchain technology, the problems of data storage and data leakage in blockchain technology have become increasingly prominent.
[0004] In blockchain, "blocks" are the main medium for storing data, which cannot store large amounts of data. Therefore, we cannot directly use blockchain as a substitute for traditional data storage systems. Secondly, there is a lack of trust between the nodes participating in the consensus in blockchain, and how to achieve "end-to-end" trust is also a problem. These problems make blockchain insufficient for the task of data storage and ensuring data privacy. Therefore, blockchain cannot exist in isolation, and can only be used as a piece of the puzzle of the underlying infrastructure. The supporting equipment and environment need to be further improved. Summary of the invention
[0005] In view of the problems in the above-mentioned prior art that traditional blockchains are unable to store large-scale data and lack trust between nodes, the present invention proposes the following solution.
[0006] On the first aspect, a blockchain system based on trusted hardware is provided, including: a client system, the client system and the node server are communicatively connected, used to obtain user needs, perform trusted calculations on the data in the user needs, and upload basic data information to the blockchain network; a node server based on trusted hardware, the node server is connected to the trusted hardware, used to perform trusted storage of user information and data information to be uploaded to the chain, and the node server reaches a consensus with the blockchain network; a blockchain network, the blockchain network includes multiple blockchain nodes.
[0007] In one possible implementation, data is interacted between a client system and a node server, wherein the client system process calls a security service when a user needs to go online, and enters the node server through a trusted execution environment communication agent; a security service process is created in the node server, and the security service is executed by scheduling a process in trusted hardware; and after the security service is completed, the process returns to the client system for trusted computing.
[0008] In a possible implementation, a hidden frequency order-preserving encryption algorithm is used during data interaction between the client system and the node server.
[0009] In one possible implementation, during the data interaction between the client system and the node server, a ciphertext indexing method is used to cryptographically convert the order relationship of the ciphertext into a data structure, so that data in the target interval can be quickly located and read through the index.
[0010] In a possible implementation, the ciphertext indexing method uses a balanced binary search tree method.
[0011] In one possible implementation, a node server includes: a trusted application layer, which is deployed with trusted applications for interacting with non-trusted execution environments or non-trusted applications, and the trusted applications implement different functions by calling different API interfaces; an extended function layer, which is deployed with extended function modules, and the extended function modules are used to provide different trusted applications with API interfaces with different functions; and a basic kernel layer, which is used to provide basic system functions for specified extended function modules.
[0012] In one possible implementation, the trusted application layer is deployed with an authentication server and a file manager; wherein the authentication server is used to verify the identity of the client system when receiving an access request to the trusted execution environment initiated by the client system in the non-trusted execution environment; and the file manager is used to perform trusted storage using encryption functions in the trusted execution environment.
[0013] In a possible implementation, the node server is also used to: encrypt sensitive data in the extended function layer of the node server, and store the encrypted and encapsulated files in the file manager; wherein, the encryption function is implemented using the storage key sk (storage key), and HMACk (m) and ENCK (m) are used to ensure the security and integrity of the sensitive data, wherein HMACk (m) represents the use of the key K to calculate the message authentication code for the sensitive data m; ENCK (m) represents the use of the key k to encrypt the sensitive data m, and corresponding symmetric and asymmetric encryption are adopted according to the type of k.
[0014] In a possible implementation, the system further includes: using a TCM chip as trusted hardware to provide basic security services for the node server.
[0015] On the other hand, a data storage method based on trusted hardware is provided, comprising: implementing data storage using a blockchain system as in the first aspect.
[0016] At least one of the above technical solutions adopted in the embodiment of the present application can achieve the following beneficial effects: In this embodiment, by adopting a solution combining blockchain technology and trusted hardware, with blockchain as the core and trusted hardware as the data storage medium, it not only solves the problem of large-scale data storage, but also realizes the "end-to-end" trust problem. In addition, the highly trusted hardware also has the function of unique identity recognition, which supports encrypting the data in the chip and uploading it to the chain in real time.
[0017] It should be understood that the above description is only an overview of the technical solution of the present invention, so that the technical means of the present invention can be more clearly understood and implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described below by way of example. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The advantages and benefits described herein and other advantages and benefits will be apparent to those of ordinary skill in the art by reading the detailed description of the exemplary embodiments below. The accompanying drawings are only used for the purpose of illustrating exemplary embodiments and are not to be considered as limiting the present invention. Moreover, the same reference numerals are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0019] Figure 1 A schematic diagram of a structure based on trusted hardware and a blockchain system according to an embodiment of the present invention;
[0020] Figure 2 A schematic diagram of a communication process between a client system and a node server according to an embodiment of the present invention;
[0021] Figure 3 A schematic diagram of the structure of a node server based on trusted hardware according to an embodiment of the present invention;
[0022] Figure 4 4 is a basic structural diagram of a trusted hardware TCM chip according to an embodiment of the present invention. DETAILED DESCRIPTION
[0023] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0024] The following is an explanation of the terms that appear in this manual:
[0025] Blockchain: Blockchain technology is an innovative application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. in the Internet era. In a narrow sense, blockchain is a chain data structure that combines data blocks in a sequential manner in chronological order, and a distributed ledger that is tamper-proof and unforgeable by cryptography; in a broad sense, blockchain technology is a new distributed infrastructure and computing paradigm that uses chain data structures to verify and store data, uses distributed node consensus algorithms to generate and update data, uses cryptography to ensure the security of data transmission and access, and uses smart contracts composed of automated script codes to program and operate data.
[0026] Trusted hardware: Trusted hardware is one of the important foundations of trusted computing. Based on trusted hardware, a trusted execution environment (TEE) can be built on the device. TEE is a concept proposed by Global Platform (GP). Currently, the most researched and applied one is Intel SGX (Intel Software Guard Extensions). As the name suggests, it is an extension of Intel Architecture (IA) to enhance the security of software. This method does not identify and isolate all malware on the platform, but encapsulates the security operations of legitimate software in an enclave to protect it from malware attacks. Privileged or non-privileged software cannot access the enclave; that is, once the software and data are in the enclave, even the operating system and VMM (Hypervisor) cannot affect the code and data in the enclave. SGX also provides remote authentication services, allowing the server to determine whether the client system requesting the service is in a secure and trusted environment (hardware + software), and establish an encrypted channel, so that confidential data can be securely sent to the trusted client system, and services can be refused to untrusted client systems.
[0027] Trusted computing: Trusted computing starts from the computer architecture and hardware security to establish a trust transmission system to ensure the trust of the terminal, solving the trust problem between people and programs, people and machines, and people from the source. The "trust" generally recognized by the industry refers to the establishment of a trusted computing environment based on security chips to ensure that system entities perform as expected.
[0028] Trust chain: Trust chain is a technical solution for implementing the trust measurement model. Trust chain technology is one of the key technologies of trusted computing.
[0029] Figure 1 A blockchain system 100 based on trusted hardware is shown, comprising:
[0030] The client system 110 is connected to the node server for obtaining the data required by the user for trusted computing and uploading the basic information of the data to the blockchain network;
[0031] A node server 120 based on trusted hardware, the node server is connected to the trusted hardware, and is used to reliably store user information and data information to be uploaded to the blockchain, and the node server reaches a consensus with the blockchain network;
[0032] The blockchain network 130 includes a plurality of blockchain nodes.
[0033] In an example, Figure 1 As shown, on the left is the node server 120 based on searchable encryption and trusted hardware, which mainly performs trusted storage of user personal information and data information to be uploaded to the blockchain, and the node server also participates in the consensus protocol in the blockchain to ensure the "end-to-end" trust in the blockchain system. On the right is the client system module 110, which mainly interacts with the data in the node server, obtains the data in the user's needs for trusted computing, and provides on-chain services for basic data information.
[0034] In this embodiment, in order to solve the problem that traditional blockchain cannot store large-scale data and lacks trust between nodes, the present invention proposes a method of combining blockchain technology with highly trusted hardware. This method takes blockchain as the core and uses highly trusted hardware as the data storage medium, which not only solves the problem of large-scale data storage, but also realizes the "end-to-end" trust problem. In addition, the trusted hardware also has the function of unique identity recognition, which supports encrypting the data in the chip and uploading it to the chain in real time.
[0035] Figure 2 The communication process between the client system 110 and the node server 120 is shown
[0036] In a possible implementation, data is exchanged between the client system and the node server, such as Figure 2 As shown, the client system process calls the security service when the user needs to go online, enters the node server through the trusted execution environment communication agent; creates a security service process in the node server, and executes the security service by scheduling the process in the trusted hardware; after the security service is completed, returns to the client system to perform the trusted computing.
[0037] In a possible implementation, a hidden frequency order-preserving encryption algorithm is used during the data interaction between the client system and the node server.
[0038] In one example, the node server uses an order-preserving encryption method when returning the corresponding data to the client system. In the order-preserving encryption stage, in order to effectively prevent frequency-based offline attacks. The present invention uses a frequency-hiding order-preserving encryption algorithm. The basic idea is to randomize the order of ciphertexts corresponding to repeated plaintexts. For example, the plaintext sequence X = {1,2,2,3} may be Y1 = {1,2,3,4} or Y2 = {1,3,2,4} after hidden frequency order-preserving encryption. This ensures the confidentiality of the frequency information while still supporting most of the operations and algorithms that traditional order-preserving encryption can support.
[0039] In a possible implementation, during the data interaction between the client system and the node server, a ciphertext indexing method is used to cryptographically convert the order relationship of the ciphertext into a data structure.
[0040] In one example, because the security of order-preserving encryption is not very high, the node server not only uses the order-preserving encryption method when returning the corresponding data to the client system, but also combines ciphertext indexing to achieve it. Specifically, for large amounts of data, the ciphertext indexing method is also used on the basis of order-preserving encryption. It converts the order relationship of the ciphertext into the data structure by cryptographic methods, so that data in the target range can be quickly located and read through the index.
[0041] In a possible implementation, the ciphertext indexing method uses a balanced binary search tree method.
[0042] In one example, the index structure is a balanced binary search tree (each node in the tree is equivalent to a "bucket"), whose leaf nodes represent a record, and non-leaf nodes contain the union of the records of its left and right subtrees. Each node in the tree is accompanied by a Bloom filter, which is a compact probabilistic data structure that allows O(1) time to determine whether an element belongs to a set (but it may be a false positive). With the help of the Bloom filter, the index can quickly determine whether there is at least one record under a subtree that belongs to the interval given by the query.
[0043] Figure 3 The system architecture diagram of the node server based on trusted hardware is shown as Figure 3 As shown:
[0044] [The top layer is the trusted application layer, which is deployed with trusted applications for interacting with non-trusted execution environments or non-trusted applications. The trusted applications implement different functions by calling different API interfaces; depending on different needs, other trusted applications can be added to the top layer of the node server to complete different requests in the untrusted environment.
[0045] The second layer is the extended function layer, which is deployed with extended function modules. The extended function modules are used to provide different functional API interfaces for different trusted applications, such as the functions of authorization verification and key package generation required by the authentication server.
[0046] The third layer is the basic kernel layer, which is used to provide basic system functions for specified extended function modules, such as memory management and task management.
[0047] In one possible implementation, the topmost trusted application layer is deployed with an authentication server and a file manager; wherein the authentication server is used to verify the identity of the client system when receiving an access request to the trusted execution environment initiated by the client system in the non-trusted execution environment; and the file manager is used to perform trusted storage using encryption functions in the trusted execution environment.
[0048] In a possible implementation, the node server based on trusted hardware is also used to: encrypt sensitive data in the extended function layer of the node server, and store the encrypted and encapsulated files in the file manager; wherein, the encryption function is implemented using the storage key sk (storage key), and HMACk (m) and ENCK (m) are used to ensure the security and integrity of the sensitive data, wherein HMACk (m) represents the calculation of a message authentication code for sensitive data m using the key K; ENCK (m) represents the encryption of sensitive data m using the key k, and corresponding symmetric and asymmetric encryption is adopted according to the type of k.
[0049] Taking sensitive data m as an example, we use k_hmac and k_enc to encapsulate it. The steps are: message ← Encrypt("HMAC+ENC", k_hamc, k_enc, m)
[0050] In a possible implementation, the system further includes: using a TCM chip as the trusted hardware to provide basic security services for the node server and establish a more secure and reliable system platform environment.
[0051] Figure 4This is the basic structure diagram of the domestic trusted cryptographic module TCM chip, in which the I / O component completes the encoding and decoding of the bus protocol and realizes the information exchange between TCM and the outside; the HMAC engine is a hardware engine that implements the Hash function message authentication code HMAC based on SHA-1, and its calculation is based on the RFC2014 specification; the cryptographic algorithm engine includes the SMS4 engine, SM2 engine and SM3 engine; the random number generator is the built-in random source of TCM, which is used to generate random numbers; the execution engine includes the CPU and the corresponding embedded software, and completes the task of TCM through the execution of the software; the non-volatile memory is mainly used to store the embedded operating system and its file system, and store important data such as keys, certificates, and identifications.
[0052] The present invention also provides a data storage method based on trusted hardware, specifically comprising: using the blockchain platform based on trusted hardware as described above for data storage.
[0053] In various aspects of the present invention, in order to achieve the goal of trust, trusted hardware is used to form a blockchain system. The advantages of trusted hardware in blockchain come from two aspects. From a logical level, trusted hardware serves users and expands the storage function of blockchain, which can safely store users' sensitive data and safely execute users' data processing tasks. From a physical location perspective, trusted hardware is directly connected to the server, with low communication latency and high bandwidth, and can be shared by multiple blockchain users, which can alleviate the additional costs incurred by using trusted hardware.
[0054] In addition, since the cryptography-based method and the trusted hardware-based method complement each other, in order to optimize the overall performance of the system. The combination of the "soft" and "hard" methods helps to balance the load between untrusted hardware and trusted hardware. In addition, trusted hardware must interact with an untrusted environment, and this interaction must rely on cryptography methods to ensure its security. Therefore, the embodiment of the present invention designs the following two aspects:
[0055] (1) We designed a data confidentiality protection mechanism based on ciphertext calculation. In order to improve the protection of data confidentiality on the blockchain platform, the most intuitive idea is to encrypt the data. But in general, once the data is encrypted, it is difficult for various applications on the blockchain platform to further calculate or process the encrypted data. So we studied and found a method that is currently suitable for ciphertext calculation on the blockchain platform.
[0056] (2) We designed a data confidentiality protection mechanism based on trusted hardware. Trusted hardware is a security-enhanced hardware that can isolate its internal computing and storage resources, making it impossible for attackers to spy on and tamper with the internal state of the trusted hardware, including code and data, from the outside. In other words, trusted hardware guarantees the confidentiality and integrity of its internal computing and data. We will use trusted hardware to protect blockchain data security.
[0057] (3) A highly reliable system based on node server devices was designed. By using node server devices with reasonable hardware configuration (content, bandwidth), stable operation and "end-to-end" trust in the blockchain are achieved. The node server receives resource information in the blockchain while interacting with trusted hardware to store information.
[0058] First, trusted hardware cannot completely replace cryptographic methods. The two need to complement each other to achieve load balancing. When trusted hardware interacts with an untrusted environment, cryptographic methods need to be used to ensure its security. Through the study of several ciphertext computing technologies, we use order-preserving encryption and ciphertext indexing methods to achieve high security while ensuring moderate overhead.
[0059] The domestic trusted cryptographic module TCM chip is selected as the hardware basis. Trusted hardware is usually used as the basis for providing trusted computing services, providing security for other devices or the entire computer system. Therefore, in order to achieve trusted storage, it is necessary to add trusted computing technology to the hardware of ordinary hard disks. With TCM as the trusted base, a trusted hardware driver module is added to the node server, and the encryption and decryption engine is used to implement the encryption and decryption algorithm based on trusted hardware, which provides great flexibility for the node server based on trusted hardware.
[0060] For the above-mentioned node servers, blocks can be generated according to operation instructions or resource content, and the resource content is stored in the trusted hardware in the form of block data. The block is used to store brief information of the resource, etc. The block needs to be added to the corresponding blockchain and synchronized to other node servers.
[0061] Compared with the prior art, the present invention has the following advantages. 1. The present invention has a simple structure, reasonable design, and is easy to implement and use. 2. It solves the storage protection problem of the blockchain platform. This patent studies the data confidentiality protection technology based on ciphertext calculation and the data confidentiality protection technology based on trusted hardware. The similarities and differences between the data confidentiality protection technologies based on cryptography and trusted hardware are analyzed and compared, and the most suitable positions for each of them in the blockchain platform are found. A data storage calculation method based on trusted hardware is designed, and the data storage calculation based on trusted hardware is implemented for this method. On the basis of in-depth understanding of trusted hardware technology, a blockchain platform based on highly trusted hardware is established, and the division of labor and cooperation of different technologies is completed, forming a complete trusted digital ecological landscape. 3. The present invention mainly studies the data storage mode based on trusted hardware, uses encrypted storage, data cutting and high redundancy in trusted hardware to ensure the privacy of data, and also verifies whether the storage node stores the complete original data. At the same time, it can establish a trust chain from the trust root (hardware) through trusted transmission, so that the node server and the upper-layer application can achieve trust extension. Finally, the trust chain is integrated into the blockchain network, thereby strengthening the data storage security of the entire network.
[0062] In summary, the present invention solves the problems of large-scale data storage, data trusted storage and computing, "end-to-end" trust, and real-time data encryption and chaining, thereby ensuring the privacy and security of data in the blockchain system.
Claims
1. A blockchain system based on trusted hardware, characterized in that: include: A client system, which is in communication with a node server and is used to obtain user requirements, perform trusted computing on the data in the user requirements, and upload the data information to the blockchain network; A node server based on trusted hardware, the node server is connected to the trusted hardware, and is used to reliably store user information and data information to be uploaded to the blockchain, and the node server reaches a consensus with the blockchain network; A blockchain network, wherein the blockchain network includes a plurality of blockchain nodes; The node server comprises: The trusted application layer is deployed with trusted applications for interacting with the non-trusted execution environment or non-trusted applications. The trusted applications implement different functions by calling different API interfaces. The extended function layer is deployed with extended function modules, which are used to provide API interfaces with different functions for different trusted applications; The basic kernel layer is used to provide basic system functions for the specified extended function modules; The trusted application layer is deployed with an authentication server and a file manager; wherein, The authentication server is used to verify the identity of the client system when receiving an access request to the trusted execution environment initiated by the client system in the non-trusted execution environment; The file manager is used for performing trusted storage using an encryption function in the trusted execution environment; Data is exchanged between the client system and the node server, wherein the client system process calls the security service when the user needs to go online, and enters the node server through the trusted execution environment communication agent; creates a security service process in the node server, and executes the security service by scheduling the process in the trusted hardware; and returns to the client system to perform the trusted computing after the security service is completed.
2. The system according to claim 1, characterized in that A hidden frequency order-preserving encryption algorithm is used during the data interaction between the client system and the node server.
3. The system according to claim 2, characterized in that During the data interaction between the client system and the node server, a ciphertext indexing method is used to cryptographically convert the order relationship of the ciphertext into a data structure, so that data in the target interval can be quickly located and read through the index.
4. The system according to claim 3, characterized in that The ciphertext indexing method uses a balanced binary search tree method.
5. The system according to claim 1, characterized in that The system further comprises: The TCM chip is used as the trusted hardware to provide basic security services for the node server.
6. A data storage method based on trusted hardware, characterized in that: include: Data storage is achieved using the blockchain system as described in any one of claims 1-5.
Citation Information
Patent Citations
A block chaining method and a block chaining system for block chain transactions
CN109903041A
Internet of Things data privacy protection method based on block chain and trusted hardware
CN110086804A
Retrieving access data for blockchain networks using highly available trusted execution environments
CN110999255A
Automated attestation of device integrity using the block chain
US20160275461A1
System and apparatus to manage data using a peer-to-peer network and the blockchain
US20190158594A1
