Run arbitrary app in a secure enclave (SGX)

325 views Asked by At

I want my C++ application to launch an arbitrary app (let's say a python script through a python interpreter) inside a secure enclave (Intel SGX). Is that even possible? The steps are the following.

  1. My app initializes an enclave and performs its attestation.
  2. Next, it somehow uploads a python interpreter and a python script to the enclave.
  3. It also uplaods to the enclave some piece of data to be processed by the script.
  4. Then, the script is being launched inside the enclave and the data is being processed.
  5. Finally, the processing result is uploaded back to the host.

Is this scenario possible? If yes, are there any examples on how to do so?

2

There are 2 answers

0
Dylan On

Microsoft OpenEnclave is also a choice. There are many examples of adding unmodified libraries to SGX and then run the toy applications: oeapkman, Package Manager and Toolbox for enclave development: apkman.

0
j__ On

If AWS Nitro Enclaves would satisfy you then the Oblivious framework let’s you do what you are describing.

There is a full tutorial and YouTube walkthrough of deploying FastAPI servers, as an example, here.

Disclosure: I work with Oblivious but this post is in no way an ad or plug, I think it just does what @pgr is asking for.