Method and device for validating database query results

The use of GPUs and query plans to validate database query results from untrusted hosts efficiently addresses inefficiencies in current validation methods, improving reliability and scalability by verifying query results without accessing the database data.

JP7561398B2Active Publication Date: 2024-10-04MAKE INFINITE LOVES INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2023548199
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2022-08-26
Filing Date
2022-12-12
Publication Date
2024-10-04
Estimated Expiration
2042-12-12

AI Technical Summary

Technical Problem

Current methods for validating database query results from outsourced databases, especially those hosted by untrusted third-party network participants, are inefficient and add significant computational overhead, limiting scalability and reliability.

Method used

A method and apparatus utilizing graphics processing units (GPUs) to generate commitments and proofs from query results, allowing verification without direct access to the database data, and leveraging query plans to validate results efficiently.

Benefits of technology

This approach enhances the reliability and scalability of query result validation by reducing computational overhead and ensuring accuracy without requiring access to the database data, facilitating processing of larger data sets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007561398000017
    Figure 0007561398000017
  • Figure 0007561398000018
    Figure 0007561398000018
  • Figure 0007561398000019
    Figure 0007561398000019
Patent Text Reader

Abstract

A method, a non-transitory computer-readable medium, and a query verification apparatus are disclosed for receiving data, storing the data in a table of a database, and receiving a query associated with the database table. A query plan and a query result are generated for the query, one or more partial proofs are generated from one or more commitments, and an overall proof is generated from the one or more partial proofs. In some examples, each of the one or more partial proofs is associated with at least one node of the query plan, which may include a directed acyclic graph. The overall proof is returned together with the query result in response to the query to facilitate verification of the query result. In some examples, one or more GPUs are configured to generate the one or more commitments, thereby accelerating the verification process and improving scalability of the database.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This application claims priority to U.S. Patent Application No. 17 / 897,102, filed August 26, 2022, which claims priority to U.S. Provisional Patent Application No. 63 / 357,930, filed July 1, 2022, each of which is incorporated by reference in its entirety herein.

[0002] Field The present technology relates generally to security of outsourced databases, and more particularly to methods and devices for validating query results of outsourced databases for tamper mitigation. [Background technology]

[0003] background Outsourced databases are increasingly being used for data storage and retrieval. Although databases can have any number of topologies, including centralized databases, one ubiquitous deployment type of outsourced databases is a distributed database hosted across multiple servers, other computing devices, or other hardware resources (such as in a cloud network). As an example, a blockchain network includes distributed nodes that maintain a database in the form of a distributed ledger that encapsulates the data stored on the blockchain network.

[0004] However, the owners of the resources hosting the outsourced database may have the ability to tamper with the stored data and the results of queries sent from the hosted database. In a blockchain network, the nodes that make up the distributed database are generally untrusted and susceptible to tampering and other malicious actions, especially if malicious actors are motivated by the nature of the stored data (e.g., cryptocurrency data). While both centralized and distributed databases can be untrusted, a fully decentralized topology gives anyone the ability to act as a database host, increasing the risk of tampering and reducing the reliability of query results returned by the database.

[0005] Unfortunately, there is currently no efficient way to attest to database query results performed against data maintained by outsourced databases hosted on resources provided by untrusted third-party network participant(s). More specifically, current attempts to verify database query results add significant computation and associated overhead to the database query itself, limiting the scalability of the database. Summary of the Invention

[0006] overview A method for validating a database query result is disclosed, the method being executed by a query verification apparatus and including generating and storing a first commitment from received data and transmitting the received data to at least one attestation device for insertion into a table of a database hosted by the at least one attestation device. The query result and the overall proof are received from the at least one attestation device in response to the received query being forwarded to the at least one attestation device and associated with one or more tables including at least the database table. The overall proof is generated from one or more partial proofs including at least in part one or more intermediate commitments generated from one or more intermediate values ​​using one or more graphics processing units (GPUs) of the at least one attestation device. After validating the query result based on a second commitment to the query result generated using the first commitment and the overall proof, a success flag is returned in response to the query together with the query result.

[0007] A query verification apparatus is also disclosed, including a proof device comprising a first memory in which first program instructions are stored, a first processor, and one or more GPUs. The first processor is configured to execute the stored first program instructions to receive data from the verification device, store the received data in a table of a database, and receive a query from the verification device. The query is associated with one or more tables including at least the database table. A query plan and a query result are generated for the query, one or more partial proofs are generated from the one or more commitments, and an overall proof is generated from the one or more partial proofs. Each of the one or more partial proofs is associated with at least one node of the query plan. The overall proof is returned together with the query result in response to the query to facilitate verification of the query result. In this example, the one or more GPUs are configured to execute the stored first program instructions to generate the one or more commitments.

[0008] Further disclosed is a non-transitory computer-readable medium having instructions stored thereon for validating a database query result, the medium including executable code that, when executed by one or more processors, causes the one or more processors to generate and store a first commitment from received data and transmit the received data to the at least one attestation device for insertion into at least one table of a database hosted by the at least one attestation device. The query result and the overall proof are received from the at least one attestation device in response to the received query being forwarded to the at least one attestation device and associated with one or more tables including at least the database table. The overall proof is generated from one or more partial proofs, each of the partial proofs being associated with at least one node of a query plan generated from the received query. After validating the query result based on a second commitment to the query result generated using the first commitment and the overall proof, a success flag is returned in response to the query along with the query result.

