New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Cryptographer Matthew Green on ZK Tech and Privacy | Matthew Green - Johns Hopkins University

Ethereum DenverWed, Oct 9, 2024, 12:00 AM

APPLICATIONS FOR ETHDenver 2024: #YearOfTheSpork ARE OPEN APPLY NOW https://ethdenver.com/apply

Transcript

I might yeah I want to watch this it's going be learn a lot welcome to the stage Matt take it away Matt thank you all right thank you okay so this is going to be a bit of a nerdy talk and I hope this is a nerdy audience and you don't mind that too much um before I get started let me introduce myself I'll tell you who I am I'm a professor I am a professor at Johns Hopkins I've been working in this area for many years uh for at least a decade I mostly work on applied cryptog graphy which covers a lot of different areas um I write a blog and uh you should please read it it's called uh it's blog. cryptography engineering.com I also co-founded a cryptocurrency back in the days when there weren't very many cryptocurrencies and that was called zcash um I'm currently working on a couple of other project or advising a couple of other projects that also work on privacy so I've kind of been in this area for a while um and it's kind of my favorite research area because I think the most interesting things in crypto are happening right here so the panel that's going to come up after me is called how ZK Tech can fix the internet's original sin so let me tell you what that actually is actually want to talk about that quickly what is the internet's original sin and why do we think cryptocurrency is going to do any better than the internet did especially if the internet is kind of broken from the start I mean cryptocurrency lives on top of the internet so I want to take us back and I I actually wasn't able to find charts that go back more than 10 years but I want to take us way back to 2004 14 and this is a chart that shows you the percentage of webpage loads in Firefox that were encrypted and we like to believe that like we've solved all the problems of security on the internet but this is 10 years ago and things are kind of a disaster we're at about 30% of internet connections are encrypted that includes your bank that includes everything you do today I'd like to believe we're at about 100% we're about 99 to 98% and that's because over the last 10 years a lot of people decided that this particular situation wasn't acceptable and there were a few reasons we made the decision to change the direction we were going in and this person who actually made his revelations back in 2013 was one of them what we learned is that while we were fooling around on the internet we were building all kinds of protocols and building websites and doing this the NSA was basically scooping up huge amounts of data this data was valuable to someone it was under attack and because that data was so valuable corporations realized that it wasn't that hard to encrypt it so we got to 100% partly because of that Revelation and just to continue the analogy to cryptocurrency today we also had kind of our own Regulators back then right this is James Comey James Comey was the head of the FBI at the time and his big thing was this this project that he called going dark and what going dark was was the idea that actually despite the fact that almost nothing was actually encrypted on the internet too much stuff was being encrypted on the internet and his big thing was let's stop that let's stop making everything so private because law enforcement won't be able to read your text messages now how many of you use signal today okay that's a great showing I don't think you're like a normal audience but like that's a that's a pretty good showing all right so I'm not going to say we've won that particular battle but I will say that the people who replaced James Comey all over the world they don't talk about whether encryption is a good idea or not anymore they talk about how they can make encryption that's a little bit safer Against Child abusers and people Distributing illicit materials so there's been a sea change in that that battle at least at some philosophical conceptual level has been won and it's not really clear why it was won but we came through the other side and we'd made a big change now moving over by the way this is just a graph it's actually from 2018 I just want to show you this um there are a bunch of blue circles on these These are messaging companies that have encryption built in and you can see that there are a lot lot of people using encryption except unfortunately in China today nearly every one of those big blue circles that says optional encryption has been filled in or is being filled in with default encryption unfortunately the green circles are the outliers that that remain unencrypted so that that's kind of where we're at right now now cryptocurrency is a new technology and despite the fact that it's 10 years old it's a very new technology it's a technology we're still trying to figure out we're trying to figure out how we add privacy to it and the problem is is of course and I'm not saying anything that everybody here doesn't know virtually every transaction we make on a smart contract system on a payment network is completely public everybody can see every single detail of what we're doing there's a little sumity but that's about it and it sort of feels like an inevitable feature of consensus systems right we need to reason over everybody's data it seems very hard to add privacy but we know it's not impossible because there are a few private chains that exist um the problem is that they're very limited mostly they just do payments either either they're they're just doing payments or they're not broadly widely used right like they're not built into systems and then unfortunately when they do get widely used terrible things happen like people get arrested and uh this happened uh two summers ago with tornado cash where Tornado was basically sanctioned in the middle of an ethereum chain the entire tornado cash application was basically hit with a hammer and everybody who had any access to those addresses or any history of those addresses was basically blocked and the sad thing is everybody's lives just kept going and it proved that it was possible to surgically remove privacy from a smart contract system without any major consequences or anybody getting too upset about this without the whole system breaking down so that's kind of an interesting sad feature of what's happening today so from here I want to talk about some of the Technologies and the techniques we have to fix that problem um and then we're going to all come up here and we're going to sit down we're going to talk about uh there are a bunch of great panelists we're going to talk about some of these ideas and what we can do with them okay I this is the part that gets a little nerdy so I want to show you in my my particular timeline a timeline of the inventions of major cryptographic Technologies and they go way back to the beginning and and I wish I'd actually put numbers and dates on this timeline they are not the 2000s this timeline begins in 1978 and it really kind of goes through the present day but like a lot of these things go way back symmetric key public key encryption these are already used in in cryptocurrency systems zero knowledge we've hit zero knowledge was invented in about 1983 and is now being finally deployed 30 years later in cryptocurrency systems multi-party computation invented in 1982 and 1984 finally we're just hearing people talk about using this um there are a few other things here you'll hear a lot about if you pay attention to The Cutting Edge kind of hype stuff fully homomorphic encryption that's the ability to encrypt uh to compute un encrypted data and then these are the things you've probably heard of succinct proofs is another one you probably don't hear as much about cryptographic obfuscation and witness encryption but I'm sure you will in 10 years so let's talk about zero knowledge and that's really the topic of our panel so we're going to talk about Z ZK I'm sad that the term ZK gets used so much it's such a cool term like zero knowledge it sounds like it should apply to everything but in cryptography it has a very specific meaning it means that I can prove the truth of a statement without giving away the information that I use to prove the truth of the statement so the obvious example is I know a key to spend some coins I know where the coins are on the Chain so I can spend them that's how we build privacy preserving crypto systems is to say I know this information but I can use zero knowledge to prove to you I know this information without revealing that secret information and that private information about everything I can also prove things about smart contracts in fact there are a whole bunch of people in that room building amazing ZK EVMS that aren't really for privacy but at least do this basic thing they take a program they say I ran it correctly on some inputs they don't care whether the inputs are secret but they have the capability to do that and the basic technology they're using is called a ZK snark or a cinct proof and what's special about them is they give us very small proofs even if the program is a million lines long we get a proof that's a few hundred bytes or a few kilobytes long and this is a lot right it gives us all of the ingredients for private pay pays for things like zcash and Monero and tornado cach and it's also great for scalability because if we don't care about privacy we can just make these proofs for everything we can Crush an entire blockchain down to a kilobyte which is incredible and that's what they're all doing out there um but it's not necessarily enough for every privacy application so ZK has a lot of problems one of the ones that is the biggest is it relies on one big assumption which is that you the person who is making the transaction have all of the secret data in the transaction and that's not always the case so when you run a smart contract you're actually Computing over a whole bunch of things so think about the case of a DEX or an amm right so you're sending in a transaction saying swap some coins but the actual data you're reasoning over is a price feed for example or it's an order book or it's a whole bunch of other stuff that may be public and that's the best case but maybe it doesn't even exist yet like you're writing the transaction it's not going to be evaluated for 5 minutes it's going to go out there it's going to encounter new information or maybe it reasons over joint state so it's very very hard to use ZK to solve all of our problems and so we need new technology and one of the the the big Technologies people are excited about is this idea of trusted execution environments so rather than just relying on ZK to solve all our problems we'll use computers that nobody can hack into and when I say computers that nobody can hack into like the problem start to be obvious right like maybe this isn't such a great assumption um so we can build all sorts of trustworthy computers chips that have special capability and maybe they even output ZK proofs to prove they did the right thing sounds like a really good idea and they are very useful as a layer on top of existing security systems and they're good for hardening existing systems what's not so great about these systems is that when you implement them in a way where compromising hacking into any trusted execution environment compromises the Integrity of the entire system the system becomes very fragile so this is not great and so there are a few examples this um the secret network was doing this they were basically letting volunteers Supply their own tees to run calculations for the whole network if one volunteer hacks into their te or simulates it the entire network can be fooled you can get inflation you can get all sorts of terrible things so this is not necessarily the best solution and I also know these two guys they're colleagues of mine and they basically break every te system every year and that's kind of their job so it makes me trust them less the next technology we run into is called multi-party computation how many people have heard the term multi-party computation sure and you think it means making signatures right like really secure signatures and that is an application of it but actually multi-party computation lets us compute anything we can compute any computation you want to do among a whole bunch of people without revealing to the other people our secret inputs so this is perfect for a blockchain right we all have secret inputs We Run The blockchain and we're done the problem is the result of this is that to make this work everybody has to talk to each other and they have to talk to each other a lot it's not send one message and go it's go back and forth a million times and that's just not how blockchains work people don't stay online with their secret information so maybe we can Outsource that to validators and they can run the MPC for us and there are people people looking at this trying to do it but there are huge research problems in how you keep that state the secret information alive as validators come and go so there's a lot of work to do there and people are thinking about how we could do that the last technology and I don't want to go over here that you're hearing a lot about right now is called fully homomorphic encryption or FHA fhe basically lets you take encrypted data you encrypt your input you want to send it to a Smart contract and have it be calculated on but nobody can see it it's fully encrypted and then the smart contract instead of decrypting it and calculating it will actually take the encrypted data and Maul it and like mess with it to cause computation to happen within the cipher text it's a brilliant beautiful idea people spent decades figuring out how to do it the problem is when you finish that mauling you get a result but it's still inside the cipher text does anyone know how you get it open how do you get that result out well the answer is right now uh maybe we use multiparty computation to do that so we have a bunch of servers who have just the secret key for the cipher text all the computation happens using FHA but this last phase where we decrypt the result happens where a bunch of validators with a secret key will all work together to decrypt it's not a terrible idea um I don't know if you remember this when I was a kid there was this book about these this king who had a problem where mice were eating his cheese so we got cats and then the cats became a problem so he got dogs and so this whole thing kind of feels very self self-referential where we introduce one technology but to make it work we have to introduce another so it's not great I hope I'm not going over the last technology I want to talk about because someday we're going to figure out how to do this is called cryptographic obfuscation and I'm only telling you this not because we can do it today but because this is the technology we want this lets us take any program we want any smart contract we can turn it into an encrypted program I can send it to a blockchain the blockchain could run that program and then at the end instead of an encrypted output I get the actual output and it's an amazing technology the problem is today the best we know how to do with cryptographic obfuscation is at best build programs that are you know if I have a very tiny program that are gigabytes in size and take years or hours at least to run so this is a technology that we may make huge progress in someday but we're just not there but this is what we want and someday we'll build it maybe out of all these existing tools so this is kind of where I'm going to let off so we have all of these Technologies I'm not talking about the problems we're trying to solve but in the next panel which is about to come up here and I think you should all probably come up here we are going to talk about some of the applications for these privacy Technologies and why we all need them so thank you for

Automatic transcript — names and jargon may be misspelled.