First steps with Intel® SGX

This section walks you through the first steps with the Intel® SGX version of the Anjuna Runtime, including running a simple command-line program in a secure enclave, writing a simple program of your own, and then running it in a secure enclave.

Before you run these examples, ensure that the Anjuna SGX Runtime was correctly installed, and the shell environment is properly configured.

To set up the shell environment, run the env.sh script that was installed with the Anjuna SGX Runtime. The exact path to the env.sh script depends on where you installed the Anjuna SGX Runtime. Assuming the Runtime is installed in the directory /home/sgx, you can set up your environment like this:

$ source /home/sgx/anjuna-runtime-ubuntu-release-1.51.0002/env.sh

If you added this step to your ~/.bash_profile, as discussed in the Setting up the shell environment section, then your environment is already set up, and you do not need to execute the above command.

To check whether your environment is set up properly, you can run the following command:

$ anjuna-sgxrun

If your environment is properly set up, then the command displays a help message similar to the following:

Usage options:
 anjuna-sgxrun [--provision [--spid value]]  []
 anjuna-sgxrun --setup
 anjuna-sgxrun --version

If instead you see output like this, then your environment is not properly set up:

  anjuna-sgxrun: command not found