[0009] The technique provides many advantages, including a method, a non-transitory computer-readable medium, and a query verification apparatus that advantageously facilitates the reliability of query results generated from untrusted centralized and distributed database hosts. In some examples, the technique leverages one or more of a commitment, a GPU, and / or a query plan to verify the accuracy of the query results. The commitment is updatable, and the query results are verified by a device (e.g., a client device, a third-party intermediary or gateway) that does not have access to the data stored in the database. Thus, the technique more effectively and efficiently verifies database queries and significantly improves scalability. This significantly improved scalability facilitates practical applications of the techniques in this field, such as processing orders of magnitude larger amounts of data. [The present invention 1001] executed by a query validator; and generating and storing a first commitment from the received data and transmitting the received data to the at least one attestation device for insertion into a table of a database hosted by the at least one attestation device; receiving, in response to a received query being forwarded to the at least one attestation device and associated with one or more tables including at least the database table, from the at least one attestation device a query result and an overall attestation, the overall attestation being generated from one or more partial attestations that at least in part include one or more intermediate commitments generated from one or more intermediate values ​​using one or more graphics processing units (GPUs) of the at least one attestation device; returning a success flag together with the query result in response to the received query after verifying the query result based on a second commitment to the query result, the second commitment being generated using the first commitment and the overall proof; A method for validating a database query result, comprising: [The present invention 1002] generating a query plan from the received query; each of the one or more partial proofs is associated with at least one node of the query plan; The method of the present invention 1001. [The present invention 1003] the database is a Structured Query Language (SQL) database, the method further comprising generating the query plan using an SQL engine; the query plan comprises a directed acyclic graph (DAG) including at least one node; The method of the present invention 1002. [The present invention 1004] The method of the present invention 1001, wherein the at least one attestation device includes a plurality of attestation devices, and the generating and storing of the first commitment, the receiving of the query, and the returning of the success flag are performed by a verification device separate from the plurality of attestation devices, and the database includes a distributed database. [The present invention 1005] updating the stored first commitment following receipt of additional data to be appended to the database table; transmitting said additional data to said at least one certification device; The method of the present invention 1001 further comprises: [The present invention 1006] 1. A query verification apparatus, comprising: a proof device comprising a first memory having first program instructions stored therein; a first processor; and one or more graphics processing units (GPUs), the proof device comprising: the first processor executing the stored first program instructions; receiving data from a verification device, storing the received data in a table of a database, and receiving a query from the verification device associated with one or more tables including at least the database table; generating a query plan and query results for the query, one or more partial proofs from one or more commitments, and an overall proof from the one or more partial proofs, each of the one or more partial proofs being associated with at least one node of the query plan; returning the overall proof together with the query result in response to the query to facilitate verification of the query result, wherein the one or more GPUs are configured to execute the stored first program instructions to generate the one or more commitments; configured to: The query validator. [The present invention 1007] The query validator of the present invention 1006, wherein the first processor is further configured to execute the stored first program instructions to generate one or more intermediate values. [The present invention 1008] The query validation apparatus of the present invention 1007, wherein the one or more GPUs are further configured to execute the stored first program instructions to generate the one or more commitments from the one or more intermediate values. [The present invention 1009] The query verification apparatus of the present invention 1008, wherein the first processor is further configured to execute the stored first program instructions to generate the one or more partial proofs from the one or more commitments. [The present invention 1010] Further comprising a verification device; the verification device comprising a second memory having second program instructions stored therein and a second processor; the second processor executes the stored second program instructions; receiving data from a first client device, generating and storing a first commitment from the received data, and transmitting the received data to the attestation device; receiving a query from a second client device, forwarding the query to the attestation device, and receiving the query results and the overall attestation from the attestation device in response to the query; verifying the query result based on a second commitment to the query result generated using the first commitment and the overall proof; returning a success flag along with the query results to the second client device in response to the query; configured to: The query verification device of the present invention 1006. [The present invention 1011] the second processor executes the stored second program instructions; updating the stored first commitment following receipt of additional data to be appended to the database table; transmitting said additional data to said certification device; The query validator of the present invention 1010, further configured to: [The present invention 1012] the database is a Structured Query Language (SQL) database, and the first processor is further configured to execute the stored first program instructions to generate the query plan using an SQL engine; the query plan comprises a directed acyclic graph (DAG) including at least one node; The query verification device of the present invention 1006. [The present invention 1013] The query verification apparatus of the present invention 1006, wherein the attestation device comprises a plurality of attestation devices hosting the database, the verification device is separate from the plurality of attestation devices, and the database comprises a distributed database. [The present invention 1014] A non-transitory computer-readable medium having stored thereon instructions, including executable code, for validating a query result, the non-transitory computer-readable medium comprising: The executable code, when executed by one or more processors, causes the one or more processors to: generating and storing a first commitment from the received data and transmitting the received data to the at least one attestation device for insertion into at least one table of a database hosted by the at least one attestation device; receiving a query result and an overall proof from the at least one proving device in response to the received query being forwarded to the at least one proving device and associated with one or more tables including at least the database table, the overall proof being generated from one or more partial proofs, each of the partial proofs being associated with at least one node of a query plan generated from the received query; returning a success flag together with the query result in response to the received query after verifying the query result based on a second commitment to the query result, the second commitment being generated using the first commitment and the overall proof; To carry out The non-transitory computer-readable medium. [The present invention 1015] The non-transitory computer-readable medium of the present invention 1014, wherein the one or more partial proofs are generated from one or more commitments generated from one or more intermediate values ​​using one or more graphics processing units (GPUs). [The present invention 1016] The non-transitory computer-readable medium of the present invention 1014, wherein the database is a Structured Query Language (SQL) database and the executable code, when executed by the one or more processors, causes the one or more processors to generate the query plan via a SQL engine. [The present invention 1017] The non-transitory computer-readable medium of the present invention 1014, wherein the query plan comprises a directed acyclic graph (DAG) including at least one node. [The present invention 1018] The non-transitory computer-readable medium of the present invention 1014, wherein the at least one attestation device comprises a plurality of attestation devices and the database comprises a distributed database. [The present invention 1019] The non-transitory computer-readable medium of the present invention 1014, wherein the first commitment is generated and stored, the query is received, and the success flag is returned by a verification device separate from the at least one attestation device. [The present invention 1020] The executable code, when executed by the one or more processors, causes the one or more processors to: updating the stored first commitment following receipt of additional data to be appended to the database table; transmitting said additional data to said at least one certification device; To carry out The non-transitory computer readable medium of the present invention 1014. [Brief description of the drawings]

