CHOAM: The Chaum-Pedersen High-Securty Ordinal Authentication Machine.
tl;dr - an authentication server that uses a custom chaum-pedersen protocol implementation to authenticate requests and hand out JWTs for authorization.
I've been reading a lot of Dune lately, so I present to you CHOAM, a Chaum-Pedersen protocol implementation in GRPC and Rust. Chaum-Pedersen is a Sigma protocol for zero-knowledge proofs.
This is not production ready code, and it should absolutely not be used for anything in production period.
To test this script out, you need to run the server locally and then run the client to authenticate with the server.
cargo run-server
to run the CHOAM server.cargo run-client
to run the client.cargo build-client
builds the client binary.cargo build-server
builds the server binary.
The client runs an automatic connection protocol and stores the token it receives from the authentication request.
src/main.rs
contains a heavily commented walk-through of the Chaum-Pedersen protocol.src/server.rs
contains the gRPC server implementation for authenticating against.src/client.rs
contains the gRPC client implementation that authenticates itself against the server.src/proto/
contains the Protobuf definitions.
- Tokio for asynchronous execution at runtime
- Tonic for generating Protobuf files
- num-bigint for modpow and other math
- jsonwebtoken for generating JWTs after successful authentication