Eliminating seed phrases with threshold crypto and passkeys

ETHCC 7 · 9 Jul 2024 · 17:20

Jan Camenisch, CTO of the DFINITY Foundation, argues that seed phrases and passwords are a leading onboarding problem for crypto and proposes passkeys combined with threshold cryptography instead. Passkeys use ECDSA on the P-256 curve, which does not match Bitcoin's curve, so he describes a smart contract that controls the key and verifies passkey signatures, letting users add or swap devices if a phone is lost. He presents a browser-based wallet on the Internet Computer, built with Internet Identity, that holds ETH, Ethereum tokens and Bitcoin, and calls it multi-chain account abstraction.

Speakers

Topics

From ETHCC 7, hosted by Ethereum France.

Transcript

Good morning everyone. Uh I'd like to talk to you about elimin eliminating seed phrases with threshold crypto and pass keys. And the goal here is to build walletless wallets. I'm Jan Kamenich, I'm uh CTO of the Divinity Foundation. The Divinita Foundation is uh like a 250 sized organization, headquarters in Zurich, and was really built out to be the NASA of decentralization. So we have like like a lot of like uh highly skilled engineers, cryptographers, a lot of them with PhDs, long careers in crypto distributed systems. And uh today I guess the goal of the organization is really to uh go towards blockchain singularity like like where all of the world's compute runs on blockchain.

So it's like the uh and so that's why we have created the internet computer, as uh the name says, like the the compute should be on the internet. And of course towards the goal, like one key is usability to end users. And so today I would really want to talk about that. Namely, like crypto today is like very hard for users. Users hear that uh you know like they people uh going through dumpsters to look for the seeds phrases, they lost tons of bitcoins somewhere on a hard disk, they don't know what it is. Or they hear that like their user's account got hacked, their passwords got hacked, and all their crypto stolen. So really like the number one probably onboarding problem to uh crypto is seed phrases and passwords.

I mean, passwords have a bad history to start this, but you know, they disrupt the user process. You wanna log in somewhere, you wanna create a wallet, wanna do something like that. And flash goes up, please select password, choose your seed phrase. Now you're sort of stuck, right? Like what do you do? Your brain freezes because now you have to somehow create a secret, a secret that your crypto depends on. And the problem here is that like password, seed phrase, anything that you is human memorable is really a bad idea to deal with secrets. Like the humans are bad at keeping secrets to start with, but now also they have to enter secrets into your computers that makes them like physically vulnerable as well.

Like vulnerable to phishing attacks, you write them down somewhere, restore them somewhere, uh, you know, piece of paper gets lost or burned. Of course, there's like this all these devices, metal devices to store your seed phrases, but that's not good a good mechanism. Even worse, like seed phrases are like this like one-shot kind of security. Uh, when you try it out a new wallet, you know, like you you have to remember the seed phrase or somehow store it, but at that moment there's no crypto attached, and so is it I want to just try it out, you save it somewhere, not very secure, and later on, certainly a lot of value is there, but then you have another secure system because like initially your your foundation of that was very bad. The solution here uh is passkeys, or that can be a solution.

Passkeys were originally designed to replace passwords. So it's like a phytoalliance standard for secure and easy authentication. It's based on public key crypto. The secret key is stored in a secure piece of uh hardware, like on your phones. Most of you, probably all of you have a pass-free mechanism on your phone installed. Signing typically requires some interaction, either fingerprint, biometrics. And today, like mostly EC DSA is supported by pass key devices. There's other schemes out there, but like the only one that's really implemented across the board is EC DSA.

Now, these devices, as I said, like on your phones, laptops, there's also UBS keys. So that's a very good way to manage now your your secret keys. And actually, I mean Apple now got a lot better over the past couple of years. Even if you buy a new phone, if you lose your phone, Apple takes care of your your keys. So make sure that the keys are transmitted from one of your devices to the other device. So they're thinking, you don't have to worry about that. Google does that, doesn't do that yet, but they're going to do that as well. Now, okay, so now we've dealt with password because that's what FIDO was uh uh set out to deal with.

So but what about seed phrases? Can I use like a pass key also for a seed phrase? I mean, after all, it's a crypto key, right? Uh the problem here is like uh passkey uses eas DSA over uh P256. Now that's all uh crypto garbage to many people here. Uh but the point is like Bitcoin uses another curve. So P256 is like the elliptic curve here, the mathematic and the mathematics where these keys live. Bitcoin uses another key. So they're not compatible, they're not crypto friendly. And the other thing, of course, is also defined to do web authentication, so it's not the APIs don't match either. So, how can we solve that?

