Photo by Michael Förtsch on Unsplash

Can you prove that you know the answer to a question, without revealing the answer? Here’s zkSnarks, Smart Contracts and Ethereum

--

Please do not think that Bitcoin in any way represents a modern distributed ledger. It is basically the Ford T of blockchain, and where Ethereum and IOTA can be likened to a Tesla car in comparison.

Overall, Ethereum advanced the Merkle Tree and blockchain chain approach of Bitcoin and added an improved proof of work (with Gas) and smart contracts. With these smart contracts, we could now run trusted code on the blockchain, and where we could pass parameters into and out of functions hosted on the public ledger.

This code, though, can be seen by anyone reviewing the contract, and where they can also see the values used. We thus need methods which can preserve the privacy of the data and code used, and so we turn to zkSnarks. These allow us to prove things, without actually revealing the values we have used. For example, a student (Peggy) may be posed with:

y=3x²+2x+5

and be asked to show they have a valid answer for x and y, and where they do not reveal these values. In this case, a value of x=1 will give a y value of 10. In zkSnarks, the Teacher (Victor) then just receives a zkSnarks result for the proof, and they can check it is valid.

--

--

Prof Bill Buchanan OBE FRSE
ASecuritySite: When Bob Met Alice

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. Based in Edinburgh. Old World Breaker. New World Creator. Building trust.