[0010] [Figure 1] 1 is a block diagram of an example network environment having a query verifier including a verification device and an attestation device. [Diagram 2] FIG. 2 is a block diagram of an exemplary verification device. [Diagram 3] FIG. 2 is a block diagram of an exemplary authentication device. [Figure 4] 1 is a timing diagram of an exemplary method for capturing data to facilitate validation of database query results. [Diagram 5] FIG. 2 is a timing diagram of an exemplary method for updating a commitment following the incorporation of new data. [Figure 6] FIG. 2 is a timing diagram of an example method for validating database query results using stored commitments. [Figure 7] 1 is a timing diagram of an example method of using a graphics processing unit (GPU) to facilitate validation of database query results. [Figure 8] FIG. 2 is a flow diagram of an example query plan used to generate query results for an example query. [Figure 9] FIG. 2 is a flow diagram of an example proof plan used to generate a proof for an example query. [Figure 10] FIG. 10 is a flow diagram of the query plan of FIG. 8 with the proof plan of FIG. 9 shown in parallel. [Figure 11] 10 is a flow diagram of an example method for verifying query results for an example query using the proofs produced by the proof plan of FIG. 9 and the results produced by the query plan of FIG. 8. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0011] Detailed Description 1, an exemplary network environment 100 is shown that includes a query verifier 102 having a verification device 104 coupled to client devices 108(1)-108(n) via communication network(s) 106(1) and coupled to attestation devices 110(1)-110(n) hosting a database 112 via communication network(s) 106(2). The network environment 100 may include other network devices, such as one or more routers or switches, which are known in the art and will not be described herein. This technique provides many advantages, including a method, non-transitory computer-readable medium, and device with improved security for ingesting data and returning query results to effectively transform an untrusted outsourced database into a trusted database.

[0012] 1 as dedicated hardware devices. However, one or more of the client devices 108(1)-108(n), the verification device 104, or the attestation devices 110(1)-110(n) may also be implemented in software within one or more other devices of the network environment 100. As an example, the verification device 104, as well as any of its components or applications, may be implemented as software running on one of the client devices 108(1)-108(n), although in other examples many other variations and types of implementations and network topologies may also be used.

[0013] 1-2, the verification device 104 of the query verification apparatus 102 may perform any number of functions including providing an interface to the client devices 108(1)-108(n) to retrieve data stored in a database 112 hosted by the attestation devices 110(1)-110(n) and process query results from the attestation devices 110(1)-110(n). The verification device 104 in this example includes central processing unit (CPU)(s) 200, memory 202, and a communication interface 204 coupled together by a bus 206, although in other configurations the verification device 104 may include other types or numbers of elements.

[0014] The CPU(s) 200 of the verification device 104 may execute program instructions stored in the memory 202 of the verification device 104 for any number of functions described and illustrated herein. The CPU(s) 200 may include, for example, one or more general-purpose processors with one or more processing cores, although other types of processor(s) may also be used. In other examples, the verification device 104 may include one or more graphics processing units (GPUs) configured to perform functions described in more detail below with reference to the attestation device 110 and corresponding hardware of FIG. 3.

[0015] Memory 202 stores these program instructions for one or more aspects of the technology described and illustrated herein, although some or all of the program instructions may be stored elsewhere. A variety of different types of memory storage devices may be used for memory 202, such as random access memory (RAM), read only memory (ROM), hard disk, solid state drive, flash memory, or other computer readable medium that is read and written by a magnetic, optical, or other read and write system coupled to the processor(s).

[0016] Thus, memory 202 can store applications that may include computer-executable instructions that, when executed by CPU(s) 200, cause verification device 104 to perform actions such as, for example, sending, receiving, or otherwise processing network messages and requests, as well as other actions described and illustrated below. The application(s) can be implemented, for example, as components of other applications, operating system extensions, and / or plug-ins.

[0017] Additionally, the application(s) may be operable in a cloud-based computing environment where access is provided via a software-as-a-service (SaaS) model. The application(s) may run in or as a virtual machine(s) or virtual server(s) that may be managed in the cloud-based computing environment. The application(s) and even the validation device 104 itself may be located on virtual server(s) running in the cloud-based computing environment rather than being tied to a particular physical network computing device. The application(s) may also run on a virtual machine (VM) running on the validation device and managed or monitored by a hypervisor.

[0018] In this particular example, memory 202 includes commitment data 208 and a verification module 210. Verification module 210 is configured to generate commitments upon data ingestion, as described and illustrated in more detail below. The commitments are values ​​for each column recorded in commitment data 208, which are used by verification module 210 to verify query results returned from attestation devices 110(1)-110(n), as described and illustrated in more detail below. In other examples, other information may be stored in memory 202, and in other examples, other data stores and / or applications or modules may also be hosted by verification device 104.

[0019] The communication interface 204 of the verification device 104 operatively couples and communicates between the verification device 104, the client devices 108(1)-108(n), and the attestation devices 110(1)-110(n), which in this particular example are at least partially coupled together by communication networks 106(1) and 106(2), although other types or numbers of communication networks or systems having other types or numbers of connections or configurations to other devices or elements may also be used. The communication networks 106(1) and 106(2) may be, for example, wide area network (WAN)(s) and / or local area network (LAN)(s) and may use TCP / IP and industry standard protocols over Ethernet, although other types or numbers of protocols or communication networks may also be used. The communication network(s) 106 may employ any suitable interface mechanism and network communication technology, including, for example, an Ethernet-based packet data network (PDN).

[0020] While in this example, the verification device 104 is shown as including a single device, in other examples, the verification device 104 may include multiple devices, each of which has one or more processors (each processor having one or more processing cores) that perform one or more steps of the technique. In these examples, one or more of the devices may have a dedicated communication interface or memory. Alternatively, one or more of the devices may utilize memory, communication interfaces, or other hardware or software components of one or more other devices included in the verification device 104. Additionally, in other examples, one or more of the devices that collectively comprise the verification device 104 may be standalone devices or may be integrated with one or more other devices or apparatuses.

