Rand Hindi: Zama - Fully Homomorphic Encryption in Blockchain Applications & Privacy. Ep. 523
24 Nov 2023 · 58:13
Rand Hindi, CEO of Zama, joins Epicenter to explain fully homomorphic encryption and how it differs from zero-knowledge proofs and multi-party computation. He details Zama's fhEVM, the tradeoffs involved in deploying an FHE rollup, and how the technology could enable compliant, programmable privacy for blockchain applications.
Speakers
Topics
Transcript
welcome to epicenter the show which talks about the Technologies projects and people driving decentralization and the blockchain revolution I'm Freda an and today I'm speaking with Rand Hindi the CEO and co-founder of Zama Zama leverages um fully homomorphic encryption for all kinds of privacy stuff that we'll talk about in just a second introducing the next generation of dydx and the next version of the dydx token welcome to the dydx chain new token mechanics mean you can stake to secure the network staking is fully decentralized and controlled by dydx token holders all fees are distributed to stakers earn rewards from using the dydx protocol with rewards planned for
Traders and early adopters too new governance means you are in control trading has been democratized you can vote on protocol improvements token distributions and more Bridge your dydx to seamlessly transition to dydx Chain Bridge now at bridge. dydx dotrade and contribute to the evolution of dydx chain open source and community-driven run your own validator validating is fully permissionless join us on our mission to democratize access to financial opportunity today before we start properly Rand thanks for coming on can you tell us a little bit about yourself sure thank you for having me uh
so my name is Rand I'm an entrepreneur and investor in deep Tech uh I started coding when I was 10 years old built my first company as a teenager then did a PhD in AI in 2007 before I was actually a cool thing to do um I've then I was running an AI company focusing on privacy that got acquired in 2019 and since 2020 I've been running Zama with my co-founder Pascal p uh and I also do quite a bit of investing in deep Tech so my sweet spot as an investor is companies that most other investors cannot understand yet ah that sounds fascinating what kind of can you give us some examples of companies you've invested in or you're thinking of investing in sure at the moment I'm
looking a lot at uh biotech specifically psychedelics longevity uh my PhD was in AI applied to biology so I can read b biop Paper just as well as I can read AI papers and so I've was able to get in early on a lot of things that people taught were like sci-fi medicine so for example I invested in a company that's doing like a miniature MRI it's an MRI machine that's 10 times smaller and cheaper than existing ones so something you can put at the back of like an ambulance and things like that when I invested nobody thought it was even possible to build it and now these guys just produced their first MRI images yeah super cool and obviously
longevity has also seen um quite the Boon over the last couple of years um any any notable Investments there um I mean I've been investing quite a few things my most recent investment is in a Diagnostics company called glycin age uh where they basically analyze some very specific markers in your blood called glycans which gives you a good estimation of your biological age but also of all kinds of different diseases that might uh progress in the future uh great company very strong science 20 years of research just something most people overlooked and so I always try to find those things you know those sort of nonobvious bets where the science is
very very strong but nobody really thought about making a company out of it uh super cool um I think we we will kind of see how this um Segways into privacy in just a bit so basically all of these biotech companies kind of the ones that kind of tell you your biological age and kind of your risk markers and so on um I would be absolutely thrilled to kind of know where I where I stand the reason I've never taken any of these tests is because I'm concerned about um the privacy of the data so going from that to kind of like a privacy Focus space it's quite a leap and then on some levels is it's not so kind of tell us kind of what um what kind of drove you
to kind of found something so intensely mathematical and kind of like computation B based I mean it's it's a tool set right so basically it's kind of it's not Yeah so basically what what made you do it actually that dates back from when I was 14 years old um so at the time I was 14 in the 90s so it was the beginning of the internet you know people were starting to build websit and since I was coding since I was a kid for me it was easy to start building websites and at the time with a friend we had built a social network uh that quite popular in France um so the reason why I'm saying this is because at some point a school I got bullied by an older kid right I mean
you know when you're 14 the guy's 16 he's twice my size what can I do about it right and I got so fed up of this guy that I thought well maybe he's a user of my social network so perhaps if I looked into his private messages I could find something compromising and blackmail him so that he would stop so I looked into the database and I found amazing things about him which I challenged him with and say hey if you ever mess with me again everybody's going to know about your da little secret your secret crush he never ever spoke to me again or approached me so Victory I bullied the bully but then I thought something's wrong about what I just did just because I'm the one operating the service
doesn't mean I should be able to see everybody's data and so from that point in 1999 I knew that privacy was going to be an very important topic for the future uh the internet and of you know just digitizing everything so as far as I can remember I've always tried to think about privacy as just as a necessity as something that you build by Design in everything that you put out there that's very true I I feel makes me feel bad for the bully uh which almost you almost never do right it's kind of like but uh yeah it's kind of he probably didn't even think about the fact that you you had kind of clear tax access kind of messages you are sending
nobody nobody thought about that in the 90s right like it wasn't something people talked about and uh and yeah and so I think I don't feel bad about it because if anything that particular episodes eventually made me focus on privacy made me create Zama and if anything more people will benefit from privacy because this guy bullied me and forced me to confront at the time the fact that I had access to so much data and the this was Ronald so you know Silver Lining he stopped buing me and hopefully a lot of people will end up benefiting from that so you just said that you co-founded with um CTO yeah yeah how did you guys
meet Pascal is like Pascal Pascal p is super OG in homomorphic encryption he's one of the early inventors of homomorphic encryption he was the first one to invent uh homomorphic addition so ability to add encrypted numbers in the 90s as well actually so when I was doing my social network he was inventing that um and him and I have been friends for a few years you know we kind of like hang out and uh we kept in touch and when he he heard that I was selling my previous company he reached out and he said hey I just had a breakthrough in homomorphic encryption I think now is the right time to build a company do you want to do it together and quite frankly initially I thought I don't know man I'm kind of like tired I want to do the whole like
sell my company takes six months travel the world kind of thing but then I thought how often do you get a chance to build a company at the right time with the perfect co-founder based on a new scientific breakthrough and so I just couldn't resist so a week after I sold my company we started z um that was in 2019 and there was um before 2020 officially 2020 2020 sorry be before the ZK boom so kind of kind of if look at kind of like um the trajectory of kind of ZK technology and kind of the Mind space it's taken up um in in uh uh the ecosystem um that was just the very very beginning and you
guys weren't even primarily working on ZK stuff but fully homomorphic encryption which is kind of like um two two pay grades Beyond uh you know vanilla uh zkps um we talk about kind of the differences between all of these Technologies in just a bit back then the only project that I'm aware of who was aiming to use fully hovic encryption was numerai I don't know whether that's still going but kind of um when you came out and said I will build something on this um basically fully homomorphic encryption has been around for 50 years or so um but basically making it usable this has kind of been the holy gra it's not it's not really been done so far so kind of what what how did people react
when you came out with this so so fully homomorphic encryption was actually only figured out in 2010 before that you could only do either additions or multiplications but you couldn't do both uh 2010 is the first time that someone invented a homomorphic technology where you could do any kind of computation uh the problem is it was extremely slow very very slow it was very hard to use for things that required complex computation and unless you had a PhD in cryptography you couldn't really use it so you know the big contribution from Zama is that we actually created a homomorphic scheme that is very fast that can that can do
any kind of computation so it can do any kind of thing you want to do without any sort of difference to if the data was not encrypted and it's very easy to use so as a developer you don't have to learn anything about cryptography and so I think you know from a mathematical perspective we've sold fhe now it's purely about making it used by as many people as possible and then improving performance all the time I think maybe this is the time to kind of explain all of these terms in depth right so basically in terms of privacy people tend to think in different tiers so tier one is ZK proofs which we have talked about on the shows many times so basically um it's this
idea that you can prove um your knowledge or something without revealing um the thing itself and um they typically generating the proof um is computationally expensive but can be done offchain and then anyone can verify it onchain um tier two that we don't actually talk all that uh that often about is uh multi-party computation and then in my head kind of tier three is kind of like the only Grail tier uh fully homomorphic encryption um can you explain the differences between zkps M MPCs and F that's a good question they're fundamentally very different Technologies and I believe that three of
them have a role to play in building a privacy protocol uh zero knowledge proofs are great when you want to prove something without revealing the data but it doesn't actually allow you to compute on the private data itself so whoever has to produce a proof has to actually have the data so for example you know if I want to create a ZK proof that I have enough tokens me the prover have to have access to the actual balance otherwise I cannot prove anything about it so if you wanted to actually compute on an encrypted balance you wouldn't do that with ZK that's really not what this is about ZK is a technology that g that creates proof of correctness it's not a
technology about Computing on private data if you want to compute on private data you've got basically MPC multiparty comput and F at least if we talking about software based Solutions you have Hardware based Solutions but let's stick to software based Solutions the idea of multiart computation is that instead of having one machine do the computation you basically split the data and the program to be executed on multiple machines each of them doing a piece of it and then putting the result back together so as long as you know a majority of those machines are honest nobody can retrieve the original encrypted data they can only retrieve
the final results uh MPC is great the only downside is that you're limited by networking time so at some point it doesn't matter how fast the machines go because sending data back and forth is going to be the buttl FH is basically running on a single server so you encrypt the data and you compute on the encrypted data itself without having to decrypt it and because this happens on one single server you could always throw more computational power at it and make it faster contrary to NPC so what we believe is a holy grail of privacy and what we do at Zama actually people don't realize that is we use FHA for computing on the private encrypted data we use zkp
to make sure the user is doing what it's supposed to do at the end and we use multiparty computation to secure the private key and decrypt the result of the homomorphic computation whenever we need to so MPC is great for managing the keys ZK is great for proving stuff about what users are doing and FH is great for doing the computation itself and that's really how people should think about combining them okay let me kind of um see whether I got this right by kind of just recapping it so kind of if you look at fully homic encryption um it's kind of like by by giving the example of kind of say um my sequence genome so I would kind of um
encrypt the genome that I sequenced or kind of I I had someone sequence and send it to these biotech institutes that kind of can tell you what your risk factors are and so on and then they can do computation on my genome without knowing what exactly they're looking at they're just doing their computation on it and then kind of they send me the result back and I can encrypt it with my private key correct yes that that would be the simplest way to think about FHA so if you wanted to do that with ZK it would be the other way around so in the case of ZK the user me would run the you know genomic analysis on my own computer
on my unencrypted genome sequence and I would then produce a proof that I've correctly executed the program and send back the result alongside with the proof so that I don't need to show them the actual genome input so this would be typically if the you know if the research organization wants only the result of the analysis but they don't want to see your individual data that's how you could potentially do it so you see you're swapping things around in the case of zkp it's not the company that's providing a service doing the computation it's you the user doing the computation and just sending them the result and a proof that this result result is for the correct data okay so basically it's kind of like
say um I want to take out new health insurance and kind of they want proof that kind of I am generally healthy and I kind of I want to be at charged like on the lowest here so I don't need to tell them exactly what my ailments are but basically I can tell them that I'm generally a healthy person by kind of sending exactly exactly but see you're the one doing the computation in the case of FH you would encrypt your data send it to them and they would do the computation and you would then send back the the results that sounds like magic because as someone who kind of who processed large batches of data before typically the first thing that you do with data is you clean it up right so basically that it's in the right format and does if fhe fhe work even with data
that's not cleaned up say for instance I take a picture of a natural scene and kind of I want image processing about kind of what we see say dog walking across the street and kind of uh traffic light and whatever kind of like yeah automatic process thing um usually happens can this happen on data that's not been tied absolutely FH FH is true incomplet so anything you can do on unencrypted data you can do on encrypted data with FHA the question is how efficient is it going to be so often CA in often cases you probably want to do some of the pre-processing before you encrypt the data and send it as FH because if you
can why not is cheaper right at the end but for image processing we have an example if you go on a hugging face Z has like a space where we actually have a demo of uh an encrypted image filtering application so it's literally that you upload an image it encrypts it send it to the server the server applies different filters on it and you get back the response so 100% like FH does not have any requirement on what kind of data is being computed it on you can do whatever you want okay I I I'm still kind of struggling so this seems like magic so so basically kind of if if I think about this say for instance I ask um an llm
something right kind of like an embarrassing question that I don't want the makers of open AI to know that I have right so basically um let's say I I send an encrypted version of it um but basically the the the the way that kind of say llms work it also kind of um like these image processing um softwares is that they kind of quote unquote understand something about the data right so basically kind of it they have context so kind of how does the embedding in the context work in terms of when you think about AI or any other application you have some inputs there's some data going into the model this data
is then transformed you're applying all kinds of different algorithms on it so it could be you know looking up value in a table for your emings or it could be uh applying like an activation function on the data right all of these things you could do an fhe in exactly the same way so the program itself doesn't change the only difference is that the inputs are encrypted and so if you look at the input itself you're only going to see some unless you have the key to put things back in order you're not going to understand much but the particularity of the way that this was encrypted is that it conserves some mathematical
properties so for example adding two encrypted numbers would result in the same thing as adding two unencrypted numbers um so a good analogy is like imagine you have a box okay um so you cannot see what's inside the box you can put something inside the box but you cannot really see what's inside the box but you know that box has a few buttons and a few knobs that you can turn you know maybe one button squashes whatever is inside the box maybe one button sprays red paint on it so even though you don't know what's inside the box you can still press a button that will squash it you can still press the other button that would make it red and when you take out whatever object was in the Box it will be squashed at red right so the person who applied the
transformation on the data didn't have to actually see the data itself that was in the box you just had to know that there was something in the box and just press those buttons it's exactly the same idea here right it basically encrypting is just putting something into this box and giving this box to you and you are the one pressing the buttons on it um so you know exactly what you did you just don't know what you did it on I think on some level to me that makes sense but kind of especially kind of when you have um a large repository that you kind of have trained your data on it kind of it seems intuitive to me that kind of maybe you you should have
had to do the same thing on your on the data you used for training um so that kind of you actually compare apples with apples rather than Apples with you know really squished squished and you know green apples ah but it is the same thing right it's just that it's translated into a different language but it's fundamentally the same data so when you train your model right what you're doing is you're telling it you know if that number is five I want to multiply by two if the number is six I want to divide it by three let's say something like that yeah that logic the application itself still holds as long as the input that represents you know the value you want
to transform is able to support those operations you want to do on it okay so if you encrypted data but the encrypted data can still be multiplied and divided and things like that then it doesn't matter right it's it's like you're basically just shifting the space that you're operating in but you're not changing the operations that you're applying on it okay and that was the big difficulty of FHA is supporting all those different operators on the encrypted data okay but just to be perfectly clear the only thing that kind of needs to be encrypted is kind of the data that I sent basically you're using kind of the the M text operations that kind of I would use on unencrypted data as well
okay that and that that's exactly a challenge by the way like f for 50 years the whole challenge was can we do any operation on the data not just additions or multiplications okay yeah so um I hear you and I think I've read this before still seems crazy to me but uh I mean this is often I mean it's m which is exactly a reason why we put so much effort into building good devel veler tools so that people don't have to figure it out because at the end of the day people don't care about how it works right they care about it working so the users want to know that the inputs they're sending aren't readable the developers want to know the applications are building are going to behave as
expected that's it and as long as you can guarantee that the internals and the mathematics which I agree sounds like black magic honestly most people are probably not going to care uh I mean at that point I'm the CEO here of the company and I'm I'm pretty good at mat and coding I can't even keep track of everything happening inside Zama there's like there's so much complexity in terms of the underlying mathematics and it's okay you know it's not our job to understand those things to use them um we've been told time and time again that um commercial use of is years in the future from what from what you're saying sounds like you disagree
and can it can be used for things now or things soon um where do you think kind of this disconnect comes in well I think the people saying that aren't the people working on it so it's very difficult to know it's very difficult to know what's possible unless you're yourself in the field at some point it becomes evident to everyone but you know ZK today seems obvious to everyone but it was very obvious to a small group of people five years ago as well right FH is the same you know FH today is obvious to people working in FH that this is working it hasn't yet transpired to everybody else so you know short answer is it depends who you're asking to the longer answer
is um they're kind of right because up until now FH was not yet practical you know there were three problems it was limited in terms of what you could do with it it was very difficult to use as a developer and it was very slow slow Z made it very easy to use we've made it such that you can do anything you want with it you don't have to worry about what's coming in what's coming out we've taken care of everything performance is the last smile so right now we can basically let's take blockchain as an example you know using uh homomorphic encryption in a blockchain right now we can support between two and five transactions per second it's not bad considering that
most l twos on average only actually have five TPS so FH today already matches the average load of most evm chains we believe that we can 10ex that number just with better cryptography in the next 18 months so you're going to get to like you know 15 20 TPS in the next you know uh in the next couple of years so that basically is the same throughput as ethereum so for blockchain FH works period done if you want to have a thousand transactions per second then you need some additional uh Hardware accelerators you know you need like a kind of GPU for homomorphic encryption if you want to go beyond this 10 or 20 transactions per second so you know if
you want to use it for something that you would do ethereum done it works if you want to use it for something you do on Solana then you need this Hardware accelerator okay um maybe it's time to kind of go into the products and services that you currently offer um so what's on offer so Zama is a full stack company we basically have a solution all the way down from you know fpg and GPU acceleration all the way up to solutions for blockchain and machine learning at the core of everything we do there is a unique technology we build called tfh uh which we basically have like an a FH developer library and on top of that
we've built one solution for machine learning where you can take some python code so an existing model that you wrote in Python and we automatically convert it into a homomorphic equivalent that can work on encrypted data so as a data scientist you don't have to learn anything about cryptography you just write python code and we take care of everything else on the blockchain side things were a little bit more complicated um so we basically created this product called the FHM which is a way to have confidential smart contracts in evm Chains using homomorphic encryption and so that particular protocol works great but it's a little bit more than just FH because you have multiple users you know interacting with each other you
need composability between contracts uh and so this is where we're using MPC for example for Key Management so our fhvm protocol uses FH for the unchain secret computation but it also uses MPC for managing the secret key of the network and this FH evm is it live today can I run it on ethereum is it like its own chain what are the costs there is a set of pre-compiled that you need to integrate into your evm chain to support homomorphic encryption so it doesn't work on ethereum it would work on any chain any evm chain who just basically implements those promiles pretty much so it's a very easy
integration uh but it does require effectively to at least soft Fork the evm itself I don't think ethereum will ever use fhe just because of the computational requirements it's just not in the spirit of ethereum of running that like on cheap Hardware right I think you know FH still needs some pretty powerful Hardware uh so there are a number of companies integrating the fhvm the first one that's public who announced it is called Phoenix so Phoenix is a new L2 uh based on homeomorphic encryption using our technology uh that's built by the the team behind secret Network was that's already like a privacy Network so they're launching this new protocol loal Phoenix uh great guys incredible team uh
great investors too so they they rais like a seven million seed round LED by multicoin uh so I think that's going to be probably one of the very successful projects but let's just say that if we do our job right homomorphic encryption will be a commodity technology in blockchain because when you think about it right now on a block chain everything is public if you want to build any kind of confidential application you're going to need something like homomorphic encryption yeah absolutely so kind of let's talk I mean I I I the use case to me is absolutely clear I'm still not clear on kind of the technical implementation say I want to launch um a
an fhe in aboard um chain um as in l21 ethereum first of all does everything need to be um fully homomorphically encrypted or can I do like plain text things and FHA things on the same chain that's a great question um you can do both at the same time in fact we don't actually change the evm itself you can take an existing evm so let's say you take a go ethereum okay get you use that you can take that and you basically add the Z pre-compile libraries which are basically linking your evm to our FH Library so that you can start doing FH
stuff in solidity but the way you do that is that we expose some new data type in solidity so basically an encrypted integer an encrypted Boolean value and in your contract you can specify what's supposed to be encrypted what's not encrypted so you have full composability not just between encrypted FH contracts but also between encrypted and non-encrypted states and that's a very important important part because you can take an existing chain that's already running and without changing anything without breaking anything you can add F capabilities on top of it let's just stay on the same chain right so basically if if everything kind of happens on one chain how do you deal with um composability if like some parts
are plain text and some parts are encrypted fhc can work uh so FH operations can work between two encrypted values between two Cipher Texs but it can also work between a cipher Tex and a plain text value uh so the operator an FH basically exist for both flavors uh so that part is I would say a a natural feature of FH Technologies um what's really difficult is actually composability between encrypted States because if you think about it if you have multiple users or multiple contracts interacting with each other it does imply that they've all encrypted their data under this same
public key because if the data is encrypted under different Keys it cannot be mixed right it just won't work so it has to be under one Global network key and so if there is one Global network key that everybody's encrypting under the question is who has the decryption key and how do you selectively determine who's allowed to see which encrypted value right how do you decrypt what for who and this is where NPC comes in the smart contract itself can Define Access Control logic it can say this user who owns this balance can decrypt its own balance makes sense right and the way this works is that the validators will split the private key of the network in different pieces and you need a majority
threshold uh approval for something to be decrypted so it's called thresold decryption and by having this thresold decryption combined with you know your traditional blockchain you can actually have you know this decentralized system where nobody has a private key and where the smart contract dictates what can be decrypted or not I think I understand that um so this means that kind of theoretically things can't be stolen from you but kind of if enough um of the MPC key holders collude um the network say could be frozen right I mean not necessarily if if if the MPC noes colludes it doesn't change
anything to the blockchain itself it only means that they would be able to decrypt anything they want so the worse is that you would loot confidentiality but you would never be able to double spend or anything like that because of that but I would argue that you know if you don't have an honest majority in your protocol is broken anyway so you probably shouldn't use it uh but having said that you know securing an NPC protocol is a very very tricky thing very very tricky uh so most likely we believe that this is going to go through a combination of this threshold NPC protocol running inside some kind of secure Enclave so for example if each of the NPC node participants are running the NPC
software inside an HSM then you will need to break multiple hsms at the same time faster than the keys are rotating and so you know arguably this means that you know I don't even think a government could do it because if those noes are in different countries nobody would have full access to all of them at the same time so you would need some kind of global international you know uh operation where people synchronize to break HSM in a few minutes if they can do that they can break into any bank so the goal here is to make this protocol Bank grade security right okay H how how fast are Keys
rotated that you can determine pretty much any way you want I would say at least as as often as validators rotate okay and and in terms of kind of like MPC numbers so kind of how many uh how many uh parties do you recommend because I mean kind of you need like you need to cover like different jurisdictions you kind of need to have like geographical Independence and the operator Independence and so on um so kind of just so just so to make sure that you don't have run into like either a um jurisdictional um catastrophe or kind of like a dark Dow scenario yeah these are
very very important question these are very hard questions I I think today the hardest question for you know FHA isn't F anymore it's the key management of the trash protocol for those you know composable multi-user FH you know use cases like blockchain um that's a very hard problem right because you know it's not about cryptography anymore you know this is about it's about up security exactly upsc pretty much so we believe that a combination so first of all we believe that the threshold you know NPC protocol is probably not going to be run by the validators of the network itself because it doesn't have to be uh secondly we
believe that this this KMS will probably have much much stricter requirements in terms of what Hardware should be running on who should be allowed to run it it might even be permissions if people want to have it like really even extra secure so it's possible that you might have like one permissioned you know threshold Network that everybody's using and the people running that are going to be apple Huawei Zama like you know you basically have companies from different countries uh that have no incentive to collaborate whatsoever running those things um so it could be you know five participants it could be 10 we even have a protocol for 50 participants so you know the number doesn't really matter
it's really more about yeah just uh who's running it effectively okay but there's no way of kind of um establishing a scheme such that kind of you don't need the same um encryption keys to kind of for things to be able to it operate right there is something called multi- key homomorphic encryption the problem is that it requires every participant to be online for decryption and the size of the keys uh basically explode quadratically with the number of users so if it's like three people sure why not right if it's like a 100 million people on ethereum no way and plus not all of them will be there so no no the
correct way 100% the correct and only way that this will work is uh homomorphic encryption using a public key that everybody's sharing with some sort of threshold protocol for securing the private key there is maybe a longer term idea where you could basically have uh wo functional encryption combined with some kind of ZK proof so if you can provide a proof that the F computation was done correctly there is a technology called functional encryption that takes an encrypted input and produces an encrypted output only if certain conditions are satisfied uh the problem is that this
technology G is so so so so so so so slow and limited that it's basically not possible right now to do it but you know maybe in 10 years you're going to have FH running on the encrypted data ZK proving that the computation was done correctly and the proof of this ZK protocol will be used in a functional encryption scheme for decrypting the actual Cipher text that was the result of the computation and here you would have a completely trustless decentralized no no threshold no MPC uh protocol and that would be a holy grail of uh of you know FHA super cool so let's talk about kind of the ways that it can be deployed
today say I'm deploying an L2 on ethereum and I kind of I have all the necessary pre-compiled to kind of enable um the fhbm do I still use like regular vanilla um ZK um rollup technology to kind of prove to ethereum that my state is correct unfortunately right now proving an FH computation is much more costly than just redoing it so it doesn't really make sense to use a ZK rollup for scalability in FH right now doing an optimistic FH rollup makes more sense uh so I think you know that's probably what we're going to see happening okay and and how do you then deal with fraud
proofs that you need for the optimistic rollup I mean can everything that kind of I need to um show for fraud proof be done on um layer one without the pre-compiled that's that's a very good question uh not with the optimism stack uh the op stack but with arbitrum you know you can push a wasm executable right and so theoretically you could compile your your contract including our libraries into a wasm you know executable and run that on the L1 uh that's possible uh how practical it would be I'm not sure uh there are people working on FH rollups but it's not yet sold but it's
doable for sure doable I think so I think arbit from style fraud prooof would work better than op style ones and and that's um what what Phoenix is using or how how are they setting this up so Phoenix just recently uh published your white paper showing how you would actually do FH rollups uh so so they have a prototype working and they're well on track to release that at some point in 2024 in production and they use actually arbitrum style wasm frog proof for it if you kind of look at l2s and l1s obviously kind of like there there's a huge spectrum of possibilities how to
configure this so does this work with POS P POA um can I just can I just set up um an arbitrary evm chain as long as it kind of has the right pre- compilance it should work with any evm um there are some I would say compromises if you're using a consensus protocol that doesn't have instant finality uh and the reason is that if you don't have instant finality and you're requesting to decrypt something of the state you might be decrypting something that gets rolled back at some point so you might be leaking information that isn't actually final States so that's why we think that like
you know final instant finality protocols like tendermint you know Comet bft and all these ibft sort of consensus are better suited for this okay you don't want proof of work or anything yeah proof of work's probably not going to do it uh but proof of stake proof of authority um should be fine okay yeah super interesting do you expect everyone will do do you expect there to be specific chains that kind of are FH enabl um or do you think we will see the future of dap chains where kind of AD dap decides that kind of this is really what they need and they kind of release um their own chain because then
obviously kind of interoperability becomes a problem again that I mean and I mean with optimistic rollups um this is a much bigger problem than with um ZK rollups I mean I mean bridging between between different l2s um is not s satisfactorily solved at the moment but I mean I can see us getting there with um different ZK rollups um in due time where whereas kind of on optimism or optimistic rollups generally it's much harder yeah I think most likely given the constraints in terms of computational power needed for FH I don't think that an L1 would be running FH
natively right now I think FH will be at the L2 or as a side chain or as an app chain so I think you know you're probably going to have ethereum Solana polygon all of these guys as PL text un encrypted l1s with FH l2s and L3 applications on them uh and whether you run that as app chains as POS side chains or as rollups doesn't really make much of a difference in terms of interoperability it's actually not that much of an issue because even though every network has its own key you can re-encrypt from one key to another so when you're bridging all you have to do
is reencrypt the value to bridge using the public key of the network bridging into uh and that's perfectly fine like this is you can take an existing bridging contract and just add that particular feature and then you're done so there shouldn't be any more complexity for bridging in FHA chains as you would have in regular ones but but that's only if you don't have a contest mode right and on optimistic uh chains you inherently have to have one so basically you could only do this like after a week or so I mean I guess it I there's people still use optimistic rups right and then they basically swap on those uh uh you know fee markets to they give away 10%
of the value and then you know they don't have to wait a a week right so you could imagine that people might be okay with it it might not be the most secure thing to do right uh but I think you know at the end of the day the user can choose if they're fine and okay with the tradeoff i the user is taking a risk not the protocol I agree but kind of these kind of these Bridge liquidity providers um they work by kind of um by very ver ifying that the claim is cracked and then kind of paying out on this without waiting for the cont mean in terms of like a bridge yes yes yes yes yes yes no you're you're correct I I don't think
the bridge would be necessarily different here in this case I think it would be the same logic again I think you know arguably that weak period in your optimistic rollup could roll back spending which is way worse than you know confidentiality in some extent um I don't think it would be any different to be fair or at least I don't see I don't see any particular problem right now okay um let's talk about things that are actually currently being built so kind of we already talked about chains who may who may use this imminently what kind of um deps run on them that kind of um make it necessary to have this level of
privacy you know it's a completely new design space so we don't know yet what people are going to build but can tell you what I see people asking us if it's buildable so there's a very big use case around um defi obviously uh the ability to have confidential dii whether it's preventing Me by having your transaction encrypted up until the point that it's executed so it's encrypted in a men poool it's executed during execution a contract and it's only decrypted and made public once a Blog is finalized for example those would be one example uh confidential erc20 tokens keeping the balance and the amounts transferred
encrypted so you still have traceability you still know that you and I made a transfer you just don't know for how much and how much we both owe and related to that you have governance in a dow right now everybody sees who's voting on what with how many tokens a lot of blackmailing bribery social pressure if your vote was encrypted and people didn't know what you voted for and how many tokens you voted with you would have a much much much better you know system for governance that wouldn't be you know subject to peer pressure and things like that uh one thing I'm particularly excited about is a compliant uh applications if you want to be compliant let's imagine something
very simple you want to transfer tokens to someone else you know maybe that person is a different country so there might be regulations around that you know uh maybe uh the government in your country should be allowed to see the detail the transfer right you have a lot of like those things with a homomorphic encryption with the FHM you could have your identity encrypted in a smart contract so let's say you go through some kyc the kyc provider you know does your facial scan takes your passport they encrypt your age they encrypt your name your address or citizenship they put that in a smart contract and so whenever you want to use a dii protocol let's say you have to prove that you're not American you could do that onchain
you wouldn't need any kind of offchain at the station you would there wouldn't be any kind of offchain thing you do the K once they put it on the blockchain and then from that point you can use it to prove things about yourself what that means is that you can have composability between identities and applications and that I think is huge right and I'm pretty certain that that's going to create a kind of like White Market and dark Market on the blockchain where you're gonna have like a layer of compliant applications where everybody's like kyc but confidential so people don't know you right uh that's going to be most of volume and then there's going to be like a dark net on blockchains right where people do things without kic it's G it's
GNA put a very clear price on money laundering well yeah and I mean you know look at the end of the day what people want is confidentiality they want privacy they don't want non-compliance oh yeah it's just that up until now you know compliance meant disclosing everything to your government and to everybody else here we're talking about a way to have confidential compliance and that I think is really the trick to make this work absolutely so kind of if you look at the wider context of privacy um over the last say 20 or 30 years um um the expectation that kind of things that we do is
inherently private um is has kind of eroded away right so basically it's kind of like um just because there's we we generate massive amounts of data that are analyzable I mean I think had the situation been different earlier um I I think we may have seen the same thing uh but basically there was no data collection on almost all of the things that people said and did and so on and this is different now um and there's already been this cultural shift um to um to kind of expect that kind of data that's
generated can be used by law enforcement and other agencies and can be monetized so people are no longer willing to pay for services that um previously um would have had to charge something just because their business model is that you know they use your data to kind of generate income right how do you think privacy solutions kind of fit into the space where kind of a lot of the harm has already been done in terms of kind of expectations I think there is a distinction between accessing the actual data and doing something with the data um for example
let's imagine you know you want a government to be able to uh prevent transfers from one country to another right now they will need to see all of the data from everybody making a transfer even those not making a transfer to a blacklisted country but imagine for a second that the data is encrypted using homomorphic encryption the government could still apply a filter on the encrypted stream of financial transactions they could say I want you to homomorphically check where those transactions are going and if they're going to a blacklisted country just make them zero right so basically
you send zero instead of sending whatever amount you're supposed to send effectively you're blocking the transfer by doing that right that would work the government would be able to prevent people from making transfers to you know like Russia or whatever without seeing what the transfers are so you could still argue well but you know the government in that case could apply any arbitrary filter that's true and that's where the transparency of a blockchain comes in if that filter is a smart contract on a blockchain everybody can see which filters are being applied right so you can have transparency of the regulation and the filters the governments are applying on financial
transactions and still have confidential Financial transactions that I think is like super powerful right and that I think is something that's uniquely enabled by FHA because FHA doesn't remove traceability it doesn't hide the application it hides the user data I think I think that's fair to a certain extent I mean these rules can still be arbitrary and then I guess it's a policy it's a policy fight um but let's look at kind of business models of kind of like big data companies right so basically H what percentage of the population do you think would be willing to kind of pay for encrypted search encrypted social network and so
on probably no one or very small percentage and I want to be clear I don't think people care about privacy I don't think they will care about privacy but you see that's exactly the goal the goal is that nobody cares not be not because it's not important but because it basically becomes something that's guaranteed by Design privacy is something people shouldn't think about because it shouldn't be a problem and so our goal at Zama is to make that happen right we were not trying to change people's opinion on privacy we're trying to change if anything developers opinion on the importance of making their application private by Design but but even kind of in cases where um there are good Alternatives that kind of offer
ostensively the same service as kind of the data mining company say for instance you could you could use proton mail instead of Gmail or you could use duck ducko instead of Google people despite the fact that kind of the marginal cost of switching to this is basically zero people still don't right so basically it's not even harder to use or more expensive to use it it just seems a lot of people actually value their right to privacy at literally zero that's exactly why the person who should care is Google Google should make Gmail private by Design the user shouldn't have to think about switching it's Google who should think about
enabling that and it's not a first time we've seen this WhatsApp you know turned on and to an encryption to a billion people overnight so it's possible for a large company with a lot of users to go from a zero privacy model to a privacy by Design model business model of Google is kind of like data mining they can still do that with the FH encrypted data they just wouldn't know what they're Mining and what they're serving they could literally you could take an encrypted user profile and you could run an encrypted advertising matching algorithm on it the user would still see an ad it's just Google
wouldn't know who the user is what the profile is or what ads were served so it's positive with see that that's the thing it's a little bit like is that it doesn't pre prevent any usage of your data it just prevents the visibility of the data okay yeah fair I think I think I get the distinction so um how does Z monetize um all of this technology so how are you guys funded so we've been very lucky we've raised a lot of funding a lot uh so we have runway for multiple years so we don't have to think too much about any short-term issues having said that you know we are a business so clearly we're
not a nonprofit we're not working for free and even though everything we do is open source we do offer commercial licenses uh so typically for a blockchain we would take a percentage of the token Supply Plus a percentage of the block fees generated by the network uh if there is a token if there isn't any token then it would basically be some kind of fat based licensing model you know we're not Reinventing the wheel we're doing something super vanilla we do have a few ideas of like hosted Services long term but for now effectively you can use our technology as long as you get a license to use it commercially so there the philosophy is very simple it's completely free it's completely open but if you're going to
make money with our technology we should make money too that's it okay that's fair so where can people stay in touch with you guys kind of follow the news join the community learn we know what can be buildt on top of Z with Zama protocols um our Twitter handle for Zama is _ FH uh we also have a very active Community called fh.org where people can learn about FHA there's a Discord server as well that is very active with people excited about FHA I'm also very easy to find and reach out online my Twitter is at Rand Hindi uh I try to answer as many DMS as
possible although to be fair sometimes it's a little bit overwhelming uh but in general you know if you're interested in building something with FHA or if your company is doing some really cool science get in touch with me or with my team and would love to help fantastic it's been a pleasure having you on r