-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add test enclave usage examples, move reference repos to their …
…own subsection
- Loading branch information
Showing
1 changed file
with
27 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,36 @@ | ||
# nixsgx | ||
|
||
This repository contains a Nix flake with up2date packages for the Intel SGX SDK and gramine. | ||
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 | ||
|
||
See: https://github.com/matter-labs/teepot | ||
and https://github.com/matter-labs/era-fee-withdrawer/tree/gramine-sgx | ||
### Test enclave | ||
|
||
A testing enclave container is provided and can be ran like so: | ||
|
||
```sh | ||
# 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: | ||
|
||
- https://github.com/matter-labs/teepot | ||
- https://github.com/matter-labs/era-fee-withdrawer/tree/gramine-sgx |