Database Management

By receiving and processing database transactions in a secure processing enclave, and utilizing distributed consensus protocols and encryption technology, the problem of database systems relying on trusted third-party management in the existing technology is solved, and autonomous management and efficient database transactions are achieved. Processing and access control.

CN112889040BActive Publication Date: 2024-10-01MICROSOFT TECHNOLOGY LICENSING LLC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201980068078.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2018-11-26
Filing Date
2019-09-05
Publication Date
2024-10-01
Estimated Expiration
2039-09-05

AI Technical Summary

Technical Problem

Existing database systems rely on trusted third parties to manage access permissions and configurations. They lack autonomous management and secure database transaction processing mechanisms, making it difficult to achieve safe and efficient management of the database without relying on trust relationships.

Method used

In a computer system with a secure processing enclave, database transactions are received and processed, the security and consistency of database transaction log records are ensured through distributed consensus protocols and encryption technologies, and the blockchain network is used to realize the status management and control of distributed databases. Access control.

Benefits of technology

It realizes the safe execution of database transactions without relying on a trusted third party, ensures the integrity and recoverability of database status through the blockchain network, and provides autonomous management and efficient access control of distributed databases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112889040B_ABST
    Figure CN112889040B_ABST
Patent Text Reader

Abstract

Database transactions are executed in a computer in a system of networked computers having a secure processing enclave. Within the secure processing enclave, a database transaction log record for the executed database transaction is generated and cryptographically protected using a private key pair held in a secure storage device of the secure processing enclave. The state of the distributed database is recorded in a series of transaction log records that are replicated in a distributed computer storage device accessible to the networked computers. Consensus messages are transmitted and received via a secure communication link between the secure processing enclaves of the networked computers to merge the database transaction log record into the series of transaction log records according to a distributed consensus protocol implemented based on consensus protocol logic held within the secure processing enclave.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to database management technology. Background Art

[0002] Conventional database systems (e.g., database systems that provide shared access to a database by multiple users) typically rely on a trusted third party (e.g., a database administrator) to manage access permissions and other configuration aspects related to the database. As a result, transactions that users request to be performed in or about a database will be subject to any constraints imposed by configuration settings applied by the database administrator. An audit log may be maintained by the database system, recording specific details of user activities when accessing the database. Configuration settings typically determine what is recorded in the audit log. The database administrator may access the audit log for administrative purposes, for example, to perform analysis of the log records, for archival purposes, or to invoke any applicable data retention policies.

[0003] The database may be a relational database for which transactions are defined using a database management programming language such as SQL (Structured Query Language). SQL is a standard language for managing data within a relational database management system (RDBMS). Database-related operations are facilitated by commands in the form of SQL statements submitted to a message interface or SQL "front end". SQL is a comprehensive language that includes a range of functionality including data query, data manipulation, data definition, and data control. SQL provides a comprehensive framework for accessing and manipulating different forms of relational databases. Summary of the invention

[0004] According to a first aspect disclosed herein, a method for executing a database transaction in a computer in a system of networked computers having a secure processing enclave is provided. One or more statements in a defined database query language for executing a database transaction against a distributed database are received at a secure processing enclave of the computer. The one or more statements are processed according to the database query language by a database transaction processing engine executed in the secure processing enclave to execute the database transaction against the distributed database. Within the secure processing enclave, a database transaction log record is generated for the executed database transaction, and the database transaction log record is cryptographically protected using a private key held in a secure storage device of the secure processing enclave. The state of the distributed database is recorded in a series of transaction log records, which are replicated in a distributed computer storage device accessible to the networked computer. Consensus messages are transmitted and received via a secure communication link between the secure processing enclaves of the networked computers to merge the database transaction log record into the series of transaction log records according to a distributed consensus protocol, which is implemented based on consensus protocol logic held in the secure processing enclave. BRIEF DESCRIPTION OF THE DRAWINGS

[0005] To assist in understanding the present disclosure and to show how embodiments may be implemented, reference is made to the accompanying drawings by way of example, in which:

[0006] Figure 1 An example of a blockchain network architecture in which a database management system may be implemented is shown;

[0007] Figure 2 A schematic functional block diagram of a relational database management system is shown;

[0008] Figure 3 An example of a distributed database system is shown;

[0009] Figure 4 shows a schematic block diagram of a server unit having a secure processing enclave;

[0010] Figure 5 An example of a database transaction recorded in a blockchain is shown;

[0011] Figure 6 A functional block diagram of a server unit hosting a transaction processing engine in a secure processing enclave is shown;

[0012] Figure 7 A set of example transaction log records is shown;

[0013] Figure 8 An example blockchain data structure is shown that is secured by a blockchain network based on trusted hardware. DETAILED DESCRIPTION

