You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code sample shows how to use PCL in Rust-SGX.
4
+
5
+
`pcl-user` contains logic of the user side, who wants to load encrypted enclave on a remote SGX-enabled machine.
6
+
7
+
`encrypted-hello` is the code user wants to protect. It is encrypted during building process. The encryption key is dynamically generated.
8
+
9
+
`pcl-seal` is a remote SGX app. It contains a sealing enclave which is in charge of storing the encryption key and provide it to the PCL API.
10
+
11
+
## Build and Run
12
+
13
+
To build, just type `make` and everything should be fine.
14
+
15
+
To run, please put your IAS registration files (client.key, client.crt and spid.txt) in under `pcl_seal/bin/`. Then
16
+
17
+
```
18
+
$ cd pcl-seal/bin
19
+
$ ./app
20
+
```
21
+
22
+
In another terminal, start the pcl-user app:
23
+
24
+
```
25
+
$ cd pcl-user
26
+
$ cargo run
27
+
```
28
+
29
+
Next you'll see `pcl-seal` starts getting a report from Intel and establishes a RA-based TLS channel with `pcl-user` and gets sealed key provisioned and stored in `SgxFile`. At last, `pcl-seal` will launch the `encrypted-hello` enclave and finally print the hello message.
0 commit comments