ETHKL#5 - Part1: Ken Chan introducing Zero Knowledge Proofs in Ethereum
Ethereum Malaysia·Wed, Oct 9, 2019, 12:00 AM
Kuala Lumpur based blockchain developer Ken Chan introduces Zero Knowledge Proofs in Ethereum. Overall presentation and detailed introduction to ZK- SNARKs
Transcript
[Music] before so again so a shout out to our partners hello golden teeth a scan for taking the time from the ID jobs to bring people from around the world over and especially thanks for our speakers from Macomb Bell Labs etherion Foundation and all the way from Switzerland change security before we start to get our guest speakers to speak one of the things that we do at ETL is we get one of our local developers to just give a small demo or presentation on stuff that he'll be working on so can we get Ken chime I introduced entropy so change the blocks in developer he was working with analytics one Keith I interesting theory I didn't know I can barely create the most popular check act for Pokemon go in Hong Kong just a random stuff that we find out but this is we argue a are run over a pass from ok right welcome everyone since it's your first time here but I will try to make a good impression of ETL for you guys right so I'm going to introduce to you what our zero knowledge proof so zero knowledge proof have been popularized recently by another cryptocurrency sea-tac and how they run you through how it actually works right so that's right to a very classical example of an election on Europe's let's see if it's possible right so how do we do it is first we will have a smart contract and Trump and Clinton right so they'll be started with zero zero and they'll be competing against each other so how it would be classically done in here is that we will have buta one will be voting for Trump plus one for the two and so on so after that we can conclude that Trump since Trump has the most votes is the winner of the election but obviously this is a very suboptimal way of doing things why because we can see that the vote the one important to is actually exposed so they can actually be politically part of that or - can actually prevent those sports from actually entering the system since they control everything that enters in the lottery right so the most optimal way of doing this is actually too high who they both work so each boat away she put cut two words one for from and one for pimping so how it's going to look like is that boat Abajo actually plus one for Trump and Bhutto one also plus zero for Clinton so that indicates that the voter one wants to vote for Trump so this is the optimal way of doing things and at the end of the round we want to conclude that Trump wins without actually displaying the total number of votes so let's run through how we can do that with zero knowledge proof right so zero knowledge proof the definition the high-level definition of it is approval and prove the verifier which is another party that they have knowledge of X without revealing information about X okay this seems a bit paradoxical right so let's say I know Harry's birthday and she asked me to prove it to him that I know is birthday how I do that how to say his birthday all right so that's the only way to prove it but in cryptography you can actually turn out you can reveal that you know something without me feeling that something let's see how we can run through that okay so first I'll give you an example of a zero knowledge proof so I will need a volunteer can are you can yell be all right okay so here okay so I have two pens right yeah okay so I have two pens here so one is a blue pen one is a black pen so assume curry is colorblind right let's harvest a lip line and colorblind means you cannot differentiate between blue and black so yeah I don't when when you color by you're not blind all right okay so assume hari is colorblind prove to him that these two are different colors because it's his colorblindness he cannot know such a thing so I want to prove to him that leads to a different colors without revealing the actual colors that this is a blue pen this is a black pen and how I do that okay so first harif will actually put the two pens behind his back and I can choose to either shuffle or not shuffle the pen yes okay right so here we can see that order has not changed blue and I'm black right so we can see so I can say it to him okay the pen has not been shuffle then hurry okay yeah you're right I have a shuffled it because I know I'm the one shuffling it right okay so there might still be the chance that I am guessing there's a 50% child damn right so let's try that again it's time try something okay pick it out right so I can tell him that it's not shuffle because the order hasn't changed blue and a black right so we can play this game on and on and this decreases the chance that I'm right so what does this mean so this means that I can actually prove the hurry that I know the two different colors are different without actually building the colors to him so that's quite mind-boggling to me initially right so as it turns out okay as it turns out the 20th round that you're doing this you can actually decrease the chance to one in a million so ZK starts are one of the other thing for zero knowledge that a lot of cryptographers are using right now so it's almost like a branch of it there are a few techniques they are used this is one of them so I will cover above all the other definitions but white stands for is your knowledge zero knowledge is the example that given you just now that you don't reveal knowledge about something so what wait the cobbler is boxing and not interactive arguments of knowledge just means that is an assertion of truth right so what is succinct and not interactive me in the key start is one of technique used so something means that approver which means that it was me just now in my example generates something called a proof string so proof string is like a small text ball kind of thing it runs a few kilobytes large it means that it is succinct because it is a small proof string and then you have a very fire who actually verifies that the proof string is correct so this is the meaning of non-interactive this is only a one step process where the difference is that the example just now it was an interactive example where we actually verified against each other 20 times so this happens only 1 times that's why it's more efficient right ok so how it works is that our just cover this very briefly so how can we make a smart contract private with the case-knives right so how works from a very broad level is that we turn a code into a bunch of circuits so this bunch of circuits are basically like gates where let's say a class represents a gate a multiplier a prison represents a key then on the other hand you generate out something called toxic waste so this toxic waste is it's almost like a dangerous dangerous parameter that can be used by an attacker to actually affect the network by creating something come across proofs which I'll cover later right okay so generating approve okay verifying a proof so verifying a proof the output would meet in a true or false whether the proof is correct or not so maybe after this presentation I can go into the discussion if you guys are interested ok so you think the toxic wish you can actually generate some fake proofs so in the case of let's say C cache we can actually print more money we can create more supply of C cash coins right so why as UK snarks popular nowadays so I'm going to cover that so it is it has something properties that make it very strong cryptography and it's led by the C cash team so it's math is backed by math the difference with other private crypto currencies like Manero or like z coin is that it's not coin joining it's more of very solid cryptography so the other point about zk snart's they are very important is shockproof because like we see just now that the property of ZK stars is that it's succinct means that it's verified very quickly so the disadvantages of ZK snart's is that like we can see that is a trusted set up for every program or every contract that you want to execute so this actually brings in the issue that you need to actually find a way to dispose of the toxic waste because if you don't dispose of the toxic waste you run the risk of almost defeating the purpose of your program right so ok bla bla bla but you compute that patiently expensive so this you can actually observe in crypto currencies like z cache where it takes a few seconds she verify a transaction and generate proof so this is yzk stars are still not as popular so in here IAM right so there are a few tools out there but they are not as popular we have Socrates which is the case not to box what it does is that you send in a smart contract and it generates out some the circuits the ZK stock so if it's like I mentioned before and then yep all the other libraries okay thank you
Automatic transcript — names and jargon may be misspelled.