Intro to trusted execution environments with Saul of Livy (Part 1)

Whitepaper Reading Club Talks · July 2025 · 16:33

Saul Garcia, a software engineer who founded Livy, introduces trusted execution environments and explains how Livy aims to build a provenance layer by making TEE development more accessible. Co-hosts Brian Seong of Polygon, author of the Chainless whitepaper, and Rongxin of the Whitepaper Reading Club ask why ZK development is too complex and slow for most use cases and how TEEs offer verifiable computation with better performance. Part 1 of Chainless episode 2 also weighs security trade-offs between mathematical proofs and hardware attestation.

Speakers

Topics

From Whitepaper Reading Club Talks; community: Whitepaper Reading Club.

Transcript

The first time we did the podcast, Brian, he essentially said, "If you don't get a haircut, I'm not going to do this podcast with you." He said it in a really harsh way. I meant it in a good heart. I want you to look good on the camera. He essentially saying that I was ugly. You're toxic, Brian. This is the second episode of the chainless podcast and the idea is to go deep into the new paradigm of DAP development that is stripping away the idea of the blockchain and using proofs that are offchain to verify transactions.

Today we have Saul with us from Levy. This is Brian from Polygon Labs and today we're really excited to have Levy who is building this thing called the provenence layer which is essentially a decentralized TE proving service where if you have any computation if you can wrap it into some sort of a package in this case will be container you throw it to the decentralized TE layer they generate a TE execution with a signature and But I provide it back to you. But now you are equipped. You're returned with a computation result with a signature that says it the computation

was done correctly. Without further ado, I would like to introduce Saul whom I actually met. We first met in a in a hacker house and succinct lab. Succinct Lab hosted a hacker house and then I went there to check out cuz I'm super interested in their project and there was a really cool dude who was who was right there. I just felt like man he has an aura I have to go talk to him and the more I talked to him the more I realized are you that Saul that I know of and then he's hey are you that Brian that I know of. So we pretty much knew each other before they were building on top of polyonair.

That started the friendship and eventually we also built a hackathon project on succid and eventually it led to a lot of different ventures on our each of our own and now he's the founder of Libby and I am super excited to to have him on this podcast and to share with us about himself what he's building and we have a couple questions about some of these amazing stuff that he's building. I'll give it to you. So, thank you so much for introduction. I'm 23 years old. So, like I'm a kid here basically working in crypto since like probably the last five years basically a software engineer while a computer science dropout TLDDR

first year of computer science. I was in this hackathon project with a couple of folks from university. We passed all the challenges that we have. We went to the final out of 500 students brought into the country 80 plus universities and we basically got finalists and basically got the top three out of Spain which basically got me into like my first full-time position. I dropped out university first year. Two years later I started doing product and started doing things on my own. So I drove quit the company and basically started working like product front end consulting stuff when it comes to software engineer product design all of that. After that super interesting like the blockchain space. So it started going to the first hackathons last year in Brussels. We

built the first concept with polygon. Basically we build this wallet with your codes that also use the polygon act layer. We were the first project to use the polygon act layer into like project. I was super interested in CKVMs at the time like CK what was like all of this blockchain stuff. So I basically got super into CK trying to understand how this move complexity works and basically super interested. My last position was at CK email. I was doing dero with them and then basically January was my last with them and February I built this initial concept that basically was like an image editor that used CK in this case to sync the CKVM to generate a proof of image transformations. We found problems with that and that's why we

built Levy. So yeah, that's pretty much like my interaction. Can you describe to the audience what is it that you're trying to solve? Yeah. So why you came up with this concept of basically using tees in order to create verifiable applications is with CK. Now Wish have solved the problem of complexity and how to build CK applications. Initially you have circuits that you need to write basically defining all the constraints which is very complex. A couple of cryptographers that understood everything could basically develop CK apps. With CKVMs, we probably have solved that problem. Now we can just use Rust and it's going to work and generate a proof. So complexity when it comes to development has been solved. But again, you have a DSL, you need to learn Rust in order to build apps most of the time.

