Interested in building privacy-preserving applications in a way where no one, not even the host operating system, can access your data? Interested in ensuring that your data stays encrypted or is not accessible to anyone even when it is being processed? Try Conclave, the R3 confidential computing platform.
This blog will list the steps for running a Conclave application on your system in 5 minutes.
Step 1: Prerequisites
- You need JDK 8 or 11 installed to build and run the app.
- Grab a copy of Conclave SDK from here.
- Conclave Init Tool: We will use the conclave init tool for bootstrapping Conclave projects, reducing the amount of boilerplate you need to write. You will find conclave-init.jar in the tools directory of the Conclave SDK.
Step 2: Create the project template using the Conclave Init Tool
We will use the Conclave Init Tool for bootstrapping Conclave projects, reducing the amount of boilerplate you need to write.
To create a new Conclave project, run the following command
A new project would be created in the simple-conclave-app directory, as specified by target ./simple-conclave-app.
The above command generates three modules.
- The enclave module contains the SimpleEnclave class. Your enclave code will go here.
- The host directory is created, too. It contains only a build.gradle file, since that’s all required for the Conclave web host.
- The client directory contains a basic client which can interact with the web host.
Step 3: Run the Conclave application
For this template, the client will connect and send a string “abc” to the enclave. The enclave will reply back by sending “321” to the client. The client will print the reply to the terminal.
For this sample, we will run the sample in mock mode. Open two terminals for client and host pointing to the root of our simple-conclave-app.
1. Build the host using the below command on terminal one
2. Run the host on the same terminal
3. Build the client using the below command on a new terminal two
4. Run the client on the new terminal two
And that’s really it!
There is no step 4.
Now that you have a basic sample Conclave application running on your system, you can modify the enclave code and add your processing logic to it.
Now that you have developed and tested your enclave locally, you can take a final step, and try to run your application on a real production Intel SGX system. To do that you can run the enclave in RELEASE mode.
You can refer to the appendix section of ReadMe of the samples repo to know more about each step.
To read more, visit the Conclave docs site.
Visit the developer portal to access more blogs.