[0021] 1 and 3 , the attestation device 110 of the query verifier 102 may perform any number of functions including, for example, hosting a database 112, processing queries to generate query results from the contents of the database 112, and generating attestations that facilitate verification of the query results by the verification device 104. The attestation device 110 in this example includes CPU(s) 300, GPU(s) 302, memory 304, and a communication interface 306 coupled together by a bus 308, although the attestation device 110 may include other types or numbers of elements in other configurations.

[0022] The CPU(s) 300 and GPU(s) 302 of the attestation device 110 may execute program instructions stored in memory 304 for any number of functions described and illustrated herein. The CPU(s) 300 may include, for example, one or more general-purpose processors with one or more processing cores, although other types of processor(s) may also be used. The GPU(s) 302 may be configured to process relatively large blocks of data in parallel to accelerate certain processing functions. In some examples, described and illustrated in more detail below, the GPU(s) 302 are used to generate commitments and the CPU(s) 300 facilitate the remaining functionality of the attestation device 110, although other implementations may also be used.

[0023] Memory 304 stores these program instructions for one or more aspects of the technology described and illustrated herein, although some or all of the program instructions may be stored elsewhere. A variety of different types of memory storage devices may be used for memory 304, such as RAM, ROM, hard disks, solid state drives, flash memory, or other computer readable media that are read and written by a magnetic, optical, or other read and write system coupled to CPU(s) 300 and / or GPU(s) 302.

[0024] Thus, memory 304 may store applications that may include computer-executable instructions that, when executed by CPU(s) 300 and / or GPU(s) 302, cause attestation device 110 to perform actions such as, for example, sending, receiving, or otherwise processing network messages and requests, as well as other actions described and illustrated below. The application(s) may be implemented, for example, as components of other applications, operating system extensions, and / or plug-ins.

[0025] Additionally, the application(s) may be operable in a cloud-based computing environment where access is provided via a software-as-a-service (SaaS) model. The application(s) may run in or as a virtual machine(s) or virtual server(s) that may be managed in the cloud-based computing environment. The application(s) and even the attestation device 110 itself may be located on a virtual server(s) running in the cloud-based computing environment rather than being tied to a particular physical network computing device. The application(s) may also run in a VM that is run on the verification device and managed or monitored by a hypervisor.

[0026] In this particular example, memory 304 includes a query execution engine 310 and a proof module 312. Query execution engine 310 is configured to execute queries received from client devices 108(1)-108(n) against database 112 and generate query results. In some examples, database 112 may be a Structured Query Language (SQL) database and thus query execution engine 310 may be a SQL engine, although the techniques described and illustrated herein are operable with NoSQL and other types of databases, as described in more detail below.

[0027] The attestation module 312 is configured to generate attestations that can be provided to the verification device 104 along with the query results to facilitate verification of the query results by the verification device 104, as described and illustrated in further detail below. In other examples, other information can be stored in the memory 304, and in other examples, other data stores and / or applications or modules can also be hosted by the verification device 110.

[0028] The communication interface 306 of the attestation device 110 operatively couples and communicates between the verification device 104 and another of the attestation devices 110(1)-110(n). The attestation devices 110(1)-110(n) are at least partially coupled to one another, for example, by a communication network(s) (e.g., a WAN or LAN(s)) (not shown) or a direct connection. In some examples, the attestation devices 110(1)-110(n) are database servers deployed in a distributed network and communicated over the communication network(s), and the database 112 is a distributed database, although other types of implementations may be used. Additionally, in other examples, other types or numbers of networks, as well as other types or numbers of configurations of connections to other devices or elements may be used.

[0029] While in this example, attestation device 110 is shown as including a single device, in other examples, verification device 110 may include multiple devices, each of which has one or more processors (each processor having one or more processing cores) that perform one or more steps of the technique. In these examples, one or more of the devices may include dedicated communication interfaces or memory. Alternatively, one or more of the devices may utilize memory, communication interfaces, or other hardware or software components of one or more other devices included in attestation device 110. Additionally, in other examples, one or more of the devices that collectively comprise attestation device 110 may be standalone devices or may be integrated with one or more other devices or apparatuses.

[0030] Each of the client devices 108(1)-108(n) of the network environment 100 in this example includes any type of computing device capable of exchanging network data, such as a mobile, desktop, laptop, or tablet computing device, a virtual machine (including cloud-based computers), etc. Each of the client devices 108(1)-108(n) in this example includes a processor, memory, and a communication interface that are coupled together by a bus or other communication link (not shown), although other numbers or types of components may be used.

[0031] Each of the client devices 108(1)-108(n) may execute a service and / or interface application, such as a standard web browser or a standalone application, that may provide an interface for communicating with the verification device 104 over the communications network(s) 106. Each of the client devices 108(1)-108(n) may further include a display device, such as a display screen or touch screen, or an input device, such as a keyboard or mouse (not shown).

[0032] Although an exemplary network environment 100 having client devices 108(1)-108(n), verification device 104, attestation devices 110(1)-110(n), and communication networks 106(1) and 106(2) is described and illustrated herein, other types or numbers of systems, devices, components, or elements in other topologies may be used. It should be understood that the example systems described herein are for illustrative purposes, and that many variations in the specific hardware and software used to implement the examples are possible, as would be understood by one of ordinary skill in the relevant art.

[0033] For example, one or more of the components illustrated in network environment 100, such as client devices 108(1)-108(n), verification device 104, or attestation devices 110(1)-110(n), may be configured to operate as virtual instances on the same physical machine. In other words, one or more of client devices 108(1)-108(n), verification device 104, or attestation devices 110(1)-110(n) may operate on the same physical device rather than as separate devices that communicate over communications networks 106(1) and / or 106(2). Additionally, there may be more or fewer client devices, verification devices, or attestation devices than are shown in FIG. 1.

