Reproducible Nix packages for TEEs
Find a file
Harald Hoyer 4ec107365f
Merge pull request #68 from ozwaldorf/docs/usage
docs: add test enclave usage example
2024-11-15 00:14:42 +07:00
.github chore(deps): update trufflesecurity/trufflehog action to v3.82.9 2024-10-15 23:43:37 +00:00
overlays/libTee feat(sgxGramineContainer): expose maxLayers argument from image builder 2024-11-13 13:03:53 -05:00
packages feat: sgx-2.25 dcap-1.22 2024-10-15 08:30:27 +02:00
.gitignore feat: add GRAMINE_DIRECT 2024-06-14 20:43:03 +02:00
COPYING feat: initial commit 2024-02-07 11:25:05 +01:00
flake.lock chore(deps): update nixpkgs 2024-10-15 11:21:38 +02:00
flake.nix chore: Migrate from cachix to Attic in nix and github workflows 2024-07-01 14:00:14 +02:00
README.md docs: add test enclave usage examples, move reference repos to their own subsection 2024-11-14 11:58:33 -05:00

nixsgx

This repository contains a Nix flake with up-to-date packages for the Intel SGX SDK and gramine.

Hopefully most of the packages will be upstreamed to nixpkgs at some point.

All package builds should be reproducible and therefore can be used to build reproducible enclave images.

Usage

Test enclave

A testing enclave container is provided and can be ran like so:

# Build the dcap (or azure) container variant
nix build .#nixsgx-test-sgx-dcap

# Load image into docker
docker load < result

# Run the enclave, binding the sgx devices
docker run -i --init --rm \
  --device /dev/sgx_enclave \
  --device /dev/sgx_provision \
  nixsgx-test-sgx-dcap:latest

Note: An external aesmd instance can be provided by mounting the socket to the container: -v /var/run/aesmd/aesm.socket:/var/run/aesmd/aesm.socket

Reference projects

The following projects provide reproducible enclaves using nixsgx: