Aisling Connolly - vetKeys: How Blockchains can keep many Secrets

EthereumZuri.ch 2024 · April 2024 · 30:38

Aisling Connolly categorizes blockchain privacy problems, from the protocol level down to individual users whose addresses and wallet activity are open for anyone to inspect. She introduces vetKeys and other recent cryptographic innovations that let blockchains keep many secrets, and shows how they support front-running protection in DeFi, end-to-end encrypted decentralized messaging and social networks, cross-chain bridges, and primitives such as witness encryption and one-time programs.

Speakers

Topics

From EthereumZuri.ch 2024, hosted by EthereumZuri.ch.

Transcript

there we go attempt three welcome to the stage aeling Conley from definity thank you very much um it's great to be here and yeah I'm sorry if I'm not what you expected um you can hear okay I can't speak so loud I'm I'm a quiet girl who will try to shout a bit for you but anyway so I'm here to talk about vet Keys which is um a protocol that we introduced to um allow you to have many secrets on a blockchain but first I want to come and say gr H uh so I don't know how many of you are from Switzerland or from Zurich um but yeah this is the kind of word that people use

to welcome or say hello in in in Zurich and when I came at first people said this to me and I was like what is this fritzy thing they're saying to me and anyway um so yeah it's welcome and I just wanted to say that uh like I heard someone say I I come from America I come from ICP and ICP is this internet computer protocol which you can see on the overhead projector which is very old school and quite nice actually um it's cool to be in a university to see this uh classic text text stuff can I send a fax here and this kind of stuff but anyway um it's cool but I come from internet computer we call it ICP as well um but this is generally a a prot layer one blockchain that now has lots of

features which I will tell you about today um but yeah so why I I kind of start I'm here for two reasons and there's kind of two strands to the story which lead to this privacy thing that I want to tell you about in a minute the first kind of leg of the story is about this internet computer which launched in 2021 and the goal of launching this was to form a kind of new blockchain network that would serve um the world software and system so like Bitcoin came along and gave us this very nice kind of financial system and this kind of peer-to-peer payment system and it was great but like uh um it was it was limited in a way and it gave rise to all this kind of super cool like people said ah now that we have this kind of digital

secure payment system maybe we can build this digital secure compute system as well and so this is how ethereum came along I'm sure you know much more like about ethereum so I don't need to go into that and actually Wolf Gang I think who talked before will give a very nice talk about ethereum tomorrow so I do a bit of advertisement for him as well but yeah ethereum came along and it gave these smart contracts and as you see now um a lot of the uh conversation around ethereum is about how to scale it how to make it more efficient and things like this and we sort of came came along in 2021 and said we want to build this sort of autonomous Cloud that can facilitate like real world systems like it doesn't have to be maybe the absolute most super secure highly decentralized a million

validators checking every signature like this is not needed for most stuff that runs on the internet but somewhere between Amazon Cloud and ethereum is where we kind of wanted to to build something so this launched in 2021 but the question is how can you build something that has like kind of the efficiency of a cloud service provider but some of the kind of nice um idealistic guarantees that you hope to achieve from something like ethereum like a decentralized network and I think like one of the biggest problems at the time in 2015 if you kind of place yourself back in this world um which is kind of fun now to think that this was actually quite some time ago and the blockchain validators like one of the

biggest things with Bitcoin was that it needed like the there were these full nodes that needed to download the whole blockchain and check all the state check the full history and the same with ethereum at the time and now there's light clients and rollups and ZK proofs and all this kind of stuff that gets around this but at the time this was not hyper efficient and as we wanted to build this hyper efficient blockchain Network that would host like really you know like the world software cloud like um we needed to do something else and at the same time I don't know if you remember there was like this like ethereum was kind of Bitcoin was taking off ethereum was coming up they were like oo these cryptocurrencies are a

thing now and they started calling them cryptos and then all the cryptographers got up in arms and said like what do you mean the cryptos crypto means cryptography and there was all this kind of spatting back and forth on uh on Twitter I don't know if you remember but for as a cryp I studied cryptography so as a cryptographer uh people got very defensive of the word crypto anyway we lost the battle but at the time the cryptographers started paying a lot of attention to blockchains and I mean to me you know how many Engineers do you need to change a light bulb like how many cryptographers do you need to look at blockchain before you start realizing signatures are the answer to everything and so with the internet computer I think one of the key like the first real main Innovations of how this blockchain

network could be different is instead of taking all this history and having to verify it all the time can't we just like sign the stuff we've verified already and can't you just trust this like we have provable security to show that you can't forge these signatures we have like ways I mean you have a consensus Network to prove that everybody agrees that this is the current state so coupling these two things surely this means that like you can just just agree that because we've agreed on the history and because we've signed it it can't be faked and so this is what we aim to do and uh but in order to do that efficiently in a way that like anybody can verify that okay

because we've come up with consensus and because we've signed it nicely and because it can't be faked um but still someone needs to verify it and like if there's here you see these uh bubbles on the picture are supposed to represent smart contracts on the internet computer like if these smart contracts on the internet computer are signing everything saying like Okay this is okay do you need public keys for all of these like this is going to be a like a key management Nightmare and so one of the real kind of big Innovations of the time at least around the internet Computer World was the fact that you could have one single public key one single private key from which you derive everything else and all the kind of private keys are of the smart contracts that sign and

verify and attest to things could be verified all these signatures could be verified with a single public key so this was like the big innovation of the time and this was like a lot of kind of crypto stuff and we call this cheny cryptography and but it depends on hasht trees and threshold BLS I don't know how much you know about the technical side of this stuff but if you this becomes important later um but then yeah okay fine you can have like a a uh one key that can verify everything this makes it super efficient but at the time I don't know if you also remember there was a lot of questions about setup how do we set up this stuff securely like uh all this decentralized stuff was coming around and it's like okay I as Ashling can generate a key and

give it to you but like who's to say that I am trustworthy enough to give you the key that starts all of this whole network and so there needed to be a distributed way of actually setting up this master key in the first place from which everything would be direct arrived and whatever and so there was a very nice uh another kind of key innovation of the time was this paper from yans um about non-interactive distributed key generation and key res sharing so we need the key res sharing for if if validators come and leave the network if you know if like things change uh you can't have a static system and you can't have static key derivation so things change so you need to reshare keys anyway this this was kind of one of the big uh things of the time and I tell you

this just so that um you know and you can keep in your pocket now okay they have thresold thresold BLS they have these keys that they can use to sign stuff and get all this efficiency and they can set it up in a secure way this is great and so yeah ultimately you have one master chain key that kind of allows all this signing and all this verification it doesn't mean that you have to carry all this history around with you and this is actually the public key there it's just there you can take this public key and you can verify any signature from the internet computer with this key and this allows you to yeah verify transactions and correctness and it can't be uh can't be faked you can't tamper with this whatever so that's one part of the story the other

part of the story is that now that we have threshold BLS um it allows us to kind of integrate with the internet very well it allows us to kind of go in the direction of this Cloud stuff but also at the same time as I said we also believe in these kind of um decentral ized principles these kind of ethereum ideals this was supposed to kind of build on top of ethereum but how can you build on top of a network that you can't even talk to or whatever and so ethereum relied on ecdsa signature so it's a different type of signature scheme and if we would want to talk to ethereum it would be necessary that we do ecdsa so we can also sign things that ethereum would understand and so we did

and so um we implemented this EC DSA and luckily I mean you if you do this you get Bitcoin and ethereum for free because uh they both use the same signature scheme so now it means that the internet computer or ICP can actually write to bitcoin can write to the internet can write to ethereum and these validators can validate all these signatures in a very super efficient way I won't go into this too much but um this is kind of nice because uh smart contracts so this picture on the to you the right of the screen is supposed to represent some portion of the internet computer and the keys on the notes the validators at the bottom collaborate together to sign some stuff they uh produce a key that can be used

by the canisters which sign or the smart contracts which sign transactions that can be red and change State on the ethereum network so we have this integration we also do this with Bitcoin so you can sign transactions that can change the state on the Bitcoin Network this is um super nice but um my colleague will talk about this later in the afternoon so I'm going to like move on from that topic now um so yeah Bon um will talk about threshold cryptography for multi-chain app so how like all this kind of signing and stuff can allow you to enhance uh like take some nice features of ICP and use them in your ethereum app or use them in your Bitcoin app or like add some functionality to bitcoin that's not there already but