[0034] Examples of the technology may also be embodied as one or more non-transitory computer-readable media having instructions stored thereon, such as memory 202 and / or 304, for one or more aspects of the technology, as described and illustrated herein by way of example. In some examples, the instructions include executable code that, when executed by one or more processors, such as CPU(s) 200 and / or 300 and / or GPU(s) 302, causes the processors to perform the steps necessary to implement the methods in the examples of the technology, as described and illustrated herein.

[0035] 4, a timing diagram of an exemplary method for capturing data to facilitate validation of database query results is shown. In this example, at step 400, a client device 108 transmits a request over communication network(s) 106 for storing data included with the request in a database 112 hosted at least in part by an attestation device 110. Thus, in this particular example, the verification device 104 is effectively a gateway disposed between the client device 108 and the attestation device 110.

[0036] In step 402, the verification device of the query validator 102 receives or intercepts a request from the client device 108 and generates and stores locally (e.g., in memory 304) a commitment to data associated with the request (e.g., a table in the database 112 that stores the data) to be stored in the database 112. The commitment in this example is a relatively small "digest" of the data, retaining enough information to ensure that the data has not been subsequently tampered with, as described and illustrated in more detail below in conjunction with an exemplary commitment scheme.

[0037] In step 404, the verification device 104 sends the data to the attestation device 110 of the query verifier 102 for storage in the database 112. In step 406, the attestation device 110 creates a table in the database 112 (e.g., an SQL database, although any other type of database can be used) and inserts the data into the table (or other database storage structure). In step 408, the attestation device 110 optionally sends an acknowledgement to the verification device 104, which in step 410 optionally sends another acknowledgement to the client device 108 indicating successful storage of the requested data in the database 112.

[0038] In the examples described and illustrated herein, the commitment is advantageously updateable by the verification device 104 without the verification device 104 having to access old existing data. Referring to Figure 5, a timing diagram of an exemplary method for updating a commitment following the incorporation of new data is shown. In this example, at step 500, the client device 108 sends the new data as part of a save request directed to the database 112. In this example, the new data will be appended to the same table created in step 406 of Figure 4.

[0039] In step 502, the verification device 104 receives a request from the client device 108 to retrieve a stored commitment for the relevant data and updates the retrieved commitment in step 504. Although Pedersen commitments and related schemes may be used in some examples to allow the verification device 104 to combine the retrieved old commitment with the new data it receives to create a new commitment for the entire updated table without accessing the old existing data stored in the table, other types of algorithms may be used to generate other types of commitments, such as KZG commitments or FRI commitments.

[0040] The Pedersen Commitment Scheme lends itself to faster development and faster time to market and has favorable mathematical properties. TIFF0007561398000001.tif6128 is a column of data (e.g., in a database table), and the Pedersen commitment is TIFF0007561398000002.tif6128, where G i These are “random”, public and transparent parameters that do not require a trusted setup phase as required by other commitment schemes.

[0041] Also, Pedersen commitments are relatively easy to update, since appending to the commitment only requires adding an additional term to the above sum for each new piece of data. Furthermore, the computation speed of the Pedersen commitment can be improved by using Curve25519 as the elliptic curve and using GPU(s) 302 for parallel processing. Curve25519 is described in Bernstein, Daniel, Curve25519: New Diffie-Hellman Speed ​​Records, 2016, 3958, 207-228.10.1007 / 11745853_14, which is incorporated herein by reference in its entirety. Pedersen commitments are further described in Pedersen, TP, "Non-Interactive and Information-Theoretic Secure Verifiable Secret Sharing," Advances in Cryptology-CRYPTO '91 (pp. 129-140), Springer Berlin Heidelberg, which is incorporated herein by reference in its entirety.

[0042] Thus, following the renewal of the commitment in step 504, the verification device 104 sends the new data to the attestation device 110 in step 506. In step 508, the attestation device 110 appends the new data to the previously created existing table in the database 112. In step 510, the attestation device 110 optionally sends an acknowledgement to the verification device 104, which optionally sends another acknowledgement to the client device 108 in step 512 indicating successful saving of the requested new data in the database 112.

[0043] 6, a timing diagram of an exemplary method for verifying database query results using stored commitments is shown. In this example, at step 600, a client device 108 sends a query to a database 112 to extract stored data, for example, from at least one table. At step 602, a verification device 104 receives the query from the client device 108 and forwards the query to an attestation device 110 that hosts at least a portion of the database 112.

[0044] In step 604, the attestation device 110 executes the query received from the verification device 104 against the database 112 using the query execution engine 310 to generate a result. In step 606, the attestation device 110 generates a proof. The proof can be generated using a method similar to the Pedersen commitment scheme described in Bunz, Benedikt, "Bulletproofs: Short Proofs for Confidential Transactions and More," 2018 IEEE Symposium on Security and Privacy (SP), May 20-24, 2018, which is incorporated herein by reference in its entirety, although other schemes and methods for generating proofs can also be used.

[0045] Additionally, the proof can be non-interactive, for example, using the Fiat-Shamir heuristic. In one example, the proof is generated in step 606, as described and illustrated in more detail below with reference to steps 704-712 of Figure 7, although in other examples the proof can be generated in other ways. Next, in steps 608 and 610, the proving device 110 transmits the generated result and the proof, respectively, to the verification device 104.

[0046] In step 612, the verification device 104 retrieves a stored commitment for at least one table to which the query received in step 600 was directed. In step 614, the verification device 104 uses the retrieved commitment to check the proof received from the attestation device 110 in step 610 against the results received from the attestation device in step 608, thereby verifying whether the attestation device 110 produced the correct results for the query.

