This is a proof-of-concept implementation of the DARC protocol, described in the paper "DARC: Decentralized Anonymous Researcher Credentials for Access to Federated Genomic Data".
To be able to compile and run Circom circuits see https://docs.circom.io/getting-started/installation/.
Navigate to ./groups.
create an off-chain groups using the scripts in ./groups by running the command:
ts-node ./Generate.tsNavigate to ./zkp/circuits/.
To compile the circuits and generate the proof run the command:
bash ./runCircuit.shNavigate to ./contracts
The main contract is DARC.sol which contains the logic to issue the credential.
CredRegistry.sol is the registry for the credentials
Groups.sol manages the roots for the merkle forest and contains details on each group within the forest.
verifier/verifier.sol is the snarks verifier contracts generated from the circuit.