A new paradigm in privacy: The Fundamentals of Homomorphic Encryption

EthPrague 2024 · 31 May 2024 · 20:39

Fully homomorphic encryption enables computation on encrypted data, but the speaker argues that noise, expensive bootstrapping and latency still obstruct practical blockchain use. A hypothetical patient-notes example shows an AI model processing data without seeing it or its output; he says FHE must work with tools such as ZK and threshold signing to verify operations and decentralize computation. The Q&A treats quantum resistance as theoretical consensus and debates FHE versus MPC on efficiency, sharing and collusion risk.

Topics

From EthPrague 2024, hosted by ETHPrague.

Holešovice Market

Transcript

[Music] so good afternoon everyone it's a little bit cooling down with amazing rain uh now we're going to have very interesting session very very hot topic uh FHA I don't know um if you have been following the trend fully homomorphic encryption so this going to be um this time introduced by Diogo from light shift capital so please welcome our amazing speaker with a big [Applause] Applause so hi everyone um like we we are in 2024 and there's

still like massive data acts happening like 23 Andy was just act with like thousands of data from users DNA being being exploited by by eers right and so we are like taking Rockets to to space we are building completely new Financial systems on chain but we still haven't able to secure users data uh online right and so I think that for me amorphic encryption can be a solution for that and my my goal today is to explain a little bit on the the basics of what F actually is um from my conversations I've been seeing a lot of misconceptions and so I want to want to

share a bit more of of the basics I'm not a cryptographer nor do I pretend to be one so I'm just giving you the basics explain what the Technologies and some of the challenges that he he also needs to to solve to actually become feasible uh in the blockchain space and of course the potential that I think it it has um so very quickly about myself I'm I'm do I'm from Lisbon I work at White shift capital and I also organize uh e Lisbon uh as for white shift we we are in a wage VC that joins forces and invests in companies building the the future of the central wise infrastructure um and getting to the reads like what actually

is f right so very simply fig or ful amorphic encryption is an encryption method that allows one to do general computations of our data that's encrypted while getting the same result as if were're doing it on the crypted data so we can actually do data over uh sorry we can actually do computations over encrypted data without having to decrypt it and so as an example let's say we have like some data like the the number two right and we want to like do some computation over it let's say multiply it by two if we were to use a regular P scheme we would encrypt the the number two we would get some Cipher

text and then if we we try to multiply that Cipher text by two and then if we try to decp that result we would get gibberish like we wouldn't get anything useful and we certainly wouldn't get the number four right however if we instead of using py if you use an FG scheme to encrypt the data we can actually take the point text that's encrypted with with FG we can use that point text to do uh for amorphic multiplication and then the result we get is the same result that we we would get if the data was encrypted in this case we would multiply the the cipher text and after decrypting it we will get the number four and so

basically we could actually compute the multiplication over encrypted data and so maybe for a more practical example let's take Alis Alis is a psychologist she has like thousands of notes from her consultations with patients and she wants to run an AI model to try to find patterns within the patients however she doesn't have enough compute to do this right and so she knows her friend Rob Bob has a ton of servers and she thinks maybe Bob can actually run this AI models over my data but like Alex knows that this data is very uh private is very uh like sensitive and so she can actually share it with Bob and what does

she do she enps the data and sends the saer text to Bob however when when Bob gets the data he can't run the model right because the data is encrypted and so he can't see the data but he also can't do anything with it and so the solution for this is for allice to actually give him the the the key to allow him to decrypt the data but this actually def fits the whole purpose of encrypting it in the in the beginning right and again with have FG we could solve this right because if F would encrypt the data with um with FG scheme she could send the cipher text to Bob and Bob again he wouldn't see the data but he could actually reun the model

over that data right and then you would actually also not see the output so you could run the model you wouldn't see the data and you wouldn't see the output basically solving the issue before and like this sounds pretty cool right this sounds amazing right so like what why the hell isn't this everywhere why aren't we we using this already and the issue is noise right because every time we do a computation over the the encrypted data um we add more noise to it so every multiplication that's done every uh sum adds noise to the cipher text and after a given number of operations the noise BEC simply too big and you can't equip the data if you try