Well, you're right, we're in blockchain, right? So we have smart contracts, smart contracts are a secure piece of software. So now, of course, you could say, well, okay, we do a smart contract that manages, verifies that ECDSA key and manages your crypto. So the smart contract can uh own your crypto, can control your crypto, and then now you authorize transactions with your pass keys from your devices, and then the smart contract, if the that thing verifies, then they will sign the transactions or execute the transaction on your behalf. Now there's really two versions here. Uh you know, like the one option is like the smart contract like wallet owns your token directly, so it means that smart contract wallet is on that chain, it owns the tokens, and you you authenticate your with EC DSA or like with pass key transactions on there.

Now the problem here is of course you need to deploy that smart contract and all every chain that you want to own crypto and manage those smart contracts. Problem here is of course some platforms cannot do that, like Bitcoin for one, cannot do that. Uh also you would have to verify those uh pass key signatures on those chains, which can be very expensive. On top of that, now of course you also need to manage gas on those chains, right? And that uh by itself is a headache to like to onboard users, so user don't want to do that. The second option is actually if your smart contract actually owned the crypto via public key, now if your smart contract controls the public key instead of the tokens directly, then actually uh that smart contract could own tokens on any any chain, well, provided that the public key is compatible, so it shouldn't be like the P256 that uh pass key uses, but like that can be dealt with, right?

And in this case, actually, the smart contract owns the token via the public key and it can own them on any chain. So we can have like a multi-chain smart contract wallet. Okay, so I said wallet, so the goal here is really, and because there's other things to do with that technology, but the goal here is really to uh design, like come up with a wallet that's really usable for users, so they don't have to do anything. And so let's uh have a look for a bit about what different wallets exist. So there you can have like browser-based wallets that that you know, like Fireblocks, Binance, Kroken, all of those exchanges come with the wallet built in. Essentially, you log in there, you well, most cases actually you still use a password, but in many cases they use like at least pass keys as a second factory authentication.

But you get the principle, right? You log into some service, the service cost it is uh the uh crypto keys for you. On the other hand, on the other extreme, we have like uh plug-in-based or app-based uh wallets, like you download them things here. Uh so now here you have the seed phrase problem because now you need to do self-custody of those seed phrases. To me, these are like bad solutions because really not very usable or at least not very secure. In the middle, we have sort of this uh like what uh the only example I could find other than what I'm going to present is Soul Wallet, where you have like a browser-based wallet, but actually the custody is like smart contract, or I would say like network custodial solutions where the network, the blockchain takes care of managing the keys for you, and you do authentication with pass keys.

Now, uh as I mean, solar wallet is out there. I tried to check it, I don't uh you know, like there's like a very alpha version, I couldn't get it. Anyway, it's gonna be built. But that one is like taking this like Ethereum only approach in some sense because it puts a smart contract on the chain that then verifies uh the passkey keys. So what we want is like look at the second solution where actually there is a smart contract that controls the public key and from that uh can deal with the tokens. So we wanna build a web wallet, because I mean that's really the best way.

Fire up your browser as quick you can't onboard a user quicker, like they just enter URL, they have their wallet, you don't have to rely on desktop or mobile apps. So it works for users across the board, any device they can just use that. And even like if you used uh like a browser-based wallet in like incognito mode, nobody will even tell that you own crypto because there's no wallet on your phone, there's no search history in in your browser. That's actually also in some jurisdiction, actually, a very important uh property. Web wallet is also nice because as a developer, higher speed of development, uh no multi-OS, no binaries, simple to test, and also it makes composition easier with all the web architectures that we have out there.

Okay, so what do we want? We want to have like separate the crypto key from the authentication with it, ownership of that key from authentication, because that allows us now to change uh the authentication. If you lose your phone, it doesn't matter because you can have another device that also controls or authenticates that smart contract. So it solves the the seed phrase problem, it solves the uh custody problem. We want to have the smart contract as I said, like control the public key. Of course, that requires you need to have a chain that actually has threshold key capabilities. We want the front end served from the smart contract, the smart contract can interact with you via the front end, so it has to have some some web capabilities, and then we can do authentication with pass key towards that smart contract.

And of course, you want to get rid of this tedious gas management so that actually users don't have to do anything to just go have a wallet and they're good to go. And here, I guess I'm uh advertising the internet computer protocol, but here we have built stuff that actually solves all these problems. Uh so the Internet Computer Protocol, in case you don't know, or in case you know, it's just a brief refresher. It knows it runs on independent nodes, it runs on bare bone hardware, very much like the Bitcoin network. So there's like no cloud big tech involved here. Uh the protocol then brings those uh different nodes together in a form of this deterministic decentralization, just enough decentralization for the system to be secure, but not too much, and not like hundreds or thousands of uh nodes to make it uh slow, inefficient, and expensive.

