Next Generation Wallets: Passkeys, Why and How.

ETHCC 7 · 9 Jul 2024 · 19:30

Doğan Alpaslan, a researcher at Clave, explains why passkey wallets are a better answer than passwords or seed phrases. He says passwords are reused and breached, and seed phrases are hard to store, whereas WebAuthn passkeys sign with keys held in a device's secure enclave, resist phishing and can be recovered through a password manager. Because passkeys use the P-256 curve that Ethereum does not support natively, he explains why account abstraction is needed and how Clave's hackathon work led to EIP-7212 and RIP-7212. The Q&A covers cards and attestation.

Speakers

Topics

From ETHCC 7, hosted by Ethereum France.

Transcript

Okay, I can do it again. No problem. All right. Hello everyone, this is Don. Uh I'm currently working with Clave as a researcher, and Clave is a pass key wallet. And today we are going to uh talk about what is a pass key wallet, how it works, and why we should build it right now. Uh so let's start let's get started. So first of all, uh the passwords not only in Web3, but also in Web Two is broken because like most of the uh passwords are being reused uh by across uh different uh websites. Can we close the door?

Excuse me. Yeah. Uh why it's a problem? Because the in web two ask you a little bit uh the uh passwords uh increases the risk because if if any of the website that you are reusing the password gets hacked, then you are uh you are getting ragged. And also uh that there are uh uh concept there are a problem of password breaches, and uh around forty percent of people are unaware that their passwords are uh have been uh even uh breached. Uh and this is another problem of uh web2 passwords.

And the third password, third problem is the common weak passwords. I I think uh most of uh you have like uh used the one, two, three, four, five, six passwords in any website, and this is the like most famous uh password across globally, and this is another risk. So as a result, in 2023, uh three in four people uh globally were at risk of hacking. So we should fix it.

But in web3 it's actually worse. Why? Because like uh seed phrases are too long and it's so hard to uh securely store it. And most of the people don't even know like how to store it. Uh and like when we look at how we store today, is like uh most of the users just store it on devices shared storage, most of them are using the cloud papers and screenshot or messages, which is a huge uh security risk uh as a financial uh as we have we are building a financial product, and this opens up two problems one is recoverability, and the second one is phishing resistance, and uh neither seed phrases or like nor uh the uh web2 passwords cannot uh give these uh two guarantees together. So when we look at the like uh diagram, you can see that uh there is no uh one solution that can provide easy recoverability decentralization and security together so we should fix it so how we can fix it so here is the answer the answer is web authentic web authentic authentication mechanism that is built by FIDO and it's designed to eliminate the need of passwords.

Why we need passwords because of the proving the ownership and WebAuthan is offering a new way to uh prove your identity to online and it utilizes the most advanced uh security uh practices what does it mean it means that like uh most of the uh webaltin uh applications utilizes uh secur enclaves or like the the best uh security examples on everyday devices and so how does it work it works like when you want to create a pass key on any website then the pass key uh then the website uh will pop up one screen and will ask that when where do you want to store the key so the key is uh is like a private key I think you are uh familiar with and the uh and there is a lot of like different alternatives uh as like YubiKey UbiKe is an I is a secure element uh like a uh flashback and you can uh use YubiKe to store your keys and also you can use iCloud keychain or like other uh password managers to uh store the uh to store uh your keys securely and and like when we look at the details uh like how the pass keys works is that uh when uh user wants to uh sign up with an pass key then uh the server side gives an arbitrary message and this arbitrary message can be anything so this is up to the server and after the uh after like this message has been given to uh the client side client is uh signing the message within the key inside of their device but where are those keys especially in the passkey side are being stored is it's being stored or like being secured by the secure enclave and the secure enclave is a dedicated and separate microchip that lives on everyday devices I think most of your devices have the support for securing clave it doesn't matter if it's Apple if it's Android even if it's like a uh laptop and uh to the securing clave is designed to protect your sensitive data and it's designed to be secure even if your device got stolen got hacked or like uh anything else and it stores the biometrics it stores the uh cryptography keys uh and many more and after the signing the sign it message goes to the server side and the server side uh has the sign it message has the message and has the public key and after that it verifies the ownership so why pass keys have better security than seed phrases.

Actually, pass keys uh have uh are uh more secure because like you never use the same password within a different domains, which uh which is why they are phishing resistant. And pass keys never leak the password to the server side or uh operating system or as uh or a user. So no one can see the private key, only the user can function within the key. So that's all the thing that passkey uh provides.

And pass keys works with biometric authentication uh which is built in uh devices, so it's it it really has a uh so simple and easy UX. You can do everything with just one keys thanks to the pass keys. And the recoverability is possible via password managers or like IPO keychain, and the server side does not hold any encryption key, which means that it is actually self-custodial and it never leaves from the users uh users' devices. Uh so it's secure, it's phishing resistant, and it's easy to recover.

But the answer is when like is it something that everyone is using right now? Yes. So big brands in Web2 already utilize uh passkeys as a login method, for example, Uber, like Google, Microsoft, Amazon, and GitHub. So why should we not use them on uh Web3? Um can we utilize the pass keys in Ethereum? Like short answer is yes, but it requires a bit of effort. Uh what kind of efforts we need to do to enable PASCE verification on Ethereum?

So, first of all, let's to look at a bit of details, how like PASCI's uh currently working with uh Web2 and server side. So uh when we give a uh message to the uh client, the client is signs the message within a cryptographic algorithm called P256 or aka sec P256R1 curve. This is not supported on Ethereum and it's on another uh curve that uh web uh most of the web applications support. And after the uh signing, uh sign up message goes to the server side, and the server side is uh verifying the signature within just like uh as we do on on uh Ethereum, but the curve is different.