[0014] Brief reference Figure 1 , describes a blockchain design that allows a consortium of mutually untrusting enterprises to establish and operate a SQL-based blockchain 30 with strong confidentiality and tamper-proof guarantees. The blockchain network 132 consists of a set of transaction processing SQL server instances operated by different enterprises. Each SQL instance hosts the database transaction processing engine and application logic inside a TEE (Trusted Execution Environment), which may also be referred to as a secure processing enclave in this article. That is, it is the SQL server instance that acts as the blockchain network. Each database transaction processing engine takes the form of a SQL engine (e.g., Hekaton). The application can, for example, take the form of a "smart contract" written in SQL.

[0015] TEE Figure 1 Not shown, but in Figure 3 and described later.

[0016] The principles of TEE and confidential computing are known per se. A trusted execution environment is protected based on cryptography so that the data and code (instructions) stored therein and any operations performed therein cannot be viewed or inferred from the outside, but also so that any changes to the data or code are nonetheless detectable. If any such changes are detected, the TEE can be disabled to ensure that only authorized operations can be performed and only on authorized data. SGX (Software Guard Extensions) is an example of a suitable TEE architecture. This allows applications to be partitioned across secure hardware enclaves. Another example is A virtualization-based security (VBS) architecture that uses hardware virtualization to provide a trusted execution environment by isolating secure areas of physical memory from the operating system and using integrity checks to ensure that code can only be executed within the TEE when signed by an authorized signer. This is part of the so-called "enclave attestation" (the process of verifying a secure enclave). Further details of confidential computing are not described in this article, as existing confidential computing technologies can be used to provide a TEE that can guarantee the integrity and confidentiality of the code and data executed and stored therein.

[0017] The blockchain network 132 hosts a distributed relational database (DB) 110 that is managed using SQL and supported by a form of blockchain technology. The details of this arrangement will now be described.

[0018] Figure 1 is a highly schematic block diagram showing how blockchain technology may be used to support DB 110.

[0019] like Figure 1 As shown, the SQL engines 15 are interconnected to form a blockchain network 132. The SQL engines 15 and the server instances hosting them operate as nodes of the blockchain network 132 to store, maintain and protect the above-mentioned blockchain 30. The blockchain 30 is regarded as the authoritative definition of the state of the DB 110.

[0020] To this end, multiple secure communication links 17 are set between different TEEs hosting SQL engines 15, which are used to implement communications within the blockchain network 132, especially the underlying protocols of the blockchain network. These protocols are crucial to the operation of the blockchain network 132 and define the way in which the blockchain 30 is managed and protected by the blockchain network 132.

[0021] The underlying protocols include a consensus protocol 128 and a distributed governance protocol 130.

[0022] The SQL engine 15 of the blockchain network runs a consensus protocol 128 to execute transactions while ensuring consistency and fault tolerance. The consensus protocol 128 is a mechanism by which the SQL engine reaches a consensus on the state of the blockchain 30 and thereby reaches a consensus on the authoritative state of the DB 110 defined by the blockchain 30.

[0023] The blockchain network 132 uses a decentralized governance model in which operations, such as adding / removing users and making database schema changes (such as adding or removing tables, indexes, and stored procedures, and defining access control policies), are authorized and performed according to the distributed governance protocol 130 of the blockchain network 132.

[0024] The consensus protocol 128 and the distributed governance protocol 130 are hosted in the TEE because they are implemented based on secure protocol logic that is stored in the TEE and can therefore be trusted. This is not to say that the protocols must be specifically defined by the secure protocol logic hosted in the TEE. For example, the secure protocol logic may allow one or both protocols to be changed when the defined protocol change requirements are met (e.g., based on voting within the blockchain network). However, the secure protocol logic defines how external information, events, etc. outside the TEE affect the implementation of the protocol (if any). Permitted changes to the consensus protocol 128 and the distributed governance protocol 130 can be defined by the distributed governance protocol 130 itself. Such changes can also be recorded in the blockchain 30 (for example) when they are implemented.

[0025] The blockchain network 132 may be any form of blockchain network designed using trusted hardware.

[0026] For example, The CoCo (Confidential Alliance) framework for the enterprise blockchain network of Azure provides a trusted foundation that provides an efficient consensus algorithm and a flexible confidentiality scheme, and the trusted foundation can support new and existing blockchain protocols (such as Ethereum, Quorum, Corda, etc.) with enhanced latency, throughput, and confidentiality guarantees. For example, in this context, reference is made to U.S. Patent Publication No. US2018 / 0225661 A1, and additional reference is made to the publicly available CoCo white paper (“CoCo Framework-Technical Overview”; https: / / github.com / Azure / coco-framework / blob / master / docs / Coco%20Fra mework%20whitepaper.pdf) published on August 10, 2017. In the current context, the blockchain network 132 can be implemented by running the SQL engine 15 on top of the CoCo framework within the distributed TEE network.

