Alexander Hertlein - Decentralized Confidential Computing (DeCC)
EthereumZuri.ch 2024 · April 2024 · 21:20
Alexander Hertlein introduces Decentralized Confidential Computing (DeCC), a class of solutions for confidential execution of arbitrary computations using trusted execution environments, fully homomorphic encryption, multi-party computation or zero-knowledge proofs. He argues DeCC will join DeFi and DePIN as a major category of blockchain use cases, presents a lightweight trustless bridge on Secret Network that executes encrypted payloads for EVM-compatible chains, and surveys a consortium of confidential blockchains.
Speakers
Topics
From EthereumZuri.ch 2024, hosted by EthereumZuri.ch.
Transcript
hi guys okay so I already got introduced I'm Alexander um I'm working at the sqq Network Foundation for developer relations and my topic is pretty simple today it's one of the most I think going to be like one of the new narratives uh for this year which is going to be uh decentralized confidential Computing uh or in short and DCC so uh simply put DCC is you know trying to form a narrative around the fact that you have a lot of chains that are doing privacy preserving computation or confidential uh computation but don't have like sort of a unified narrative you know which they kind of share um so let me show you which which these are I
mean you might you might know some of these um chains that are always using these Technologies so DCC basically means that we're like having sort of an umbrella a narrative to kind of bring in all of the chains that are using these kind of Technologies to basically have privacy preserving or confidential um Computing so the first of them is trusted execution environments which is one of the uh things that secret Network uses um a trusted execution environment simply means that you have a special part in a CPU we call an enclave and you do some sort of computation inside of there it's not visible to the outside nor to the node Runners nor to validators and you can do all sorts of like encrypted um Computing inside of
this trusted exuse environment then some might know what multiart computation already is it means that you have um just validators or notes each doing one small computation without knowing the whole part of it so that way you can keep the whole computation confidential by just basically Distributing them across a bunch of um nodes then we have fully homomorph encryption which is the new kit on a block uh F morphic encryption simply means that you do the encryption directly on the encrypted data so we don't even decrypt it you just take the data you do the computation directly on these data and then lastly with Z knowledge proofs I think most of them already most of you already know what zkps are so I'm not going to go too deeply into this so
now what's the whole landscape of these chains if you know them right maybe you know some of them maybe not I'm going to go into these but the whole DCC narrative kind of centers on all of these chains that are using these Technologies so for example you might already some know of them for example for zkps it's like dusk Leo atte 3D ones that you know then we're going to go to tees which is of course I put secret in the middle obviously because I'm because I'm working at secret um secret is is a is a pretty old one of them like we started in 2020 um then we have for Aces RIS Network Marlin F Network for example or 10 I mean they were formerly obscuro if you know obscuro this this is like what 10 is now they renamed it then we're
going to go more into the fhe direction which I'm all on test right now the C technology that they use is Zama so if you know Zama already it might ring a bell if not they're basically doing they're basically ping the um the FH to be you know to be used on blockchains and two projects that are using this already are Phoenix and inco there on in tesate stages right now then we go to the last one which is NPC so we kind have like projects that are kind of somewhere sitting in the middle basically using all kinds of Technologies like or multiple for example Alf zero which some of you might know already or Fair block and part blockchain so there a wild mix of blockchains that are protocols that are using all range all kinds of these
Technologies but all what they kind of have in common is they they're all trying to provide you with privacy preserve uh privacy preserving smart contracts or with confidential Computing how however you would like to name it then question is since we all have all kind of have like these different Technologies for confidential Computing why does it even have to be that many that's the question why do we even need like this narrative is why is it necessary even key question is if you have all of these Technologies is there someone is there one technology actually stands out I would personally say no because each of them has like its distinct let's say advantages and disadvantages I give an example so if you just compare it to etherum on the left so like if you can see the axis
it's roughly it's it's just a rough idea um of how hard it is to you know do something on the Chain you know do some program um some coding on the chain or how the application logic is versus like how fast it is and um how private it actually is so it's it's it's always like a trade-off I'd say right if is super easy to develop but it's completely open public so if you want to go more into the Privacy space confidential Computing space you're going to got they going to first get to tees which are like easier to develop but of course they have the assumption that the CPU or The Trusted execution doesn't break then for example for NPC you're going to have of course a a little bit better TR assumption because you say well if all the nodes of Val
just don't collude you're going to be still secure because you don't know the whole part the whole computation each one only knows one part of it for fhe for example problem is it's mathematically secure it's just proven that's that it works problem is it's rather slow to develop right it's it you have to use extra logic to make that code work also the execution itself isn't that fast so if it's not that fast you're going to have to use like a lot a lot of accelerators or you're going to have to just use the fact that you just use smaller data types to make use of it so it increases the complexity again and then on the other hand for example with zkps of course you can only prove that a computation was correct but you maybe
can't use shared state so you have to be like a bit clever about how you use this so all of these have to distinct trade-offs but what they all kind of unite is the fact that they all trying to give you you know confidential Computing you know one way or another so that's why we think it's important to kind of give them all like a narrative their own umbrella basically on which you would you know give it out to um into the crypto world so basically from from my whole talk right now is the idea is I'm guess you're going to go from the top so from pretty broad scope now to a bit like a bit narrowed scope which goes more basically we're going to go converge more and more into secret right now to explain also you what how secret is solving this um so we can have this DCC
umbrella now and from our standpoint from Secret what we're going doing is we're trying to do like we just want to Foster um deeper collaborations so the DCC narrative is something that any chain that's doing some sort of like privacy preserving has privacy pres smart contracts or Computing how however you would Name It We want you in that narrative we want you in in that unified narrative in the group that we have you know to actually push push this into um into the crypto world and you know make make use of the narrative that we have then what we can do it for secret leas we can have a bit more deeper um collaborations which is basically we we're going from the DCC a bit deeper we're basically zooming in now and we're zooming in and what we
have in secret what we do is we call it in our case that's the confidential Computing constellation so it's like a narrow set of projects that are closely that are working together more closely so that's a bit so basically we zoomed in now and we kind I kind of put secret in the middle obviously because I'm in secret so from my standpoint if you look at a Galaxy like a cluster you would I see myself as the middle of it of course each of these chains and projects are equally important so in our case we see secret in the middle that's the logo that I'm also having here then we also have Phoenix which you know takes care of fhe then we have fa block and then we have Obi so fabblock uses NPC mainly um and Obi is actually a side chain that's
going to be made for secret that uses a account abstraction so we can actually use secret since we have trusted execution environments we can store private keys inside of that trusted execution environment so no one else can see it and with this you can create account abstraction wallets OB is already live on mainnet but they're also going to do an extra separate Chain by the way so they actually completely leveraging secret to the maximum um to do Aon obstruction what's very cool about all of these is that they you know closely work with each other together so Phoenix for example has a lot of developers that work on secret and on Phoenix fa block for example is also developing technologies that kind of go into the direction of Secret for example with the fairing um with the fairing test and what they're doing and then also for Obi
for example they're going to be like a side chain to secret or an L or or an L2 sort of because secret is an L Cosmos L1 but I'm going to go more into this and then also we still um we're still making out deals with other projects that are actually uh using secret as part of the code or like integrating more with secret so we're still we we're very open for more collaborations as well but we also have some more in the um in our draws which are still not completely finished so we can't so I can't announce them yet we still have more to come um so now my my question is really like if if you're basically reading this now the question is well how would secret actually fulfill this like DCC narrative like this vision of actually bringing confidential Computing to other evm
chains or like to other chains since this since this is an eum event um so now my question really is how how do we do DCC for evm chains that's going to be my question that I'm going to answer now this is absolutely perfect for the uh for the formatting that that was that was actually better when I actually sent it in anyways um I think you can still read it do you if not Just Give Me A Sign anyways our question really is how can we bring decentralized confidential Computing to evm chains I can tell you at least how SQL is going to do it and how we're doing it right now so on the one side on the left you can see EVMS could also be ZK VMS by the way we're also supporting
these and then on the other side of course we have secet network secet network is using trusted execution environment so you can do like a bunch of privacy preserving SL confidential Computing on secret and then send a result back so you're going to do some computation on on on evm or you can send encrypt the payloads in you send them to secret do some computation and then send it back and there's going to be two ways so first of them it's going to be Axel generate gener message passing for those who don't know what Axel maybe some some of you use squid router maybe in some use case if you did um it's already basically you already just used axela without actually knowing it uh in case what you don't know what axela is it's essentially it's also a cosmos L1 and the key idea is it's basically a huge
multi that consists of all of the validators inside of Axel so it's you can almost say it's like a huge multi sck Bridge um so that way of course we have a two-way Bridge that's pretty secure um now our question is mainly I mean I've talked about the ECC now I've talked about secret now question is really I want to go to what SEC what secret actually is for you so you just I'm just going to tell you secret is a and this is how we see ourselves this is how we see ourselves this is how we want to be seen basically for the whole affirm committee as well we see us as a confidential Computing Hub and we are using Cosmos SDK as our base and we on L1 and cre technology is trusted
execution environments and in our use case we use Intel sgx for this of course there other Technologies as well for example AMD SCV and others but for our use case and for our project we're using Intel sgx and what we have and that's basically what we are providing to EVMS is our what we call like just confidential execution layer that's decentralized scalable and secure and we are using this to just basically give you any you know do any sort of like confidential private computation that you want on your data from any blockchain that you have on evm Space we also we also starting to support other blockchains now that like not non evm based but we like slowly slowly building it
out now the question is since we have we're going to go more deep deeper into this like what are actually our disciplines what do we think do we need to like provide actually for users who are using secret and we call this like the te te disciplines so it kind of looks like Olympic rings that's actually on purpose that's actually not a error on the on the formatting it's actually on purpose so first of all is we have confidential calculations what we see as really important for the for all chains basically that can use it then we want trusted execution then we want transactional privacy transactional privacy simply means for example you're sending some tokens around you don't want to know
what are you sending around right or to who you're sending it to or what amount are you sending it to so that's how we so that's how we see it privacy has to be a must then data protection obviously so your data are secure when are you're Computing on them and you're they're not leaked afterwards and also verifiable Computing which means even though we're still doing this all kind of stuff in enclaves and it's not visible to the outside it still has to be verifiable by all of the validators inside of secret that are like checking the blocks and are giving the signatures on the blocks so it still has to be verified VI in some way as well so with this we can have basically everything together right we have we have the evm side we have the Secret
side now together and we have one of the one of them bridging protocols which is ax GMP thing is with ax GMP if some if some might have used it the problem is that it's not really fast it's like finality is like 10 minutes 20 minutes depending on the chain that you have so what are we going to do now well what we're going to do is we are going to use secret path which is a bridge that's a bit different but it's way faster and the principle is actually pretty simple so what we have with secret PA is it's also like a cross chain bridging solution but we see it as something that's actually trustless because it actually leverages only leverages a confidential contract on secret to pull
off the whole bridging and the idea is pretty simple since you have a trusted execution environment it's encrypt so all the state that you have inside of this is encrypted no one else can see the state of that contract so you can store a private key in that contract that's the idea behind it you store a private key in this contract that no one else can see except the contract only contract has access to this so that contract obviously can do the following it can sign messages now since it has a since it has a private key inside of the contract it can sign messages and since you can sign messages with these type messages you can verify them on evm so what you can do is you can basically take some data put them on secret do some encrypted computation on secret using an encrypted
payLo put it on secret and then it will sign a message and send it back so the way in is actually not trusted that's completely different from any other change you usually see right because it usually you know kind of secures both ways it secures the way in and and secures the way out in secret it's in that secret path of our special technology it's a bit different you just have a smart contract so the way in is untrusted but the way back is actually trusted that's the only one that's actually trusted so we see it's like a one way sign Bridge only the messages that are coming out of it actually secure but they're only signed by a smart contract so it doesn't have to be any multi behind this it's just a contract that signs a message and you can verify that message that it was
actually coming from this contract you just check the signature that's it and with secet path you can I personally say you can almost pull off then personally say it's like almost 80% of the use cases that you're going to do like using AXA GP or other services uh so you can basically use any encrypted payload that you can imagine for example a encrypted key value store on your evm yep and you can use for example CF which we used at e Denver and if e Bucharest both of the teams that Ed it one actually and it's a verifiable onchain random number generator it's way faster so within one block and it's way cheaper in gas usage as well because you only check one signature so now we've basically went in super deep into the whole secret stack and what you can do with
it but that's about it we're basically now going to zoom out again that's how we think we can fulfill the DCC Nar ative to bring a DCC to all across all evm chains and potentially even more other chains as well now so I basically talk to ICP as well and also in Zana if you want to find out more that's where you can look at that's it thank you [Applause] guys big round of applause thank you thank you it is a secret I'm totally sold because it's confidential I like it so questions please raise your hand we'll give you the mic you have mic over there and here one or two one wonderful ah thank you so I've got a question
about secret path so comparing to other cross string protocols such as layer zero or across protocol what are the advantages of secret path I mean the the main advantage in secret path is that you not riing on some you know at attester basically you know attesting some sort of like um message that was or some bridging that was correct it's just the smart contract itself does all of the logic it checks that the message came in it will execute it on a different contract that you like just set basically you said execute this this contract and then it will actually use the result of this sign it again so it will get back the message it will sign the message and then send it back into evm so you don't have any attestation service or anything involved it's just sending in some message into that
Gateway in secret it handles everything and then sends it back with the signature on it and you can check the signature on evm and that's pretty simple right you just don't have any intermediary you just basically just put the message from evm into secret we have a relayer for this but it's trustless so it don't even it can actually try to forge messages it doesn't matter because you don't trust it anyways and the way back is also untrusted you can just basically take the stuff from the contract put it into the in evm contract the evm contract will check it if it's valid or not that's it and you don't have to use any attestation service or rollup or anything impressive it's pretty nice yeah and it's and it's extremely fast and we I hope people raise more than layer zero did so fingers I keep my finger cross
for you any more questions then we are staying for the last but not least panel discussion everybody's here stay here thank you so much was a question there one question apologies apologies yeah uh thanks for presentation uh I was uh last time I was looking into sgx it was long time ago so I may be not up to date but I would love to to hear from you U about like challenges in uh maintaining high security of the Privacy what is executed inside in respect to side Channel attacks uh is my understanding correct that the system
running inside of Enclave is processing the inputs that are provided for the external world so I could technically make a copy of this state and fuz it with different inputs and try to measure timings or do other kind of like measurements and try through side Channel attack to uh exploit some good point vulnerabilities and I wondered because there is this like inse security this this this this this uh false sense of security that you provide platform that developers will feel so secure that they will start to be like you know a bit Loy about the implementation while still I believe you need to have a
regime like constant time computation or other stuff so I wonder about your thoughts about this like um extremely good points so first of all um exactly saying the side CH attacks are a huge problem obviously because if you're on public blockchains you don't have to think about this kind of stuff um the thing that we how we solve it is we disable transaction simulation so we can't actually simulate a transaction uh so we actually have to really execute that transaction on chain and also the other thing is you could potentially say well how about I'm just forking the network and then just trying to do the same thing thing is um we basically verify the valid has set inside of The Enclave as well so if you try to Fork the the whole chain and then try to do some execution on it it doesn't work because you're also
including the Valor set in each of the proofs inside of the te so the te checks actually who's actually signing this and if you don't have the Valor set included that's actually from your original chain you can't do any execution on that Enclave so that way you're mitigating this um but yeah this like one of the bigger ones and then for example constant time is also a problem obviously so we have for example also gas evaporation so it basically that way you do it like kind of like con constant gas instead of constant time you do constant gas and that way it doesn't leak any information about the execution Trace that you had but super good points and this is like actually not a trival problem you really have to think about this when you're doing the whole privacy you know privacy preserving SL confidential Computing stack absolutely
agree and we'll keep that for the upper thank you so much Alexander last round of applause for Alexander