[0047] If the verification device 104 determines that the attestation device 110 produced the correct results for the query, the verification device 104 transmits the results to the client device 108 from which the query originated, at step 616. Optionally, the verification device 104 transmits a tamper-proof success flag, at step 618, along with or following the results transmitted at step 616. The tamper-proof success flag may be an indication that the results have been verified and thus the query has not been tampered with.

[0048] However, if the verification device 104 determines in step 614 that the attestation fails, the verification device 104 does not route the result to the client device 108, but instead sends a failure message. In other examples, the verification device 104 can send the result to the client device with a tamper-proof failure flag, and in still other examples, other types of communication indicating success and / or failure of the verification on the part of the verification device 104 can also be used.

[0049] Referring to FIG. 7, a timing diagram of an exemplary method using at least one of the GPU(s) 302 to facilitate validation of database query results is shown. A significant portion of the computational cost of this technique is associated with computing the commitment. However, the structure of the Pedersen commitment in particular is relatively repetitive, and the computation can be parallelized. Advantageously, this technique leverages the GPU 302 to provide hardware acceleration for the commitment computation, thereby improving the scalability of the database 112. While the GPU 302 is utilized for the commitment computation in this example, one or more other aspects of one or more of the methods described and illustrated herein may also be accelerated using the GPU 302.

[0050] In this particular example, steps 700 and 702 are performed by at least one of the CPU(s) 300 as described and illustrated above with reference to steps 602 and 604 of Figure 6, respectively. However, in step 704, the CPU 300 of the attestation device 110 initiates generation of the proof by sending intermediate values ​​to the GPU 302 in step 706. The GPU 302 calculates a commitment based on the intermediate values ​​in step 708.

[0051] The attestation device 110 computes many intermediate columns or values ​​in generating the resulting proof. In some cases, it is not necessary to compute commitments to these intermediate values ​​from scratch, but in many cases the attestation device 110 must provide commitments to the intermediate values ​​to the verification device 104. As a result, the attestation device 110 may need to compute many commitments at once for a large data set, in step 708.

[0052] The Pedersen commitment can be treated as a highly parallel multi-exponentiation. Furthermore, because several commitments need to be computed together, these multi-exponentiations can also be performed in parallel. In some examples, the GPU 302 computes many exponents in a single step and then aggregates them into the desired commitment. In other examples, optimizations can be used.

[0053] For example, Pippenger's algorithm, described in Pippenger, Nicholas, "On the Evaluation of Powers and Monomials," SIAM Journal on Computing 9.2 (1980), pp. 230-250 (incorporated herein by reference in its entirety), can be used to facilitate optimal asymptotic run-times. In other examples, sparse data sets can be processed more efficiently than using naive algorithms, and exponential calculations can be truncated to increase speed when the data contains small values. In still other examples, other optimizations can be used.

[0054] 7, in step 710, GPU 302 of attestation device 110 returns the set of commitments to CPU 300. CPU 300 then completes generation of the proof in step 712, performing steps 714 and 716 as described and illustrated above with reference to steps 608 and 610 of FIG.

[0055] An exemplary method for generating a proof will now be described and illustrated with reference to FIGS. 8-10. In this particular example, the database 112 is an SQL database, the query execution engine 310 is an SQL engine, and the query is an SQL query, although in other examples, other types of databases, execution engines, and / or queries may be used, including NoSQL databases, execution engines, and queries. The query execution engine 310 may begin executing the query (e.g., at step 604 of FIG. 6 and / or step 702 of FIG. 7 ) by parsing the query and creating a query plan, which may be a directed acyclic graph (DAG). In the example described and illustrated in detail below, an exemplary SQL query (referred to herein as a “sample query”) is provided as follows: TIFF0007561398000003.tif52165

[0056] Also, for purposes of the examples described and illustrated herein, the following transaction and user tables are provided as Table 1 and Table 2, respectively.

[0057] (Table 1) Transaction table TIFF0007561398000004.tif34149

[0058] (Table 2) User table TIFF0007561398000005.tif38145

[0059] More specifically, referring to Figure 8, a flow diagram of an exemplary query plan 800 used to generate query results for the example query is shown. The example query can be decomposed by the query execution engine 310 into a DAG consisting of two FILTER nodes and one JOIN node, as shown in Figure 8. To compute the results for the example query, the query execution engine 310 passes each of the two tables to the FILTER nodes, and then passes the intermediate results from those nodes to the JOIN node. The output of the JOIN node is the result of the query.

[0060] More specifically, referring to FIG. 9, a flow diagram of an example proof plan 900 used to generate a proof for an example query is shown. The proof of the example query mirrors the DAG used by the query execution engine 310, in this example. Thus, a proof node is created for each query execution node in the query plan 800, since each FILTER or JOIN operation requires a corresponding proof. The proof node can use the intermediate results, since the intermediate steps have already been computed by the execution of the query. Each proof node generates a partial proof, which is then aggregated into an overall proof (e.g., step 606 of FIG. 6).

[0061] 10, a flow diagram of the query plan 800 is shown with a parallel proof plan 900. The method illustrated in FIG. 10 may be performed by the proving device 110 in some examples. Advantageously, in this example, the generation of the proof is relatively efficient based on integration with the query execution engine 310, and intermediate nodes corresponding to nodes of the DAG generated by the query execution engine 310 based on the example query are used to generate partial proofs, which are aggregated to form the proof that is returned to the verification device 104.

[0062] 11, a flow diagram of an exemplary method for verifying query results for an example query using the proof generated via the proof plan 900 and the results generated via the query plan 800 is shown. The method shown in FIG. 11 may be performed by the verification device 104 in some examples. In this particular example, the verification device 104 also mirrors the DAG generated by the query execution engine 310 based on the example query. However, since the verification device 104 does not have access to the data stored in the database 112, it can only act on the commitments.

[0063] More specifically, the verification device 104 begins by retrieving previously generated stored commitments for the transaction and user tables in this example where the verification device 104 attempts to verify an example query. When the attestation device 110 transforms data in response to one step of the example query, the verification device 104 must apply the corresponding transformation to the commitments of the associated data. In this approach, computation of the commitments by the verification device 104 is relatively efficient compared to transmitting data from the attestation device 110 to the verification device 104 and then having the verification device 104 perform the computation.

