Privacy as a Primitive
Pragma London · 14 Mar 2024 · 16:30
Aztec's Joe Andrews argues that Ethereum's public ledger exposes every transaction and balance, and that adding privacy to the EVM does not work because other nodes need public data to verify. Aztec instead runs as a rollup that inherits Ethereum security with its own execution environment, where private functions run on the user's device with a locally generated proof and public functions run in the usual way. Contracts are written in Noir, which lets a developer mix both kinds of function in one contract, and the stated target is a complex private transaction proven on a phone in under 30 seconds, with a full testnet hoped for in the third quarter.
Speakers
Topics
From Pragma London, hosted by ETHGlobal.
Transcript
[Music] all right with this we're going to jump right into our next interview for the day and that is bringing on Joe from Aztec Joe is one of the co-founders of Aztec and we're going to talk about the importance of privacy and bringing it on chain so please join me in welcoming Joe on stage okay hey everyone all right Joe I've uh known you for uh over six years now and uh I think this is our eighth eth Global this might
be probably more um and uh since then the only thing I've known that I know you definitely like is uh privacy and ethereum so that's been very consistent so so my first question there is um well let's let's just go into why um why do you think privacy is important and uh how do we actually make that relevant for crypto yes it's a good question I think starting with kind of looking at the world around us today like we're in London Financial Hub of the world and we get pretty used to the Privacy we enjoy um in our like daily lives when we pay someone when we pay the tube when we when we get here and kind of when you
look at that um uh there is privacy in everything we do um and then you you start to look at ethereum you go on ether scan and uh that privacy just doesn't exist um you can see every historic and future transaction from any blockchain address you can see their balances um and that world's pretty scary so um we care a lot about privacy Aztec because if we're going to build these new payment rails for the world uh I think we at least need to do as well as we did with the traditional uh banking system and that was a pretty low bar like we we're in the traditional World trust a service provider uh with all our data that service provider usually sells it to someone um but we
get some privacy uh so at htech we care about um onboarding kind of billions of people onto blockchain and giving them hopefully better privacy uh not worse than we have in in the in the web 2 World um so that's kind of it's been our mission for five six years now um um and we're getting pretty close to delivering on it so uh yeah excited to be here nice um one kind of common thing that we hear all the time is that U there's a misconception that when people hear the word ZK they think is just everything is private and uh that's definitely not the case um could you kind of clarify what is a good intuition around it and then uh kind of then zooming out well what is Aztec and and what are you building yeah I think this is um uh some good
marketing on some of the other l2's parts um so ZK is usually kind of an abbreviation for knowledge proof and specifically ZK snark and there's two interesting properties to ZK snars or or stocks um that we care about one of them is succinctness um and this is kind of proof of computation um and you can use that to instead of having ethereum verify hundreds of thousands of transactions or or 50 million transactions in in Stan's case um you can just have a proof that those were executed correctly and a lot of ZK teams are using that to scale ethereum and get higher throughput um uh kind of l2s um the other interesting property that's
kind of somewhat forgotten is is zero knowledge um of these ZK snar proving systems and you can use that to encrypt information and hide data and so at Aztec we're kind of using both properties um and one of the only only rollups to actually be doing this but we we used a zero knowledge property to encrypt information um and kind of hide your resultant state of a transaction um and we can get into more on that in in a second but at a high level we're building a privacy focused L2 on ethereum um that has public and private State that's composable um so let's get get more into that so you're leveraging those two properties but just to confirm it's not the same as a ZK evm as well either is that right yeah it's not so if
you look at like the evm um it's a great virtual machine but it it has some floors like there's no there's no privacy built into it so we can't take the evm um and and actually use that to uh give developers private States or private function calls so uh we have a different architecture um we have what we call a kernel circuit which uh allows users to run transactions on their own device create a proof on on their local device a bit like endtoend encrypting in in Signal uh and messaging apps but in this case you're you're running arbitrary code on your device uh and proving its execution and then that's paired with what we call the Aztec virtual machine which is um it's it's just another virtual machine that's a
bit more like uh stet or CYO that has extra features uh that make it easier to interact with the private State and so the two together um are the kind of Aztec execution environment um and we took the view quite early on that trying to add privacy to the evm was uh kind of a Fool's errand because it just wasn't designed for that why yeah I I guess well on a fundamental level like if you think about how a blockchain Works um you send a transaction to a public mle um and in order for the other nodes to validate it all the data needs to be public um so you can't take that virtual machine and
keep the properties of strong consensus um uh and also get privacy um some people are trying to do it with kind of FH and and other things like that but it's as many years off so yeah we had to kind of start from zero and uh work out a new type of execution environment that would allow privacy to be built into these applications um but we still do benefit from the consensus of ethereum so we're very much a roll up on ethereum we inherit all its security properties uh we get the best bits of what ethereum offers but with just a different um execution environment so this is uh this is super interesting so obviously a big piece of being able to validate things at scale and kind of keeping it decentralized and an open source um is
that everybody can kind of verify that the same information is there um but if everything is encrypted how do you going to get the same guarantees and and more specifically um does something change in in this manner where you're trying to access private information because yes I may not want to publicize how much money I have in my wallet but what about me interacting with a def5 protocol that's on Aztec does it not need to know how to read things can it read everything just the way it would are there any gotas how do we think about that world yeah so there are some different mental models I think when you're dealing with um private State and private execution I think the first one that's worth touching on is that someone or a group
of people needs to own private State and and what I mean by own is it's encrypted for um a given key that could be a shared key between lots of different people but it belongs to someone um and then you have like public state which is obviously Global and and anyone can see it and usually the flow of a transaction in Aztec is there's kind of a setup phase uh where you want to do something that's that's hiding information uh could be hiding your passport proving you have a UK passport inside the the pre- part of the transaction the private part and then that's like the Gateway into maybe a more public execution like an amm so it's for developers kind of you have the best of both worlds some things like amm designs just need public State you need a you need a shared
Global uh variable to exist um but the the best thing about azc is you can choose what's public and what's private uh to get the best of both worlds so I think the first mental model that I would flag is that private State usually needs to be owned by someone um and then I think the other thing that's a little bit different uh when you're talking about privacy or or private execution uh we sometimes call it is where it's running um so in the kind of traditional blockchain model uh you send a signature um to a mempo that kind of outlines your TR action request and someone else does the computation um on ethereum uh the block Builder will do the computation on kind of public
l2s uh the Builder will do the computation and someone else will prove it's done correctly uh but on Aztec uh for the private portion the user is doing the computation and they're proving they did it correctly with a a ZK snark um and it says an interesting property that you get unlimited runtime you have no concept of gas in a private transaction because if you can make a proof you can do whatever you want uh in in that transaction um you can also feed whatever data uh you want into that transaction so you don't need to just be constrained by data that's on the Aztec blockchain you could feed in health records you could feed in kind of all your bank balances that were in like a sign CSV prove some computation over that and then do some resultant state so
there's a lot of like pre setup uh that happens in the in the private land and then my mental model is you then go and do something with that maybe in the public uh def land oh super interesting um but but I guess to do now effectively kind of having this decision to decide if it's a private versus public side of things you need different Primitives and and you've had to invent a new programming language called Noir um what is kind of the current state of Noir right now and um and how's the development of the language going yeah so we've been building Noir for about two or three years now it started uh with a grant from the ethereum foundation um and so nor is this low level language for or mid-level language for writing um zero
knowledge proofs um and on Aztec all of our contracts are written inside but written in Noir um but there's some libraries which help you kind of uh write public functions or private functions so to to the developer's point of view um you just write one contract and you tag which functions are private and which functions are public so you don't have to think about these two different execution environments when you're writing code it's a very seamless kind of composable developer experience no's in a pretty good state right now um You can already do things like as I said earlier prove uh you have a passport you can like read the passport with your NFC chip and then prove that the signature inside it is pretty performant um we focused a lot on the devx um so it's a
has the exact same syntax as rust um so if you like rust you'll like no um and also kind of uh just getting started is quite easy we have a lot of code spaces on GitHub um if you've ever used a code space you just click a button and you get thrown into uh kind of a a web is literally Visual Studio online yeah digital Studio online we've got a great um uh what's it called like a an IDE plugin that does syntax highlighting uh it does like go to definition so it's very easy to actually get started uh with Noir say it's in beta stage but still pre-audit um audits this year awesome um a couple more things I want to want to ask before uh before we um wrap up um you have been a product person your entire career and um the
thing I'm curious about is when we kind of see all these things that we have to address uh in this new paradigm especially when you introduce a otion of not public and private data and U and giving people a choice how do you actually make that seamless and and what have you been thinking about or or have done so far in terms of actually making that onchain experience uh seamless yeah I think it starts with like the developer environment so you have the Noir code space which is like I just want to mess around with like a little Noir program but we have the same thing for developing on Aztec so if you want to uh write test contracts in our Aztec sandbox there's also a code space so you don't need to kind of waste 3 hours installing the right Docker dependencies or making sure you've got
the right version of node uh to get going you can just you can get going in a browser um and I know eth Global has good Wi-Fi usually but you don't have to deal with hackathon Wi-Fi uh because it's it's it's it's it's running on a remote server so I think there's some like lowlevel Primitives which just help developers on board and then once they're kind of in and that they've decided they want to invest 3 hours I think having kind of sensible defaults so that they don't have to reinvent the wheel so we have token standards so you can do basic things like transfer tokens and you can kind of build around this like ecosystem of quite good Primitives to actually get to what you wanted to do rather than having to reinvent everything so I think it's it's a combination of um sensible defaults and
just good devx uh that we focused on initially um we haven't got it all right so we are iterating quite a lot uh and and we have prizes at the haathon so if you guys um have any feedback uh we'll take it into account what about being on chain on the the ux side of uh just kind of the web experience so you kind of said hey people have to now create the proofs on their computers now does that mean like I can't do something because my computer's not powerful enough or I have to like now wait a couple minutes to do some information or a basic thing um how do we kind of simplify that experience yeah so um Noir is kind of uh the language you write your programs in
but under the hood what actually happens is you plug into a cryptographic backend and most developers don't need to worry about this but effectively Noir abstracts the cryptography from developers and what we've been hard at work on at Aztec is ensuring that that cryptographic back end is performant enough um and so this technolog is not going to get adopted if there's a noticeable ux trade-off for constructing of proof uh so we we've set some pretty ambitious benchmarks of being able to construct pretty complex Aztec transactions like six smart contract calls um on a phone in under 30 seconds and that's kind of like the most complicated defi transaction you can think of um a basic payment should be under under a couple of seconds so
inside that you get full full account abstraction um you don't have to deal with kind of ethereum keys or c phrases anymore you can use Touch ID as a signature so we spent a lot of work under the hood building a proving system that can deliver all of this performance and I guess developers now just need to build the applications uh that make it useful nice well um the last thing I want to ask you here is uh there's been a handful of bold announcements by by the Aztec team so I guess I'm curious about getting an update on where things are headed and what's next on the Aztec road map yeah it's a good question um so we launched our kind of initial v.1 sandbox back in September and we've been kind of iterating on that for probably
the last 3 4 months um it's approaching kind of feature completion so it's it's getting a lot more stable these days and that's what you can hack on uh today at the hackathon um yeah there's docs on on our docs. aztec. Network site um and you can kind of get a flavor for all of the types of applications uh you can build uh on Aztec with that sandbox it's like a local gu node basically but for for Aztec um and so from here our kind of engineering road map is trying to get everything working end to end so we've got this sandbox environment but actually can we make it construct full proofs can we can we build a full roll up on a test net um so we'll kind of heads down our offices kind of a mile from here trying to get that working uh
over the next kind of month or two um and once once we've got that working um we'll start to kind of plot out a path to a decentralized test um at the moment we're kind of focusing on just the network side of it so the sequencing infrastructure the peer-to-peer transaction pool on Aztec um and then maybe in Q3 we'll have a full developer test net uh for everyone to kind of play with awesome that I mean that's very close Q3 I we're Q2 in a two weeks time's flying pressure's on yeah well Jo thank you so much for this amazing conversation and uh can't wait to see the public test net for FS second Q3 awesome thanks ktic I appreciate it the