Skip to content

Commit eb4b8df

Browse files
committed
Feat: Migrate the guides from protocol documentation
1 parent 0dcc3ac commit eb4b8df

File tree

11 files changed

+1907
-1
lines changed

11 files changed

+1907
-1
lines changed

.vitepress/sidebar.ts

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,13 @@ export function getSidebar() {
127127
},
128128
],
129129
},
130+
{
131+
text: 'TEE Technology',
132+
collapsed: true,
133+
items: [
134+
{ text: 'Intel SGX Technology Overview', link: '/get-started/protocol/tee/intel-sgx-technology' },
135+
],
136+
},
130137
],
131138
},
132139
],
@@ -175,6 +182,21 @@ export function getSidebar() {
175182
text: 'Debugging',
176183
link: '/guides/build-iapp/debugging',
177184
},
185+
{
186+
text: 'Advanced Low‑Level iApp Building',
187+
collapsed: true,
188+
items: [
189+
{ text: 'Overview', link: '/guides/build-iapp/advanced-low-level/' },
190+
{ text: 'Quick Start for Developers', link: '/guides/build-iapp/advanced-low-level/quick-start-for-developers' },
191+
{ text: 'Build your first application', link: '/guides/build-iapp/advanced-low-level/your-first-app' },
192+
{ text: 'Intel SGX Technology Overview', link: '/guides/build-iapp/advanced-low-level/intel-sgx-technology' },
193+
{ text: 'Build your first SGX app (SCONE)', link: '/guides/build-iapp/advanced-low-level/create-your-first-sgx-app' },
194+
{ text: 'End-to-end Encryption', link: '/guides/build-iapp/advanced-low-level/end-to-end-encryption' },
195+
{ text: 'SGX Encrypted Dataset', link: '/guides/build-iapp/advanced-low-level/sgx-encrypted-dataset' },
196+
{ text: 'Access Confidential Assets', link: '/guides/build-iapp/advanced-low-level/access-confidential-assets' },
197+
{ text: 'Build Intel TDX app', link: '/guides/build-iapp/advanced-low-level/create-your-first-tdx-app' },
198+
],
199+
},
178200
],
179201
},
180202
{
@@ -566,5 +588,5 @@ export function getSidebar() {
566588
link: '/references/glossary',
567589
},
568590
],
569-
} satisfies DefaultTheme.Sidebar;
591+
} as DefaultTheme.Sidebar
570592
}
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Overview
2+
3+
**Confidential Computing** (or **Trusted Execution Environments -** **'TEE'**)
4+
ensures computation confidentiality through mechanisms of memory encryption at
5+
the hardware level. Applications being executed and data being processed are
6+
safeguarded against even the most privileged access levels (OS, Hypervisor...).
7+
Only authorized code can run inside this protected area and manipulate its data.
8+
9+
In some cases, ensuring that code runs correctly without any third party
10+
altering the execution, is even more important than hiding the computation's
11+
data. This concept is called **Trusted Computing.**
12+
13+
These guarantees are critical for a decentralized cloud where code is being
14+
executed on a remote machine, that is not controlled by the requester. They are
15+
also required to prevent leakage while monetizing data sets.
16+
17+
## Intel® Software Guard Extension (Intel® SGX)
18+
19+
[Intel® SGX](https://software.intel.com/en-us/sgx) is a technology that enables
20+
**Trusted Computing** and **Confidential Computing**. At its core, it relies on
21+
the creation of a special zone in the memory called an “enclave”. This enclave
22+
can be considered as a vault, to which only the CPU can have access. Neither
23+
privileged access-levels such as root, nor the operating system itself is
24+
capable of inspecting the content of this region. The code, as well as the data
25+
inside the protected zone, is totally unreadable and unalterable from the
26+
outside. This guarantees non-disclosure of data as well as tamper-proof
27+
execution of the code.
28+
29+
An application's code can be separated into "trusted" and "untrusted" parts
30+
where sensitive data is manipulated inside the protected area.
31+
32+
## Confidential Computing with iExec
33+
34+
Here is a general overview of how a TEE application runs on iExec:
35+
36+
```mermaid
37+
graph TD
38+
Req[Requester] --> |1 . Buy task| Chain
39+
Chain[Blockchain] --> |2 . Notify task to compute| Worker[Worker/Workerpool]
40+
Worker --> |3 . Launch TEE application| App[TEE application pre-starting]
41+
App --> |4 . Send report containing integrity information of the enclave| SMS{SMS Is integrity and authenticity <br> of the requesting enclave valid?}
42+
SMS --> |No| AppFailed[TEE application run aborted]
43+
SMS --> |Yes| AppStarted[TEE application started]
44+
45+
style AppFailed color:red
46+
style AppStarted color:green
47+
```
48+
49+
To build such Confidential Computing (TEE) application, a developer would need
50+
to use the Intel® SGX SDK. With iExec, you don't need to manipulate it. Instead
51+
iExec supports the high-level Scone framework.
52+
53+
At a high-level, Scone protects the confidentiality and integrity of the data
54+
and the code without needing to modify or recompile the application. With native
55+
Intel® SGX technology, the OS is not a part of the Trusted Computing Base (TCB)
56+
hence system calls and kernel services are not available from an Intel® SGX
57+
enclave. This can be limiting as the application will not be able to use File
58+
System and sockets directly from the code running inside the enclave. The
59+
[Scone](https://scontain.com/) framework resolves this and reduces the burden of
60+
porting the application to Intel® SGX.
61+
62+
More precisely, Scone provides a C standard library interface to container
63+
processes. System calls are executed outside of the enclave, but they are
64+
shielded by transparently encrypting/decrypting application data. Files stored
65+
outside of the enclave are therefore encrypted, and network communication is
66+
protected by Transport Layer Security (TLS).
67+
68+
For a deeper understanding, you can have a look to the official
69+
[Scone documentation](https://sconedocs.github.io/).
70+
71+
## Let's build
72+
73+
::: warning
74+
75+
Following steps will show you how to build a Confidential Computing application.
76+
The environment you are about to use is a "develop" environment:
77+
78+
- which can be reset at any time
79+
- where configurations and secrets might be inspected (debug enclaves)
80+
81+
When your developer discovery journey is complete, please reach the
82+
[production section](/guides/build-iapp/build-&-deploy#go-to-production).
83+
84+
:::
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Access confidential assets from your app
2+
3+
::: warning
4+
5+
Before going any further, make sure you managed to
6+
[Build your first application with Scone framework](create-your-first-sgx-app.md).
7+
8+
:::
9+
10+
## Secret Management Service (SMS)
11+
12+
You can use confidential assets on iExec thanks to the _iExec Secret Management
13+
Service_. This service verifies that the enclave asking for secrets is
14+
authorized to do so. Any user - as a confidential asset provider - declares on
15+
the blockchain which enclaves are authorized to access it. For each task, the
16+
SMS will query the blockchain to determine if the enclave requesting secrets is
17+
indeed whitelisted for it.
18+
19+
The SMS currently supports 3 types of secrets:
20+
21+
1. [Application developer secret](/guides/build-iapp/build-&-deploy#application-developer-secret): This secret is
22+
directly accessible from the application as an environment variable. It is
23+
owned by the developer of the application. It can be any kind of data (API
24+
key, private key, token, ..) as long as it respects the size limit (max. 4096
25+
kB).
26+
2. [Requester secrets](/guides/build-iapp/inputs-and-outputs#access-requester-secrets): These secrets are directly
27+
accessible from the application as environment variables, as long as the
28+
requester has decided to share them with it. These secrets can be any kind of
29+
data as long as they respect the size limit (max. 4096 kB). Before buying a
30+
task, a requester secret is pushed into the SMS and is not linked to any
31+
application. When a requester buys a task, the requester can declare which
32+
secrets can be accessed by the application. Doing so, a single requester
33+
secret can be shared with multiple applications.
34+
3. [Dataset secret](sgx-encrypted-dataset.md): A dataset secret is not directly
35+
accessible from the application but its decrypted content is. If a dataset is
36+
requested and authorized to be used in it, its content will be automatically
37+
decrypted in the application enclave. To monetize such a dataset on iExec,
38+
the original dataset must be encrypted using the iExec SDK, its encrypted
39+
counterpart must be publicly available and its encryption key pushed into the
40+
SMS.
41+
42+
Here is a general overview of how confidential assets are used on iExec:
43+
44+
```mermaid
45+
graph TD
46+
Req[Requester] -->|1.a. Push secret| SMS[SMS]
47+
AppDev[Application developer] -->|1.b. Push secret| SMS
48+
DatasetOwn[Dataset owner] -->|1.c. Push secret| SMS
49+
Req --> |2 . Buy task| Chain
50+
Chain[Blockchain] --> |3 . Notify task to compute| Worker[Worker/Workerpool]
51+
Worker --> |4 . Launch TEE application| App[TEE application]
52+
App --> |5.a. Get secrets for task| SMS
53+
SMS --> |5.b. Check authorization for secrets| Chain
54+
```
55+
56+
## Next step?
57+
58+
You now understand how these three kinds of confidential assets work on iExec,
59+
you can go one step further by learning how to manipulate them:
60+
61+
- [Attach a secret to your app](/guides/build-iapp/build-&-deploy#application-developer-secret)
62+
- [Access requester secrets](/guides/build-iapp/inputs-and-outputs#access-requester-secrets)
63+
- [Access a confidential dataset](sgx-encrypted-dataset.md)

0 commit comments

Comments
 (0)