[0027] Although traditional blockchain protocols are often based on "proof of work" requirements, in the present case different forms of consensus protocols can be used to protect the blockchain 30. For example, the CoCo framework described above can support efficient Paxos or Caesar consensus protocols (among others). As described above, the blockchain itself is protected by public-private key cryptography through trusted hardware implementation, where valid transactions to be added to the blockchain are cryptographically signed within the TEE provided by the trusted hardware without the need for expensive proof of work algorithms.

[0028] Such blockchain networks are known to operate according to a distributed governance protocol, which may define, for example, which blockchain users are authorized to submit transactions to the blockchain network 124 and which users are allowed to access the blockchain 30. With respect to the latter, while some public blockchains store data in plaintext that can be accessed by any user, confidential / consortium networks based on trusted execution hardware allow blockchain data to be encrypted via access control via a trusted execution environment (TEE) provided by the trusted hardware. Other blockchain architectures may also be used to provide a closed (i.e., encrypted or partially encrypted) blockchain, access to which may be regulated according to a governance protocol. A distributed governance protocol may be implemented, for example, based on voting within a blockchain network, where voting rights and requirements are defined by the protocol. As described above, the network may agree to make changes to the distributed governance protocol, and the conditions for doing so may be defined by the partitioned governance protocol itself.

[0029] Since the principles of consensus and distributed governance are known, for example in the context of the CoCo framework, further details are described herein only to the extent relevant to the described embodiments. One aspect to note at this point is their relationship to the DB 110: the consensus protocol 128 is used to reach consensus on the state of the distributed DB 110 (the blockchain 30 is ultimately the authoritative source of the database state), and the distributed governance protocol 130 is used to regulate the operations that can be performed on the DB.

[0030] The consensus protocol 128 also provides fault tolerance for the DB 110: because the SQL engine 15 reaches consensus on the agreed-upon state of the blockchain 30 and the database 110, errors can be detected as deviations from the agreed-upon state.

[0031] Figure 2A highly schematic system block diagram illustrating some of the principles of the described technology is shown. A relational database management system (RDBMS) 5 is shown having a SQL front end 100 to which a SQL client 25 can submit input formed by SQL statements. The SQL front end 100 accepts and processes such input to allow the SQL client 25 to initiate database transactions with a distributed relational DB 110 managed by the RDBMS. The SQL front end 100 is provided by a SQL engine 15 of a blockchain network 132.

[0032] A database management system (DBMS) refers to a computer program or a set of computer programs used to create and manage databases. A DBMS executes on one or more processors (e.g., CPU, GPU, accelerator, etc.) of a database system. A DBMS allows users and applications to interact with a database managed by the DBMS to perform operations such as data creation, manipulation, query and control, and database management.

[0033] The enterprise uses the SQL client 25 to send encrypted requests (transaction execution messages) to execute transactions to the blockchain 30 managed and protected by the blockchain network 132. These requests contain commands in the form of SQL statements that define the database transactions to be executed. The database transaction is executed according to one or more commands received in at least one transaction execution message to cause the state of the DB 110 to change from a previous state to a new state. A transaction log record is generated for each executed database transaction and stored in the blockchain 30. Therefore, over time, a series of transaction log records are created in the blockchain 30.

[0034] Each transaction log record corresponds to one of the database transactions and includes (i) one or more commands according to which the transaction log record is executed, and (ii) the result of the execution of the transaction log record, so that a new state of the database can be restored from the transaction log record and the previous state of the database, so that the database 110 can be fully restored from the series of transaction log records stored in the blockchain 30.

[0035] All transaction log records are signed and include corresponding signature requests for full auditing. The log can be verified by anyone and can be used to restore the state of the database 110 to any point. Log records can be encrypted using private keys (multiple) securely stored in the TEE to preserve the confidentiality of certain tables / transactions.

[0036] The transaction log record includes the full text of each submitted SQL query / statement signed by the SQL client 25 that issued the query / statement, and the results generated by the SQL engine 15 that processed the query / statement. Optionally, the transaction log record may also include a set of any writes (inserts, updates, and deletes) made to the data in DB 110 during the execution of the transaction.

[0037] Database transactions may abort or fail for a variety of reasons. In some cases, the aborted / failed transaction will also be recorded in the blockchain.

[0038] The database 110 has a set of defined users 118 that can be authorized to perform operations on the DB 110 according to at least one access control policy 120. As described above, this is ultimately determined based on the distributed governance protocol 130. Therefore, it is the distributed governance protocol 130 that ultimately determines the authorized users 118 of the database 110 and their roles, permissions, etc. Roles and permissions are well-defined concepts in database technology. One or more roles can be assigned to a user, which in turn can be associated with one or more permissions, or a user can be directly associated with one or more permissions. The permissions associated with a user (directly or indirectly) specify whether the user has the right to perform which operations on the database 110.

[0039]

[0066] Other examples of the types of operations that may be performed when executing a database transaction will now be described.

[0040] The SQL front end 100 is shown to include a data manipulation component 102, a data query component 104, a data definition component 106, and a data control component 108. It should be understood that these are high-level representations of specific classes of functionality provided by the SQL engine 15 as part of the SQL front end 100, and although shown as distinct components, they may have a degree of overlap.