You have other compatible programming languages as well. But usually it's mainly Rust, which is a problem for most folks. So that was one of the initial problems that we have. And the second problem that we identified basically was like performance. If you want to have like fully security, CK is great. You're going to have that fully guarantee with proofs basically, which is great. But if you really need to have low latencies and performance for large computation, training a models, for example, you basically can't do that with CK right now. It's basically too expensive and too slow to do that. So how can we bring like the same guarantees of security verifiability but without having these issues? So with TEES, we can execute any programming language as well. We can

execute any computation. We don't have pretty much any overhead and basically we have the attestation at the end of every single execution which is one of the best properties of DE is that the finality is instant. Once you execute something you have the stationation and you don't have to wait for the proje or for like smart contracts or Viper. So you're saying that generally there's two problems with the ZK ecosystem. One is that it's very difficult to build on for a developer. You either have to learn these new languages or you have to use low-level languages and the process is

complex. The other one is there's a limit to the type of computation that can be done in a ZKVM. Even though it's more generalized, there's just so much more that goes into producing these computations. As a result, you're saying that TE is a solution to do many of the things to have similar security guarantees but in a much more efficient and easy to build environment. Would that be accurate? So with CK, you can do a lot of computations that were impossible like a couple years ago. But again, uh if you really want to run like extremely heavy compute or extremely low latency computations, you probably can't do that with CK unless you're using like

huge machines like do that. Which goes to the second problem which is pricing. Basically a question that I have is maybe a little bit of context for everyone. PE is a trusted execution environment. So basically a trusted execution environment is an environment that is trusted. So the idea is that there are like devices which can be graphic cards with Nvidia CPUs with with both Intel and AMD that basically it's just a normal CPU that has like an extra hardware that allows to basically verify the integrity of the memory the integrity of the boot. So you have a guaranteed or like an inclave that the execution you're doing are performing basically on that CPU or GPU it's going to be secure and every time you make an

execution you have an at the station that proves the integrity of the memory the integrity of the execution that provides a trust layer on top of like normal compute that you would never have if you just run a normal CPU and basically just execute some. So just to summarize like the trust and execution environment is this extra piece of hardware that allows you to verify execution. So it has to be built on a special piece of hardware. It's not something that is can be purely an emulation. You can emulate that but again like the security comes from the hardware itself. So you can create a similar signature retention execution with software but again you are not going to have the security war that software has been run correctly and that's something that the TE provides for you. For the noobs out

there like myself where do you get these like TE's? Is it you go to Walmart, you just go to the sales person like hey man I want a te show me your tees. Yeah like how does it work? So essentially it's just a computer AWS provides there's other providers like web three for example fala or you can directly go to like this super old enterprise company. Hey, I need a TE like 100 cores, two terabytes memory. Like they're going to give you like a rack that you just lally need to plug in and then you have to configure and boot and all of that to create virtual machines and basically create like a cloud itself. So it's a normal computer at the end. The only thing that you have to think about it is that obviously it's

going to be like a huge computer which is usually enterprise service that server that basically that's the reason why you don't see a TE wall. So of the n you have like different providers for both graphic card like Nvidia and then CPS it's both IMD Intel but you also have ARM with their trust zone which is also like another execution environment for smaller devices that fingerprint thing was is that ARM's like trust zone or is like their own thing is that something that you can program into too in the case of phones you have the TE which is basically for story only you don't have the execution of anything in that one You can basically share anything and it's going to be secure. So like your signatures of your your face, it's going to be secure

inside that. I don't know what's the name of the Apple one, but it's not programmable, which is like the main difference in between, for example, the Intel TDX with the Apple one in their devices, which is like fully programmable. You can execute anything that a normal C would do. But in the case of Apple, it's basically for storing information. Jump in a little bit. So you have been talking a lot about some of the benefits of TE and we covered the introductions. I would also wonder what are some of the limitations in terms of say hey this is a trusted execution environment but uh assume it's going to use memories it's going to use storage and those data that you store also has to be in an encrypted form. But what are some of the

limitations of TE and what how do you think are some of the solvable ways around it? Yeah, like the limit is basically like how we can be included. You cannot encrypt or like basically sign all the hardware directly. For example, the data on the hard drives that cannot be signed directly because you're basically signed in memory and not all of it sometimes. So it's basically like that limit on like how big can be the program. But usually this space is going to be big enough to run any sort of computation. But if you want for example to run a database inside like pees that's going to for example a limit especially once you scale because you're basically not going to be capable of string terabytes within the enclave which is obviously a limit but for

