This project implements a gRPC server and client leveraging the Zero-Knowledge Proof (ZKP) Rust library for secure authentication. The integration of ZKP with gRPC ensures that users can be authenticated without revealing sensitive information, enhancing privacy and security. gRPC, a high-performance, universal RPC framework, is employed to handle the communication between the client and server.
- Rust programming language
protobuf-compiler
- Docker (for containerized deployment)
-
Ensure you have Rust installed on your system. If not, you can download and install Rust from the official website: https://www.rust-lang.org/tools/install
-
Install the required
protobuf-compiler
. On Linux systems, you can use the following command:sudo apt install protobuf-compiler
-
Clone the project repository:
git clone https://github.com/your-username/zkp-grpc-authentication.git
-
Navigate to the project directory:
cd zkp-grpc-authentication
The application can be containerized using Docker, which ensures a consistent environment for deployment.
To build the Docker containers, use:
docker-compose build zkpserver
Launch the container with:
docker-compose run --rm zkpserver
To access the running container:
- List the active containers:
docker container ls
- Connect to the desired container using its CONTAINER ID:
docker exec -it [CONTAINER ID] /bin/bash
-
Start the server:
cargo run --bin server --release
-
In a separate terminal instance, run the client:
cargo run --bin client --release
-
Build the project:
cargo build --release
-
Start the server:
cargo run --bin server --release
-
In a separate terminal instance, run the client:
cargo run --bin client --release
-
Follow the prompts to enter the username and password (in hexadecimal format).
-
Use the provided password to log in and obtain the session ID.
-
Building the Docker Image To build the Docker image, use the following command:
docker-compose build zkpserver
-
Running the Docker Container Launch the Docker container with the following command:
docker-compose run --rm zkpserver
-
Accessing the Running Container List the active containers:
docker container ls
-
Connect to the desired container using its CONTAINER ID:
docker exec -it [CONTAINER ID] /bin/bash
-
Executing the Server and Client Inside the Container Start the server:
cargo run --bin server --release
-
In a separate terminal instance, run the client:
cargo run --bin client --release
-
Follow the prompts to enter the username and password (in hexadecimal format).
-
Use the provided password to log in and obtain the session ID.
We welcome contributions to enhance the functionality and usability of this project. If you'd like to contribute, please follow these steps:
Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them with descriptive commit messages.
- Push your changes to your forked repository.
- Submit a pull request to the main repository, clearly describing your changes and their benefits.