This project demonstrates a secure, privacy-preserving system for managing health records using zkPass, Zero-Knowledge Proofs (zkProofs), and blockchain-based smart contracts. It ensures user data confidentiality while enabling secure CRUD operations on health records.
- Health Record Management: Enables secure creation, retrieval, updating, and deletion of health records via a blockchain smart contract.
- zkPass Integration: Facilitates secure data verification without exposing sensitive user information.
- Zero-Knowledge Proof (zkProof): Verifies user claims (e.g., age, identity, or attributes) with cryptographic assurance, ensuring privacy.
- Frontend-Centric Validation: All proof verification happens seamlessly on the client side, optimizing user experience.
- Secure Communication: Utilizes cryptographic primitives to ensure the integrity and confidentiality of interactions.
If a health API is available in the future, it can be integrated to fetch and sync health records. The smart contract will handle CRUD operations securely, ensuring compliance with privacy standards such as HIPAA. The current implementation uses placeholder data to simulate real-world scenarios.
- React/TypeScript: Frontend framework and language for modular and type-safe development.
- zkPass: Privacy-preserving authentication tool for user verification.
- zkProof: Cryptographic proofs ensuring secure validation of claims.
- Ethers.js: Library for interacting with Ethereum blockchain and wallets.
-
Users submit health record data through a secure frontend interface.
-
The data is encapsulated into a zkProof using zkPass.
- zkPass generates cryptographic proofs for submitted health data using Multi-Party Computation (MPC) and Garbled Circuits.
- Proofs protect user data, revealing only the necessary details required for verification.
- The zkProof is verified on the frontend using the zkPass verification API.
- Verification ensures the authenticity of the user data without exposing the actual data or health information.
- A blockchain-based smart contract facilitates CRUD operations for health records.
- Operations include:
- Create: Adding new health records.
- Read: Retrieving existing records securely.
- Update: Modifying records with integrity.
- Delete: Removing records while maintaining audit trails.
- Based on proof verification and smart contract responses, actions like granting access or updating health records are performed.
-
Clone the repository:
git clone https://github.com/Dannynsikak/zkpass-Bounty.git
-
Navigate to the project directory:
cd vite-project -
Install dependencies:
npm install
-
Set environment variables for the smart contract in a
.envfile. -
Start the development server:
npm run dev
- Add support for additional zkProof protocols (e.g., zkSNARK, zkSTARK).
- Extend proof verification to server-side for hybrid workflows.
- Integrate with decentralized identity systems (e.g., DID).
- Integrate with real-world health APIs for dynamic record management.
- Explore compliance with healthcare privacy standards like HIPAA.