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