This project implements a simple server/client authentication using Chaum Pedersen zero knowledge sigma protocol. There are two variants of this protocol implemented, one is using exponentiation, the other one is using k256 elliptic curve.
When run in docker-compose or locally, by default, the grcp server is exposed on http://localhost:50051 and web client is exposed on http://localhost:8080.
make build
make test
make run
make run_local_server
make run_local_client
Install grpcurl to hit api endpoints from the command line. https://github.com/fullstorydev/grpcurl#installation
grpcurl -plaintext \
--d '{
"user": "testuser",
"y1": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL3GqnpYYAs=",
"y2": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA2XK7fK8mKg="
}' \
localhost:50051 zkp_auth.Auth.Register
grpcurl -plaintext \
--d '{
"user": "testuser",
"r1": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWvHBn7ds4M=",
"r2": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0FAkZel/Y8="
}' \
localhost:50051 zkp_auth.Auth.CreateAuthenticationChallenge
grpcurl -plaintext \
--d '{
"auth_id": "11fc1350-1288-4bfd-9322-f0e9d491cd77",
"s": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAl8UA="
}' \
localhost:50051 zkp_auth.Auth.VerifyAuthentication