Clear Sign All The Things

ETHCC 7 · 8 Jul 2024 · 20:52

Charles Guillemet, CTO of Ledger, presents the Clear Sign All The Things initiative against blind signing. He describes wallet drains rising, which he puts at 300 million last year and 75 million in March, and why hashes on a hardware screen are not enough. His proposed open standard uses metadata files that tell a device how to parse a raw transaction. He shows a demo on 1inch Fusion with Rabby, brings a Rabby representative on stage, and says a public registry governed by the community is planned.

Speakers

Topics

From ETHCC 7, hosted by Ethereum France.

Transcript

GM everyone! Yes, it's always morning in the Web3. My name is Charles Guillet. I'm CTO at Ledger, and today I'm going to talk about the Ledger's ClearSign All The Things Initiative. This is something we are working on for a couple of months now with different actors in the community. And I'm very proud to present you where we are and how we plan to fight against blind timing. Maybe just before starting, uh, raise your hand if you own the Ledger device.

Okay. Now raise your hand if you have ever blindly signed a transaction. It's a lot also. So let's clear sign all the things. Um since Ledger inception, 10 years ago, uh the landscape of uh digital asset has evolved uh significantly. Uh 10 years ago uh there was Bitcoin and only Bitcoin, so the landscape was very simple. And the biggest success for uh Ledger at this time was the launch of the Nano S in uh 2016. Uh this uh device uh embedded uh uh a secure screen and also that was an open platform allowing developers to build uh different applications on top of it.

At the beginning that was only Bitcoin and then as early as uh 2016 uh we started to uh support uh the Ethereum app. And the use cases at this time was really buy and hold, uh but since then a lot of things have happened uh in the ecosystem at Ledger also. And now uh there are plenty of new use cases from uh self-sovereign identity, uh Web3 Gaming, NFT, and DeFi. And now interacting with smart contracts uh is the norm. And it will be even more the case with uh account abstraction because with account abstraction uh for interacting with your wallet uh you have to uh do a smart contract call.

So the use cases we had in the past were really buy and hold, and now we are signing a more complex uh smart contract interaction. So now secure storage is not sufficient anymore. Uh we need to unboard the next one billion uh users, and we need them to uh sign transactions with confidence. Uh, blindly signing a hash is uh not acceptable at all. Today we see more and more people who are yellow signing. Uh I told uh tell I call this like this yellow signing, meaning that they don't even verify anything and they blindly sign a transaction, and at some point uh they they get drained.

Uh it happens all the time. A good practice that we see in the space is to have different wallets, one for for uh cold storage where we pay attention to what we sign, and another for um hot um wallet where people are yellow signing, but it's not something uh sustainable, we really need to fix it. Um if you check on Twitter, uh last month, only last month, someone uh signed away seven million by blindly signing a permit. So this is something we need to fix in at the ecosystem level.

And the amount of value that are uh drained from wallets is increasing very fast. Last year that was 300 millions, and only in March uh this year, 75 millions uh have been drained, so it's uh significant. And attackers are um simple man, simple men, I would say. Uh they always it's it's always a matter of opportunity cost. They start with low-hanging food, and in the past, low-hanging foods were simple consist consisted in uh asking users for their 24 words, and it worked pretty well. Um they they were tricking users into uh asking them uh their 24 words, and now they are tricking users into signing malicious transactions.

Uh at the beginning that was quite simple, and now they have they have built big business where they are they are offering uh crypto uh draining as a service where they take the fee uh at the smart contract level. So this is something uh that starts to be big, and and we need to uh raise the bars for security, we need to fight against uh those attackers. And security for digital value exists with uh three different things. On one end, you need to have a secure enclave in order to generate your secret and also to implement the cryptography inside this enclave so that uh the secret don't have to leave the enclave. Then this so at Ledger we are using secure element for that for the for the enclave.

The secure element is driving uh directly this the screen. Here you can see uh ledger stacks, and then we have an operating system around it allowing uh uh application to run on top of it. And from this base, we uh need uh clear signing, and clear signing is really the combination of a clear intent and human-readable parameters uh that are uh shown to the user, and the user can then have all the information in order to decide if you want to consent to a specific transaction or not. And all these information are provided by the device itself.

And you have the ledger level of security with the with the hardware security. And this is completely very complementary with what we have on wallet with transaction simulation and all of this. All of this is very useful. But the problem is if you have a malware on your computer or on your browser or something like this, then you have no way to uh have strong guarantees that what you are signing at the device level is the same as what you want it to sign. So that's why we really need uh clear signing, which is the combination of clear intent and clear parameters.

