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] 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"] 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.