Roadmap
Phase 1: ZKConsent
First step is to allow the publishing of a new project for an "organizer" (usually a private company") to collect data. Usually companies issue a detailed document to be signed for consent. Upon signing by the participant this document needs to be approved in some cases by an healthcare professional to validate the information about the study is well presented to the participants. The ozkar app will allow to create an account as organizer and issue the consent document on chain trhough an IPFS endpoint which makes the document verifiable. The app should provide an option to issue the document in private mode as some protocols should be hidden from the public.
Phase 2:In-app registration form and escrow contract
Second step is for the organizer to be able to publish a registration form to participate to a study. THe registration form can verify parameters for participation using zero knowledge proof. Plus, the value for participation can be locked in with an escrow contract. Once the data is shared by the participant, the organizer can access/use the data only if validating the termination of the study with the participant thus unlocking the participation incentive. Work done by the MAC! project from https://github.com/marekyggdrasil will be used and discussed in this stage; https://github.com/marekyggdrasil/mac
Phase 3: Research Kit integration
Apple has issued a particularly useful sdk to enable medical research application, its called research kit. Together with carekit it is optimizing usage of apple sensors and hardware stack to collect qualitative data. The phase 3 will explore how to share data with ozkar server from a participant using this kit while integrating with proof issueing to expose data validity without compromising with privacy.
Phase 4: ZKML validation
ZKML can enable advanced validation use cases to improve validations in data collection process. It can prevent issueing and reading and sharing by running a ai algorithm without providing sensitive access. Image processing is a typical use case. Work is being done for zkml with o1js https://github.com/only4sim/Snarky-ML and this stage will rely on progress made in this porject as well.
import { Bool } from "o1js" import { PackedStringFactory } from "o1js-pack"
const RANDOM_DNA = 'cgcgtcggaagcatcggatcgtatgatcttcccctatagctatgtgtgggcgttgacattagataaggcgggcatacgccagagttgtactagcgtggatcgttctataacggatgaccttgagaattgcagacctcgcaacactacgcagcacctctaggctgggaaagaaaatccccgcaaacgtcggaacgcgctctgcggattgtacgggctgaggataaatataaacgtagcggcgcctttaaagaaacgaagctaacgtatctatgcgccgtcgtttctatgatcacaacgcgccttttttaatgtctgcctaagaagggttaactgttacccatgcggtaaacgaatggaagaaacggctttccgactgtatatacaacggccccgcttgctcagataagattgaggcgagcaaaccgtctcatttatacttcgtgggaaccgctcgagcacacaacggcctagtgcaggtgaccatactgggatgtgcgctgttatcttcattgtataactcaggagctgggagtcactatggcacggaagcgtcgtcggctgtttgggtaacagcagagcagcctaaacaaactattaaattccaccaagcacaccgtttcagtgacaaggcatcccttgtggaacattcttcggtccatgaaataacgccgtatggagttgaagatggcagcagctagagtgaattagcaaagaaacgtgaatacaactcaaaaatgcagttttattccagtatggatcccagttataacctgatacagcgagaattgtttgatcgaaacggaatgcgcgcccgccgagtcatctaacaagctctgtgaggcgttgagatatacactatgacgcgaacataagcccgtcatgcgagccaaacccgctacttggacgcagttacaaagtccgttgaagagcccatgtttgtcggttgaagcgccctataccggtttctgatatttgcaccggtgtgctacgctttgcgttt'
class Gene extends PackedStringFactory(6) { }
const targetGene = Gene.fromString('ggaagc');
console.log('Target Gene: ', targetGene.packed.toString(), '\n') let match = Bool(false); for(let offset = 0; offset < RANDOM_DNA.length; offset += 6) { const gene = Gene.fromString(RANDOM_DNA.substring(offset, offset + 6));
console.log(gene.packed.toString()); // compare the field value of gene to target gene match = Bool.or(match, gene.packed.equals(targetGene.packed)); }
console.log(match.toBoolean());