4 releases
0.1.3 | Jan 24, 2024 |
---|---|
0.1.2 | Jan 22, 2024 |
0.1.1 | Jan 20, 2024 |
0.1.0 | Jan 18, 2024 |
#899 in Network programming
Used in 2 crates
19KB
184 lines
Zero Knowledge Proof Algorithm Implemetaion
How to use this library?
TL;DR
cargo build
(should generate the compiled protobuf in exampls/protos. Note the build.rs file is only for compiling the proto files in example folder.)- Start the server:
cargo run --package chaum_pedersen_auth --example server
- Start the client:
cargo run --package chaum_pedersen_auth --example client
- Take a look at Example folder which implemeted a client and a server that use gRPC as protocol.
The theory
Assets:
- Bob's Asset: Private key: $x, k$
- Alice's Asset: Random key $c$
- Shared Asset: generator $\alpha , \beta$.
Registrition:
$\alpha^x \mod q$ , $\beta^x \mod q$
Authentication:
Bob send $\alpha^k \mod q$ , $\beta^k \mod q$
- Bob calculation: $s = k - cx$
- Alice Verification: $\alpha^s (\alpha^x)^c \mod q$ , $\beta^s (\beta^x)^c\mod q$
Usage
- Put the following crates to Cargo workspace:
Dependencies
~0.7–1MB
~18K SLoC