From 20493e4c93063ab09f2409476f7b97ae2f80bf51 Mon Sep 17 00:00:00 2001 From: Louis Tremblay Thibault Date: Wed, 12 Jul 2023 09:31:00 +0200 Subject: [PATCH 1/3] Update README.md Change name --- README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 0f6a8c0..69cc8c0 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# ZBC FHE tool +# TFHE-CLI -The ZBC FHE tool allows developers to use __tfhe-rs__ features through a user-friendly CLI. +The TFHE-CLI tool allows developers to use __tfhe-rs__ features through a user-friendly CLI. -This tool could be used locally or through a docker image. +This tool can be used locally or through a docker image. # Quick start @@ -10,12 +10,12 @@ If you want to generate fhe keys for your evmos node: On x86: ```bash -$> mkdir -p res && docker run -v $PWD:/usr/local/app ghcr.io/zama-ai/zbc-fhe-tool:v0.1.1 zbc-fhe-tool generate-keys -d res +$ mkdir -p res && docker run -v $PWD:/usr/local/app ghcr.io/zama-ai/fhevm-tfhe-cli:v0.1.1 fhevm-tfhe-cli generate-keys -d res ``` On arm64: ```bash -$> mkdir -p res && docker run -v $PWD:/usr/local/app ghcr.io/zama-ai/zbc-fhe-tool:v0.1.1-arm64 zbc-fhe-tool generate-keys -d res +$ mkdir -p res && docker run -v $PWD:/usr/local/app ghcr.io/zama-ai/fhevm-tfhe-cli:v0.1.1-arm64 fhevm-tfhe-cli generate-keys -d res ``` Typical output: @@ -24,7 +24,7 @@ Typical output: # Generated cks size: 41130 bytes # Generated sks size: 100729006 bytes # Generated pks size: 16553 bytes -$> ls res +$ ls res # cks pks sks ``` @@ -32,10 +32,10 @@ $> ls res Make sure you either have Docker or the Rust toolchain installed on your host machine. -Please replace `ZBC_FHE_TOOL` with either: +Please replace `FHEVM_TFHE_CLI` with either: * "`cargo run --features tfhe/aarch64-unix --release -- `" - for ARM CPUs when running locally on the host * "`cargo run --features tfhe/x86_64-unix --release -- `" - for x86 CPUs when running locally on the host - * "`docker run -v $LOCAL_DIR:/usr/local/app ghcr.io/zama-ai/zbc-fhe-tool:$TAG zbc-fhe-tool`" + * "`docker run -v $LOCAL_DIR:/usr/local/app ghcr.io/zama-ai/fhevm-tfhe-cli:$TAG fhevm-tfhe-cli`" * replace LOCAL_DIR with a local directory of choice in order to persist output from the tool when using Docker * replace TAG with a known tagged version @@ -43,33 +43,33 @@ For more information on Docker, see below. For more information on supported operations and their variations, please see the built-in help: ```bash -ZBC_FHE_TOOL help +FHEVM_TFHE_CLI help ``` ## Key generation ```bash mkdir -p /path/to/keys/directory -ZBC_FHE_TOOL generate-keys -d /path/to/keys/directory +FHEVM_TFHE_CLI generate-keys -d /path/to/keys/directory ``` ## Public encryption ```bash # Encryption requires the public key `pks`. -ZBC_FHE_TOOL public-encrypt-integer32 -c ./ciphertext -p /path/to/keys/directory/pks -v 42 +FHEVM_TFHE_CLI public-encrypt-integer32 -c ./ciphertext -p /path/to/keys/directory/pks -v 42 ``` ## Decryption ```bash # Decryption requires the secret key `cks`. -ZBC_FHE_TOOL decrypt-ciphertext -c ./ciphertext -s /path/to/keys/directory/cks +FHEVM_TFHE_CLI decrypt-ciphertext -c ./ciphertext -s /path/to/keys/directory/cks ``` # Using published Docker images -One needs to docker login to ghcr.io to download the published image. +One needs to login to ghcr.io to download the published image.
From 407c3a916ab05b5c4b58e29fbbe787ec10147cea Mon Sep 17 00:00:00 2001 From: Louis Tremblay Thibault Date: Wed, 12 Jul 2023 10:09:23 +0200 Subject: [PATCH 2/3] :) --- Cargo.lock | 2 +- Cargo.toml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 097cd50..9392dff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -565,7 +565,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "zbc-fhe-tool" +name = "fhevm-tfhe-cli" version = "0.1.1" dependencies = [ "bincode", diff --git a/Cargo.toml b/Cargo.toml index 96ced55..cf0a406 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,11 @@ [package] -name = "zbc-fhe-tool" +name = "fhevm-tfhe-cli" version = "0.1.1" authors = ["Zama "] edition = "2021" license = "Unlicense" -homepage = "https://github.com/zama-ai/zbc-fhe-tool" -repository = "https://github.com/zama-ai/zbc-fhe-tool" +homepage = "https://github.com/zama-ai/fhevm-tfhe-cli" +repository = "https://github.com/zama-ai/fhevm-tfhe-cli" publish = false [dependencies] From 920e24d0cf800258e63d32638acf0cc0dea583c4 Mon Sep 17 00:00:00 2001 From: Louis Tremblay Thibault Date: Wed, 12 Jul 2023 10:09:43 +0200 Subject: [PATCH 3/3] .. --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 90ba058..144f5e6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,13 @@ FROM rust:1.67 as builder -WORKDIR /usr/local/app/zbc-fhe-tool +WORKDIR /usr/local/app/fhevm-tfhe-cli ADD . . RUN cargo build --release --features tfhe/$(./scripts/get_arch.sh) FROM debian:bullseye-slim WORKDIR /usr/local/app RUN apt-get install libc6 -y -COPY --from=builder /usr/local/app/zbc-fhe-tool/target/release/zbc-fhe-tool /usr/local/bin +COPY --from=builder /usr/local/app/fhevm-tfhe-cli/target/release/fhevm-tfhe-cli /usr/local/bin ENV RUST_LOG=info -CMD ["zbc-fhe-tool"] +CMD ["fhevm-tfhe-cli"]