
Explore the Petersen protocol as an interactive zero-knowledge proof for passwordless user authentication, implemented in Rust, with server challenges, gRPC communication, and dockerized deployment.
Master the basics of modular arithmetic, including remainders, mod notation, handling negatives, and the cyclic behavior that underpins later group theory applications.
Learn about groups as sets with an operation, focusing on modular addition modulo five. Define closure, associativity, identity, inverse, and the abelian (commutative) case.
Explore generators in a finite cyclic group under modular multiplication modulo 11, using powers of 2 to generate all elements and distinguish non-generators like 3.
Explains the discrete logarithm problem, its role in public key cryptography, and why solving alpha^D = beta in modular arithmetic becomes hard for large numbers.
Present the Chaum-Pedersen zero-knowledge proof protocol, where Bob proves knowledge of secret X to Alice using alpha and beta in a prime order group, via interactive challenges without revealing X.
Demonstrate a toy zero-knowledge proof in a small group modulo 23, using generators, exponentiation, and a challenge‑response verification between Alice and Bob to illustrate the protocol, with Rust implementation hints.
Install rust on your machine using the official install script to set up rustup, cargo, and rustc. Create a new cargo project and run cargo run to verify hello world.
Design the schema for zero-knowledge proofs in Rust by outlining the prover-verifier interactions, implementing exponentiation modulo p, verify logic, random number generation, and using big integers for security.
Install the bigint library and implement exponentiate, solve, and verify in a Rust library. Verify uses alpha, beta, X, Y1, Y2, and Z to check R1 and R2.
Execute a unit test in Rust to demonstrate a toy zero-knowledge proof, defining alpha, beta, p, and group order, and verify real and fake secrets with a verifier.
Implement a random number generator for the protocol in Rust using the run crate and rand bigint to produce large numbers below a limit, with unit tests via cargo test.
Refactor the zero-knowledge proofs library in Rust by introducing a public struct for constants and generators alpha and beta, and implement protocol methods using self, including verify and generate.
Stress tests use 1024-bit integers to ensure a prime order group with a generator, loading 5114 constants for Diffie-Hellman, and validating random exponents in Rust.
design a gRPC server in rust that uses a zero-knowledge proof library, implementing the Pedersen protocol for registration and login via protobuf and tonic to generate client and server code.
Learn how to write and compile a protobuf file for a tonic-based Rust gRPC authentication flow, including registration, challenge creation, and verification in a zero-knowledge proof context.
Create separate server and client executables from the zero knowledge proofs library, configure cargo with two binaries, and print 'hi I am the server' and 'hi I am the client'.
Learn to build a tonic-based gRPC server in Rust using tokio async, implementing register, create authentication challenge, and verify authentication handlers, then run and test locally.
Implement the server register flow by parsing username, y1 and y2, and storing them in a mutex-protected hash map via a user info struct, exposed via gRPC.
Process authentication challenge requests by validating the username, processing R1 and R2, generate an authentication ID, store user-auth mappings in a hash map, and return a challenge response.
Implement and verify the server-side authentication flow in Rust, generating a 12-character random session id, resolving auth IDs, and validating the client's solution against the challenge.
Build the client that connects to the pre-coded server, prompts for a username and password, and registers via a register request before preparing for login.
Develop a zero-knowledge proof authentication client and server, compute R1 and R2 challenges as big integers, and exchange authentication challenges via gRPC.
Advance the zero-knowledge proof server and client with gRPC in Rust, apply code improvements as homework using cargo clippy, and implement serialize and get_pair helpers.
Dockerize your server and client by building lightweight, isolated containers, using docker compose, docker hub images, and a dockerfile to package a Rust-based app across Windows, macOS, and Linux.
Write a dockerfile and docker-compose.yaml to build a rust-based zero knowledge proof server image, map local volumes, and run the container with cargo.
Learn to dockerize a zero knowledge proof Rust app by installing the protobuf compiler, building a release image, and running a server and client with Docker Compose.
This Zero-Knowledge Proof course in Rust is designed to learn how to implement a cryptography ZKP algorithm and use it in real-world applications for user registration and authentication.
The course is divided into four main parts:
Theoretical Foundations: we will have a didactic introduction to the Chaum-Pedersen Protocol and understand how this interactive ZKP algorithm works with small toy examples. Additionally, we will cover what finite cyclic groups, generators and the discrete logarithm problem are.
Rust Implementation: we will implement in Rust what we have seen in the theory section. Here I recommend you execute the code by yourself and also create a GitHub repo to have a showcase in your portfolio. This will help future employers to know what you are talking about!
gRPC Server/Client: here, we use the previous Rust ZKP library we implemented to create a server that authenticates users through a gRPC protocol. This part is useful even if you are not interested in cryptography or ZKP protocols. Many companies and startups are interested in people with experience in gRPC.
Dockerization: in the last part of the course, we will learn how to dockerize the application using Docker. This will enable us to run it on any Windows, Linux, or MacOS system.