Skip to content

Commit 781edc2

Browse files
committed
fix format
1 parent ad30264 commit 781edc2

File tree

1 file changed

+30
-14
lines changed

1 file changed

+30
-14
lines changed

src/guides/use-iapp/run-iapp-without-ProtectedData.md

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -203,15 +203,20 @@ const taskId = await iexec.order.matchOrders({
203203

204204
## 🔐 Encrypt Results (Advanced)
205205

206-
::: info DataProtector handles encryption automatically
207-
If you're using DataProtector, result encryption is handled automatically. This section is only needed for manual encryption when not using DataProtector.
208-
:::
206+
::: info DataProtector handles encryption automatically If you're using
207+
DataProtector, result encryption is handled automatically. This section is only
208+
needed for manual encryption when not using DataProtector. :::
209209

210-
Secure your outputs with end‑to‑end encryption so only you (the beneficiary) can read them. Results leave the enclave and may traverse untrusted storage and networks; encryption ensures nobody else (operators, storage providers, intermediaries) can access the content.
210+
Secure your outputs with end‑to‑end encryption so only you (the beneficiary) can
211+
read them. Results leave the enclave and may traverse untrusted storage and
212+
networks; encryption ensures nobody else (operators, storage providers,
213+
intermediaries) can access the content.
211214

212215
### 1) Generate your encryption key pair
213216

214-
The beneficiary key pair is the root of trust for result confidentiality. The public key will be used inside the TEE to encrypt results for the beneficiary; the private key stays with the beneficiary to decrypt them locally.
217+
The beneficiary key pair is the root of trust for result confidentiality. The
218+
public key will be used inside the TEE to encrypt results for the beneficiary;
219+
the private key stays with the beneficiary to decrypt them locally.
215220

216221
Run from your iExec project directory:
217222

@@ -228,11 +233,14 @@ This creates two files in `.secrets/beneficiary/`:
228233
└─ <0x-your-wallet-address>_key.pub # PUBLIC KEY
229234
```
230235

231-
Back up the private key securely. You will only need it locally to decrypt results.
236+
Back up the private key securely. You will only need it locally to decrypt
237+
results.
232238

233239
### 2) Push your public key to the SMS
234240

235-
The Secret Management Service securely delivers your public key, at runtime, to the enclave running your iApp. Without this, the iApp cannot encrypt outputs for you.
241+
The Secret Management Service securely delivers your public key, at runtime, to
242+
the enclave running your iApp. Without this, the iApp cannot encrypt outputs for
243+
you.
236244

237245
Make the public key available to TEEs at runtime:
238246

@@ -248,7 +256,9 @@ iexec result check-encryption-key --tee-framework scone
248256

249257
### 3) Run the iApp with encrypted results
250258

251-
The --encrypt-result flag instructs the platform to perform envelope encryption inside the enclave using your public key, so the archive that leaves the TEE is unreadable to others.
259+
The --encrypt-result flag instructs the platform to perform envelope encryption
260+
inside the enclave using your public key, so the archive that leaves the TEE is
261+
unreadable to others.
252262

253263
Trigger a task and request encrypted outputs:
254264

@@ -268,9 +278,11 @@ iexec task show <0x-task-id> --download
268278

269279
Inside the archive, `iexec_out/result.zip.aes` is encrypted.
270280

271-
Note: Results are encrypted for the task beneficiary. Ensure the beneficiary address is yours to be able to decrypt the archive.
281+
Note: Results are encrypted for the task beneficiary. Ensure the beneficiary
282+
address is yours to be able to decrypt the archive.
272283

273-
If you extract the archive and try to read the encrypted file, you'll see unreadable content:
284+
If you extract the archive and try to read the encrypted file, you'll see
285+
unreadable content:
274286

275287
```bash
276288
mkdir /tmp/trash && \
@@ -285,11 +297,13 @@ The output will look like:
285297
Յ]9WTL*tdzO`!e&snoL3K6L9%
286298
```
287299
288-
This confirms the results are properly encrypted and unreadable without the private key.
300+
This confirms the results are properly encrypted and unreadable without the
301+
private key.
289302
290303
### 4) Decrypt results locally
291304
292-
Results are encrypted end‑to‑end; only your private key can decrypt them. This step restores the plaintext so you can use the output files.
305+
Results are encrypted end‑to‑end; only your private key can decrypt them. This
306+
step restores the plaintext so you can use the output files.
293307
294308
Use your private key generated in step 1:
295309
@@ -315,5 +329,7 @@ Your results are now decrypted and ready to use.
315329
### Notes and tips
316330
317331
- Keep the private key offline and backed up.
318-
- You can rotate keys by re-running generation and push steps; old tasks remain decryptable with the old private key.
319-
- iApp code does not need changes to enable result encryption; it is enforced by the TEE using the public key from SMS.
332+
- You can rotate keys by re-running generation and push steps; old tasks remain
333+
decryptable with the old private key.
334+
- iApp code does not need changes to enable result encryption; it is enforced by
335+
the TEE using the public key from SMS.

0 commit comments

Comments
 (0)