This project demonstrates a server authentication application using Zero-Knowledge Proof (Chaum-Pedersen protocol) implemented in Rust. It uses the gRPC protocol for communication between the client and server. Zero-Knowledge Proof (ZKP) is a cryptographic technique that allows one party (the prover) to prove to another party (the verifier) that they possess knowledge of a secret without revealing the secret itself.
- User registration with ZKP
- Authentication challenge generation
- Solution verification
- Secure communication with gRPC
- Chaum-Pedersen protocol implementation
- Rust: Make sure you have Rust installed. You can download it from rustup.rs.
- Protocol Buffers: Ensure that you have Protocol Buffers (protoc) installed. You can download it from Protocol Buffers.
-
Clone this repository to your local machine:
git clone https://github.com/solthodox/zkp-auth.git cd zkp-auth
-
Build the project:
cargo build --release
-
Start the server:
cargo run --bin server
-
In a separate terminal, run the client:
cargo run --bin client
- When running the client, you will be prompted to enter a username and a password (x).
- The client will register the user with the server using the Chaum-Pedersen protocol.
- It will then request an authentication challenge from the server.
- After receiving the challenge, the client will verify the solution and log in if successful.
This project is licensed under the MIT License - see the LICENSE file for details.