to equip it you just get like random numbers and and strings right and so the noise gets exhausted very fast and this is why we couldn't do ful encryption however someone someone uh found a solution with boot strapping and basically what boot stopping does is that after a number of operations it resets the noise level of um the the cipher text allowing you to do more computations and so in theory if you keep on bootstrapping if you keep on resetting the noise you can do infinite amounts of of operations again this is the the theory right and and once again

if we have a solution like why the hell aren't we using this and and the issue is that like because bootstrapping is too complex right it requires a lot of compute it adds a 10 of weency to systems and so they become simply like too unusable right so a simply a simple multiplication will take like weeks to be done and that's simply not not feasible in current systems and it actually is very costly to run because again of latency and and the the amount of Compu that it actually needs to to make it happen and so a lot of people ask like why is FG better than ZK but this is actually the wrong question to ask because I I think sorry a much more

interesting one is like why is FG different than ZK because there are different Technologies right they are both encryption methods but they serve different purposes and like zika is amazing right is amazing for scalability to do like verifiable computations and to verify things and for some private use cases however like zika is not ideal for privacy Solutions because you are always dealing with proofs and these proes are like you can do a lot of things with it but they are not very flexible you can't like do complex computations over over that data because you are only dealing with with proofs right and so like it's great if you actually can use a proof but if you

can't then you have no solution but use like the crypto data and that's how FG can can can enter the space and can and can complement the Privacy stock right and so FG like zika is just another to on the Privacy stock um and so how can we actually make F feasible right what are the actual challenges that need to be solved for for fig to become feasible and like there's a lot of them of course is a very new technology like two years ago nobody in the crypto space actually knew what this was nor even me right and so there's a lot of things that need to be solved um but so first I think in the auction

in place we are all used to solving hard problems and most of these problems are actually being solved in other Technologies and one of them is like you actually need to verify the input the the input data right because each F model has some specifications for what data you can handle and so you need to verify that the user is inputting that the right data otherwise you can't write the system and you can actually try to um understand the private key from from that um you you also need to verify computation because even if Bob with the servers even if it doesn't have access to the data only the encrypted form of the data like you actually want to make

sure that it's doing the computations that you want him to do right because otherwise it could be trying to exploit the data somehow and then finally like you also want to decentralize the computation because again even if the data is encrypted you don't want a single party to control your data right you don't want AWS to have all your encrypted data right even if they they can't really see the the the point text Data you also you also don't want them to have the encrypted data and so you we need solutions for this and that's how how I think that like f should be combined with other cryptography Technologies like ZK threshold signing and and solutions like that um and then

of course as we all know that blockchains and cryptography technology suff we need to solve like computation speed and and efficiency right and so there's like a lot of new schemes being being developed to improve the the efficiency and try to make them faster there's also a lot of companies building Hardware acceleration systems to allow FG to be run on on current Hardware devices by by gpus and then of course there's also companies developing isix so special purpose Hardware just for for fug Solutions and like a lot of people call

FG the holy gra of encryption I think this is a very uh yeah a very aggressive term I think FG has a lot of potential but like like heav every novel technology it also has a lot of challenges that need to be solved right and so it still needs to be proven that it can actually work in current environments and we need to solve all those issues that I that I mentioned right um and then like whyg doesn't solve everything he also needs to be implemented with other Technologies like ZK to verify computation and and to verify um input data like threshold signing to decentralize the the

computation and things like that so FG by itself doesn't solve everything and FG by itself actually can't be implemented in a permissionless system um and then like I think the best is here to come we are just in the beginning of of FG like I think we are where ZK was a few years ago where like everybody was talking to talk about it and trying to come with new ideas on on how to use it and so I hope I made you guys a little bit more excited to explore the the topic in this brief presentation and I'm giving you an article I written about this which go in much more detail on how the actual mathematics of all this work and then there's a lot of resources for people

that are much smarter than me that have been reading like master and PhD Theses about F so if feel free to check them out um and yeah hope let's create a new privacy Paradigm thank you guys for the time I guess we already have a c from the audience immediately raising the hand so let's H oh really ah so okay I can I can share after uh yeah cool any other questions I see the hands there the microphone please here you go uh so I want to ask