that's his later on but I say all these things just so that you know now and that you have in your pocket okay you have thresold BLS you have a nice way to set it up and you have uh threshold ecdsa which allows you to talk to bitcoin and ethereum but now the reason that I'm actually here is for privacy and do I don't know like maybe a show of hands how many people care about privacy in the room okay quite a few I find it kind of funny because like in the blockchain world so there's like a bit of a contradiction I have do I have time to like ramble a bit okay great this is the nice thing when someone doesn't show off you're like well let me now go into

story time um this is like off off slides now but but like for me ER I care about privacy a lot I did my PhD in privacy topics so I could talk about this all day um but uh the interesting thing with privacy is that so people don't like Google and people don't like Facebook because they can see your data and like there's data leaks and my data is even being sold to Netflix for hundreds of millions of dollars and all this kind of stuff so like having a centralized system have control of your data is not good because then you know those are profit maximizing organizations that are going to do what they need to do to maximize their profits at the cost of maybe you and

your privacy and whatever little like ideals that you might have throw them out the window and so like this is not good and so you kind of then find this blockchain world where it's like ah it's decentralized Iz I'm taking out the middleman there's no more Facebook there's no more Google this is super nice because you're like yeah damn the man I'm going to build my systems but then you build your systems you realize that every goddamn thing that you do is public and it's like you've seen all my like you've seen that I sold Dogecoin like way too early and you've seen that I minted like some crap nfts and it's like okay it's okay but like I mean that's fine now because it's like my web

three friends and they've done the same and it's okay but if people are kind of doing analysis on this and if you want all this data it's there and it's public and um when you're playing in the web threee world as it is now that's okay but I mean I don't want my bank details and all my like things to be just in the open so that you can check because because why not and it's like oh because everyone needs to verify everything all the time and it's like well well maybe they don't need to verify everything all the time hang on a minute like what were we actually trying to do with these blockchains in the first place like we were trying to it's like this security thing at the airport like because one person did a bad thing

everyone now has to suffer and put their shampoo in little bottles for like 10 years it's like crazy um so because like Google does some bad stuff and Facebook sells your data now everybody's Bank Account Details essentially and okay it's not a bank account but like their account and their money which is real now is out in the open for everybody to see and verify so this kind of sucks and it also sucks like on the more technical like so this is the personal level okay my I don't want my stuff be just because Google sucks doesn't mean that I should have to suffer for all my data stuff this is on the personal level but on the protocol level there's also like some problems like if you think about um well I don't know if it's a

problem or not it depends who you're talking to like it's a bit of a debate about whether this is a blessing or a curse but there's this um me situation let's not call it a problem but there's a situation um on a lot of blockchains where you know transactions come into the blockchain and validators need to build blocks or people someone a block maker needs to build blocks and they order transactions they package them they build a block they kind of confirm things and then they're sent around to everybody else but like um these like depending on how you order the transactions I mean like these transaction come with fees so if transactions come with very high fees maybe you put those higher or maybe

because you can see what's kind of coming in maybe you want to actually start ordering transactions yourself or maybe you want to make some transactions yourself because you know I mean there's a lot of kind of um manipulation that can go on with transactions and things like this when you're making blocks and on the one hand this is a great thing if you're a block maker because you can make money and you can do uh you can put things in blocks that you want I mean you can do all sorts of stuff as a block maker but again as a kind of end user all I do is suffer and pay too much fees and maybe actually my transaction doesn't make it into the block and I lose the gas that I paid to try and get in there and the transaction fails so again like just because like one guy is

trying to make some money I suffer and this sucks and like this is to me because everything is open and everything can be seen and everything can be validated so privacy on blockchains is like a huge issue oh I talked too much now the thing went to sleep um yeah it's a huge issue and like it's really hard to know how to solve it because also people need to see stuff to verify it like that's how the whole thing is built so like how can you do anything with any sort of privacy on blockchains okay it's a big topic now people are doing some stuff the ZK proofs um whatever so let me go on and try to uh uh I talked too much sorry okay there we are um so yeah anyway I go back to now

trying to explain to you how we get some privacy how we built this privacy tool that can be used either on the internet computer on ICP or on ethereum if you have an ethereum app you can use this as a service um or on bitcoin or whatever so you can add some privacy wherever you like um so yeah earlier we saw that now because we have threshold BLS we have these smart contracts that are able to sign transactions um on other blockchains oh because we have special ecdsa we have um smart contracts can sign transactions on other blockchains so we want to just take this picture and kind of extend it so like

