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

Loading player…

Manage dApp Secrets: Create Private Data Sharing with NuCypher - David Nuñez

Ethereum DenverSat, Oct 9, 2021, 12:00 AM

This talk is from ETHDenver & ColoradoJam , the world’s largest Web3 BUIDLathon and Community Gathering. ETHDenver’s content is crypto and blockchain focused. Learn more: ethdenver.com Subscribe to our channel to learn more + connect on Twitter: https://twitter.com/EthereumDenver. Speaker: David Nuñez This talk was recorded Sunday, February 7, 2021. ETHDenver 2021’s content themes included DeFi & Money Legos, NFTs & the Creator Economy, ColoradoJam & the Next Frontier of Statehood, Protocols & Interoperability, Open Source & Public Goods, The Ownership Economy & Digital Orgs, Usability Design & Adoption and Legal, Privacy & Identity. Industry experts also weighed in on topics like decentralization, privacy, identity, non-fungible tokens, scaling, governance, diversity, and arts and culture in blockchain technology. The 2021 event was February 5-12 and hosted virtually in 2021 with 5000+ blockchain enthusiasts, developers and community members from 80 countries and 50 U.S. states. 🔴 SUBSCRIBE ETHDenver’s YouTube https://www.youtube.com/channel/UCgz9NU06t_FkT0Py1Vadczw 💡 LEARN ETHDenver’s Official Website https://www.ethdenver.com/ 👋 CONNECT ETHDenver Twitter https://twitter.com/EthereumDenver 📖 READ ETHDenver News on Medium https://medium.com/ethdenver 🛍️ SHOP ETHDenver Official Merchandise bufficorn.com 💬 CHAT Telegram https://t.me/Ethdenver Discord https://discord.gg/AxFmNdCVnU 📱 FOLLOW LinkedIn https://www.linkedin.com/company/ethdenver Instagram https://www.instagram.com/ethdenver/ Facebook https://www.facebook.com/ETHDenver/

Transcript