uh does does this uh encryption uh is it a Quantum resistant or yeah so um so f is based on on what is mathematics like basically it's like learning with errors uh mathematics and the consens is that it's Quantum resistance but yeah that's like the theor theoretical consensus but in theory it is um so yeah because it's based on what is mathematics yeah yes I can see another hand there yeah I have a question that and do you have any idea that how to use f to

index array element to to what sorry to to to to index element of array such as the element of a list or or data no of our data structure without to I mean that to use to hide is is index on inex index of the of the ARR which means that the The Ordering of the array uh the index of of the elements in the array or the or the node in the data structure how to how to use f to to so you mean index or index index of

the data okay structure okay yeah I actually don't know so I mean that how to um how to hide the index of a node in a data structure or a element in Array that's same thing yeah I I don't know the answer I don't know the answer oh you you don't have an idea to do do do that yeah know oh so sorry so so currently a you can only um uh can only and Inc the uh the the basic operation basic arithmetic or the comparison or logical comparison yeah so like most systems like most systems right now they

are all doing only like sum and multiplication compute right because in theory like you can replicate like every logic system with just some multiplication right so like most system today are just doing that okay does that answer your question yeah okay cool uh any other questions so uh if not uh Dio oh okay yes hi I have a question uh because currently there are already uh distributed networks like uh Nilan or particia that basically uh mask the data distribute it among nodes and uh are

able to perform computation on the data uh without encryption decryption the nodes don't know what they Computing and uh the approach is much more efficient than uh the homomorphic encryption as it seems so uh are you aware of these systems or how do you compare it yeah so like Newan is based on Multi party computation right and so f is a subset of multi party computation where basically there's only two parties right so like yeah like there's just cases where neon is much more efficient but if you actually don't need to decentralize the compute then in theory you could do it with with f um so because again like FG is a subset of um uh operations done with with NPC um there said I don't

think I answer your question so what would be uh if you compare it in uh some real world examples let's say I have U private data or like medical data or something in in which uh where it would be more effective to use uh fully homomorphic encryption compared to uh some multiparty computation Network yeah exactly so like if you actually don't need so if you if you actually don't need to like decentralize the compute right if you have like again the example I gave with like Alis and Bob like then M computation is less efficient right because you are decentralizing the

compute without the need to actually do it right and maybe in in in the blockchain space um MPC is more um is more efficient but like for web to use cases for example where you just like doing on a specific server then becomes more efficient because you you don't need to be Distributing uh the computer cross nodes because that also has latency right because every time these no not have to communicate with themselves is adding weency to the system uh again I'm not a cryptographer so I'm just giving you what I know of the research I've been doing thank you I see another question coming

along actually sorry just it's a comment actually uh there's a difference in security between FH and MPC FH basically you have a certain if the scheme is secure then basically it's secure an NPC if the nodes actually the the the participants in NPC collude they can break the encryption so it's a different security model also it's not just this the efficiency yeah and and another point to that which is like if you actually want to like share the data equipped it you can't do it with MPC right because MPC Just DE centralizes the compute and makes the compu itself private not the data right so like if you encrypt data

and you want to share with different parties that are not communicating with each other you can't do it with MPC there are some approaches this it's still not it's still not in the main net so um well I it's still not in production yes but uh the idea is to make it so that the data is masked and to sort of eliminate uh the possibility of collusion or at least to minimize it use probably you cannot always mitigate all risks 100% yeah

right even ethereum right if everybody's foring it breaks etherum right so uh like I I understand that but to your point like MPC has a lot of great use cases but I I don't necessarily think that it's the best solution for every for everything yeah thank you interesting discussion any more questions yes I it's like a two Hot Topic in the space right I think it's evolving technology we're going to have always a lot of discussions on tradeoffs uh even like FH being expensive recently I saw some talks that people talking about Hardware acceleration going to happen in 2026 so let's see which one going to be winning your mayet or F but please I

give a pluse to Theo providing us a wonderful insight and we will see soon [Applause] [Music]