In the modern healthcare system, there's a crucial need to balance the accessibility of health records for operational purposes and the privacy of individuals' health information. Traditional methods often lead to unintended disclosure of sensitive health data, raising privacy and ethical concerns.
Cipher Health addresses this challenge by leveraging blockchain technology and Zero-Knowledge Proofs (ZKPs) to create a secure, transparent, and privacy-preserving health record system.
- Immutable Records: Once health records are stored on the blockchain, they cannot be altered, ensuring the integrity of the data.
- Decentralization: Eliminates reliance on centralized servers, reducing the risk of data manipulation or loss.
- Transparency: Ensures transparency in the process while maintaining privacy, which is critical in healthcare operations.
- Confidentiality: Allows patients to prove their health status without revealing the exact illness or condition.
- Selective Disclosure: Patients control what information they share, enhancing privacy and security.
- Trust: Builds trust between parties, as the verifier knows the information is accurate without needing to see it.
Cipher Health dApp is a decentralized application that enables patients to prove their sickness without revealing their identity or the specifics of their disease.
-
Health Records:
- Stored on the blockchain, ensuring immutability and security.
- Contains information such as doctor's address, endTimestamp, and patientAddress.
- Uses a commitment model to keep sensitive information secret.
-
Commitment:
- A cryptographic commitment hides the actual disease marker.
- Allows proof of sickness without revealing specifics.
-
HealthRecordNFT:
- A unique, soulbound token representing the patient's health record.
- Minted by the patient using a proof generated with their secret parameters (disease marker and salt).
- Verifiable and links to the patient's record without revealing sensitive data.
The Circom circuit is designed to generate a cryptographic proof, ensuring that the patient knows the secret parameters of their health record without revealing them.
- Inputs: The circuit takes both public (healthRecordId, commitment, patientAddress, doctorAddress, endTimestamp) and private inputs (marker, salt).
- Commitment Calculation: Using Poseidon hash, it computes a commitment from these inputs.
- Proof Generation: The circuit outputs a proof that this commitment corresponds to a valid health record.
- addHealthRecord: Adds a new health record to the blockchain.
- issueNFT: Issues a HealthRecordNFT based on valid proof provided by the patient.
- registerDoctor and registerOperator: For managing access and authorizations.
- Uses
Ownable2Stepfor critical operations, requiring two-step for ownership transfer. - Verifies doctors and operators to ensure only authorized individuals can interact with the system.
CipherHealth stands as a revolutionary step in healthcare data management. By harnessing blockchain and ZKP, it offers a unique solution that maintains the confidentiality of health data while ensuring its availability for necessary verification processes. This system not only enhances data privacy but also streamlines the healthcare process, making it more efficient and trustworthy.
Before you begin, you need to install the following tools:
- Node (v18 LTS)
- Yarn (v1 or v2+)
- Git
To get started with Cipher Health, follow the steps below:
- Clone this repo & install dependencies
git clone https://github.com/dzmbs/CipherHealth.git
cd CipherHealth
yarn install
- Run a local network in the first terminal:
yarn chain
This command starts a local Ethereum network using Hardhat. The network runs on your local machine and can be used for testing and development. You can customize the network configuration in hardhat.config.ts.
- On a second terminal, deploy the test contract:
yarn deploy
This command deploys a test smart contract to the local network. The contract is located in packages/hardhat/contracts and can be modified to suit your needs. The yarn deploy command uses the deploy script located in packages/hardhat/deploy to deploy the contract to the network. You can also customize the deploy script.
- On a third terminal, start your NextJS app:
yarn start
Visit app on: http://localhost:3000. You can interact with your smart contract using the Doctor dashboard and Patient dashboard pages. You can tweak the app config in packages/nextjs/scaffold.config.ts.
Run smart contract and zk circuit test with yarn hardhat:test
Project was built on top of Scaffold-ETH 2 template. Visit docs to learn how to start building with Scaffold-ETH 2.
To know more about its features, check out website.


