The combination of ZKP +/- MPC +/- FHE
Devcon 7 SEA·Tue, Nov 12, 2024, 06:34 AM · 08:42
Speaker
This talk will provide you with the necessary intuition to understand when you should use ZKP, MPC or FHE, or any combination of them.
Transcript
Yeah, it's working. Okay, cool. So, hello everyone. I'm Giacomo, and I work as a software engineer at PSETM. So, as many of you know, the last few years have seen a huge generational shift in cryptography.
We passed from specialized to general-purpose cryptography. And this has brought exciting new opportunities for everyone to make it more practical, but this comes at a cost. The cost is that we should navigate lots of jargon and mathematic, and to get the big picture also for people that is experienced in the field, it's pretty hard, like navigating the protocols, primitives, languages, tooling, etc. So today we'll try to do something very difficult to give just an overview but we will stay a really high level general purpose in order to understand what the building blocks of programmable cryptography can bring and we will just focus on the programmable part instead of the cryptography which is how things work under the hood because we do not have much time so yeah zero knowledge proof so at zero knowledge proofs make one party the prover able to prove to another party the verifier that the statement is true without revealing any information beyond the mere fact of the statements validity so you can use this for example to prove your age that is is true without revealing any information beyond the mere fact of the statement's validity. So you can use this, for example, to prove your age that is above some sort of threshold without saying exactly what your age is.
Secure multi-party computation is a set of cryptographic protocols that let multiple parties collaborate together to compute a function providing their inputs, maintaining those inputs for all the computation private. This is useful for use cases like voting, when you have to vote on something, and you want to keep your vote private, and you do not want to trust a third party to count the votes. Then we have FHE, Philemon Morphic Encryption, a set of cryptographic tools that enables you to do encrypted computations. What encrypted computation means is that once decrypted, you get a plain text. And this plain text is the same as if it performed the computation on the decrypted data directly.
This is ideal for scenarios like autosourcing computation, like running a machine learning model without letting the model owner learn about your data. Each of these blocks is pretty powerful by its own, but they open up fascinating possibilities by combining them. In particular, on trying to solve their own drawbacks. For example, ZKP can be seen as an efficient, app-specific MPC, but combining them, you can obtain verifying the MPC computation, able to prove that the multi-party computation was performed correctly under some assumption in ZK. So instead of just computing, you can also prove from input to output the computation, or you can outsource the computation.
So you can rely on other people doing the computation for you, like they can be like more than one people, and this can enable complex cryptography also in resource-constrained devices because you're not computing by yourself. Another combination, MPC-FHE, like one of the biggest challenges in FHE is managing the decryption keys. And there are two main approaches. The first one is with MPC distributing the key generation. So you have multiple parties, and they can jointly manage a single FHE key where no single party has the ownership of the key generation, so you have multiple parties, and they can jointly and manage a single FHE key, where no single party has the ownership of the key.
And the multi-key FHE, everyone has a key, and they should combine the key to perform the secure computation. On the other hand, since FHE is just addition, multiplication of ciphertext. You can achieve sum of product of encrypted values, so you can build generic MPC. With ZQP and FHE is the most experimental and is basically trying to tackle two questions. The first one is, how can I trust that the encrypted value was correct under some assumptions, like is a correct BFE ciphertext?
Or how can I trust that the computation value was correct under some assumptions, like is a correct BFE cipher text, or I can trust that the computation was done correctly. And all three blocks combined is like you can combine them. It's technically feasible. We can add ZKey to make very feasible MPC-FHE combination. You can add T's, trusted execution environment, to the ZKey and participate in the MPC-FHE, but we still need to take into consideration that many real-world problems can be solved with just one vanilla block, like just ZKey or MPC, and defining resources, constraints, and unique needs of your problem can help you navigate all the space of the solutions and help you to make the right choice.
I'm running out of time, so thank you. Okay, we have three minutes Q&A. Raise your hand if you have a question. That's a little bit far. I'm gonna try That's why outsource to you Maybe I should give it to you What are the most interesting use cases for every single one of the technologies that you've seen Like the key MPC of each year the combination I mean, is there a combination application yet?
Yeah, there are some not applications that, like, I cannot say that they are production ready. There are some explorations and research. So you have mainly, like, tooling that can help you to distribute the key of FHE in MPC or you have like some sort of initial research in verifiable FHE like proving that your ciphertext is encrypted correctly so there are still lots going on and as I said it's hard to keep up with everything so maybe I'm not aware of other stuff but in general yeah I think the most exciting thing is trying to make advancement in the FHV ability because this can be really a breakthrough. And I don't know if I can make another question, but is there any framework yet for full-momorphic encryption with contracts, like for mainnet in Solidity? When contracts like for mainnet in Solidity?
When you speak about mainnet in Solidity I think that FHE is mainly off-chain stuff. There are some teams that are working on on-chain FHE as well but yeah you can find like the state-of-the-art in the tooling and developer experience is not like as the key one right now. So there's still lots of work to do in libraries, tooling, and frameworks. Right now there are good libraries, good frameworks, but mainly for experimental research more than going to production. Thank you.
Thank you so much. I think we have time for one more question. Thank you for Thank you so much. I think we have time for one more question. Thank you for the presentation.
Is FHE general purpose? Can we use it for all kinds of computation? So I'm not 100% sure, but FHE is mostly additions and multiplications, so you can maybe emulate everything with those operations. And so yeah, you can have some sort of general-purpose FHE going on, but all the nuances about like the constraints on how efficient it is or how it can be applied on small devices or other stuff it still depends on what kind of back-end you are going to use yeah I think okay let's give a big hand to Giacomo. Thank you so much.
Next up we have Rosalina.
Automatic transcript — names and jargon may be misspelled.