okay up next we have new cipher david there you are hi can you see me okay yes can you hear me okay yes perfectly perfect well i can hear you perfectly too so you're ready to tell us what's going on with uh managing our dap secrets with privacy on jane yeah all right cool take it away um thank you very much for um giving me the opportunity to talk in this great conference uh let me share my screen okay um okay so so the topic of this presentation is to talk about the cipher um probably you have already heard about uh cypher uh previously but i will anyway uh give you a brief idea of what uh what it's about uh basically the cipher is a platform for uh managing secrets in decentralized applications and it allows you to uh share information that you have previously encrypted and shared in a secure and scalable way using our decentralized network of nodes so first um just tell us about uh just tell you something about cypher uh the vision that motivates our work is that we believe in unconditional privacy as a fundamental right of people within privacies extremely important to create ideas to collaborate and essentially to empower individuals to assert their fundamental rights in in this digital age um from that vision um we created technology uh that enables to we created a network infrastructure that enables the provision of a cryptographic service that powers privacy per serving applications um and in the application of the blockchain space cypher can be used as a data privacy layer for decentralized applications and that gives the functionality basically of secrets management and dynamic access control so um how do you use the cipher you have created a decentralized application it's great it works perfectly but now you have the problem that maybe your application uh has some the uses of your application have some data that needs to be shared and you want to give the users privacy and security for that data but but at the same time you want to um share it you want users to be able to share information with with others so how can you do this in a scalable and trustless way so the first approach that anyone can can think is okay let's use encryption and in particular let's use for example public key encryption and this can of course work but it will have several limitations because initially let's assume that you have data um that it's in control from alice and at least want to share data with bob okay uh once alice knows bob of the key she can just encrypt it and distribute it and but what happens if now uh we have a new data consumer called charlie now alice would have to take all her data again and encrypt it again for charlie and what if there are 10 more users or 100 more users wanting this data so this solution doesn't scale at all another problem is what if so what the other point is that then this implies that alice has to be uh uh online for making this process of encrypting the information and um with with the different for decision recipients which is of course very inconvenient what if we assume that alice trusts a remote service we of course we all know that this is something that this uh an assumption that we cannot do there are many potential threats out there that completely disallow this option from being considered so okay what can we do this is where our magic comes to the rescue this is a cryptographic primitive called proxy encryption it's been out there for more than 20 years i'd say but it's been only from a couple of years since it's been really taken into consideration more deeply and it essentially works very similar to public key encryption but it has an extremely interesting property which basically allows alice to take um to create a special kind of a cryptographic key called the encryption key and with this key she can give this kit to some to some intermediate entity which usually they call it the proxy and the proxy is capable now of transforming any cipher text that was encrypted for alice and transform it in a cipher text that bob can encrypt it can decrypt sorry so the problem that i mentioned before about scale this the lack of scaling of pollen key encryption now changes completely here because now if you want to share data with charlie then alice only has to create a new encryption key and give that key to the to the proxy then all previously encrypted data that was encrypted under alice's public key the proxy candidate can transform it for charlie and this process can be repeated for any number of uh recipients the cool thing is that the proxy cannot access any data and the re-encryption key doesn't give the the proxy any kind of advance ability over the ciphertext or over the underlying encryption uh or not it's not uh capable of um getting the private key of alice so basically alice is only given giving the proxy the possibility of transforming data from her key to a key that our an authorized recipient can decrypt okay so that's that that was the um like the overall uh explanation of how a generic proxy encryption scheme works but in in our setting uh in in the new cypher network we developed a cryptosystem called umbral which is a threshold proxima kitchen scheme the name umbrella comes from spanish umbral means you you guess it it means threshold so essentially the umbra cryptosystem allows you to distribute what we previously represent here with just one key the encryption key for between alice and bob for example and um and distributed to several proxies so the cool thing is that this uh this is uh in a threshold way so you have an mfn um it's a name of and threshold so you can distribute for example between five shares and set a threshold of three for example so as long as three proxies participate in the process the receiver can get the data and another the cool thing is that you have a non-interactive knowledge proof for correct natural encryption so proxies cannot cheat in during this process and and they can be you can you can detect if they are not producing the correct encryption okay so the decipher network the cypher network provides roundtables and interfaces for management management managing secrets and access control um in a decentralized permissionless and citizenship way it's extensible so it can be extended to other cryptographic primitives proximation encryption is our first offering but we can extend it to other primitives and we created in such a way that to make it intuitive to explain and we extend the classic narrative of alice and both with other characters so the characters that we use are they typical in cryptography the alice and bob so we have a data owner and the recipient and but we have two more characters one is the enrico which is the entity that encrypts the data uh on behalf of alice uh the encryptor doesn't have any uh data sharing capabilities the enrico the encrypter only produces encrypted data and the other character which is the core character in the cipher network is ursula which is where the proxies or the nodes that form the network and that provide their encryption service um right okay i already said that so how does it work overall so essentially we will have um the same kind of setting that i i commented before but in this case we also have instead of one single proxy we have a network of proxies which is in the cypher network and this is interrelated to the ethereum blockchain policies for data sharing are managed in the blockchain and they are paid for in in it in ethereum and new cipher notes will get fees and also token rewards by for the work so um i will explain a bit of how this works uh with an example so imagine we have uh we have this uh use case where alice has a harvard monitor that monitors his her heartbeat and she wants to encrypt this data and have it in some stir it and at some moment later in time she wants to share this data with the doctor so with cypher she will create a policy uh granting access to her doctor and send this policy to the new cypher network and then at this moment the doctor can just simply take encrypted data for from the shared stories layer and request our encryption from the new cypher network then decipher network we will perform a distributed computation and bob will can now re-encrypt decrypt the data with his own private key so why no cypher is unique um basically the the the whole point of of new cypher is that in this case the user alicia can create policy uh public keys before knowing the potential consumers and this will this enables a lot of uh great um advantages so for example anyone that knows the policy public key for example a hard monitor or whatever device or other users they can produce encrypted data that will be associated to the policy and this can happen before granting access to bob or to any other consumer so basically data producers are completely unaware of the recipients and if there's one takeaway message that i would like you to have from this talk is that uh is this it's basically that the encryption is the corporate from data sharing decisions that's what it's unique uh about proxy encryption and are other characteristics for example alice never interacts with the doctor she only needs to have her uh his public keys uh she only interacts with the new cycle network when granting access to the doctor and after this she can just disappear and the doctor will never interact with alice or the harmonizer the doctor only needs to be able to read cipher text and and and interact with the cypher network okay so that was the explanation of how it works and we are live uh we are live since october 15 from last year and we started with a token distribution mechanism called the warlock where a user had to stake to run a node we had over 2 000 participants and almost 350k is stake for this period of time i we believe that this was an awesome response um and okay so it's uh demo time um we have i'm going to first show how the first step would be to get the policies of bob so alice can use this public keys to grant access to him okay so at this moment i'm just running the rcli commands to um to get the i already have i initialized both character in my computer and i'm just asking for the keys okay now i have the keys now i can use uh our enrico character which is the encrypter to so with this command uh we are basically uh encrypting any some message associated to some public key and we are um storing this ciphertext directly on ipfs i previously created to make it this shorter i previously created a uh policy encryption uh policy encryption key which is what i'm going to use here okay so this is the message that i want to encrypt and it's encrypted with this uh public key this public key is associated with a poli it can be associated later with uh a sharing policy and this is going like what i'm going to show now so now this this command is what gives alice the possibility to to share data with um [Music] with bob okay so what we want to do is to we will specify um a data sharing policy specific to bob this is why i asked for bob's public keys before and we will create a policy for a certain duration of time and we can also um customize the policy with some other parameters i will show you okay so this is the policy encryption key this is the policy verifying key and this is the uh the data label uh the data label is uh like a sort of category that we use for associating the policy the police encryption key okay i can see very well okay uh we will create a policy for a number of days and this for example allows us to create uh so the the encryption key be split in several shares in this case it gives you ask us for a default of three shares which will say yes and a threshold of two is fine and this is uh regarding the payment of the policy okay so now what we this will do it this will create and a policy in the ethereum network in this case this is going for into our test net links but the process will work the same for ethereum mainnet and after just some time while the transaction is mined we will see the policy created okay we have some other information but essentially what's important is that we already we know now that the policy was created a successfully created in the cypher network and now we can just um we can just uh let me copy this cipher bob retrieve so this is the last part of the demo where bob retrieves a cipher text that the ciphertext that we created before uh with enrico character and in this case you remember the uh the command stores the ciphertext automatically in ipfs so um i am going to retrieve the cid of this data and it will communicate automatically to that and then we go to the ciphertext now i just need some of the policy metadata um and now at this point what what this did is it uh the cypher application took the ciphertext and sent it to three different notes in the network and at the moment where two of them responded with arbor encryption it will it was able to combine this encryptions and decrypt decrypted locally with bob's private key and we have the the and we have the ciphertext correctly decrypted okay so i expect that this was uh clarifying regarding how the command line uh works for the cipher there are other ways to interact with the cypher we have a python api and we have also json rpc endpoints um so in november 2021 we have a bounty we had several boundaries in fact so we have um three thousand bucks for the most interesting use of the cypher network and it's a splitter between teams so don't be shy and try the bounties we have also 1000 back for the best integration of new cypher with excel um for content distribution and also a total of 100 1000 bucks for memes and art that represents the cypher community effort um you have there all the information needed and so we have also i mean there are many interesting ideas that will be great to have for example we it would be great to have um apps that give you apps that provide help to marginalized and underrepresented communities for example um also uh in-game end-to-end secrets um encrypted video streams whistleblower applications that deliver encrypted tips to journalists content subscription platforms which you can think about encrypted only funds for example stuff like that or stuff like the example i mentioned about data sharing of data collected by wearable devices or iot devices and what's next for the cypher so we have several challenges ahead we have this the problem of scaling i think we are all aware of how difficult is being the situation regarding uh fees so the cypher relies on ethereum transactions for several things like for example creating policies to perform stake operations new cypher nodes have to perform a daily check-in for example everything all these operations uh require an extreme transaction and the gas prices are just crazy so may uh now i mean there are different things that we could do but uh layer two is the best um road ahead so that's something that we are working on right now um a javascript library to interact with the cipher so currently as i mentioned we only have python and json or pc interfaces and it will be great to have something to interact from the browser directly and working on we are working the rust bucket so to make that possible and regard to the cryptographic services offered by the network we currently have boxer encryption but this can be extended for threshold signatures or distributed key generation and all potentially other cryptographic protocols and and that's it i hope that this was interesting for you we have several bounties and we would love for you hackers to get your hands on cypher and we are constantly on discord so please come and talk to us if you need to have uh if you need help for the for setting setting up your tab to integrate with the cipher just let us know there is some links also for documentation and yeah i hope this was interesting and and clarifying for you i guess i will be time for questions yeah looks like we have a couple david um let's see if i can pull some up here take a look on the right in the comments okay um is there a way to tell an ursula to check on chain state i guess i guess you mean um like for um encryption like for make some sort of condition or encryption um if that's the case i mean that's something that would be very interesting to do and it it's currently not possible but it's something that it makes a lot of sense and it will greatly improve the functionality of the network because essentially will allow for conditional re-encryption um yes we will share the slides uh we will publish them as soon as possible um i don't understa understand the question regarding api usage of new cipher but as i said we have our python api and our json rpc uh api and we will we plan to extend it so it can be easily interpretable from the browser too okay and i don't think there are more questions yeah yeah conditional encryption will be game-changing definitely um it we have we have that open as one of the most important open issues right now so so yeah we it would be great to do that and okay so i think that's that's it from my side i if you have any more questions please come to our discord and i think you will find it very interesting to hack on on the cipher i hope you enjoyed the presentation thanks david we really appreciate it man thanks for the update on everything

Automatic transcript — names and jargon may be misspelled.