[0041] The data definition component 106 refers to the creation and modification of a database schema that defines the data structures embodied in the DB 110. The data structures may include tables 112 (relationships) and related components, such as indexes 114 of the database 110 and stored procedures 116 (STORPs) stored in the database dictionary and applicable to the DB 110 by users 118 / SQL clients 25 authorized to do so. The data manipulation component 102 refers to the storage, deletion, and modification of data within the tables 112 and / or other such data structures of the DB 110. Data querying refers to queries to the DB 110 to obtain desired data. Data control refers to functions related to access control policies 120, which in turn define which users 118 can perform query, manipulation, and control operations on which data. This may be supported, for example, by permissions, roles, etc. associated with the database users 118. Data control operations may be performed to implement access control changes, such as creating new or modifying existing permissions, roles, etc.

[0042] One aspect of SQL is the ability to "commit" a database transaction to be executed in or about a database, such as a data query, data access, data control, data manipulation statement, or any combination thereof, typically via a commit statement submitted in association with one or more operational statements (although "commit" may be implicit for some operational statements). When a database transaction is committed, assuming it is valid, the statements contained therein are executed against DB 110 so that the results are visible to other users. The database statements are committed according to a commit protocol 122 (commit logic) associated with DB 110. This may be referred to herein as a committed database transaction.

[0043] refer to Figure 3 , provides a schematic block diagram showing components in an example of a database system 1 in which an RDBMS 5 is executed. The system 1 is shown to include multiple TEEs 35. Although Figure 3 Not shown in FIG, but each TEE is provided by secure hardware on the physical server unit on which the SQL engine 15 executes.

[0044] The SQL engine 15 executes in a TEE (also not shown) and can access the secure storage device 12 within the TEE 35. As described above, in this example, each SQL engine 15 is hosted by a database server instance, which refers to a virtual machine executed on a physical computer such as a server unit. A server unit can host one or more server instances.

[0045] Figure 4A schematic block diagram of an example server unit 10 is shown, which is shown to include a TEE 35, at least one secure processor 11 (such as a CPU, etc.) for executing a SQL engine 15, and a secure storage device 12 accessible to the secure processor 11. The secure processor 11 and the secure storage device 12 are both within the TEE 35, so their integrity and confidentiality are guaranteed. The server unit 10 is also shown to include an untrusted storage device 50 accessible to the secure processor 11 but outside the TEE 35, and a network interface 402 for communicating within the blockchain network 132. A secure communication link can be established between the TEE 35 and a remote TEE via the network interface 402. The link is protected based on encryption applied within the TEE.

[0046] like Figure 4 As shown, the server unit 10 may also include untrusted hardware external to the TEE on which a computer program may be executed, such as one or more untrusted processors (such as a CPU, GPU, etc.). Depending on the implementation, the server instance may be fully executed on (multiple) processors within the TEE 35, or the server instance may be partially executed on (multiple) untrusted processors 13. For example, the server instance may be divided across a combination of trusted and untrusted hardware of the server unit 10.

[0047] As described above, security protocol logic is also hosted within each TEE 35 , which may take the form of protocol implementation instructions stored in secure storage 12 .

[0048] For example, a transaction request may include a request to read selected data stored in a database, write data to a database, or modify data stored in a database. Transactions may include, for example, a request to view or edit the schema of a database, such as a request to view or edit the properties of a field or table, a request to add or delete a field or table, or a request to view or change some other aspect of the database schema. Transactions may include requests to add or delete users, change access rights for users, or other properties of users. Transactions may also include requests to add or change properties of an enterprise or other defined user group. Transactions may also include requests to add or change other aspects of the governance rules or governance model implemented by system 1. Other database transaction types may be received, as will be apparent to those of ordinary skill in the relevant art.

[0049] The server units that make up the blockchain network 132 can be hosted in different enterprise systems, and the benefit of the described technology is that it does not assume any mutual trust relationship between enterprises. That is, the enterprises or defined user groups of the alliance can be completely independent and "untrusting" entities, that is, entities that have no reason to trust each other when sharing access to the database through the database system 1. The embodiment of the system 1 disclosed herein provides a method for users in the alliance to, for example, share access to one or more databases and manage the configuration of the database and the user's access to the database without requiring trust between users and without requiring a trusted third party to manage the rules for accessing the shared database and the configuration of the shared database. In the system 1, the configuration of the database, the rules for accessing the database, and the governance model for controlling how to change the access rules and configuration are defined and negotiated by the enterprises within the alliance using a process operated by a network of SQL engines 15, as will be described in further detail below.

