From 837564b332bf08d9d067897321274ac9a1ca6507 Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Wed, 6 Nov 2024 14:00:01 +0700 Subject: [PATCH] improvements --- workshop/workshop.md | 46 ++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/workshop/workshop.md b/workshop/workshop.md index 2cc3ef9..7bb4a5b 100644 --- a/workshop/workshop.md +++ b/workshop/workshop.md @@ -23,7 +23,7 @@ To avoid network issues on conference Wi-Fi, please download the following depen * **Toolchains:** * [Rust](https://www.rust-lang.org/tools/install) * [NPM](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) -* [Install the TLSNotary Browser Plugin](https://chromewebstore.google.com/detail/tlsn-extension/gcfkkledipjbgdbimfpijgbkhajiaaph) +* [Install the TLSNotary Browser Plugin from the Chrome Web Store](https://chromewebstore.google.com/detail/tlsn-extension/gcfkkledipjbgdbimfpijgbkhajiaaph) * **WebSocket Proxy:** `cargo install wstcp` * **Cache Preparation:** * `tlsn`: `cargo build --release --examples` @@ -52,16 +52,16 @@ The source code is located at `crates/examples/interactive/interactive.rs` in th The setup has three main parts: -* `main()`: wires everything together +* `main()`: wires everything together. * `prover(...)`: - * Connects to the Verifier - * Connects to the TLS Server - * Performs MPC-TLS handshake - * Sends a request to the Server and waits for the response - * Redacts/reveals data and creates a proof for the Verifier + * Connects to the Verifier. + * Connects to the TLS Server. + * Performs MPC-TLS handshake. + * Sends a request to the Server and waits for the response. + * Redacts/reveals data and creates a proof for the Verifier. * `verifier(...)`: - * Verifies MPC-TLS and waits for (redacted) data - * Verifies disclosed data (hostname, content) + * Verifies MPC-TLS and waits for (redacted) data. + * Verifies disclosed data (hostname, content). #### Start the Server @@ -116,7 +116,7 @@ cd crates/notary/server cargo run -r -- --tls-enabled false ``` -This setup simplifies by not using TLS to connect the Prover and Notary. +The `--tls-enabled false` argument disables TLS between the Prover and the Notary. We use it here to simplify the setup. The process has three steps: @@ -156,9 +156,9 @@ This will verify the presentation and print the disclosed data to the console. #### Extra tasks -Try the above steps with different content - - [ ] HTML: Append `-- html` to the commands for each of the steps - - [ ] Authenticated content: Append `-- authenticated` to the commands for each of the steps +Try the above steps with different types of web content: + - [ ] **HTML**: Append `-- html` to the commands for each of the steps + - [ ] **Authenticated content**: Append `-- authenticated` to the commands for each of the steps. (This will add an authentication token to the request to access 'private' data). ### Browser: notarize with the Browser extension @@ -181,7 +181,7 @@ Next we need to configure the Browser Extension options to use the local notary * **Notary** API: `http://localhost:7047` * **Proxy API**: `ws://localhost:55688` -> ℹ️ Note that if your network is fast enough, you can also use the default settings. This will use the PSE hosted notary and proxy server. +> ℹ️ Note that if your network is fast enough, you can also use the default settings. The default settings use a notary and proxy server hosted by PSE. #### Notarize @@ -198,6 +198,10 @@ This part is optional but should be fun: team up with your neighbors and distrib Make sure to open the required ports on your firewall. +### Notarize with a Trusted Notary + +Distribute the roles and make sure to configure `NOTARY_HOST`, `NOTARY_PORT`,`SERVER_HOST` and `SERVER_PORT` to the correct values. Check `/crates/examples/attestation/prove.rs` for the details + ### Interactive verifier For the interactive verifier you can use the *interactive verifier* demo from the repo. The demo is in the `verifier-server-ts` branch. @@ -231,7 +235,7 @@ npm i npm run build ``` -the dist folder should now contain a `twitter_profile.tlsn.wasm` file. This is a plugin that can be loaded in the Extension. +After you run the above commands, the dist folder should now contain a `twitter_profile.tlsn.wasm` file. This is a plugin that can be loaded in the Extension. Before we add the plugin into the extension, remove the existing Twitter plugin to avoid confusion (Hover the plugin and click the red cross in the top right of the extension). @@ -246,17 +250,21 @@ You can find more information at https://docs.tlsnotary.org/extension/plugins.ht ### Browser extension Connection API -Good job! We are progressing nicely and learning a lot. +👍 Good job! We are progressing nicely and learning a lot. + Next topic is exploring a web application that verifies that you have a Twitter account and rewards you with a POAP if you do. -Visit and walk through the steps. +Visit and walk through the steps. You can verify what the web app is doing by reading the source code at . You can find more information on the [Provider API in our documentation](https://docs.tlsnotary.org/extension/provider.html). -> ⚠️ **Note:** This demo allows for proving with any notary (so that you can use local notary to avoid stressing the network.). In real world applications, please verify the attestation more carefully to make sure the attestations you receive are trustworthy. +> ⚠️ **Note:** This demo allows for proving with any notary (so that you can use local notary to avoid stressing the network). In real world applications, please verify the attestation more carefully to make sure the attestations you receive are trustworthy. ### Play Time -You now have experimented with the basic building blocks. Next step is to build your own applications with TLSNotary. If you are a Java/Typescript developer we recommend to create a custom plugin for your preferred private data source. If you are a Rust developer, ... \ No newline at end of file +You now have experimented with the basic building blocks. Next step is to build your own applications with TLSNotary. + +Think of what Web2 data you'd like to unlock: Private message, identity providers, reputation sources, financial information, ... +Build a custom plugin or develop a complete webapp with TLSNotary. The TLSNotary team is here to help you! ❤️ \ No newline at end of file