Then smart contracts run on those uh subnet blockchains, they can interact with each other, so can invoke functions. So at the end of it, you really get this like unbounded capacity computer that just sort of software runs securely as smart contracts somewhere in the internet, right? So that's the goal here. Have a have an internet computer. Now, smart contracts here on the internet computer are very different from smart contracts on other chains. So for instance, they can store like 400 gigabytes of data, they have like four gigabytes of main memory, can do multi block transactions. Well, there's a lot of properties here.

I barely listed uh some of them, not all. What is important, I guess, for our talk today is like there's a reverse gas model, so the developers pay uh for the gas, users don't, so users can just use it. It is web native, it smart contracts can communicate HTTP out in both directions, so they can make HP calls, they can re serve HTTP, and it has chain key signing, which is really threshold cryptography at their disposal. Uh so that means like smart contracts on ICP can have a public key. With that public key, they can sign transactions, and because they're web native, they also can send those transactions to the respective chain.

So now like a smart contract can really own crypto and transact that crypto. So as I said, it's a uses threshold crypto. So we have implemented the latest actually also designed as well as we have some of the top-notch world-leading cryptographers in the team. Lucky about that. So we have designed like a state-of-the-art threshold cryptography signing protocol. So that means the secret key does never exist, but like the servers together, they have like key shares, and together with those key shares, they uh produce uh a signature share, and those signature shares then get uh put together, and for that serve to the smart contract who requested to sign something. So you have like now with Threshold Crypto, really have a smart contract that owns crypto or owns that that key and can sign messages with that key.

Another nice thing that actually we've done, we've integrated with the Bitcoin network. So nodes on an ICP subnet are also nodes of the Bitcoin network, and they're therefore can receive big Bitcoin transactions or receive the Bitcoin blocks, uh, look through those transactions and actually then uh run that through consensus. And so the smart contracts on ICP now have access to a verified UTXO set from Bitcoin, and therefore can also see whether they received Bitcoin and with that also send Bitcoin. For for Ethereum chains, we we have something similar on the network.

Uh so there's like a decentralized integration with EVM networks. So the idea here is that the nodes of the network call out to several EVM uh RPC providers, get an answer back, and then run that through consensus again to get a secure interaction from for with those chains. So smart contract, as I said, can also directly serve web to can serve like a URL. So every smart contract and SP has a URL, and so your browser just can talk directly with a smart contract. Here, another uh feature of the intercomputer comes handy because the intercomputer has like a single public key, and that public key signs all the transactions.

So you don't have to download state or anything like that in order to verify transactions on the inner computer. And so, like that, you fire up your browser, and you know you're talking to the inner computer, you're talking to a smart contract, in this case, serving your wallet. On the other hand, I guess that's now obvious probably. User can authenticate with web authentian and pass key towards the smart contract, and also here because you might have several devices, uh, Android, iPhones, whatnot. Actually, we have uh built something that's called internet identity, where you can, as you see here on the screen, you can have an iPhone, a YubiKey, a second YubiKey, a laptop, whatnot. You can bundle them all together into a single identity and then use that identity identity to authenticate to your smart contract.

In particular, that's uh one smart contract that we have built. I invite you to look at that. It's uh the URL of that smart contract is oeignet.com. It's like an intercomputer protocol-based web wallet. So you can, as you see, you can have ISP on there, but Ethereum, USD coins, like uh any East coin uh that you want, you can also have Bitcoin on that wallet. So it's it's like the intercomputer version of multi-chain account abstraction, if you want. So every user has their own like ETH address here, obviously. You can configure your authentication as I said with internet identity, you can choose many devices how you would uh want to authenticate, and really like a browser and like a motor phone is uh all you need in order to use that.

So right now it's like a single smart contract that that works for many users, but there will also be like like another version where every user can have their own smart contract again. As a user, you won't even notice. You will just be able to go to the browser and use it. So I invite you to go there. If you got curious about all the technology behind that, I also invite you to come uh to our chain Fusion Day on Wednesday where we talk more about the intercomputer, where we talk more about the possibilities, and where we talk more about how using that how to use IT Pict technologies with other blockchains altogether. Thank you very much, and uh see you tomorrow.

Thank you very much for the presentation. Um, if you want, we have time for one of two questions still. Sure. Anyone wants to have a question from the audience? Going once, going twice. Alright then, thank you very much. Thank you.

Related talks