{"id":1013,"date":"2021-09-01T05:14:10","date_gmt":"2021-09-01T05:14:10","guid":{"rendered":"http:\/\/nitk.acm.org\/blog\/?p=1013"},"modified":"2021-09-01T05:14:10","modified_gmt":"2021-09-01T05:14:10","slug":"zero-knowledge-proof","status":"publish","type":"post","link":"https:\/\/nitk.acm.org\/blog\/2021\/09\/01\/zero-knowledge-proof\/","title":{"rendered":"Zero Knowledge Proof"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\"><strong>Prove, you know a secret without actually revealing it, possible?<\/strong><\/h4>\n\n\n\n<p>Your personal data like your contact information, your taste, or even your behaviour patterns are very valuable. Companies benefit from this data in two ways: by using the data to optimize the services to better appeal to you and resell it to other companies. A lot of companies try to collect as much information about you as they can so that they will be able to sell you more ads, give you a better recommendation or keep you longer on their platform<\/p>\n\n\n\n<p>Can we put people back in control of their data?. Now of course you could say don\u2019t use services that collect personal data. For instance, if you don\u2019t agree with the way Facebook uses your data you could just decide to not sign up for it or even delete your account. But it\u2019s not that simple, we don\u2019t always have a choice. Some services genuinely require the data to serve you. Try for example getting a loan from the bank without revealing your financial history or getting health insurance without sharing health information with the insurer. Not possible right?<\/p>\n\n\n\n<p>Is there any way by which it can be showed that your credit score is enough to get a loan, without disclosing the actual credit score, or you were in a healthy range on all metrics without revealing your actual health information?<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Zero-Knowledge Proof \/ Zero-Knowledge Protocol (ZKP)<\/strong><\/h4>\n\n\n\n<p>It\u2019s a cryptographic method that allows one person(the prover) to prove to another person(the verifier) that they know a value X, without conveying any information apart from the fact that they know a value X<\/p>\n\n\n\n<p>Few examples to gloss the Protocol well include-<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Example 1<\/strong>:Prove you know Waldo\u2019s location, without sharing the location-<\/h4>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/09\/znp2-3-1024x512.jpg\" alt=\"\" class=\"wp-image-1018\" width=\"556\" height=\"278\" srcset=\"https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/09\/znp2-3-1024x512.jpg 1024w, https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/09\/znp2-3-300x150.jpg 300w, https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/09\/znp2-3-768x384.jpg 768w, https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/09\/znp2-3-1536x768.jpg 1536w, https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/09\/znp2-3.jpg 1612w\" sizes=\"auto, (max-width: 556px) 100vw, 556px\" \/><\/figure><\/div>\n\n\n\n<p>Alice and Bob are racing to find Waldo in the above scene:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"238\" src=\"https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/09\/znp3-1024x238.png\" alt=\"\" class=\"wp-image-1019\" srcset=\"https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/09\/znp3-1024x238.png 1024w, https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/09\/znp3-300x70.png 300w, https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/09\/znp3-768x179.png 768w, https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/09\/znp3.png 1393w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<p>Alice: I know where Waldo is!                                                                                    Bob: Give me proof without revealing his location.<\/p>\n\n\n\n<p>Alice brings up two solutions to prove her knowledge.<\/p>\n\n\n\n<p><strong>Proof 1:<\/strong><\/p>\n\n\n\n<p>Alice cuts a hole in the opaque sheet of cardboard. She places the cutout part on the original scene. Here only Waldo is shown, his coordinates relative to the rest of the scene are still unknown.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"304\" src=\"https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/09\/znp4-1024x304.png\" alt=\"\" class=\"wp-image-1020\" srcset=\"https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/09\/znp4-1024x304.png 1024w, https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/09\/znp4-300x89.png 300w, https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/09\/znp4-768x228.png 768w, https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/09\/znp4-1536x456.png 1536w, https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/09\/znp4.png 1595w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<p><strong>Proof 2:<\/strong><\/p>\n\n\n\n<p>Alice cuts out Waldo from the scene and shows Bob the snippet. To ensure that Alice hasn\u2019t printed Waldo\u2019s picture Bob can watermark the back of Alice\u2019s scene page.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"304\" src=\"https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/09\/znp5-1024x304.png\" alt=\"\" class=\"wp-image-1021\" srcset=\"https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/09\/znp5-1024x304.png 1024w, https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/09\/znp5-300x89.png 300w, https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/09\/znp5-768x228.png 768w, https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/09\/znp5-1536x456.png 1536w, https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/09\/znp5.png 1595w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Example 2<\/strong>: The Magic Cave-<\/h4>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"219\" height=\"230\" src=\"https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/09\/znp1.png\" alt=\"\" class=\"wp-image-1014\"\/><\/figure><\/div>\n\n\n\n<p>Consider a cave containing the magic door between C and D which requires the secret word to open it.&nbsp;<\/p>\n\n\n\n<p>Consider two persons, P(the Prover) and V(the Verifier). P claims that P knows the secret magic word required to open the door and V does not.<\/p>\n\n\n\n<p>Hence a system is devised which allows proving that P knows the secret word without actually revealing it to V. Initially, both P and V are standing at A.<\/p>\n\n\n\n<p>Now the game begins-<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>P enters the cave and takes either path B-D or B-C randomly. While P does this V waits outside the cave and is not allowed to see which path P took.<\/li><li>Then V enters the cave and shouts out the path randomly through which P should return, either D-B or C-B.<\/li><li>Now two cases arise-<\/li><\/ul>\n\n\n\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<strong>Case 1<\/strong>&#8211; P knows the secret words:\u00a0<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;P can return through the path told by V.<\/p>\n\n\n\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<strong>Case 2<\/strong>&#8211; P doesn\u2019t know the secret words:<\/p>\n\n\n\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0For this case, P can only return via the path P came in, if this is the path V told, then it\u2019s good, if not P is caught lying. So there is a 50% chance that it can still be claimed that P knows the magic words, due to good luck that day.<\/p>\n\n\n\n<p>The probability of \u00bd is not good enough. So P and V again repeat the process. At every iteration chances of P not knowing the magic words and being able to claim that P does know it, decreases. After 20 iterations the chances become one in a million.<\/p>\n\n\n\n<p>Zero-Knowledge Proof must satisfy the following properties-<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Completeness <\/strong>&#8211; Everything that is true has a proof.<\/li><li><strong>Soundness<\/strong> &#8211; Everything Provable is true.<\/li><li><strong>Zero-Knowledge<\/strong> &#8211; Only Statement which has to be proved is revealed<\/li><\/ul>\n\n\n\n<p>Consider the Alice and Bob example-<\/p>\n\n\n\n<p>Soundness: Assume Allice doesn\u2019t know Waldo\u2019s location and presents random pieces of her scene then, the cardboard holes display random images without waldo. In simple terms, Alice\u2019s proof system does not let her cheat.<\/p>\n\n\n\n<p>Completeness: As long as Alice finds Waldo, she\u2019s able to consistently use her proof to show Waldo in each iteration. Simply, Alice\u2019s proof system convince Bob that she found Waldo<\/p>\n\n\n\n<p>Zero-Knowledge: As Alice proves to Bob that she has found Waldo, the only statement revealed was \u201cAlice has found Waldo\u201d without revealing Bob\u2019s location. Simply, Alice\u2019s proof system prove her victory to Bob, without revealing her knowledge&nbsp;<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Why use ZKP?<\/strong><\/h4>\n\n\n\n<p>Over the past few years, we were accustomed to the large banks and firms accessing and employing our personal data to deliver an enhanced experience.<\/p>\n\n\n\n<p>Then entered Blockchain technology which enabled users to act anonymously and perform transactions with high-end security, in simple terms gave users control of their privacy and future back.<\/p>\n\n\n\n<p>But has Blockchain really succeeded in doing so?<\/p>\n\n\n\n<p>The answer is NO.<\/p>\n\n\n\n<p>Many Blockchain networks use public databases. Anyone having the internet can view the list of the network\u2019s transaction history. All the details associated with the transaction and all the wallet details can be seen, but the name of the user will still be unknown to them. Instead, they will come across as a public key- the unique code representing the user on the blockchain network.&nbsp;&nbsp;<\/p>\n\n\n\n<p>The public key was created to safeguard your privacy to some extent. But it is still possible for one to expose you.<\/p>\n\n\n\n<p>ZKP does not involve any complex encryption method and does not require anyone to reveal any sort of information.<\/p>\n\n\n\n<p>In regular blockchain transactions, when an asset is sent from one end to another, the details of that transaction are visible to everyone in the network. However, in a zero-knowledge transaction, the aim is to prove the statement \u201cthis transfer of assets is valid\u201d without revealing anything important about the transfer itself.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Applications of ZKP-<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Messaging in the Blockchain system:<\/strong> In messaging, end-to-end encryption is imperative so that no one can read your private message besides the one you are communicating with. To ensure security, messaging platforms ask users to verify their identity to the server and vice-versa.\u00a0                                                                                                            But, with the advent of ZKP, they will be able to build end-to-end trust in the messaging world without leaking any extra information<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Vote Verification:<\/strong> The most obvious example of applying ZKP with blockchain alludes to their democratic role in checking votes. ZKP\u2019s can give reliable answers for auditable voting by recording the votes on a public blockchain (like ethereum).                                                           Subsequently, voting processes would not need any third-party confirmation alongside excluding the requirement for restriction. ZKP\u2019s can permit voters to demonstrate their eligibility for casting a vote, along these lines preventing exposure of their sensitive personal data. Likewise, voters can request immutable evidence for consideration of their vote in the final vote count.<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"800\" src=\"https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/09\/znp6-1024x800.jpg\" alt=\"\" class=\"wp-image-1022\" srcset=\"https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/09\/znp6-1024x800.jpg 1024w, https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/09\/znp6-300x234.jpg 300w, https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/09\/znp6-768x600.jpg 768w, https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2021\/09\/znp6.jpg 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h4>\n\n\n\n<p>Zero-Knowledge Proofs could unleash a revolution when it comes to our online privacy. We can limit how much information a certain company has on us, while the company has just enough information to offer you a service or to comply with the regulation. ZKP is not perfect, does have certain limitations. Like the fact that it uses a lot of computational power. But it\u2019s a lot better than just giving all our data away and let it be collected in huge databases. The use of ZKP will have an enormous impact in finance, health care, and other industries, by enabling transactions while safeguarding data privacy.<\/p>\n\n\n\n<p><em>&#8211; By Tanmay Ranaware, Third Year Department of Electrical and Electronics Engineering <\/em> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Prove, you know a secret without actually revealing it, possible? Your personal data like your contact information, your taste, or even your behaviour patterns are very valuable. Companies benefit from this data in two ways: by using the data to optimize the services to better appeal to you and resell it to other companies. A&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[25,10],"tags":[113,347,345,348],"class_list":["post-1013","post","type-post","status-publish","format-standard","hentry","category-sanganitra","category-tech","tag-blockchain","tag-vote-verification","tag-zero-knowledge-proof","tag-zkp"],"_links":{"self":[{"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/posts\/1013","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/comments?post=1013"}],"version-history":[{"count":1,"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/posts\/1013\/revisions"}],"predecessor-version":[{"id":1023,"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/posts\/1013\/revisions\/1023"}],"wp:attachment":[{"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/media?parent=1013"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/categories?post=1013"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/tags?post=1013"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}