Protect the result
In previous tutorials, we saw how to build Confidential Computing applications that run securely inside enclaves and combine them with confidential assets to get the most out of confidential computing advantages. In this chapter, we will push things further to protect the workflow in an end to end mode. That means the next step would be encrypting results.
Before going any further, make sure you managed to Build your first application with Scone framework.
Prerequisites:
Docker 17.05 or higher on the daemon and client.
iExec SDK 8.0.0 or higher. Install the iExec SDK
Familiarity with the basic concepts of Intel® SGX and SCONE framework.
You don't need to change your application's code or redeploy it to add this feature.
Assuming your application is deployed (if not please check how to do it with Scone), before triggering an execution you need to generate an RSA key-pair, then push the public key to the Secret Management Service. The latter, in turn, will provide it, at runtime, to the enclave running your Confidential Computing application.
To generate the key-pair, go to ~/iexec-projects
and use the following SDK command:
Make sure your chain.json
content is correct.
This generates two files in .secrets/beneficiary/
. Make sure to back up the private key in the file <0x-your-wallet-address>_key
.
Now, push the public key to the SMS:
And check it using:
Now to see that in action, you'd need to trigger a task and specify yourself as the beneficiary in the command:
Wait for the task to be COMPLETED
and download the result:
If you extract the obtained zip and try to read the content of the file iexec_out/result.zip.aes
you will find it encrypted:
Now you should decrypt the result by running:
A new zip file appears in the current folder under the name results.zip
. Eventually, unzip it:
And you can see the content of your result file:
Voilà! By finishing this part, you should be able to use confidential computing on iExec like a Ninja. All parts of the workflow are protected: the execution, the dataset, and the result.
You can go to the advanced section and learn more about managing orders on the iExec to effectively monetize your applications and datasets.
Last updated