So the question is when we uh turn the uh P250, when we give the P256 signature to Ethereum, how Ethereum can understand this signing method because Ethereum does not support an Ethereum, Ethereum's account model uh only supports the UAs, which means that you have no uh programmability. So this is why we need account abstraction and we need to find a way to verify P256 curve on chain. Uh why we need account abstraction, why does this why uh PASCIS uh does not work in with uh EOAs is because like uh the only way to uh the only way to use PASCIS is P256, and UAS does not support this, and also uh they are not programmable.

And as I have mentioned, the signature method and the cryptographical algorithm that PASCIS are using is not supported on Ethereum, so we need to find a way to verify P256 curve on chain. And actually we are lucky because right now we have a kind of abstraction and uh and like uh and like right now we have 4337 and 77 uh 02 uh which is going to be live within uh I I guess one or two weeks. So how to verify P256 curve?

There are a lot of like different approaches, but uh most of them are so uh expensive and it cannot scale at massive, and you need to verify uh this curve cheaply. So this is where the clays journey has started. We have started as an hackathon project, and this hackathon project was uh an OP stack uh fork within a specific pre-compile or like specific method to verify this curve. And after uh this uh after this hackathon, we have uh uh seen a huge interest from the community, and then we have turned this uh project as a public good.

Uh and we have proposed the EIP 7212. After that, we have turned the EIP as an RIP, which is a new proposal format uh for rollups, and as you can see here, like right now, the you can verify the P256 curve on Polygon, on Z casing, on Optimism, on Arbitrum, Oasis, Evmos. And right now it's also under discussion to add this pre-compile to LD1. And I think at the next ACDA call, it's going to be decided. So we have account abstraction and we have the RIP to verify on-chain.

How we can build a pass key wallet? It's actually simple. And look, application prepares the message, message give us the uh what users will execute. And after biometric authentication, uh signing is happening, and securing clay signs the message, and smart wallet verifies it. And big brands in Ethereum ecosystem started to build past key wallets like uh Clay, like Coinbase smart wallet, like TrustWallet, Dymo, and Bravo's and Fuse. But as you can see here, there are a lot of SDKs that support the build uh PASK's wallet on top of them.

And they are like there are more uh PASCE wallet SDKs than PASKE wallets. So SDKs are amazing and helpful. However, like right now it's time to build PASCE-powered Web3 applications. And this this should be our main goal right now because we have infra, we have Ethereum support, we have roll-up support, and everything is cheap. So what's next for next for us? Uh account abstraction, we need account abstraction interoperability, uh, modular smart contract standards and keystore rollup. Um like modular smart contracts allows us to build the same smart wallet across different uh smart wallets, and the key store roll-up allows us to uh use the same keys across multi-chain.

And we need to bring our IP 7212 to a terrible main net for uh environment attestation uh and uh uh account abstraction, and we need to build real products that touches user life. So uh thank you for listening to me. Uh here's my social thank you very much, Dogan. Do we have any questions from the audience? We got some time.

Uh hi, uh my name is Judis from the Tom Blockchain Club, and I have a question regarding the uh concept of the using pass key. Um as far as I know, uh WebAuton and PassKey are based on the TPM module, which means that the key never leaves the device. And that means also it is quite hard to um kind of do some interoperability between device. For example, yeah, I have Android that use, for example, Google Titan, and I have Apple that use Apple Secure Enclave. Yeah, so how do you support this kind of interoperability between device? Yeah, um actually uh since we are using account abstraction, we are lucky.

Why? Uh because uh account abstraction allows us to use uh different uh public keys on uh one smart wallet, which means that you can control uh your uh smart wallet within your Android device and then and an Apple device together and at the same time. But on at Claive, we have uh we are using uh recovery mechanism for uh if you want to change your device to maximize the security, but it's possible to use uh the same uh public key, even even if it's from uh Android or like Windows or like Apple, it doesn't matter. Hopefully this helps.

Um I think earlier you had guys plan to build a cards like virtual card apple pay, and so you can have or maybe physical cards. Are you still gonna build this or uh it's too hard? Um so you have asked that uh um about physical cards, virtual cards attached to like your clave, like uh um uh why not? Like right now uh we don't support any card integration. I I think this was the question, right? Uh yeah yeah yes, but it's it's under our roadmap and right currently uh discovering alternatives. How hard is it to build or it's uh um actually the microphone is kind of different, so I cannot understand.

Um is it hard to build? Like how hard is it to build? Uh like it's it's just uh simple integration within Visa network. So uh and like uh the smart contract side is a bit easy because like you just give uh uh permission for an amount of time and for an amount of your assets. So uh the smart contract side is easy, but the regulation and the legal side is a bit the hard one for the card integration. Got it. Thanks. Yep.

Anyone else would like to ask a question? We got time for a few more. All right. Um if you go back one slide, I think on that last slide that you had, you were mentioning um one sorry, just like the last slide that you had before. Which one? Uh the very last one that you presented. This one. Yeah, this one, yeah.

Um you mentioned like usability at L1 plus T attestation verification. What is that about? Like actually, this is not today's topic, but the RAP7212 uh enables P256 verification, which is also using a trust execution environment. Trust execution environments is just another method to prove the integrity of an computation. Uh and it's it's currently has been used on roll-ups to enable uh multiple provers at the same time. For example, Tyco, uh scroll, Zcasyn, and like most of the roll-ups will enable SGX uh verification for their uh product and currently SGX attestation verification uh costs uh like three milling gas, which is huge, and uh we need to make it uh as cheap for uh roll-up teams to build multiple provers.

Uh this is just one use case. Okay, thanks. No problem. Anyone else? One last question. Yes. All right. Don't hesitate to raise your hand if you want to ask one last question. If not, we uh wrap up the presentation. Thank you very much.

Related talks