Skip to content

R3Conclave/conclave-samples

Repository files navigation

Conclave


Conclave Samples

This repository contains multiple Conclave sample applications which is intended to help developers to get started with Conclave and understand different features of the platform. To learn more about the Conclave platform please visit our official documentation.

Table of Contents

  1. Samples
  2. Learning Resources
  3. Getting help
  4. License

Samples

Event Manager implements the idea of an enclave that can host a collection of simultaneous 'computations'. These computations are initiated by a Conclave client, have a name and a type, have a defined set of 'participants', and a 'quorum' that must be reached before results can be obtained. Supported types are average (the average of the submissions is returned), maximum and minimum (the identity of the submitter of the highest or lowest value is returned), and 'key matcher' (described below). The idea is that an enclave of this type could be used to host simple one-off multi-party computations (e.g., five employees wanting to know the average of their salaries, or ten firms wanting to know who had the lowest sales last month without revealing what that figure was).

This sample does Column Profiling on the dataset and returns the frequency distribution as an output. Column profiling is one of the methods used in data profiling. This article explains what data profiling and column profiling means and explains its uses and applications.

This sample allows bidders to confidentially submit their bids to an enclave (A protected region of memory which cannot be accessed by the OS, Kernel or BIOS). The bids are processed confidentially in the enclave and the result is returned to concerned parties.

This application serves as a demo for building a confidential trading system based on Corda and Conclave. An exchange Corda node would serve as a host which runs the enclave, while broker nodes serve as clients which send encrypted orders from their end-clients which are matched in the enclave and trades generated are recorded in all relevant participants ledgers.

Sample showing how to use PyTorch with Conclave.

This is a simple CorDapp using the Conclave API and functions as a tutorial. It is licensed under the Apache 2 license, and therefore you may copy/paste it to act as the basis of your own commercial or open source apps.

PSI problem refers to the problem of determining the common elements from the intersection of two sets without leaking or disclosing any additional information of the remaining elements of either sets. Using this sample will demonstrate how Conclave (based on Intel SGX) can be a new tool to solve the private set intersection (PSI) problem.

Using this sample will show how Conclave (based on Intel SGX) can be used in training a ML model. We will use Tribuo Java ML library to load the AI model. For example, hospitals have patients' data which can be used to determine whether a tumour is malignant or benign. Such data can be used to train an AI model. Once a model is trained, this model can be used to predict if a given tumor is malignant or begnin given certain input attributes.

Tribuo is a Java machine learning library, which makes it well suited to run with Conclave. This sample provides tools for classification, regression, clustering, model development, and more. This sample shows you how you can use the Tribuo Java ML library to load and train models like classification models, regression models, clustering models etc.

With the new 3rd Gen Intel Xeon Scalable Processors supporting 1 TB of enclave memory, setting up a database inside an enclave is very well possible. This sample shows how persistence is used to create a database inside an enclave and save data into it as well as how to create a table, insert records into it, and select records from the table. This also shows how persisted records can be retrieved by the enclave once the host is re-started.

Learning Resources

Getting Help

License

The source code files are available under the Apache License, Version 2.0. The licence file can be found here.