DeTEE SGX library, contains Rust implementations for SGX specific features
Go to file
2024-10-27 15:55:04 +02:00
examples prettified scripts, docs and code 2024-10-27 15:55:04 +02:00
src prettified scripts, docs and code 2024-10-27 15:55:04 +02:00
.gitignore commented self signed certificate 2024-10-27 15:55:03 +02:00
build_client.sh prettified scripts, docs and code 2024-10-27 15:55:04 +02:00
build_server.sh prettified scripts, docs and code 2024-10-27 15:55:04 +02:00
build.rs added mRATLS to tonic examples 2024-10-27 15:55:03 +02:00
Cargo.toml added mRATLS to tonic examples 2024-10-27 15:55:03 +02:00
client.yaml prettified scripts, docs and code 2024-10-27 15:55:04 +02:00
README.md prettified scripts, docs and code 2024-10-27 15:55:04 +02:00
server.yaml Initial implementation 2024-10-27 15:55:02 +02:00

Occlum SGX Remote Attestation integrated in TLS connection

The MRSIGNER of the example/signing_key.pem is hardcoded in the enclave code:

6871A831CED408CD99F0ED31587CC2B5C728C99D4A0A1ADF2F0C5574EBBB00DC

You can generate your own signing key. Just use the following command:

openssl genrsa -3 -out signing_key.pem 3072

To get the MRSIGNER of the key, compile this project and use the following command:

./mrsigner signing_key.pem

Running Examples

Before running make sure you have installed the Occlum and the SGX driver. You should also have the Occlum Rust toolchain installed to get occlum-cargo. To test the project just run client and server scripts in different terminals:

./build_server.sh
./build_client.sh

Mutual RATLS examples

Examples show how to use the mRATLS (Mutual Remote Attestation TLS) in different situations:

  • The first example shows how to create mRATLS HTTPS server and client
  • The second example shows how to create mRATLS GRPCs server and client

Both the server and the client must be running inside the enclave. So during the remote attestation peers, acquire their RA certificates. And during the TLS handshake, they verify each other's RA certificates. The config allows to whitelist MRENCLAVE, MRSIGNER, PRODID, SVN of the peer.

RATLS examples

Example shows how to create RATLS HTTPS server and client. The server must be running inside the enclave. The client can be running anywhere. The server config allows to whitelist the public ec25519 key of the client. The client config allows to whitelist MRENCLAVE, MRSIGNER, PRODID, SVN of the server.