for privacy what do I want to do I want to not only sign but I also want to be able to encrypt and decrypt stuff like you know Bitcoin came with their payments so like why do we and then ethereum came along with like a general purpose compute platform okay like maybe it's good maybe it's bad I don't know but it is a general purpose compute platform so why are we still talking about transactions so much it's not just about money anymore or like a fee or like a token or whatever it's like if you're Computing you're Computing on data like it's generic so it's not just about transactions I want to be able to do the stuff that that I do with normal data I want to be able to encrypt it I

want to be able to decrypt it I want to be able to manipulate it I want to be able to do whatever with it so this is the model that I kind of work in not that uh whatever I'm signing is a transaction whatever I'm signing is data and so is there some way that I can sign this data that kind of heights it and the answer is yes actually so these BLS keys that I mentioned earlier are very special in the sense that um they're very efficient on the one hand so this is why we use them they're they're very fast you can batch them you can do all sorts of interesting stuff with them they're deterministic which means that you know every time you derive something similar you can have

the same one um you can there yeah they have lots of special properties I'll get to uh I'll get to to uh get to that in a second but yeah I take this picture and so we start with a threshold key derivation if you want some privacy you need to be able to get a key that can encrypt your stuff I think one of the nicest observations about BLS is that it also serves as a decryption key so like you can create a signature on something and this something happens to be um the public key for which the signature on it is a decryption key and so all we need to do basically to be able to do encryption with the signature is to be

able to derive this decryption key and so this is what we do so we have BLS on the internet computer already we use it in every layer of the stock and so this uh key derivation I mean this privacy tool that we have built is basic essentially just opening this to developers as an API so that they can use it too because these Keys have that functionality that can like allow you to do uh encryption and decryption so the first thing we need to do is uh derive a key but if if you derive a sort of decryption key and you send it to a Smart contract I mean uh you're just sending like secret Keys

around in the clear this is obviously not good and so you want to way then to be able to send your derived decryption key around in such a way that nobody in the network can see it because remember we're operating in a public space everyone can see everything all the time and so you never want it that your decryption key that you want to use for all your privacy stuff to keep the kind of public out of your transactions or your data this also itself should not be sent around in the clear so encrypt it fine um so with this uh key derivation scheme we have a way such that this key can be derived in an encrypted way so the user generates a transport key it's

like saying hey okay I'm going to ask you now to drive a key for me a decryption key something that I can use I can I want to encrypt like encrypting data is easy all you need is a public key and a public key you can get from anywhere the hard part is actually decrypting it so I'm going to ask you to create a decryption key for me me as an end user and I want you to somehow get this to me without anybody seeing it on the way so all I need to do then is ask you to encrypt it as well but how are you going to encrypt it you need to encrypt it onto this public key that I give to you such that when you send to me I have the decryption key which I can decrypt the derived decryption key um

and so the system API looks a bit like this it's just an API that gets decryption keys to users this is the key thing to remember so yeah you derive an encrypted key from a master key uh the transport public key is the one that I sent you to encrypt which you sent back to me um and there's a derivation ID which sort of acts as the public key in this case um and so these are what we call vet Keys uh so this is the whole like these keys that we derive and transport to the user that they can use for decryption we call them that keys and you can see why so there are threshold Keys they're encrypted threshold keys so you see the E and the T and now you might be asking what is the V and so the V is just that they're

verifiably encrypted so we want this to be sure that um in order for the blockchain not to stall basically you want to be able to give some guarantees that whatever I am deriving is actually a decryption key but because it's encrypted you need to be able to verify on the encrypted derived key so this is the verifiably encrypted threshold keys or what we call vet Keys um and that's it and so like from through uh secret shared Keys across the node in the network they collaborate together to produce this uh these uh decryption key shares which they then encrypt send to the smart contract which

then sends it to the user and this also resulted in another paper um which was released last year and it leverages the fact that BLS are also decryption Keys um it uses yeah elgamal to do this transport encryption to S to get the uh decryption key from the nodes to the end user without being seen the API is available the full integration is still coming up later this year and uh the expectation on speed and signing is that uh or like key generation is that we can do hundreds of keys per second and so the goal is that this will sort of serve as a decryption Oracle for ethereum apps and if you again if you want to see the multi-chain like how ethereum apps can

