How abhiram-1508/privaccess-a-zero-knowledge-framework-for-role-based-access-control works
PrivAccess is a web-based, role-based access-control demo combining Schnorr proofs with a location-aware, QR-driven door workflow; it also includes a Circom/Groth16 geohash-prefix proof path. The principal flow is a user scanning a door QR, the client obtaining location and producing a proof, and the Rust server checking the request before granting or denying access. The sampled server also exposes room/assignment and door-status features. Some wiring is documented rather than visible in the excerpts, so those relationships cite the README; unsampled implementation details are not inferred.
Main entry points: main.rs Axum Routes · geohash_zkp.js Geohash Prover · mobile_app.html Mobile Scan UI · zkp.rs Proof Verification
Components 17
User Clients
- Web Interface
priv_access_rs/templates/index.html - Mobile Scan UI
priv_access_rs/templates/mobile_app.html - Geohash Prover
priv_access_rs/static/js/geohash_zkp.js - Schnorr Prover
priv_access_rs/static/js/zkp.js
Access Server
- Axum Routes
priv_access_rs/src/main.rs - Door Display
priv_access_rs/templates/door_display.html - Dynamic Door QR
priv_access_rs/src/main.rs - Door Status Stream
priv_access_rs/src/main.rs - Access History
priv_access_rs/src/main.rs
Proof Systems
- Proof Verification
priv_access_rs/src/zkp.rs - Crypto Parameters
priv_access_rs/src/crypto.rs - Geohash Circuit
zkp_circom/geohash_prefix.circom - Groth16 Prover
zkp_circom/generate_proof.js - Groth16 Verifier
zkp_circom/verify_proof.js
Access Domain
- Roles & Permissions
priv_access_rs/src/rbac.rs - Room Assignments
priv_access_rs/src/main.rs
Other components
- User
Connections 18
- User → Web Interface: starts session
README.md - User → Mobile Scan UI: scans QR
README.md - Web Interface → Axum Routes: requests access
README.md - Mobile Scan UI → Geohash Prover: starts location proof
priv_access_rs/static/js/geohash_zkp.js - Geohash Prover → Axum Routes: posts proof
priv_access_rs/static/js/geohash_zkp.js - Axum Routes → Proof Verification: verifies proof
README.md - Proof Verification → Crypto Parameters: uses parameters
priv_access_rs/src/zkp.rs - Axum Routes → Roles & Permissions: checks role
README.md - Axum Routes → Dynamic Door QR: serves QR routes
priv_access_rs/src/main.rs - Dynamic Door QR → Mobile Scan UI: directs scan
priv_access_rs/src/main.rs - Axum Routes → Door Display: renders door page
priv_access_rs/src/main.rs - Axum Routes → Door Status Stream: routes status updates
priv_access_rs/src/main.rs - Axum Routes → Access History: records access
priv_access_rs/src/main.rs - Axum Routes → Room Assignments: checks section room
priv_access_rs/src/main.rs - Geohash Prover → Geohash Circuit: proves prefix
- Groth16 Prover → Geohash Circuit: generates witness
zkp_circom/generate_proof.js - Groth16 Prover → Groth16 Verifier: emits proof inputs
- Schnorr Prover → Proof Verification: matches proof scheme
README.md