[0064] Once the verification device 104 has completed the calculations for the commitment, the commitment to the outcome is complete and it can then determine whether the outcome matches or aligns with its commitment to the outcome. If it does, the verification device 104 knows it is the correct outcome, and if it does not, the verification device 104 knows to reject the outcome. In some examples, a portion or portions of the proof are optionally provided by the attestation device 110 to the verification device 104 to reduce the computational resources required by the verification device 104, which may be computationally constrained.

[0065] An exemplary method for validating a database query in accordance with the techniques described and illustrated herein will now be described. In this example, a user of a client device 108 creates a table, appends to it, and then queries the table. Thus, the client device 108 sends data to the verification device 104 with a request to create the employee table shown in Table 3 below.

[0066] (Table 3) Example of employee table TIFF0007561398000006.tif24128

[0067] The verification device 104 accepts this data and calculates the commitments for each column. In this case, these commitments are: The verifier then stores these commitments locally and transmits the data to the attestation device 110, which creates a new employee table in the database 112.

[0068] In this particular example, the client device 108 then sends the new rows of data to the verification device 104 which are appended to the Employees table, as shown in Table 4 below.

[0069] (Table 4) Rows to be appended to the Employee table TIFF0007561398000008.tif14128

[0070] The verification device 104 accepts this data and updates its commitments to each column. In this example, the new commitments are: TIFF0007561398000009.tif16128 The verification device 104 then sends the new rows to the certifying device 110 which appends them to the employees table in the database 112.

[0071] The client device 108 in this example then sends an SQL query to the database 112 to determine the total compensation: SELECT Pay*52+Bonus FROM Employees, which is received by the verification device 104. The verification device 104 routes the query to the attestation device 110, which executes the query via the query execution engine 310 by taking the salary column, multiplying it by 52, and adding the bonus column to generate the query results, which are sent back to the verification device 104 and are reflected in Table 5 below.

[0072] (Table 5) Employee table with total compensation added TIFF0007561398000010.tif37128

[0073] Because this query is relatively simple, the attestation device 110 in this particular example does not need to send any additional attestations to the verification device 104, and the verification device 104 receives only the results column of Table 5 from the attestation device 110. To verify the query result (i.e., the results column of Table 5), the verification device 104 mirrors the calculation of the attestation device 110 by taking the salary commitment, multiplying it by 52, and adding the bonus commitment. This is exactly the commitment to the outcome that should be, i.e. The file is TIFF0007561398000011.tif6128.

[0074] The verifier device 104 then computes a commitment for the query results sent by the attestation device 110. If the attestation device 110 sent the correct results, this is: However, if the attestation device 110 sends an incorrect result, this calculation will produce a different value. The verification device 104 then: TIFF0007561398000013.tif8128, and if so, the verification device 104 sends the query result to the client device 108 along with a flag confirming that the query result is correct. If the two values ​​are not equal, the verification device 104 sends, for example, a failure message to the client device 108 indicating that there was an error.

[0075] While the above examples concern proofs of SQL operations, the techniques can be applied to any type of database query. For example, MongoDB, available from MongoDB, Inc. of New York City, NY, is an example of a NoSQL query execution engine built on a key-value store. A key-value lookup can be treated as a filter on the key. As a result, key-value lookups can be proven, as described in the examples below. MongoDB also supports filtering based on conditions, which can also be proven, as described in the examples below. While these two operations cover the most common MongoDB queries, other queries and other operations associated with other types of query execution engines can also be proven using the techniques detailed and illustrated herein.

[0076] Referring again to the example query, specifically the SELECT * FROM transactions WHERE amount>10000 filter operation excerpt from the example query, Table 6 below shows the transactions table (i.e., Table 1 above) with the addition of an evaluation of the predicate where amount>10000, where 0 indicates a false value and 1 indicates a true value.

[0077] (Table 6) Transaction table with predicates TIFF0007561398000014.tif33154

[0078] The proof of the filter node associated with this excerpt of the example query can be separated into two components: (1) a proof of the evaluation of the predicate, and (2) a proof of the filtered result. In this case, for example, the predicate can be proven using range proofs, but in other examples other expressions can be proven using other techniques. Table 7 below shows the correct filtered result.

[0079] Table 7. Filtered results with indexes TIFF0007561398000015.tif14154

[0080] In one example, the above result can be proven correct by multiplying the predicate column with each of the other three columns. The result of this calculation is Table 8 shown below, converting the rows that need to be deleted to zeros.

[0081] (Table 8) Transaction table with multiplication by predicate TIFF0007561398000016.tif33156

[0082] The commitments to the columns of Table 8 depend entirely on the data resulting from the filter. If the filter is the final result of the entire query, it is sufficient for the attestation device 110 to send the filter result to the verification device 104 together with the indexes of each row in the original table (i.e., Table 1). This allows the verification device 104 to reconstruct the commitments and check them against the proven product.

[0083] As described and illustrated by the examples herein, the technique more effectively and efficiently facilitates validation of query results generated from untrusted databases, including untrusted distributed databases. The technique leverages commitments, GPUs, and / or query plans (e.g., DAGs generated by an SQL query execution engine) to improve database scalability and validate the accuracy of query results. The commitments are renewable and the query results are validated, for example, by an intermediary device or service, without requiring access by that device or service to data hosted by the database.

[0084] Having thus described the basic concepts of the present invention, it will be apparent to those skilled in the art that the detailed disclosure above is intended to be illustrative only and not limiting. Although not expressly stated herein, various changes, improvements, and modifications will occur and are within the scope of the art. These changes, improvements, and modifications are intended to be suggested by this specification and are within the spirit and scope of the present invention. Furthermore, the described order of processing elements or sequences, or the use of numbers, letters, or other designations, are not intended to limit the claimed process to any order, unless otherwise specified in the claims. Thus, the present invention is limited only by the following claims and their equivalents.