[0050] refer to Figure 5 , blockchain 30 is replicated in the distributed storage of system 1. More specifically, each server unit or server instance stores a local copy of blockchain 30 in its external non-trusted storage device 50's persistent memory. Blockchain 30 is maintained outside the TEE in the non-trusted storage device 50, which is cryptographically protected in the manner described below. Transactions T1, T2, T3 initiated in response to client requests are transmitted across the entire blockchain network 132 and recorded in each local copy of blockchain 30 according to the consensus protocol 128. For example, Figure 5 It is shown that transactions T1 and T3 are executed by a first SQL engine in the SQL engines 15 and transaction T2 is executed by a second SQL engine in the SQL engines 15. The consensus protocol 128 allows the SQL engines 15 within the blockchain network 132 to reach consensus on the record of transactions T1, T2 and T3 in the blockchain, so that the local copy of the blockchain 30 is consistent in its constituent transactions and the order of these transactions. This will be described in further detail below.

[0051] Figure 6 A schematic functional block diagram of a server unit 10 is shown, and illustrates how a blockchain 30 is grown and secured. In the depicted example, a database server instance 19 hosting a SQL engine 15 runs entirely within a TEE 35, although as described above, the technique may be implemented by executing only certain DB server functions within a TEE 35. In the example below, database transactions are executed and blocks of a blockchain 30 are generated exclusively within a TEE 35 to ensure trust in the blockchain 30.

[0052] The SQL engine 15 executed in the TEE can access the secure storage device 12 ( Figure 4 ) in a secure key repository 500. The secure key repository 500 is accessible only within the TEE 35; its contents are not accessible from the outside. The secure key repository 500 holds at least one private key 502, although in Figure 6 35, but the private key 502 never leaves the TEE 35 and is inaccessible outside the TEE 35. For each database transaction executed by the SQL engine 15, a transaction log record is generated. A new block 75 is generated for the blockchain 30 within the TEE 35, the block 75 including one or more transaction log records 90 and a block pointer 85, which is a pointer to a previous block 80 in the blockchain 30. The block pointer 85 can be a hash pointer calculated as a hash of the data of the previous block 80. The transaction log record(s) 90 and the block pointer 85 each constitute a portion of a block payload 81, which is cryptographically signed within the TEE 35. That is, at least one block cryptographic signature 95 is calculated from the block payload 86 using the private key 502 and included in the block 75 to verify the payload 86.

[0053] However, it should be noted that the DB server instance 19 that executes the database transaction is not necessarily the blockchain network node that adds the corresponding transaction log record to the blockchain 30. This is determined according to the consensus protocol 128. For example, the Paxos consensus protocol is used, according to which a leader node is designated, and then the transaction log record to be verified is transmitted to the leader node using a secure communication link 17. For example, Figure 6 A secure communication link 17 is shown between the TEE 35 and a remote TEE 35', which may be, for example, the TEE of a leader node. The DB server instance may forward the transaction log record to the remote TEE 35' for verification as needed. Assuming it is determined to be valid, the leader node adds it to the blockchain 30 in exactly the same manner as described above.