For us, it's not something completely new. Uh we are clear signing bitcoin transactions for a long time. Uh we are clear signing simple transfer uh for Ethereum and most chains uh today, and what but when it comes to uh smart contract interaction, we have developed uh several strategies. One of them is the clear signing of EIP 712 uh messages. Uh we have a ledger-specific declarative description of the message, it's easy to write, but it doesn't uh support all different uh formatting uh messages, and also we have uh developed uh an embedded C plugin um framework where uh DAP can build a small C plugin uh in order to support their smart contract interaction. Uh it supports almost all types of contracts, but one of the drawbacks is that the DAPS developer are not very good at developing a C plugin.

I don't know why. But this is where we are, and their strategy do not scale well for various reasons. The first one is that we can see new apps, new DAPs and new protocols almost every day. And secondly, the current protocols and dApps that exist evolve. So in terms in terms of maintenance, it doesn't scale well. So that's why we have decided to introduce a new open standard and method to uh enable clear signing at scale. So why a standard?

First of all, it's not ledger specific. This problem is not a ledger problem, it's a problem for the whole ecosystem. Today I'm talking uh at uh LCC for Ethereum users and developers, but it also applies on different chains, but today we are focusing on Ethereum. It's intended for all wallets. We plan to uh have some governance around it that will be uh driven by the community, and it will be uh completely decentralized so that like DAPS will provide us uh this metadata file because uh this is how it works, it's a bunch of metadata files that describe how to parse a raw transaction. Because when the raw transaction uh comes to the device, the device has no way to understand how to interpret it.

So that's why we will provide the raw transaction along with a metadata file explaining how to parse this raw transaction. This metadata file will um give you information, give the device with information about where to get the parameters and how to interpret them. For dApps, it will be very easy. And we will even provide a tool in order to ease this development. So demo is worth a thousand words, so let's uh have a look to the to the small video.

The first part is how it is today. So on the right end, you have a ledger stacks. You can see my pin is very complex. Uh and then uh on the left part you have uh one-inch fusion uh connected with uh Wabi, and I'm about to uh do a swap. Uh I click on swap. Uh it's you you need to sign two things. Uh the first one is the permits, and today when you sign a permit, you have a bunch of hashes, and except if you can read into hashes, you have no way to understand uh what to sign. So you blindly signing a message.

Maybe uh it's the one you wanted to sign, maybe not. And the second part is the swap itself. Uh again, you are on one-inch vision, and you have uh the whole transaction that is uh prepared by uh by one inch and wrapy, it's sent to the device, and again you have to sign a bunch of hashes, and you have no way uh to be sure what you are signing. And then you decide to sign this. Uh, in this case, everything goes well because there is no malware anywhere. Uh one inch uh is um is not backdoor.

This is the real one-inch fusion, uh, WABI uh also, so everything went well, but you have no guarantees that uh that uh this is what would happen uh if you if you have a malware. Uh in this case, you have the same uh scheme with the um clear signing uh standard. So you are on one-inch fusion, you are about to uh do a swap. Again, this is a two transact two transaction thing. The first part part is the permit, and on the device you can see a clear intent. You are doing a permit USDC uh from your address, and you are authorizing uh the spender one inch uh to access to uh your USDC with for an unlimited amount until a specific date, and everything can be easy man readable.

So this is real clear signing, and then you have the the real uh swap transaction again. Same thing, you are preparing everything on um on one inch fusion, and then on the device, you can see the intent. This is a one-inch order from your address, and then you can see that uh the transaction itself is a swap of uh 154 USDC to uh 154 uh die, and everything is clear sign. You only have to accept and boom, you have uh clear signed uh two transactions on one inch, and you have the full chain of security uh from uh the the dApp to the device.

So we are uh very proud uh to uh to when to go to uh to the to there, and now uh we have worked with uh different dApp uh in the ecosystem. For this demo, we have worked with uh One Inch, but we also have worked with uh different dAP, including uh Uniswap, AV, and others. Uh the same applies with uh with software wallet. Here the demo was done with uh Wabi, but we are working on uh on this with different wallets. Again, this is not something ledger specific. We really want that everyone in the community to uh participate to that. And we are also working with uh different hardware wallets uh for this.

And uh I'd like to welcome on stage uh Quinny, uh Quini Wu from uh Webby, uh, who will explain us uh how they did the integration. Thanks, Charles. Hello everyone. Uh I'm Queenie, super excited to be here representing Rabbi to share with you how we've been working together with Ledger with the same mission to unlock the next generation secure and intuitive experiences for the users. So um we supported Ledger in 2021, and we're happy to see there's already a great amount of users who are using Rabbi plus Ledger as a great combination.

