Setup Intel SGX
Please ensure, that you are using compliant hardware. You can check the list of supported hardware here.
Configure BIOS
Enable SGX
Disable Secure Boot
Disable Hyper Threading
Disable Turbo Mode
Enable CPU AES
Install Intel SGX Driver
If you have Linux kernel version 5.11 or higher, Intel SGX Driver is already included and you can skip this step.
Go to Intel Downloads page and find your platform. Download the binary file, which should be named something like sgx_linux_x64_driver_2.11.54c9c4c.bin
and install it. For example (on Ubuntu 22.04):
Install Intel AESM service
Ubuntu 22.04
Enable the Intel SGX APT repository and install the required packages.
To confirm that AESM service was installed correctly, run:
Install all required libraries
Ubuntu 22.04
Enable the Intel SGX APT repository and install required packages to run swisstronikd
:
After that you are ready to run swisstronikd
.
Verify SGX Setup
In order to make sure that your SGX setup is working, you can use the sgx-detect
tool from the sgxs-tools Rust package.
There are no pre-built packages for it, so you will need to compile it yourself.
Install Dependencies
Make sure you have the following installed on your system:
On Fedora, you can install all the above with:
On Ubuntu, you can install all the above with:
Install rustup by running:
Build and Install sgxs-tools
Run sgx-detect
tool
sgx-detect
toolAfter the installation completes, run sgx-detect
to make sure that everything is set up correctly:
Note: If you don't run the sgx-detect
tool as root
, it might not have the necessary permissions to access the SGX kernel device.
When everything is working correctly, you should receive output similar to the following (some details may vary depending on hardware features):
The important part is the checkbox under Able to launch enclaves in both Debug mode and Production mode (Intel whitelisted).
In case you encounter errors, see the list of common SGX installation issues for help.
Common issues
Permission Denied When Accessing SGX Kernel Device
If running sgx-detect --verbose
reports:
Ensure you are running the sgx-detect
tool as root
via:
Error Opening SGX Kernel Device
If running sgx-detect --verbose
reports:
Ensure your system's /dev
is NOT mounted with the noexec
mount option.
Unable to Launch Enclaves.
If running sgx-detect --verbose
reports:
Ensure your system's /dev
is NOT mounted with the noexec
mount option.
Last updated