[0054] The consensus protocol 128 also defines how new blocks are transmitted within the blockchain network 132. For example, using the Paxos protocol, once a nominated leader node adds a new block, the new block is transmitted to other nodes according to the consensus protocol 128 and the other nodes add the new block to their local copies of the blockchain 30 (i.e., the leader's determination is authoritative).

[0055] The consensus protocol 128 is a method for achieving fault tolerance. It allows the authoritative state of the blockchain 30 and thereby the authoritative state of the database 110 to be determined from the local copy in a way that tolerates failures in the local blockchain copy. The authoritative state of the blockchain 30 may be, for example, a state agreed upon by a majority of nodes (server instances) within the blockchain network 132. Such failures may occur due to corruption or deliberate tampering of external storage devices. Typically, such failures will be detectable because at least some of the cryptographically signed blockchain data will no longer be valid (i.e., no longer match the corresponding cryptographic signature(s) applied in the TEE; missing blocks may also be detected from cryptographically signed block pointers). However, the consensus protocol 128 provides an additional level of fault tolerance to improve robustness.

[0056] When a new node (server instance) joins the blockchain network 132, it needs to rebuild the blockchain 30 to its current state. Fault tolerance mechanisms are used to ensure that the rebuilt blockchain matches the majority of local blockchain copies within the network. In order for a new node to join the network, it must become a member of the alliance; the conditions for allowing new members to join the alliance are set by the distributed governance protocol 130.

[0057] The database 110 may be implemented as a distributed in-memory database, i.e., each server instance maintains a local copy (database instance) of the database 110 in a portion of the main memory 65 of the server unit 10 on which it is hosted. The portion of the main memory 65 hosting the in-memory database is preferably within the TEE 35. An example of a suitable in-memory database is Hekaton.

[0058] Alternatively, the blockchain 30 containing the log of database transactions may be the only persistent representation of the database, and the state required to perform each transaction may be reconstructed from the blockchain only when it is needed to perform a transaction.

[0059] Figure 7 A set of example transaction log records 700 stored in the blockchain 30 is shown. Each transaction log record 701 includes: a piece of ordering data, which in this example is a sequence number 702; a complete SQL text 704 defining the original database transaction; at least one client encryption signature 706 for verifying the SQL text 704; the execution result of the database transaction 708; and at least one server encryption signature 710 for verifying the execution result 708. The client encryption signature 708 is a signature generated based on the SQL text 704 submitted by the SQL client 25 for execution using a private key available to the client (the private key can be, for example, a private key issued to a specific user who has been authenticated by the SQL client 25). The server encryption signature 710 is a signature generated by the SQL engine 15 executing the transaction using a private key available to it.

[0060] Alternatively, the sequence number may be omitted and the order of transactions may be defined by their order within the blockchain 30.

[0061] The order of transactions may be determined, for example, by a leader node, i.e., the leader node is responsible for defining the order of database transactions on the database 110. More generally, the order may be determined according to the consensus protocol 128.

[0062] A sequence number, timestamp, etc. is used as a transaction identifier for identifying the transaction log record to which it applies.

[0063] Figure 5 An example data structure of a blockchain 30 is shown. The blockchain 30 is shown to be formed by a series of blocks. Each block 800 includes a payload 802, which is in turn shown to include Figure 4 A set of transaction log records 700 of the type shown. In addition, each block's payload 802 (except for Figure 4 The genesis block (not shown in FIG. 1 ) contains a pointer 802 pointing to a previous block in the blockchain. Pointer 804 can be, for example, a hash pointer obtained by hashing the data of the previous block.

[0064] In this example, the block payload 802 is protected by a block cryptographic signature 95, which can be used to verify the block payload 802 and thus verify the reorganized transaction log record 700 and the block pointer 804 contained in the payload 802. As described above, the block cryptographic signature 95 is generated by a cryptographic signature function 512 executed within the TEE 808 of the blockchain network 132 using a private key 510 maintained in a secure storage device of the TEE 808. This cryptographic mechanism operates completely independently of the database system 1 and the key 510 within the TEE 808 cannot be accessed within the database system 1 at all, even if it has been compromised. The TEE is provided by trusted hardware within the blockchain network 132 and may also be referred to herein as a secure enclave.

[0065] These three cryptographic signatures (ie, the client cryptographic signature 706 and the server signature 710 applied together with the block cryptographic signature 95 ) combine to provide a highly reliable data verification mechanism for the transaction log record 700 .

[0066] Although Figure 4 A set of three transaction log records is shown, but a block payload may contain any number of transaction log records, including one.

[0067] As described above, according to the first aspect disclosed herein, a method for executing a database transaction in a computer in a system of networked computers having a secure processing enclave is provided. One or more statements in a defined database query language for executing a database transaction against a distributed database are received at a secure processing enclave of the computer. The one or more statements are processed according to the database query language by a database transaction processing engine executed in the secure processing enclave to execute a database transaction against the distributed database. Within the secure processing enclave, a database transaction log record is generated for the executed database transaction, and the database transaction log record is cryptographically protected using a private key held in a secure storage device of the secure processing enclave. The state of the distributed database is recorded in a series of transaction log records, which are replicated in a distributed computer storage device accessible to the networked computer. Consensus messages are transmitted and received via a secure communication link between the secure processing enclaves of the networked computers to merge the database transaction log record into the series of transaction log records according to a distributed consensus protocol, which is implemented based on consensus protocol logic held in the secure processing enclave.

[0068] By way of example, optional implementation features that may be implemented in embodiments of the first aspect are set out below.

[0069] The series of transaction log records may be stored in a blockchain, and the database transaction log records may be included in a data block that is added to the blockchain according to a consensus protocol.

[0070] Database transactions may be performed according to a set of database privileges. The set of database privileges may be defined by a distributed governance protocol implemented based on governance protocol logic maintained within a secure processing enclave.

[0071] The database may contain encrypted data, and the set of database privileges includes access privileges to the encrypted data, wherein the series of transaction log records is at least partially encrypted using one or more private keys in one or more secure processing enclaves securely maintained in the secure processing enclave, such that the encrypted data stored in the database cannot be recovered from the series of transaction log records outside the secure processing enclave.

[0072] The distributed database may be a relational database, and the database query language may be Structured Query Language (SQL).

[0073] Database transaction log records can be cryptographically protected by using a private key to generate a cryptographic signature that is used to authenticate the database transaction log records.

[0074] Database transaction log records can be encrypted and protected by encrypting the database transaction log records using a private key.

[0075] The distributed database is an in-memory database, and an instance of the in-memory database is embodied in the processor main memory of each of the networked computers.

[0076] A portion of a processor's main memory embodying an in-memory database instance may be contained within a secure processing enclave of the computer.

[0077] A database transaction may cause a state change of the database from a previous state to a new state. A database transaction log record may include the one or more statements, so that the new state of the database is recoverable from the database transaction log record and the previous state of the database.

[0078] The database transaction log records may include the results of the execution of database transactions generated by the transaction processing engine.

[0079] The method may further include the step of exporting the cryptographically protected database transaction log records from the secure processing enclave for storage in a distributed computer storage device external to the secure processing enclave.

[0080] The method may further include the step of transmitting the cryptographically protected database transaction log records from the secure processing enclave to the remote secure processing enclave via the secure communications link for processing.

[0081] Execution of a database transaction may cause at least one of: a database schema change to the distributed database, and a change to a set of database permissions associated with the database.

[0082] Execution of a database transaction may cause data to be queried from the distributed database, inserted or updated in the distributed database, or deleted from the distributed database.

[0083] The distributed governance protocol may be used to determine at least one role and / or at least one permission associated with a database.

[0084] The protocol logic may take the form of protocol implementation instructions stored in secure storage of the secure processing enclave.

[0085] A second aspect of the present disclosure provides a computer for executing a database transaction, the computer comprising: a secure processing enclave comprising at least one processor for executing instructions and a secure storage device accessible to the processor; and a network interface for establishing a secure communication link for transmitting data to the secure processing enclave and receiving data from the secure processing enclave. The at least one processor is configured to execute computer-readable instructions within the secure processing enclave, which, when executed, causes the at least one processor to perform any of the steps disclosed herein.

[0086] Another aspect provides a distributed database system comprising a plurality of networked computers, each networked computer being configured as described in the preceding paragraph.

[0087] Another aspect provides a computer program comprising instructions stored on a computer-readable storage medium, the instructions being configured to implement any of the steps disclosed herein when executed on a computer having a secure processing enclave.

[0088] Note that references to code, software, instructions, etc. executed on one or more processors (etc.) may mean that all software is executed on the same processor, or that portions of the code may be executed on different processors, which may or may not be in the same location. References to "computer storage," "electronic storage," and any other form of "storage" generally refer to one or more computer-readable storage devices, such as magnetic or solid-state storage devices. For multiple devices, they may or may not be in the same location in space. Features of the techniques described herein are platform-independent, meaning that these techniques can be implemented on a variety of commercial computing platforms with a variety of processors. For example, these systems may include a computer-readable medium that may be configured to maintain instructions that cause the system, particularly any operating system executed thereon, and the associated hardware of the system to perform operations. Thus, these instructions function to configure the operating system and associated hardware to perform these operations, and in this way cause the conversion of the operating system and associated hardware to perform functions. These instructions may be provided to the system processor(s) by a computer-readable medium in a variety of different configurations. One such configuration of a computer-readable medium is a signal-bearing medium, and is therefore configured to transmit instructions (e.g., as a carrier wave) to a computing device, such as via a network. Computer-readable media may also be configured as computer-readable storage media, and therefore are not signal-bearing media. Examples of computer-readable storage media include random access memory (RAM), read-only memory (ROM), optical disks, flash memory, hard disk storage, and other memory devices that can use magnetic, optical, and other technologies to store instructions and other data. The examples described herein will be understood as illustrative examples of embodiments of the present invention. Other embodiments and examples are contemplated. Any feature described with respect to any one example or embodiment may be used alone or in combination with other features. In addition, any feature described with respect to any one example or embodiment may also be used in combination with one or more features of any other example or embodiment or any combination of any other example or embodiment. Although the subject matter has been described in a language specific to structural features and / or method actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the above-mentioned specific features or actions. Instead, the specific features and actions described above are disclosed as example forms for implementing the claims.

Claims

1. A method of performing a database transaction, the method comprising, in a computer in a system of networked computers having a secure processing enclave: receiving, at the secure processing enclave of the computer, one or more statements in a defined database query language for executing a database transaction against a distributed database, wherein the secure processing enclave is protected based on encryption such that contents of the secure processing enclave cannot be viewed from the outside, and such that changes to the contents of the secure processing enclave are detectable from the outside; processing, by a database transaction processing engine executed in the secure processing enclave, the one or more statements in accordance with the database query language to perform the database transaction against the distributed database; as well as generating, within the secure processing enclave, a database transaction log record for the database transaction executed and cryptographically protecting the database transaction log record using a private key maintained in secure storage of the secure processing enclave; wherein the state of the distributed database is recorded in a series of transaction log records, the series of transaction log records are replicated in distributed computer storage accessible to networked computers, and the method further comprises: and transmitting and receiving consensus messages via a secure communication link between the secure processing enclaves of the networked computers to merge the database transaction log records into the series of transaction log records according to a distributed consensus protocol implemented based on consensus protocol logic maintained within the secure processing enclaves.

2. The method of claim 1 , wherein the series of transaction log records are stored in a blockchain and the database transaction log records are contained in a data block that is added to the blockchain according to the consensus protocol.

3. The method of claim 1 , wherein the database transaction is performed according to a set of database privileges, wherein the set of database privileges is defined by a distributed governance protocol, the distributed governance protocol being implemented based on governance protocol logic maintained within the secure processing enclave.

4. The method of claim 3, wherein the distributed database contains encrypted data and the set of database privileges includes access privileges to the encrypted data, wherein the series of transaction log records is at least partially encrypted using one or more private keys securely maintained in one or more of the secure processing enclaves, such that the encrypted data stored in the distributed database cannot be recovered from the series of transaction log records outside of the secure processing enclave.

5. The method of claim 3, wherein the distributed governance protocol is used to determine at least one role and / or at least one permission associated with the distributed database.

6. The method according to claim 1, wherein the distributed database is a relational database, and the database query language is structured query language SQL.

7. The method of claim 1, wherein the database transaction log record is cryptographically protected by using the private key to generate a cryptographic signature for authenticating the database transaction log record.

8. The method of claim 1, wherein the database transaction log record is cryptographically protected by encrypting the database transaction log record using the private key.

9. The method of claim 1, wherein the distributed database is an in-memory database, and an instance of the in-memory database is embodied in a processor main memory of each of the networked computers.

10. The method of claim 9, wherein a portion of the processor main memory embodying the in-memory database instance is contained within the secure processing enclave of the computer.

11. The method of claim 1 , wherein the database transaction causes a state change of the distributed database from a previous state to a new state, wherein the database transaction log record includes the one or more statements, such that the new state of the distributed database is recoverable from the database transaction log record and the previous state of the distributed database.

12. The method of claim 11, wherein the database transaction log record includes a result of the execution of the database transaction generated by the database transaction processing engine.

13. The method of claim 1, wherein the method further comprises the operation of exporting the cryptographically protected database transaction log records from the secure processing enclave for storage in the distributed computer storage device external to the secure processing enclave.

14. The method of claim 1, wherein the method further comprises the operation of transmitting the cryptographically protected database transaction log records from the secure processing enclave to a remote secure processing enclave via a secure communications link for processing.

15. The method of claim 1, wherein the execution of the database transaction causes at least one of: a database schema change for the distributed database, and a change to a set of database permissions associated with the distributed database.

16. The method of claim 1, wherein the execution of the database transaction causes data to be queried from the distributed database, inserted or updated in the distributed database, or deleted from the distributed database.

17. The method of claim 1, wherein the database transaction log record comprises the one or more statements of the database transaction, at least one client cryptographic signature for verifying the one or more statements, a result of the execution of the database transaction, and at least one server cryptographic signature for verifying the execution result.

18. A computer for executing a database transaction, the computer comprising: a secure processing enclave comprising at least one processor for executing instructions and secure storage accessible to the processor, wherein the secure processing enclave is protected based on encryption such that contents of the secure processing enclave cannot be viewed from the outside, and such that modifications to the contents of the secure processing enclave are detectable from the outside; as well as a network interface for establishing a secure communication link for transmitting data to and receiving data from the secure processing enclave; wherein the at least one processor is configured to execute computer readable instructions within the secure processing enclave, the computer readable instructions, when executed, causing the at least one processor to: receiving, at the secure processing enclave of the computer, one or more statements in a defined database query language for performing a database transaction against a distributed database; processing the one or more statements according to the database query language to perform the database transaction against the distributed database; as well as generating, within the secure processing enclave, a database transaction log record for the database transaction executed and cryptographically protecting the database transaction log record using a private key maintained in secure storage of the secure processing enclave; wherein the state of the distributed database is recorded in a series of transaction log records, the series of transaction log records are replicated in distributed computer storage accessible to networked computers, and the operations further include: and transmitting and receiving consensus messages via a secure communication link between the secure processing enclaves of the networked computers to merge the database transaction log records into the series of transaction log records according to a distributed consensus protocol implemented based on consensus protocol logic maintained within the secure processing enclaves.

19. The computer of claim 18, wherein the series of transaction log records are stored in a blockchain, and the database transaction log records are contained in a data block, which is added to the blockchain according to the consensus protocol.

20. A computer program comprising instructions stored on a computer readable storage device, the instructions being configured to, when executed on a computer having a secure processing enclave, perform the following operations: receiving, at the secure processing enclave of the computer, one or more statements in a defined database query language for executing a database transaction against a distributed database, wherein the secure processing enclave is protected based on encryption such that contents of the secure processing enclave cannot be viewed from the outside, and such that changes to the contents of the secure processing enclave are detectable from the outside; processing the one or more statements according to the database query language to perform the database transaction against the distributed database; as well as generating, within the secure processing enclave, a database transaction log record for the database transaction executed and cryptographically protecting the database transaction log record using a private key maintained in secure storage of the secure processing enclave; wherein the state of the distributed database is recorded in a series of transaction log records, the series of transaction log records are replicated in distributed computer storage accessible to networked computers, and the operations further include: and transmitting and receiving consensus messages via a secure communication link between the secure processing enclaves of the networked computers to merge the database transaction log records into the series of transaction log records according to a distributed consensus protocol implemented based on consensus protocol logic maintained within the secure processing enclaves.