Modern Encryption in Decentralized Networks Anika Raghuvanshi mod; Chris Casssano Lit Protocol; Mich
Ethereum Denver·Sun, Oct 9, 2022, 12:00 AM
Transcript
hello can you guys hear me awesome um so before we get started um all of these folks work on pretty interesting projects and so i wanted to dive into each of them a little bit so we can start with chris he's closest to me so chris works on lit protocol um it's basically a way for or i'll have you give the elevator pitch and then i'll ask some follow-up questions sure yeah it's a decentralized access control protocol powered by threshold encryption awesome so decentralized access to what uh to any basically anything you can encrypt data and it also supports um generating signatures that you could present to a server like a web 2 server in order to get some data from a web 2 server and so what what exactly are people like what criteria are people like gating this content by yeah so we we see blockchains as credential networks essentially so right now people are using lit protocol for things like encrypting data and specifying that if a user owns a certain nft or if a user is in a dow or meets some other on-chain condition they're able to pull down that data and decrypt it and what's really cool about that is that that set of users that are able to decrypt it can be dynamically changing all the time yeah so that's pretty different than other kind of previous protocols because you usually have to have this set group of people that you encrypt all the information too so yeah what kind of does this open up in terms of possibilities yeah it uh lets you do something like uh block some data behind an nft put the nft up for sale on openc and then disappear from the face of the earth and then that nft can be traded around and everybody that buys it is able to decrypt it and no one else is able to decrypt it so without knowing specifically who you want to be able to decrypt it um instead you can set a condition of who should be able to decrypt it as long as they meet that condition which right now is usually something on chain uh then they'll be able to decrypt it cool and do you and you mentioned um threshold scheme what does that mean exactly oh so i love threshold cryptography okay so we uh one of the most powerful things i think uh that we can all agree on is public key cryptography i mean it underlies um all of the blockchains that we use but public key cryptography is uh typically not used in a way where a signer is decentralized and with threshold cryptography you can do all the same things you can do as an individual with public key cryptography like sign messages or decrypt things but in a fully decentralized way where a network of nodes each holds a share of a private key and they're able to decrypt things with that share or sign things with that share the end user can collect those decryption shares or signature shares and use it to create or to to recover a key or a signature that they can use for basically anything that you would normally use public key cryptography for cool and to clarify the the user who's decrypting the data do they have access to the private key yeah that's exactly it technically nobody knows the full private key the key is generated through a process called distributed key generation where each node in the network creates a private key share the public key is known to the whole network but nobody actually knows the private key and so you have a secret private key essentially that can be used and worked within a decentralized way awesome thank you we'll move on to wayne um so wayne works for spruce id at spruce systems um so feel free to give the elevator pitch yeah so at spruce we're trying to let users control their data across the web and we work on a few things to make that happen today you know we work in a world where you try to authenticate log into a platform and you hope that they give you access to some of your data again and we want that to move to a model where you bring a personal data vault around from platform to platform and you permission access to different parts your data vault that's yours you know really being able to have the same expectations in the digital world for ownership and control as you do in the physical world when you get your passport from your bedroom right you don't have to ask anyone to access that again right you can just get it in the digital world why do you have to go through an intermediary to grab that is there a way that you know empowers you a bit more so today if you're signing in through an identity provider like google or facebook if they decide to pull the rug from under you and remove access to your account you know how much access are you going to lose is it just properties from google or is it everything you ever use that account to sign into right so we're working on signing with ethereum with the ethereum foundation and ens to figure out how to let ethereum accounts log into websites so that your keys can help you authenticate a session not your keys not your crypto becomes not your keys not your identity right so for the people who want more control we want to make sure there's an option for them we're also working on a personal data vault and so can you describe like what the user experience would look like if they were if they were using this sign-in with ethereum sure so if you've ever used openc and you go into your profile page and you're trying to like edit something about yourself maybe not just anyone should be able to like edit details about your profile like change your alias your profile picture right maybe they want to make sure it's you right so openc already does sign in with ethereum in their own way and they make sure that you sign a message to create a session with you to to really prove that they're talking to the key holder right so that way you can then edit your data and show people you know your new profile picture or whatever right and uh basically that's what it looks like in any wallet that supports signing you get a prompt and you're signing into ethereum and all of a sudden when you sign it you get a session right so there are a few drawbacks about the approach in the wild today that's not standardized uh basically one of the most important things from a security perspective is something called domain binding so when you get you know opencs asking you to sign into you know with your ethereum account how do you know that message really came from the openc website right and if you don't know you might be the victim of a man in the middle or phishing attack so it's really important that wallets have the opportunity to ensure domain binding so that you know you're talking to the right website right so by standardizing it as an eip 4361 if you go to login.xyz you can find all the details we did in the open throughout community calls and everything then you're able to specify a pretty rigid message format where any wallet can detect this message format and be like oh that's the domain that i'm supposed to check and we have to make sure that the user is on the right site you know we're talking to wallet connect about how to do that over walt connect as a protocol we're talking a bunch of wallets on how to check it in the browser and that's really important what's even more exciting is as more applications start adopting it then wallets have an opportunity to interpret the different parts of the message and display a superior ux as a confirmation dialogue so it actually feels like you're signing in with passwordless authentication we've seen efforts previously like web authen and others but when we look at ethereum and related systems as the biggest pki adoption event in history right then you kind of really think about hey you know most of these keys are being used to just sign mainnet transactions or on some other chain id what else can you do with them right there's a whole bunch of white space to explore there and the first step is authentication and signing with ethereum and then you can go from there to a bunch of other use cases awesome and last but not least zach what is aztec yeah hi all uh so aztec is a privacy preserving um layer 2 that lives on top of ethereum effectively it allows users to um conduct all of their ethereum activity whilst protecting their identity and anonymity by making sure that yeah basically all of your state that's stored on the network instead of it all being plain text uh it's all encrypted uh and uh our specialist specialism is performing verifiable computations on encrypted data so that uh folks can hide their djen nft trading from their friends and family awesome thanks and um so aztek is built on some cool cryptography that you've invented called plonk can you can you describe what planck is at a high level cause i know it's pretty complicated yeah i can try so um it's something that's called the zk snark which is probably about as helpful the name as planck but it's it's a very niche form of cryptography where you can take a computer program uh and um basically construct a mathematical proof that you have uh correctly run this program um and the benefit to this is a you can encrypt the embers and outputs to the program uh which means that you could for example the way we use it is for private transactions what the user is effectively doing is they're saying well here's some encrypted data that represents the transaction trade and uh if i were to decrypt it i could prove to you that a i own the the account that's that's that's this thing is um referencing and b i follow the rules of your blockchain not double spent etc i could do that but i'm not gonna i'm not gonna do that i'm just gonna leave it in an encrypted form and serve you a mathematical proof of correctness um uh so i can't remember i was i had a second point i can't remember what it was that's basically it um and uh so plonk was a basically a way of doing this efficiently the problem with zk snarks is that they've been possible in theory for for years but in practice you know you'd need like monstrous computers munching through gigabytes of ram and like churning away for you know minutes or tens of minutes to get this kind of thing done and plonk was a way of doing it um uh uh constructing these zika snack seconds very efficiently so that you could actually construct these proof you could use these prove algorithms say you know on consumer hardware um on a laptop in a web browser and with much better security properties than some of the stuff that existed beforehand awesome thanks um so one question i wanted to post to all of you is what is the unexpected or expected technical challenge that you faced recently or in general um yeah feel free to take it away sure yeah so um with threshold cryptography and with a lot of cryptography in general it starts out as an academic idea it starts out as a paper and generally there's a lot of assumptions made there like that potentially the set of nodes that are operating with the data like don't change that the nodes are always online that they're easy to communicate with and there's not like high latency so a big challenge for us has been taking some of those ideas and making them work in a more practical and robust way and really one thing that we're very excited about is a technology called proactive secret sharing and uh once a number of nodes have generated a uh private key shares and have done a distributed key generation operation it's very hard to change the set of those nodes um you don't want to just like copy the shares over because then more people have the shares and if some one party was able to accumulate more than the threshold number of shares they would be able to to figure out the private key which is very bad so proactive secret sharing lets you keep the same secret but add and remove parties from the the group of people that are able to sign or decrypt with it cool one technical challenge that we encountered trying to build these personal data vaults is allowing people to encrypt data with their key material before storing it in the data vault that way they minimize trust even more with whoever they're storing it with right and i think that's something we all like but it's challenging because it's not standardized and i think one of the wallets that everyone likes to support and has an or has an rpc endpoint for it is metamask right and there are some challenges especially with ethereum because the sec p256k1 curve has some potential flaws when used for encryption as opposed to signing right so uh that if you want to learn more there's a cryptographer i think some of us are familiar with uh christian lunkist and uh he had i think several years ago written a blog post about some brute force attacks that you could do if an attacker could pick certain points for someone else to produce so that could be problematic or not but you know this is what standardization would help with really tying either tying the curve down to an area where it could perform to the quality that we want or the metamask implementation actually delegates to a separate key an ed25519 edwards based key and it uses x25519 and other bernstein algorithms to figure out how to do the cryptography for encryption and then um you know that's kind of like metamask uh special right so how do we make it uh more standard across all wallets so invariantly you can encrypt stuff to other people's ethereum accounts and they can decrypt it you can build things like messaging frameworks you can encrypt data before you send it to someone right if we are looking at this as the biggest pki adoption event while using our keys for encryption you know is a really good use case for that so christian if you're out there i hear he's like the metaverse these days running stuff in vr so if you're hearing this from your vr headset you know please let us know how to find you so we can talk more about you know standardizing this stuff but this is something that i would invite all wallets to talk more about how can we have standard interfaces for encryption and decryption right so that's one challenge and a solution that we can collaborate on yeah um challenges challenges so many uh well okay so one of the things we've been wrestling with recently is um performing uh verifying ethereum signatures inside of aztec zika snack uh circuits um which is uh so it all right now what we do with our with our existing layer two um the essence network is uh when you um we derive um public private keys from uh ethereum signatures for users of the asset network and the reason we have to do this is because uh the kind of the elliptic curves that we use within our zika snark circuits that we use to verify signatures they're different to the standard ethereum curve and that's because the standard ethereum curve when it comes to zika snarks is rubbish not their fault zika snakes didn't exist um when ethereum like not really where mainstream went through turned up but basically um the specific elliptic curve that ethereum uses um has parameters which means that uh um like uh constructing a proof that you can correct that you can sign a ethereum signature with a lazy guest snark is about like one million times slower than actually doing the computation directly and so but it's but it's something that is quite important if you want to say you know use just your regular ethereum hardware like hardware on the asking network it's essential so he basically spends i don't know like i think it's been about two years of research so far getting it working um but uh uh we have now uh find like finally we've got something practical and we should be rolling it out in about in about like three four months so yeah that's that's what i've been dealing with yeah just to add on i think like that this is like the builder's dilemma in the space right like do you care about theoretical perfection or do you care about building and iterating right and those sometimes can work together sometimes a lot of the times they don't and you have to work with what you got and figure out what other departments for your problem and take an engineering approach to figure out what's going to work so that's a lot of the challenges and when you're building a startup company right you have to figure out what's going to work for your end user so if step one is download this random app that you never heard of and then put your most trusted key material into it you know it doesn't work for a lot of people and we have to figure out what already has trust in terms of its limits of use so using things like wallets they're familiar with and everything else we really have to talk to users and understand their perspective on it i think that's why you know a lot of these decisions are being made yeah totally on on that point like what is the biggest barrier for for users to for using each of your different projects the biggest barrier for users uh that's a good question um i mean in general in the crypto space uh obviously the the wallet onboarding process is a little tough like you're you're you're signing up for uh you know a wallet and it's like write down these 24 words and you're like i'm on a bus like i don't have a pen like there's people around me like it's not a great ux so that that in general i think is is a big thing um i would love to see some more clarity around uh like what people are signing specifically that's a a area that's pretty opaque to a lot of users and it's hard to explain because the the information is highly technical but if there was a way to sort of humanize it in a you know english phrasing i think that would be really helpful um and i understand like that that this kind of stuff isn't necessarily a high priority right now like with respect to where we are in like cryptocurrency and in cryptography we're still kind of in like the everything is held together with duct tape and chewing gum phase uh but you know we're gonna keep keep working on it and uh hopefully improve that yeah um i really like your analogy to like can i use this on the bus we heard a bus factor maybe we can introduce like a bus test and the bus test is as defined you start off in williamsburg and get on the b44 and you ride it all the way down brooklyn to sheepshead bay and if you can set up an account and do some transactions in that time period on a busy bus and feel confident in your results then we have passed the bus test right so maybe we can add that to the literature so some ux problems that we encounter at spruce is that we think keys can be used for a lot of things and uh if you're trying to like let's say a file storage service you know maybe like dropbox and you're trying to control all interactions with signed operations instead of creating a cookie-based session with uh kind of creating a stateful channel with the host right how would that look right you might have to like prompt up a metamask dialog or whatever the signing interface is every time you want to like rename a file or like move it around right or modify a file that's terrible like you just break the user flow every time there are some solutions to this like auto approving signing which has gotten really bad rap and generally not a good idea there are other approaches but the one that we like to solve this problem so everything can be rooted in your keys is using something called session keys so the idea is that what if in the user's browser or you know their extension some part of the model you can use their local system entropy and generate a new private key but this is a horrible environment compared to a hardware wallet or something right so with a horrible environment come attenuated privileges so if we can down scope and permission what this key can actually do make it automatically expire right say that this key can access this sub path only write a certain amount of bandwidth that kind of stuff and assign that delegation correctly then that's i think a really exciting way to be able to operate a key inside a browser without huge friction or forcing wallets to do anything weird right so that's one direction that we're looking at to improving that and especially letting the user revoke their session keys at any time right today you can't revoke all your cookies at once so if someone stole your cookies that you'd be done right but what if you could just look at all the session keys you had in existence and just decide to wipe them and then none of those services could access anymore right so i think there are some exciting improvements we can consider with things like session keys and capability-based permission models but uh hand it over to zac yeah i mean i'm going to say something pretty similar which is that i think one of the one of the things that would help with user adoption and integrations with aztec is not need to rely on this kind of kind of custom key derivation algorithm that we put together because there's no standardization um so that would definitely help because yeah it's a huge blocker because you've got to obviously users have to trust that we've done our job correctly and that you know our libraries are correct but also then because there's no there's no standardization it means that any integrator has to also use this custom library and it just is it adds a lot of inertia um to adoption how do we start a dao where we fund technical writers to move the curves that we like into standards organizations and go through the ringer of the you know itf security group and everything else so that we can use those curves in other places you know if they are indeed accepted right i think that would be super cool talk to me after if you're interested um and my yeah my last question is um so obviously you all are very bright minds um there's also a lot to think about in all of these spaces so like what do you think is something that people should be thinking about more or you wish there were more minds working on i mean up in two words yeah uh cryptocurrency standardizing standards everything's public [Music] thanks anika
Automatic transcript — names and jargon may be misspelled.