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.
- My app initializes an enclave and performs its attestation.
- Next, it somehow uploads a python interpreter and a python script to the enclave.
- It also uplaods to the enclave some piece of data to be processed by the script.
- Then, the script is being launched inside the enclave and the data is being processed.
- 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?
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.