use features of the IC that's be's talk later but this is one of those exact features and so some uses I alluded it to them earlier in the little speech book like one is um let's say you want to build an endtoend encrypted messaging app on chain um and you want to yeah I mean like you saw that Facebook messages were sold to Netflix this week I think that was the big news so like having endtoend encrypted messaging with nobody in between is a very good thing to have and having it in a decentralized way is even better so the trick here is that the vet keys so the BLS signatures can function as the decryption key we've been through this so if I let's say want to send a message to you um I will encrypt it

under your name like under your public key and then you get your encrypted message and then you call out to the internet computer and say hey I need to actually decrypt this thing I don't have a private key and then you say okay given this identity here's the private key for this guy to decrypt his message and this is the whole point so like I think one of the biggest problems with privacy in blockchain in particular is this whole Key Management problem so this gets around all this key stuff you can just derve your decryption key on demand um another one is front running prevention so I talked about this in the uh at the start as well about this um block ordering and how you might order

transactions to suit yourself or make some transactions or get your transactions in so if everybody like let's say in the room wants to send a transaction to like make a transaction on ethereum if I in like if everybody in the room encrypts the payload of this uh transaction to the public key let's say of the validator um everything is encrypted so that as they arrived he can like order them in a particular way and commit to this ordering such that when this ordering of encrypted transactions is committed to then they can actually decrypt the uh transactions in that order to execute them and there are actually people doing

this there one uh group called shter Network that is doing this but this is also possible on uh ICP so you can just do this very like like for free basically with this API um another one is seed phrase backup so like uh another huge problem in web 3 is that people forget to write down the 12 or 24 words of whatever particular um uh recovery for whatever particular wallet they're using and so if we had a way to be able to say like hey I need to derive secret keys on demand exactly this is what um can solve this type of problem as well so instead of having it like uh instead of having to write your seed phrase on a piece of paper and put

it into a bank vault in UBS on ban of stasa or whatever um you can just encrypt your words like encrypt your seat phrase store it anywhere on the internet store it on the okay don't store it on the blockchain but like uh just like store it somewhere and then anytime you need to decrypt it you can get your decrypt Key by calling this vet Keys Oracle let's say um and this is actually a community project so somebody is building this on ICP right now another one is the dead man switch so this is something that's also one of the community projects is working on so there are some people who let's say have a lot of Bitcoin and they want some kind of trustless way to be able to pass this

Bitcoin onto their kids in case something happens let's say in the event that something goes wrong and they don't have the ability or the capacity to pass on their crypto keys to their kids what they can do is encrypt their keys to like under the public key like their Bitcoin keys under the public keys of their kids let's say and if somehow this guy hasn't access to a computer anymore the kids will be able to derive their decryption keys and decrypt um decrypt their daddy's Bitcoin keys and have access to his uh his his Bitcoins so this is some somebody's working on basically um yeah like all sorts of insurance and um yeah inheritance

problems and yeah so um people have started like we as I said we released the API for this people have started building it or building using this already um a few of the projects are here there was like a document based proof of proof of personhood there was end to end encrypted forms so instead of using Google forms um you can use this now or there are others um yeah file services that are fully encrypted there was like a privacy based AI chatbot running on ICP there is a Noster client running on ICP with privacy um there was medical prescription so this is actually pretty

serious real world use case that is actually being developed um so I think it was in some country in out America I can't remember where exactly but they have prescriptions which they need to share across different entities in a particular government and they don't want things just flowing around in the clear but they also don't want to have to deal with the key management of like okay the the the local doctor and the hospital and the pharmacy all need to have decryption keys and like okay am I encrypting to the pharmacist or am I encrypting to the hospital or am I encrypting to the doctor or whatever it's like you can just encrypt to whoever and they can derive their decryption key people don't have to it just kind of simplifies the use of privacy in not just

blockchains um capsule was a time capsule so keeping information in a in a encrypted form for x amount of time so um it's quite fun to think about how you can actually use time in the blockchain sense so like okay once we reach block number this decrypt so you can give all sorts of capabilities to Smart contracts to kind kind of decrypt on demand as you like um there were note sharing applications and uh role based context within Gaming Community so these were the kind of main things that were being built so far um and yeah I now kind of encourage you to have a look at the documentation and if you're interested in privacy to actually start thinking

about or ask me like or talk to anyone from definity where um there's a booth right by the coffee place so grab a coffee and stop by and talk to us and yeah happy to uh answer some questions as well at this time thanks very much thank you very much aeling everyone put your hands together