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 repository provides a canister (`src/system_api`) that offers the vetKD system API proposed in https://github.com/dfinity/interface-spec/pull/158, implemented in an **unsafe**manner **for demonstration purposes**.
3
+
This example demonstrates how to use the Internet Computer's **vetKeys**feature to:
4
4
5
-
Additionally, the repository provides:
5
+
1. Derive a (symmetric) cryptographic AES-GCM-256 key *in the user's browser*, and use it there for encryption and decryption.
6
+
2. Use identity-based encryption (IBE) to encrypt some plaintext for a particular *principal*, derive a respective decryption key *in the user's browser* for the user that is currently logged in, and use it to decrypt some ciphertext.
6
7
7
-
* An example app backend canister (`src/app_backend`) implemented in **Rust** that makes use of this system API to provide caller-specific symmetric keys that can be used for AES encryption and decryption.
8
+
It includes:
9
+
10
+
* An example app backend canister (`src/app_backend`) implemented in **Rust** that provides caller-specific symmetric keys that can be used for AES encryption and decryption.
8
11
9
12
* An example frontend (`src/app_frontend_js`) that uses the backend from Javascript in the browser.
10
13
11
14
The frontend uses the [ic-vetkd-utils](https://github.com/dfinity/ic/tree/master/packages/ic-vetkd-utils) to create a transport key pair that is used to obtain a verifiably encrypted key from the system API, to decrypt this key, and to derive a symmetric key to be used for AES encryption/decryption.
12
15
13
16
Because the `ic-vetkd-utils` are not yet published as NPM package at [npmjs.com](https://npmjs.com), a respective package file (`ic-vetkd-utils-0.1.0.tgz`) is included in this repository.
14
17
15
-
---
16
-
17
-
## Disclaimer
18
-
19
-
The implementation of [the proposed vetKD system API](https://github.com/dfinity/interface-spec/pull/158) used in this example is **unsafe**, e.g., we hard-code a master secret key, rather than using a master secret key that is distributed among sufficiently many Internet Computer nodes through distributed key generation. **Do not use this in production or for sensitive data**! This example is solely provided **for demonstration purposes** to collect feedback on the mentioned vetKD system API. See also the respective disclaimer [in the system API canister implementation](https://github.com/dfinity/examples/blob/master/rust/vetkd/src/system_api/src/lib.rs#L19-L26).
20
-
21
-
---
22
-
23
18
## Prerequisites
24
19
-[x] Install the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/getting-started/install).
25
20
-[x] Clone the example dapp project: `git clone https://github.com/dfinity/examples`
0 commit comments