New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

TACo: Web3's Day-One-Decentralized Access Control Plugin | Arjun Hassard - Threshold

Ethereum DenverWed, Oct 9, 2024, 12:00 AM

TACo is live with paying adopters, operating in domains where one can’t compromise on decentralization: seed phrase recovery, reproductive health data, cryptoinheritance, & DRM enforcement. This workshop discusses progressive vs. day-one decentralization and introduces TACo’s easy-to-use APIs. APPLICATIONS FOR ETHDenver 2024: #YearOfTheSpork ARE OPEN APPLY NOW https://ethdenver.com/apply

Transcript

[Music] my name is arjin Hazard this is James uh we both work for the threshold network uh with a particular focus on Taco uh Taco is an endtoend encryption laay that is endtoend decentralized and it's been decentralized from day one so why is it important to be decentralized from the beginning what's wrong with Progressive decentralization well Taco's early adopters are operating in domains where it doesn't really fly to not have trust reduction from the beginning the stakes are too high and the data is just too sensitive it needs to be encrypted under a decentralized crypto system from the beginning for example passing on inheritance crypto inheritance to beneficiaries or recovering seed phrases in general another example would be enforcing decryption rights for tokenized media libraries worth billions of dollars or even sharing of reproductive Health Data in jurisdictions where a data leak could result in someone being prosecuted so I want you to imagine there are actually real world use cases out there that need trust reduction today they need real actual practicable decentralization and they can't just wait until a project eventually decentralizes too is relevant to any application or project that handles private data though uh in the second half of this talk we're going to do an interactive walkthrough if you'd like to follow along uh you can head to uh this link Taco web demo bit.ly um and you can get a sense for um how our types types script API works so who the hell are the threshold Network um it's the result of the first ever onchain merge between new Cipher and keep and what emerged was a multi-app network focused on services that oriented around threshold cryptography so if you were to take like a sensitive cryptographic operation like signing or Randomness generation or condition verification or the provision of decryption material and you were to assign it to a single server or data custodian or commercial entity that would obviously be very trustful what threshold does is disassemble and distribute those operations across an array of independent machines there are four applications live on the threshold Network today the most famous is tbtc which just crossed 100 million in tvl which is kind of a big deal and actually is relevant for the other apps on on the network too in terms of like a track record of our honest majority assumptions working but today we're going to talk about uh threshold Access Control Taco which is presenting a departure from the web 2 Paradigm with respect to encryption and access control so we all want versions of the apps we use every day that are nons surveilling non- exploitative non- rent seeking right like a decentralized twitch decentralized Spotify decentralized zdoc Etc how do we do that well a piece of the stack that's often overlooked is what we might describe as selective decryption very simply how do you make it so certain data is only decryptable by certain devices so basically this applies to the vast majority of applications in web 3 and just on the web the option available to developers today are pretty limited excluding Taco you could just go with local easy asymmetric encryption or p pki and this is nice it is secure everything happens in the client but it doesn't scale Beyond a prototype it's not user friendly Beyond a proof of concept the next option is even worse you use Amazon KMS or aour key management system you're basically trusting a cloud service and then the third option is the worst of the bunch you use a dino which means decentralized in name only IE web infrastructure that says it's in it's decentralized has very swish marketing but actually if you dig into it the decryption material the sensitive keys are controlled by one commercial entity or at best a Coty of like permissioned in a permissioned c of insiders the problem with this kind of decentralization Cosplay is that your your users data are at risk of being subject to a rogue developer team um an opaque back from deal or just generally a single point of failure or the more benign uh outcome where they just never work out how to eventually decentralize okay so how did we launch Taco as decentralized from day one I I'll explain that through uh a three-step process so say we want to um inre some data we start off by sampling a cohort of nodes from the threshold Network let's say 30 now what they're going to do is a dkg initialization what that involves is generating transcripts aggregating and cross verifying them if any one of them screws up or does something malicious then the ritual fails so it's basically Min one honest party the outcome of the dkg is some public material and some private material the public material is used to to generate a persistent public key the private material is held on to or a fragment of that private material is held on to by each of the nodes now from the encryptor or data owner perspective they specify some conditions for the data to be decryptable I for the designated recipient to be able to decrypt it so let's say my twitch stream decentralized twitch stream is decryptable if the viewer holds two special purpose nfts this condition is then embedded along with the payload or the stream and uh sent out to storage somewhere uh the just a quick note on the conditions they're designed to be very composable so that you can combine them with any kind of like operand uh they can be surfaced at different points in the runtime and at some point we'll be able to update those conditions later now from the recipient point of view uh they basically take that payload from store storage and present it to the network along with a signature uh proving they own a wallet that's going to fulfill the conditions I just mentioned IE the two uh nfts the cohort of nodes takes this and verifies whether they actually fulfill those conditions and once a threshold of them agrees that they fulfill the conditions they provide provision the decryption material to uh back to the recipient who is able to assemble it locally in order to decrypt the data pretty straightforward so far let's jump into two case studies of uh adopters that are already using Taco um for their sharing flows so Master file is bringing private nfts to the world so whether it's a movie comic book a track or a piece of art instead of just owning a symbolic receipt that you purchased something at some point um here you would actually own the decryption rights based on the nft that you hold so only you can decrypt a given piece of art or uh asset it's built on taco and arweave so you have access to that uh uh this asset or this nft in perpetuity until you decide to sell or transfer it one way to think about this use case which is quite interesting is that if we stick with like the web 2 approach then all of your collections of assets like let's say for example your your Spotify collection you know you can spend 10 years building it and then you start paying the subscription fee and it's gone but then if you think about it from the old media company's point of view they're interested in web 3 and crypto but they don't want to put these um these libraries of Music Etc onto openc because they consider that to be persistently permanently uh pirateable uh and so they're interested in in in you know the nft space but and they're actually the ones demanding that the whole stack is decentralized because they don't trust the kind of fake decentralized model another high stakes use case already using Taco among other things silk is pioneering a form of key recovery that doesn't rely on burdening your mother uh uh in being your key recovery contact so they their approach is antisocial key recovery where you retrieve access to your your seed phrase by proving that you are the um the account owner for an email or another account um the interesting thing actually about their model is that they take the really sensitive payload I.E the seed phrase and they Shard it across multiple access control services so us Taco but also lit um now that Shard that Lit controls from our from what we can see is going to be you know at best controlled by like one of these permissioned ceries like I mentioned before or like more or less a centralized service but The Shard that taco controls would be managed by those 30 nodes uh that I mentioned earlier okay so at this point we're going to hand over to James for a walk through of our typescript API thank you okay so if you did want to follow along uh I'll actually just grab that one last time bit.ly Taco web demo um and that'll take you to the our GitHub you'll be able to follow along with this demo uh let's increase this okay so this is uh an extremely simple example of how you'd Implement encryption and decryption using Taco web um first thing in this situation we've set up a very simple n file with some please don't do this in production uh private keys for encryptors and consumers and some config data about the ritual and the domain so the ritual refers to the cohort of nodes that Arch was talking about before the domain is a taco word for whether we on Main net test net um Cutting Edge test net that's all we're talking about there um we're going to connect to set up our RPC provider read in those environment variables the ritual ID here's our RPC provider and then we have two helper functions encrypt to bytes and decrypt from bytes I'll come back to those in a moment very simply we specify the network we'd like to connect to in this case uh polygon Mumbai set up our message string call encrypt bytes we get a cipher text back blob of bytes we do the exact same in Reverse decrypt from bytes and we'll get our decrypted message back so what do those actually look like encrypt to bites first you set up your sign a wallet um again you wouldn't read this in from aend file you can do whatever um however uh suits your use case um coming from a web wallet or Hardware local hardware wallet whatever whatever suits your you use case we set up our message we convert it to bites here line 52 to 60 that's the fun fun condition stuff so here we're creating an RPC condition um these can be extremely extremely generic this one is looking at the balance of the user so does the user have a greater than zero balance on chain 8001 so do they have a positive polygon Matic balance super simple you can do complete custom conditions so any contract call that is a view that is nonstate changing can be used for condition evaluation so if you have very very complex condition logic you can deploy your contract to whichever chain of your choice um specify the address specify the function signature the inputs the expected output and that's how it's going to be the nodes are then resolving that call and returning true or false we get a signer the user has to prove that they actually they has to provide a signature of the address that's involved that has this positive balance and then we produce a message kit which is then converted to bytes on the decryption side we're doing extremely simply just calling threshold messag kit. fromes and then decrypt Um this can all be condensed down to about three lines of code if you if you want it to so let's actually run this we'll see that it's nice and fast I think it needs to be much bigger there we go okay uh oh we got a network error perfect typical here we go so we're getting the sign as address our domain is to Pi that's the test net ritual ID zero this was the first ever ritual the dkg ritual that we set up on the network um and then oh before I've even managed to finish we've managed to decrypt so the encrypting message this is a secret smiley face we get our Cipher text back really importantly we can do whatever we like with this Cipher text now store it on arweave store it on ipfs send it to someone it can go anywhere the only people that will be able to decrypt it are people that satisfy that condition that we sent the consumer sign it address is this they then provide a signature and we manage to to decrypt our message again if we go back we can have a look at all right let's change the conditions and see what happens I only want you to be able to decrypt this if you are filthy rich on testnet which I'm not encrypt again we get a different Cipher text because it's uh using key encapsulation and excellent command failed so we can see here the responses that we get from the cohort of nodes um and it's multiple unauthorized decryption conditions not satisfied decryption conditions not satisfied decryptions conditions not satisfied so in this case we can see all of them agree that I don't satisfy the conditions for decrypting this Cipher text and um therefore I'm unable to all right pass back the fact that it um failed initially with the network era shows that we didn't simulate any of this uh okay so just one last slide um planning to decentralize is not the same as decentralized I can't emphasize this enough um we've seen in the world of bridges how they can go wrong multi-chain Ren BTC but it's also a massive risk for infrastructure and in some ways it's worse because if you invest the time and you know become dependent on components of your stack you're much more locked into this eventuality that the infrastructure provider doesn't work out how to eventually decentralize and some of the Mal feasant could be happening without you even noticing a semi- centralized threshold decryption protocol IE using what you might describe as glorified chir secret sharing but then just having it controlled by one entity that is basically like using a cloud service but more inefficient and then the most important point of this talk is that we launched L last month we were decentralized from the very beginning we're on like day 50 now we already have over a 100 nodes running Taco software which is amazing and we also are generating revenue from a diverse set of use cases which is also ahead of schedule um our test net up here is open for anybody to hack on um and yeah thank you so much for being [Applause] here

Automatic transcript — names and jargon may be misspelled.