Claims

1. executed by a query validator; and generating and storing a first commitment from the received data and transmitting the received data to the at least one attestation device for insertion into a table of a database hosted by the at least one attestation device; receiving, in response to a received query being forwarded to the at least one attestation device and associated with one or more tables including at least the table of the database, a query result and an overall attestation from the at least one attestation device, the overall attestation being generated from one or more partial attestations that at least in part include one or more intermediate commitments generated from one or more intermediate values ​​using one or more graphics processing units (GPUs) of the at least one attestation device; returning a success flag together with the query result in response to the received query after verifying the query result based on a second commitment to the query result, the second commitment being generated using the first commitment and the overall proof; A method for validating a database query result, comprising:

2. generating a query plan from the received query; each of the one or more partial proofs is associated with at least one node of the query plan; The method of claim 1.

3. the database is a Structured Query Language (SQL) database, the method further comprising generating the query plan using a SQL engine; the query plan comprises a directed acyclic graph (DAG) including at least one node; The method of claim 2.

4. 2. The method of claim 1 , wherein the at least one attestation device includes a plurality of attestation devices, and the generating and storing of the first commitment, the receiving of the query result, and the returning of the success flag are performed by a verification device separate from the plurality of attestation devices, and the database includes a distributed database.

5. updating the stored first commitment following receipt of additional data to be appended to the table of the database; transmitting said additional data to said at least one certification device; The method of claim 1 further comprising:

6. 1. A query verification apparatus, comprising: a proof device comprising a first memory having first program instructions stored therein, a first processor, and one or more graphics processing units (GPUs), the proof device comprising: The first processor executes the stored first program instructions, receiving data from a verification device, storing the received data in a table of a database, and receiving a query from the verification device associated with one or more tables including at least the database table; generating a query plan and query results for the query, one or more partial proofs from one or more commitments, and an overall proof from the one or more partial proofs, each of the one or more partial proofs being associated with at least one node of the query plan; returning the overall proof together with the query result in response to the query to facilitate verification of the query result, wherein the one or more GPUs are configured to execute the stored first program instructions to generate the one or more commitments; configured to: The query validator.

7. The query validator of claim 6 , wherein the first processor is further configured to execute the stored first program instructions to generate one or more intermediate values.

8. 8. The query validator of claim 7, wherein the one or more GPUs are further configured to execute the stored first program instructions to generate the one or more commitments from the one or more intermediate values.

9. 9. The query validator of claim 8, wherein the first processor is further configured to execute the stored first program instructions to generate the one or more partial proofs from the one or more commitments.

10. Further comprising a verification device; the verification device comprising a second memory having second program instructions stored therein and a second processor; the second processor executing the stored second program instructions; receiving data from a first client device, generating and storing a first commitment from the received data, and transmitting the received data to the attestation device; receiving a query from a second client device, forwarding the query to the attestation device, and receiving the query results and the overall attestation from the attestation device in response to the query; verifying the query result based on a second commitment to the query result generated using the first commitment and the overall proof; returning a success flag along with the query results to the second client device in response to the query; configured to:

7. The query validator of claim 6.

11. the second processor executing the stored second program instructions; updating the stored first commitment following receipt of additional data to be appended to the database table; transmitting said additional data to said certification device; The query validator of claim 10 , further configured to:

12. the database is a Structured Query Language (SQL) database, and the first processor is further configured to execute the stored first program instructions to generate the query plan using a SQL engine; the query plan comprises a directed acyclic graph (DAG) including at least one node; 7. The query validator of claim 6.

13. 7. The apparatus of claim 6, wherein the attestation device comprises a plurality of attestation devices hosting the database, the verification device is separate from the plurality of attestation devices, and the database comprises a distributed database.

14. A non-transitory computer-readable medium having stored thereon instructions, including executable code, for validating a query result, the non-transitory computer-readable medium comprising: The executable code, when executed by one or more processors, causes the one or more processors to: generating and storing a first commitment from the received data and transmitting the received data to the at least one attestation device for insertion into at least one table of a database hosted by the at least one attestation device; receiving, in response to an received query being forwarded to the at least one proving device and associated with one or more tables including at least the at least one table of the database, a query result and an overall proof from the at least one proving device, the overall proof being generated from one or more partial proofs, each of the partial proofs being associated with at least one node of a query plan generated from the received query; returning a success flag together with the query result in response to the received query after verifying the query result based on a second commitment to the query result, the second commitment being generated using the first commitment and the overall proof; To carry out The non-transitory computer-readable medium.

15. 15. The non-transitory computer-readable medium of claim 14, wherein the one or more partial proofs are generated from one or more commitments generated from one or more intermediate values ​​using one or more graphics processing units (GPUs).

16. 15. The non-transitory computer-readable medium of claim 14, wherein the database is a Structured Query Language (SQL) database, and the executable code, when executed by the one or more processors, causes the one or more processors to generate the query plan via a SQL engine.

17. 15. The non-transitory computer-readable medium of claim 14, wherein the query plan comprises a directed acyclic graph (DAG) including at least one node.

18. The non-transitory computer-readable medium of claim 14 , wherein the at least one attestation device comprises a plurality of attestation devices and the database comprises a distributed database.

19. 15. The non-transitory computer-readable medium of claim 14, wherein the first commitment is generated and stored, the query results are received, and the success flag is returned by a verification device separate from the at least one attestation device.

20. The executable code, when executed by the one or more processors, causes the one or more processors to: updating the stored first commitment following receipt of additional data to be appended to the at least one table of the database; transmitting said additional data to said at least one certification device; To carry out 15. The non-transitory computer readable medium of claim 14.

Citation Information

Patent Citations

  • Verification of Data Provenance for Existing Computer Systems

    US20190228086A1

  • Decentralized techniques for verification of data in transport layer security and other contexts

    WO2021041771A1