youtube image
From YouTube: Build a Complete Zero Knowledge Application in Under 30 Minutes

Description

This video was created by Kartik Chopra
You can follow him on Twitter here https://twitter.com/ckartik_

Imagine that you could prove you have a doctor's note without revealing the doctor's details or specialization. Made a small Zero Knowledge Application to do just that!

From Kartik.
- I’m creating a smart contract that has a function which allows patients to pass in their virtual sick notes, provided by their doctors
- The smart-contract asserts a real doctor provided the sick note.

In More Detail:
Doctor Registry
- We’re first creating a registry of doctors in the leaves of a Merkel-tree. These will only be mutable by a single entity, known as the CPSO (https://cpso.on.ca taken from A doctor association in Canada) and forms the foundation of our security model/assumptions.
- We don’t highlight it in the code, but the Merkel tree would be hosted publicly in practice
Verification Process
- The patient-client would pass in a Merkel Witness for the doctor that provided them with the sick note.
- This would remain a private input
- The code/verification function checks the validity of the Merkel-Inclusion Proof by ensuring the tree root, which is currently a public state variable matches the Merkel Witness root.
- If this assertion passes, we check if the doctor’s note that is passed in was truly provided to the patient by the doctor.
- We do this by running Verify on the signature.

Imagine that you could prove you have a doctor's note without revealing the doctor's details or specialization. Made a small Zero Knowledge Application to do just that!