So from this graph you can see actually Ledger, uh sorry, uh Rebi is the operating interface that connects depths and hardware wallets like ledger. So um we make sure that um we present and we interpret um the context and parameters of the transactions to the users in a very easily readable way. Um so this is enabled by our capabilities of transaction interpret uh interpretation and the simulation, uh, which is uh something where we we've been working on for more than three years, and uh there are more than 99% of all kinds of transactions have been covered. And now with clear signing that's offered by Ledger, it finally uh closes the whole transaction loop in the most secure and user uh friendly way.

So uh now you can actually double confirm, double check your transaction both on Rebbe and Ledger. So it's basically like a double insurance. So welcome uh welcome to the new clear era, and we will welcome any kind of feedback or support from the community. Thank you. Thank you, Queenie. Um again, this is not something ledger specific, so we encourage everyone in the community to help us joining the clear signing revolution. We have already a few official partners, but we have more people working uh with us, and we also need you uh to help us in uh this effort.

So the next step uh will be the following: if you are a DAP, uh don't hesitate to provide us with some feedback. Uh we have a dedicated website on GitHub for that. Uh, we want to make sure that we thought to every single uh use cases and so on. But we already have worked doing an RFC and so on, and we uh got very good feedback from uh the community. And if you are a software wallet, uh please work with us to update your ledger integration. And uh I can give a small teaser that we are working on a device SDK uh making this integration uh even easier. So when we have uh there's uh metadata file, uh the question is to trust them, and what we are going to do is to uh verify and to um uh uh and to check that everything is good in the in the metadata file that are provided, and then we will sign them.

Uh Ledger will be a certification authority for ledger devices. Um maybe other wallet will be will use uh our certification authority. And the idea is really to open this to anyone who wants to sign uh and to become a certification authority, and this certification authority will be uh uh accepted by the device uh if you wish uh wish it. So uh thank you for your attention. Here you can uh scan the QR code for the developer portal. Uh please come to our boat uh booth in order to discuss with us and ask some questions. And um, if you have questions, please uh let me know.

Any question? I can't see one about stacks. So thanks for the presentation. Uh the question is the following will uh clear signing be backwards compatible with older ledger devices or will it only work with ledger stacks? Uh very good question. So, yes, I presented this uh uh with uh ledger stacks. Ledger stacks has a wider screen allowing us to provide with more information and so on.

Uh however, it will be compatible with uh older devices, and uh the the difference will be the UI. The UI will won't be as great as this one, but uh but it will be supported, yes. Okay, cool, thanks. Welcome. Another question here. Two questions. Um the first one is uh will there be a scheme for verification of the uh schema, the definition of this metadata? And then the second question is um have you thought about uh discovery of metadata?

Um it seems that this um this metadata would also be useful for indexers um in acting after the fact. So yeah, as you said, we will get all this metadata files. Uh we want them to be provided by uh the dApps because uh they know how to interact with the smart contract, they know what are the relevant parameters and so on. And then the question is how do we decide if we sign this metadata file or not? And and for this, uh it will be a mix between uh some semi-automated process uh where we will uh have some heuristic to make sure that the metadata file uh corresponds to what the smart contract is doing. So this is uh one of the uh the big question, and it will be a mix between uh some semi-automated process and uh manual process for uh the bigger dApp.

We want to make sure that we we don't sign uh scams basically. And your second second question was uh the discovery. Uh so after the fact, if I'm looking at historic hash um uh operations on the chain, how can I discover the appropriate uh metadata that corresponds to it? Yeah, this is uh the what we what we can do uh indeed is uh is checking what's uh what's what has happened on chain and uh try to infer uh what kind of uh intent it was this is not the path we followed. This so this is something that would be possible.

But I think uh it's uh we prefer uh going with the DAP uh uh path and I think we will cover maybe ninety-five percent of the of the use case. But if it's not enough and if we need to uh to find different alternatives, so probably we will do like uh on-chain inspection in order to uh to understand what other interaction we didn't cover. Okay, so uh follow-on question or clarification from the first part is there's gonna be some sort of registry um of all of these things. Yeah, there will be uh there will be a wide uh public registry with some governance by uh the community and then it will be up to different wallets to trust part or the whole registry, and this is where we will sign uh what we think we can trust and we won't sign the West, basically.

But uh but it will be completely public and governed by the community. Thank you. Um we don't have time for other questions, so thank you. Thank you. And if you have more questions, please come to our booth. Thank you.

Related talks