Catalogue of Tools & Metrics for Trustworthy AI

These tools and metrics are designed to help AI actors develop and use trustworthy AI systems and applications that respect human rights and are fair, transparent, explainable, robust, secure and safe.

Opaque SQL



Opaque SQL

Opaque

Secure Apache Spark SQL

Tests Status
License

Contributor Covenant

Welcome to the landing page of Opaque SQL! Opaque SQL is a package for Apache Spark SQL that enables processing over encrypted DataFrames using the OpenEnclave framework.

Quick start

Note that Opaque SQL requires the MC2 Client in order to securely run an encrypted query. For a quickstart on that end-to-end workflow, please see the README in the MC2 Client repo.

Usage

Similar to Apache Spark SQL, Opaque SQL offer an encrypted DataFrame abstraction. Users familiar with the Spark API can easily run queries on encrypted DataFrames using the same API. The main difference is that we support saving and loading of DataFrames, but not actions like .collect or .show. An example script is the following:

// Import hooks to Opaque SQL
import edu.berkeley.cs.rise.opaque.implicits._
import org.apache.spark.sql.types._

// Load an encrypted DataFrame (saved using the MC2 client)
val df_en = spark.read.format('edu.berkeley.cs.rise.opaque.EncryptedSource').load('/tmp/opaquesql.csv.enc')
// Run a filter query on the encrypted DataFrame
val result = df_enc.filter($'Age' < lit(30))
// This will save the encrypted result to the result directory on the cloud
result.write.format('edu.berkeley.cs.rise.opaque.EncryptedSource').save('/tmp/opaque_sql_result')

For more details on how to use Opaque SQL, please refer to this section.

Documentation

For more details on building, using, and contributing, please see our documentation.

Paper

The open source is based on our NSDI 2017 paper.

Contact

Join the discussion on Slack or email us at mc2-dev@googlegroups.com.

About the tool


Developing organisation(s):


Tool type(s):



Country/Territory of origin:


Type of approach:







Github stars:

  • 190

Github forks:

  • 70

Modify this tool

Use Cases

There is no use cases for this tool yet.

Would you like to submit a use case for this tool?

If you have used this tool, we would love to know more about your experience.

Add use case
Partnership on AI

Disclaimer: The tools and metrics featured herein are solely those of the originating authors and are not vetted or endorsed by the OECD or its member countries. The Organisation cannot be held responsible for possible issues resulting from the posting of links to third parties' tools and metrics on this catalogue. More on the methodology can be found at https://oecd.ai/catalogue/faq.