Insights into TEE Research and Deployment Framework for Blockchain Scalability
ProtoLayers Talks · June 2024 · 15:34
Filip Rezabek of the Technical University of Munich describes the differences between process-based and VM-based trusted execution environments and assesses their impact on blockchain scalability. He reviews the state of TEE research and its open challenges, and introduces a framework for deploying and researching TEEs in both local and cloud settings.
Speakers
Topics
From ProtoLayers Talks, hosted by ProtoLayers.
Transcript
and I'm very happy to be here so I'm originally from Prague and but I've have been living for several couple of years like outside of of my hometown prag and it's always good to get here and see how the crypto scene is growing so this is the second year actually I'm attending e prag and it's good to be here also as a as a speaker this year y uh and today I will be presenting about my insights into resarch that is focusing on trusted execution environments so for those of you who have been here since since the early afternoon definitely I think we have heard in most of the talks aspects of tees and in my talk I will be diving a bit more into the details of actually what are what is at te what are the different manufacturers out there and
actually maybe you can think of some use cases for Te during the development of your of your Solutions and in the second half of the talk or rather coming to the end of the talk I will also touch on an aspect of a framework that we have developed at a chair that is aimed to be used for uh for actually assessing the capabilities of the different trusted execution environment Technologies but not only limited to that but providing a general scope uh the work is uh part of a larger team of people my colleagues at the chair that I have been working with for the several couple of years uh not only on this framework but other aspects as well and as a chair of network architectures and services we are in general looking into the aspects of distributed systems and looking into the network security protocols and other
parts so if you're interested feel free to scan the QR code and find out what other research we are actually doing so without further Ado let's get started started so I believe some of you are already familiar with the general concept of what T is can be used for uh this is not of course covering all of the aspects and use cases you can think about but the general idea is that of course in order to scale the performance of the of the chains you can do certain offchain computation in order to later on just provide a certain proof or commitment on the chain that can be later on used uh to basically provide additional computation of chain of course there is other solution that is much more popular that is that are Z erops but in some way te can provide a similar type of uh use cases of course
the general part of the te is focusing on the comput and proving where you later on can store the computation on the Chain where people in a smart contact can later on verify it and get information about that but of course there are additional use cases you can think about so it can be of course used also for privacy when it comes to encrypted mol transactions similar resistance due to the aspects of the attestations and other other parts as well so of course uh depending with whom you speak there will be a bit of controversy between the people that support the or not from my perspective I don't generally see it like a silver bullet that should be used for all types of solutions but you can think of it like a defense in-depth mechanism where maybe using tees can provide some additional security guarantees and definitely I
think they are worthwhile technology to have a look at because they are quite mature and they can be already used in nowaday systems so providing a bit of context what is actually a trusted execution environment so you can think of it like an isolated region in a CPU so for that it actually means that the hardware manufacturer has to provide this uh information and or this aspects inside of the CPU so when you are ordering a CPU you have to actually verify that the CPU is supporting the corresponding trusted execution environment technology and in general it aims to promise to be secure location for code and data uh on the CPU itself and the main attributes of thust execution environments is that it offers confidentiality meaning that no one else either the the other users
in the system uh can read the data and you it also offers integrity so that in case you're interacting with the te you can ensure the data that you have integr we have uh interacted with uh we not tempered with and are actually functioning and in order to make it usable you can also generate attestation reports that you are later on sharing with anyone else and they can verify that actually okay this type of computation has happened inside of the th execution environment and they can actually trust uh that the computation and the outcome of it is is correct uh diving a bit more into the attestation so again this is actually aspect that is varying quite significantly among the different manufacturers uh but the idea is that it
allows you to measure and attesa in the state of the system so for example it can provide you information in the policy of the correspond attestation is what operating system are you using what is the corresponding hash of the of your code that is running inside of the te and many other information and this information in order to be trusted actually has to be provided in a form of fruit of trust so that way even in the manufacturer of the CPU is basically helping you to issue a certificate to your corresponding te so that way you can have the root of trust from the manufacturer to the user of the te until basically anyone third party can verify that this computation has happened inside of your te and of course for that you are using typical public e cryptography that you are just signing the rep board inside of the te itself um
there can be added also depending again on the type of manufacturer you can also have some uh granular control and you can be adding additional custom to this attestation report but again for that we don't have time to dive into details but in general we can see that this is something that uh is a welcomed uh feature to have when it comes to the usage of tees there are two main categories of thed execution environments uh process based and VM based Solutions so on the right side we can see the process based solution so this is the the implementation inside of the cloud but of course you can also think of it when you have your bare metal solution where you will just basically skip the hypervisor and that means that your application has to be specifically written in such a way that
it will be interacting with the Tred execution environment and you basically have a hook uh to the to the corresponding trusted execution environment secure Enclave on the system and parts of your code will be running inside of this enclave and you will specify using this interaction and the SDK what types of code actually should be running inside of The Enclave itself and for those operations that will be running inside of The Enclave you will ensure the additional security properties on the other side we have the virtual machine based Solutions in this case you actually are running whole your application inside of the te where we are not only talking about full-fledge virtual machines but it can be also containers so for example uh I guess many of you have heard about Docker containers so those cannot be easily run
inside of a te but there are other solutions for example like ransy containers or Kata containers that basically allows to be run inside of a te either individually or on top of a virtual machine that is fully running inside of the te itself so and later on when the corresponding application wants to interact uh with the te it's basically leveraging the secur instructions that are provided and are part of the instruction set of the corresponding CPUs uh there are several manufacturers so basically most of the modern CPUs are either coming from Intel or AMD and for those we can see the the colors in green correspond to this to the process based solution so we have Intel sgx that I would say is quite established technology has been around for quite some time
uh that is process based solution we have Intel TDX and new solution coming from Intel that is a VM based solution from AMD we have a different versions over the years of AMD SCV SNP that is adding additional features for confidentiality and integrity uh then we also have risk 5 Keystone project but there is also additional part that can be added to that and from arm uh we have that trust Zone that is like very established technology pretty much used in every modern uh smartphone that is is also a process based solution but also we see a successor of arm uh thrust Zone that is called CCA and actually for that one we will see a shift uh towards uh towards the VM based approach as well so the reason I briefly already touched on
that why the VM based Solutions are maybe more attractive for the new technologies especially the aspect that you don't have to do too significant modifications for your particular code so you can just take your application run it inside of the of your container and you will basically be adding this additional security features on top and of course you have to later on interact with the additional tooling to be able to generate the attestations to convince others that actually your code has run properly inside of the te and is providing the sufficient feature so still you have to of course consider what are the features you are interested in but the usability should be uh much much uh better when it comes to that of course when looking into the other aspects already touched upon that memory confidentiality memory Integrity CPU
State protection station is all of the are provided by the modern technologies that we can see here for example when when talking about arm trust Zone uh arm trust Zone doesn't provide the remote adastation capability so that way you cannot easily convince others that your code and your tool chain was actually running inside of the armra Zone itself and of course uh the main difference is the aspect of the fine grain control so of course uh with using the VM based approach you are losing this fine grain Gran control because you are running all your code itself whereas for the Intel sgx you are actually running only certain parts that you can uh assess and ensure that they will be running inside of the thr execution environment also looking into the accessibility of it of course there are
already CPUs you can buy you can just buy your own bare metal and deploy it very easily locally I mean easily uh it's kind of plug and play depending on the solutions you want to use uh we have quite some experience that we running our own Bare Metal Solutions for uh majority of the te that you can see on the slides uh but also for accessibility reasons you can also consider having a look at Cloud providers so gcp Google Cloud platform Azure AWS are basically already providing most of these uh a uh most of the options Intel TDX is rather new uh so for that one we can especially uh only have access in a public review so this is something that actually we have an access to and are looking into the usage of Google Cloud platform
together with Intel TDX and continuing with the second part of the talk it's uh as we can see there are different thrusted execution environments all of them are providing slightly different guarantees when it comes to security usability and other parts and for that we are looking into the ways on actually how to be a able to assess in a structured fashion first the capabilities of the te and especially looking into that in the context of distributed systems blockchains cryptography protocols and other parts and be able to collect insights in a reproducible fashion be able to compare how the different architectures either of tees or the applications running inside of a te can differ and and identifying a common ground that can basically later on help to collect the insights and uh minimize the external
noise of such deployments so I believe most of you are in some way familiar with the stti on the right side so of course mainly on the application layer we are interested in the blockchain St right that where basically we have our data layer Network layer consensus layer execution layer and others but of course uh the blockchains are not coming out of a thin air right they are building on top of uh internet and of course the corresponding physical layer adds are part of the whole stch that the corresponding uh clients that are running and participating in in blockchain have to be uh considered of and the part that we are mainly interested in is how does when we integrate for example tees especially the the VMAs Solutions affect the upper layer Solutions in such a way
so our framework is basically allowing to deploy uh the aspects in a cloud deployments but also in local deployments meaning that for example you can take ethereum client and deploy it in cloud or local deployment inside of a te and see actually how uh does it affect the performance but also how can you actually interact with it and be able to create a corresponding attestations and of course in order to be able to collect valuable insights we have to do some theoretical assessments like we actually really diving into the the security guarantees into the white papers and and others of the corresponding system to see how it behaves see if actually if it's matching to the code itself and later on do some testing when it comes to the evaluation metrics there's of course platora of
metrics you can play around with also platora of parameters you can modify so we don't really have time to dive into that in such a level of detail but uh in general what we are aiming for is to have a granular control over as many parameters and met as and be able to collect information about as many metrics as possible when it comes to actually deploying such experiments uh we are calling the framework methoda and we have a orchestration from a management host that basically where we Define the corresponding inputs meaning okay we want to run I don't know 8 different ethereum client nodes in our environment that will be distributed over several physical nodes uh some of them can be running inside of a te some of them will
be running uh just as a typical virtual machines or other parts then later on we have the system under the test where we are collecting the insights about the system uh performance and properties and later on we are collecting all of the information from the corresponding run and we are able to collect later on the insights about the system properties itself since we are talking specially about tees here are some preliminary experiments where we can see uh two types of experiments for the CPU compute bound Triad metric and CPU memory Bound for which we use the computation of metrix Dimensions where you can see on the xaxis the corresponding data set size for the Triad on the left and on the right side the metric dimensions for the memory bound experiments and then we
can see the execution duration in seconds on the y- axis for the Triad on the left and number of floating Point operations on the on the metrix dimensions and we have been comparing four different Technologies inside of our local deployment where we have a baseline which is basically no virtualization no trust execution environment itself it's just basically the the bare metal performance we have then a Kata we have done a Docker container cata container and cata container inside with with the thrusted execution environment and basically basically their experiments are showcasing that the modern te uh performance implications are rather comparable actually to running uh a bare metal performances itself which actually
is showcasing quite nicely the majority of the technology and it can be quite easily used uh for certain CPU heavy tasks and doesn't provide as much of an overhead when when used so in today's talk we covered the aspects on how these can be used for scalability and we covered also the framework that we are using for such Solutions and overall we consider that this could be applicable to many solutions out there either for scalability uh other aspects of private computer on General priv private computer on permissionless blockchains big topic uh decentralized physical infrastructures and others what we have also heard in the previous talk that we we didn't manage to cover in the talk uh this time at all is we actually
start to see trust execution environments on uh gpus so that way when you are for example running certain training of the data you can easily uh run it inside of a GPU itself and overall what we can imagine it will be a good uh stepping stone to achieve the holistic view on how the tees can be uh used together with other types of blockchain application and we'll be able to see how it can interact with the individual players so with that I'm coming to the end if you're interested feel free to check our preprint publication and I will be happy to connect and take any of your questions thank you very much [Applause]