generic computations like normal program which is going to take kilobytes in the worst case megabytes and then the state execution can be still less and then basically you do the transition and again if you want to have like persistency again you still manage to have some space that allows you to use the TE in a secure Okay. So if you want to have data intensive applications, probably that's not going to be like the great scenario for having or stuff like that very fast within like the TE. But when it comes to execution is great. I see. And yeah, I I think that makes a lot of sense. And for general computation that doesn't require that much data, then running in TE would just be almost the same performance as

running on the normal like CPU or GPU environment. But when it comes to you have a lot of data access IO between the memory and also the storage with the CPU context even in the CPU context there's already a lot of overhead but now you're dealing with a encrypted IO between memory and also with the storage so that's going to be additional overhead so I guess it would just be a limitation to what kind of application that you can design for that majority you're saying it should be able to host it but you should have that limit limitation in mind when you're designing your applications. The second question I actually have is about like the hardware signature security itself because there's a lot of debates in the

blockchain space saying is cool but it like that there could be side channels there could be a lot of ways to hack it and that's why people are looking into ways to decentralize it so that these TE environments are being randomly selected so that we can just mitigate that whatever side channel attacks and stuff. I wonder what your thoughts on this and what is like live levy solutions around it. So yeah, a side channel attacks is one of those problems that tees could potentially could have. The way we try to mitigate that idea is basically through the provenence there like the execution can basically have the side channel attacks. But if you verify the attestation at different node or like a different TE that the one you're

executing the code of mitigate these issues but again it's not going to be fully perfect like CK but basically we're designing these mechanisms to mitigate these issues that de potentially could have in a security spectrum. We could say ZK is probably like the maximum security or let's say even Ethereum is the maximum security because it just has so many nodes out there. That's why we entrust Ethereum as like a lot of the layer 2s they entrust Ethereum as a settlement layer. They peck their securities onto Ethereum. So if Ethereum is a maximum security ZK is similar to that level and there comes the decentralized TE and then so consensus ZK they're all there.

Consensus varies depending on how many nodes you have in the network. But things like Ethereum and Bitcoin is on the furthest left and then on the furthest right will be a centralized server with no ZK with no TE. You just say whatever you want. That's the web to style. And decentralized TE is way closer towards the ZK side. But if it's just TE maybe the security lip stands in the middle of the spectrum and if you go down a little bit it's just fewer nodes consensus like six nodes consensus similar ones are doing that. So yeah.

Yeah. One of the notes I want to have is like you mentioned like CK is less secure than Ethereum. I would argue that CK is the most secure thing. Basically your audience relied on pure map and then maybe E is great for dynamic security and that's why we trust that. But I would argue that a snar like strong whatever proven system you use is way more secure than Ethereum itself because if you break that like basically you don't have anything else but I I agree that basically dees could be in the middle. I would say okay and Ethereum level consensus it's like on the same level similar level of trust or actually you're right ZK is way more but it's just like Ethereum is really secure. I guess that's the point that I'm trying to make. But yeah, ZK is like

maths because it's absolute. As long as there's no bug in the circuit, then it should be right. It's like 100% correct. Like that's but then yeah, you have if you want that 100% security, then you need to go through the formal verification angle, right? If you want to have absolute security with math, then you get super complex, difficult to verify and hard to understand stuff. And then maybe on the Ethereum side, it's not as absolute, but you have these like economic guarantees. You have some other factors that kind of make up, but it's easier to understand.

There's like additional axes to what we're discussing is like a horizontal axis on the security side and on a vertical axis is probably I don't know scalability or maybe like cost or performance etc. I feel like all of those could be its own axes itself to to distinguish Ethereum and ZK. And the reason why I use the term Ethereum specifically is because there's no other blockchain programmable blockchain that can achieve Ethereum level security in the world right now. So that's like the golden standard. We're just trying to contribute to the pump up the the ETH price. Let's take a big

Related talks