Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sgx blog fixes new #192

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 10 additions & 24 deletions src/content/blog/announcements/introducing-fleek-edge-sgx/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,41 +52,27 @@ In addition to security, Fleek’s SGX service leverages content-addressed mecha

## How to use Fleek’s edge-optimized SGX service

Using Fleek’s SGX service is simple and follows a similar process to our Javascript service:
Using Fleek’s Edge SGX service is simple and follows a similar process to our Javascript service:

1. Upload your program
1. Get the [Fleek CLI](https://fleek.xyz/docs/cli/)

Compile your program to WASM, then upload it to an underlying storage layer, like IPFS.

The only difference here is the encryption step — before uploading to IPFS, you encrypt the data to ensure privacy. Soon, this step will be abstracted into Fleek’s CLI, but for now, you can use our standalone binary.

2. Install the binary

Install the binary tool with
2. Run this command to auth your CLI tool:

```bash
cargo install sgxencrypt
fleek login
```

Use the binary to encrypt your WASM program before uploading it to Fleek’s storage layer:
3. Run this command to deploy:

```bash
sgxencrypt --pubkey <network pubkey> path/to/wasm.wasm
fleek functions deploy --name Myfunction --path my.wasm --sgx
```

3. Upload and run the program

Once encrypted, upload the output to Fleek’s storage:
4. You can invoke this function at https://fleek-test.network/services/3 with a payload containing hash, inputs, and whether its encrypted or not (always yes with the current tool), and any inputs you need:

```bash
fleek storage add path/to/wasm.cipher
```

After that, you can call the service via HTTP or other supported transport methods using the CID:

```bash
https://fleek-test.network/services/3/ipfs/{CID}
```
curl fleek-test.network/services/3 --data '{"hash": "<hash>", "decrypt": true, "input": "foo"}'
```

---

Expand All @@ -112,7 +98,7 @@ As Fleek progresses towards offering a comprehensive full-stack developer experi

You can start building with our Edge SGX service in alpha at the links below. Don’t hesitate to reach out in [Discord](https://discord.gg/fleek) with any questions or feedback.

- Fleek CLI
- [Fleek CLI](https://fleek.xyz/docs/cli/)
- [GitHub ReadMe & Examples](https://github.com/fleek-network/lightning/tree/sgx-alpha/lib/sgxkit#readme)
- Fleek Network SGX Integration Technical Overview
- [Discord](https://discord.gg/fleek)
Loading