EthCC 2: Nick Dodson
Ethereum Paris·Wed, Oct 9, 2019, 12:00 AM
Speaker
EthCC 2 EthCC, the Ethereum Community Conference is created by the community, for the community. It brings together great minds and forethinkers, and allows the community to grow. Follow us : @AssethFR https://ethcc.io
Transcript
has every okay oh oh alright alright we're doing this we're talking okay so welcome to my shamble of a presentation that's going to be one part security rant second part thing I came up with related to security that you're gonna like you're all gonna like it you're gonna love it and it's really simple and it's probably really easy to copy but don't copy it because I put my name on it and I'll give all the code away later and then you can copy it so right now just don't copy it so this is my presentation Nick pay a security journey and ye thieves are doing security all wrong and how it affects the user so I was just gonna do a security presentation and then I came up with this thing and then now it's a half and half so alright so thinking like a dev so devs are really interesting because they just think this one way they're like okay well I'll build the thing and I focused on building the thing and then I got to secure the thing and I don't necessarily care about the user because that's second to the building of the thing so they're very very focused on building and then securing and UX people are not so much concerned with that they're more just like well we have these users and we need to get them from point A to B in the simplest fashion possible and in this case when you ask them about security you're like well which one's really right you know which one really has a point and when we think about BTC versus devs I think about them like this and I give them a tinfoil hat score so the BTC dev gets a nine out of ten with the tinfoil hat wearing so you're generating your keys in a tin foil blanket in a basement with no Wi-Fi signal you know with safe entropy coming from somewhere you're using dice you're doing all these sort of crazy things and then they eat there's just like well I came here to make financial assets or something rather than you know I just don't necessarily care as much and so they get a six out of ten and so in this case it's like well who's really right here you know and what's right and when you're thinking about security I mean it's really not that difficult it's just how risky is what you're doing and you know how many protections are you putting in place so if you think about security just as a binary just like an on and off switch it's like okay well a lot of bitcoiners are like well if you don't own your [ __ ] keys then you don't own anything and it's over and that's really scary for a lot of people like a lot of normal people that aren't crazy and so basically you know the normal way to think about it that we've always been thinking about it with software is it's like a gradient you know if it's like it's low-risk and it's like well maybe we don't need to put so many protections in place but if it's high-risk then you put really strong protections in place so it's more like a gradient I'm what much more in favor of the gradient paradigm than the binary paradigm as you can tell so you know poor risk assessment so just going through an application saying well what's the security like what's what's my risk what's my sort of attack surface and I think the wrong way to think about it is like well does it have keys and then you go into the Bitcoin or mindset you're like well if I don't on the keys then it's over so you better run your keys and then it's like well does it have value and it's like well it has value then you use a hardware wall or something very safe that seems safe even though one of the hardware wallets isn't even open source it's not it can't even read what it is they could just be reading all of our keys just slowly doing that sort of thing anyway and then you know oh I created a wallet so now I have to do a seed and recovery step because that's what everyone's doing and it's just kind of like you know the spur of the moment so the thing you're not really thinking about it so you just do what everyone else does why is this poor well because it's a massive lack of situational context if there's no situation that necessarily requires a specific kind of security profile or specific kind of thing so when you're thinking about assessing risk it could be a little more complicated so you know assessing risk for adapt ok well maybe some questions you might want to ask just some basic ones is how much value is at stake how long more importantly is that value at stake what's the exposure risk you know and as well how safe is the operating environment is it is it terminal is it is a browser you know and and if we can go into many of these but basically assessing risk should be context depending on what the [ __ ] you're doing it shouldn't be this thing where it's like oh yeah I built a crypto app so now you have to use these wallets and these things to feel safe or to feel protected in many cases particularly with games particularly with with certain kinds of context you don't need all that security and that's [ __ ] and most of the applications we have don't even have any users so that right there is a great risk assessment it's just like okay well how many users you got oh you got four okay well should you really be forcing them to use a ledger then to do something no not at all it's stupid why are you doing that so you know when you talk about engineers they say often like oh there's lots of projects working on this I don't need to think about this this isn't my job you know just shuffle that off to something else and I'm like no not really those users are for your thing they're for your project are coming to your project to use your thing it's your responsibility to make the experience both safe and a good experience and to use the software else no one's gonna use your thing and you know you look at a generic wallet flow how much time do I have am i doing good 10:28 okay we're doing good so you look at a generic wallet flow just just very very vanilla right you have a user they're like okay you know I got to go find and install a wallet they don't really know what a wallet is yet so they're not really sure then you get into writing a seed phrase down you get into recovering it you get into acquiring eath and then somehow sending it to this address there's so many unknowns for the user here in this flow it's so damning that most of the applications forced people to go through this when they don't even know what they're doing it a lot of the users have no idea what they're even doing and you're forcing them to go through this very very naive thing now I understand that you know sometimes you're like well I don't want to take the risk so I shuffle that tomato mask or I shuffle that to another wallet and I understand but in for the sake of your experience for the sake of everything it's like if the value or the context situation is not high-risk don't force them to do this because it's silly it's like stupid you know that you can use these techniques later when value is actually accrued or when value actually starts popping up but not right away it's it's ridiculous so you know in low-risk scenarios you should just not do all of this seed and recovery phrase stuff don't use bit 39 you don't need to use that just yet you can and you should and you probably should later but not right away let's not scare anyone we already have problems attracting anyone to use this technology who isn't you know an engineer or somewhat technical so by throwing this in their face they will certainly never use our technology ever so then we get into this other problem where people keep saying oh well we don't have enough infrastructure yet to make a great experience to make it safe you know we you know the transaction speeds are low I've heard this like so often well you know the app was good with the train you know it just was it was lagging and I just think people don't understand where we came from like with Bitcoin it was so bad I mean you couldn't you could do like in 2013 you could do so little with Bitcoin we're just dying for anything hey just anything and when aetherium popped up like my life changed it was just like holy [ __ ] I can code something I can build something with this it was it was thrilling and here people say that we don't have enough tech right now to make a great experience and to make it safe is [ __ ] you're just not being creative enough and you're shoving things off to other projects and you're not taking the responsibility for your own users to do the thing they got to do with your application snarks elliptic curve hashing smart contracts encryption meta transactions you already have enough right there to make an exceptional experience and one the user doesn't need to be blast with with technical jargon and and concepts and phrases and things they don't understand so takeaway number one for the security round is our community is filled with engineering paranoia inherited from the BTC cypherpunk community and if we had mass adoption users which we don't we sure as hell wouldn't keep them around with this thought paradigm because it's insane it's literally crazy and I think we can do better and as aetherium we have this great opportunity to not do what bitcoiners do and try things because while they're going to be obsessed with keys and security and everything else we can go ahead and try things and then we actually get users we can make it safe for them it's a simple concept simple attack strategy and the second one is always do its best for the user and that includes security and securing your app but it also means don't put million-dollar protections on $100 use case and I think this is just really really simple and one example which we're starting to see and I think many many people are getting so excited about is I want to buy hot dogs with died because I'm at an ethereal conference great use case for died because we're already bought in so we already like it and we have an area at a time when we need to use it does this really require a seed and recovery step in a wallet creation flow to achieve this particular this particular goals particularly N and as we've seen with our fun burner wallet die X die it doesn't and it's a lot of fun and yes it's a trusted Authority and approved Authority network and we just have to magically trust that these people don't just walk away with our money they're reputable people prove Authority is scary but you know we're all willing to just be like yeah lock up a couple dollars worth and try this and use this and people had so much fun they were buying things with it I think bitcoiners with lightning have the same experience all of a sudden their technology works and it does something for them it does payments but payments to buy things to actually use the it's exciting it's thrilling and if you throw you know a ledger in front of this or you throw a hardware wallet in front of this a connection step a laptop and a bunch of other things it's not fun anymore it's just it's just way too serious and it totally kills me buying a hot dog at a crypto conference and even when I came to this conference I are not this conference the theory of magicians conference which I didn't have a ticket to like they were like yeah you can pay a Neath and that was the worst thing I could have heard because it's like well okay I don't have that much ease now I've gotta figure that out and I've got to get it and then they didn't have an address so it was just a goddamn nightmare it was a train wreck people don't do that don't charge ease for the conference is stupid alright maybe die but not Eve so now for the fun bit so we went through the security rant that was my rant okay and and the thing is it's just an observation and you can take it take it or leave it but I'm just fed up with engineering excuses you're smart people you're engineers I know a lot of you are you can do so much better you're just passing the buck and every user that's coming to our community is stopping at the door because of you not because of UX people you didn't give them any power because you're like oh no it's not safe so we won't do this so you know you can do better now for the fun bit okay so I came up with something so I wanted to send crypto to an email address this was something that I wanted to do for a while and I'm not the first one there there are other things but I wanted to do a certain way and then I wanted something else to happen after and this all has to do with security as much as to do with anything because this is a simple concept any of you could have come up with this idea but could you have found the right crypto primitives to actually execute it and that's really the real question so pros of email sending crypto to email so yeah you know sorry about that so I love you this but the adoption is very low and if they're brand-new to crypto they don't have any crypto so they can't even buy anything on ENS so that's a problem so everyone has an email email has become you know secure or not your own profile a hub for own personal identities unfortunately all of your identities are tied to your email and the security of that email and and in general I mean most people tie it to like one email so Google knows this everyone knows this and they're actually email for what it's worth is fairly secure and people say it's not no no it's insecure yeah it's got a lot of people working on it so I can send crypto if I can send it to an email to someone new that's never used crypto before and of course the experience has to be just right email addresses are easier to handle than hex addresses and email addresses by design are inherently communicative they're social so they're perfect way to introduce someone even someone basic and I'm not saying everyone's gonna use this I'm not saying anyone's gonna use this but it seems fun so of course the cons aren't emails insecure and what if the email gets compromised or what if their computer their terminals compromised oh my god I should just stop there and not build this it's so unsafe it's so daring why would you do this well I did it anyway so introducing and just get ready I mean maybe you should we make some noise just to introduce it just like you just like a little yeah okay all right excited I've just everyone's so excited they're so thrilled nikpay and I know I know what you're thinking I named it after myself and I did because I'm tired I'm tired of people coming up with Fancy Pants protocols and saying I don't know it's not about me it's about the protocol and then just making it all about them instead I'm gonna change the whole vibe here you come up with something in this community named it after yourself and then you have to really live with it what you've just done and that's you know could be a mistake it could be a good thing so but I would just say this is a should set a new trend okay so it's not polkadot it's Gavin okay and gap coin is fantastic it's a whole other concept but it's not polkadot its gab point okay so here's nikpay at work so this is just a little DAP mind you so you're typing in an email I'm saying sorry it's in French and that scares me but can you see it just enough can you see just die and the amount and typing in oh is it not doing the full thing god no it's only playing half the Jeff sorry guys alright this is the first half of the experience and the second half which I luckily saved somewhat in slides so basically how this works it's very very simple I have a DAP here this would actually be built into any wallet and I'll explain that later but what this allows you to do is type in an email the amount you want and a password and effectively you are password locking your crypto and I'll explain how that works and then a recipient the person you're trying to send to will receive an email with the password encrypted blob and basically be able to claim those funds from the password encrypted blob now this is rather technical the way that this works and the way that I've got it in such a way that it's actually safe so you'll receive an email something like this and when you click on it you'll be walked through I'm sorry the jiff didn't work I guess it's this player so you'll be walked through a basic scenario type in a password and it'll prompt you to install a wallet so the wallet creation step is kind of baked into the flow for a new user and you can tailor it if they're on mobile we'll send them to mobile wallets if they're on browser send them to browser wallets and basically we can tailor the whole entrance of the experience to aetherium for the new user and in fact meta masks can even adjust to the case for example so that we have maybe a low-tech set up for minimizer so how does it work and this is where it gets really exciting so the user password encrypts their crypto client-side and I'll explain that in a second the user sends encrypted payload to the to an email provider the intended claimant or recipient receives the email from the provider and the recipient claims the lock funds and the provider is paid for the delivery so the provider in this case has a financial incentive to deliver the email to the right person if they don't they won't get the fee so there's kind of an incentive game going on so some basic properties that I built into this system are the sender can retrieve the funds at any time up until the claims up until that person actually receives the funds the claim can expire at the claim expires at a certain point so what this does is if I just password lock some crypto and I didn't put an expiry on it that means that payload for the rest of time is somewhat usable so by reducing from the time the exposure time as I mentioned in the security assessment analysis you get less risk so you have less time to hack the particular password encrypted blob the claims are unique with the nonce so every claim is generated as a unique claim the email provider never has access to control over or holds the funds at any time so while they can validate the encrypted blob and the data that's available they actually can't take any of the funds in a time and the sender can cancel the claim at any time as well so the claim reduces to a release hash and the release hash can be nullified at any time on chain if they want to do that it's one transaction for drop-off and the one transaction that you do initially is just an approve so it's very cheap it's very lean and the pickup transaction or the claim transaction is actually a meta transactions it's relayed by the provider this allows the user who's picking it up to not have eath to pick up their crypto and in doing so as well getting paid to do the relay and by the way we should have been doing meta transactions this whole time we had UC recover this entire time no one did it because we didn't have any users we'd have anyone using this stuff don't recently until we started using dye for conferences in which case we started to realize okay now this we really should build up more infrastructure to make this happen see how crazy that is it's just it's madness so then the claimant can decide to this is this is the most exciting thing - if I send someone new some crypto via nikpay and an email not only do they get the email they can unlock the funds receive it and their brand new wallet but if I send them die they can actually leave that die locked in the contract but claim to them and then they can use meta transactions to send that die wherever they want and they don't need eath anymore because I'm not just gonna stop at you send eath to someone or you said and die to someone and then guess what they have this die and they can't use it because they're stuck and they have no gas or no teeth to pay for gas I don't want that to happen because the whole flow is it's an entire process so good Nick pay - also meta transaction contract and lock up such that now when the user receives it they can now basically continue to use that die forever until they run out of money effectively and then the contract is a single autonomous contract with three functions the deposit functions one lines just to deposit eath and notate that transfer which is to do the particular transfers in and out of the the actual contract and invalidate hash it's less than 100 lines of code really really simple and the contract will use VIP 712 I used the earlier version of that just to do the the MVP so it only works with better masks but it it'll be really easy to implement 712 for the signing claim so is this already done kind of there's a couple different people who are working on different pieces of this project in different ways so you've got eat was a hackathon project by Kevyn Orr walkie and a couple people they did a great job but the contract was rather expensive they didn't have the release portion and they didn't have this ending portion where when you receive the funds via email now the user this new user can't use their freaking funds because there's no Ethernet so now you've got to either send them either or you got to have some kind of play there in my case I allow meta transactions from that point so now the user can in you to use the dye that they've just been sent so they're not stuck so if - which allows you to send either a special link or SMS so II - is pretty cool but a lot of these are actually either sending private keys some form of private keys unencrypted encrypted and they had their faults and E I P 1630 which was kind of presented here is a built into the node we can do node relayed meta transactions style things we don't need to change the protocol so you have P 1613 is kind of similar kind of related and then you have X die which is you know sort of burner proof of authority you can lock it up into approval Authority Network but with a 1x die while it is fast I have to trust that the authorities you know send my money where I was supposed to go and well that's fine for many use cases III think there's those reasons I won't bring up today that's not necessarily a good thing which I will quietly send to all the validators in a private email so with Nick pay just to overview a couple things you can send youth die or year C 20s to email addresses potentially cell phone numbers anything else we use a shared private key to unlock the funds and the way that I encrypt that is with password encrypted with script caching so that just reduces the brute-force capability on the password and then I throw the share private key in a tweet Nats old box and tweet Nestle's Fantasticks very very lean and it encrypts it just like a yes then you have expiry at nonce to prevent channel service the email sender has an incentive to send the notification of the fee the email sender has no access or control over the funds ipfs is used to actually distribute the data across more available less fault tolerant sources what's fun about that is it I BFS should not be used if it's just a one to run one to one or one to two relation you shouldn't use this data transport protocol for that however if the email provider is doing lots of different transactions they can take that raw data those payloads they can encrypt them individually index them throw them all into an IP FS store then you get this really excited thing where now all these people have incentive to basically store that that ipfs payload so it just makes it a little more fault-tolerant redundant just in case say I send the email my server goes down the IP of s stores are spread out such that you can actually you should be able to given that IP of s functions better reclaim your your claim effectively and then the fund recipient can leave the funds in the contract and use meta transactions to send the money later with no eath required for gas and wallets can integrate thick pay with just the library and there's no need to go to Nick PACOM to use Nick pay that's ridiculous no one's gonna do that but the exciting thing is if all the wallets just integrate this little library and then the to field can be an email and then you drop down and there's maybe a password for that then now every wallet can just send crypto to email and as well one last thing one protection I didn't talk about is I'm not gonna send an email with crypto in it that has like five million dollars in the crypto I'm just not gonna do it so my because you have to sort of pre-announced the amount within the data that's going to the server you can basically restrict the amount so you can restrict your risk so you know we're talking even in the banking system with Interac eat rants fern of those Canadians in the room they know what this is it's basically pass worded bank transfers they they only go up to like three to five thousand dollars worth of risk per per transfer so we'd assume that the provider would do well FLE the same so just quick technical run-through so we have the sender on the client side the sender doesn't er c20 approve to the meta transaction contract generates the share private key you have a simple passphrase and as well I restrict all the top like the top ten thousand eight character passwords I restrict a lot of those so so even in the library you can't use those that just prevents the brute forcing risk even more then you have the script passing script hashing which is just let's just prevent the brute forcing of the password so now it's it's computationally expensive to continuously try new passwords and then you have tweet nestled which is both encrypting the entire blob with a separate encryption store later on but also encrypting the shared private key then you have the email address and the message you have the meta transaction fee and the specified amount you have the EIP 12 signature that's kind of signing everything and then you have the packet that's sent to the email provider and by the way for the user literally if it's baked into the wallet it could it could be as simple as the email address the thing and one button and that's it that's literally all it would be for the user but all of this stuff happens underneath it and it's just an example of no all of the different cryptographic primitives you have available to you because you can wire them all together the user has no idea it provides a tremendous amount of safety and there's no there's no roadblock for the user and and so this is the scenario that I want engineers in our community to create we have so much crypto available just just use it an interesting in different ways you you have it available to you so client-side sends this payload to the server the lambda picks it up validates it encrypts it another tweet NASA payload sends it to ipfs combined with a bunch of payloads and then sends the email to the intended claimant and of course with the IP of s hash and the the password to that IP of s hat now the last thing is the claimant so the claimant receives the email they have the access link and the ipfs hash blob whatever the URL we'll release it so there'll be a pastor in the URL there's security vulnerabilities that that's okay then they'll install meta mask or trust wallet and your password and then the funds are vetted transaction sent to the recipient wallet address because the wallet injects the address into the browser and then lastly I have this really fun cron job server that I wrote where I basically smash all of the transactions because of the same transaction and potentially doing hundreds of them you know say a second I smashed them all into one transaction and then that reduces the gas fee even more because I don't have to pay the gas on every single transaction so you mix everything together you make some multi sends some assembly some contracts and this and that some tweet NASA this that blah blah blah and then all of a sudden you can send crypto to email and it's pretty safe it's pretty amazing pretty [ __ ] amazing anyway I'm sorry if I'm the only one awestruck but you know needed to present it anyway so here's just like a snippet of the contract so this is with the old e IP was a sign type version of one so effectively here you're seeing just the sign recovery and the release hash step and then I have several different types of transfer that are going either into the contract out of the contract or using it in different ways so effectively it's one function it just does a couple different things and does so as efficiently or I believe as efficiently as possible so just remember that once you're in nikpay you don't ever have to leave nikpay you can just stay in it and send meta transactions for the rest of your life you don't need to use anything else you don't need to use a channel you just wait 14 seconds or whatever and send I would die or Knossos with gnosis you know and that's that's that simple it's that fun you know but you can't leave it any time and I do give you that option and that is autonomous but why why would you want to once you're in you're in you don't need to leave you know and lastly just just big takeaways so the two filled in wallets for aetherium should now within a month or so the support hex ENS and email and potentially SMS to send crypto which is really fun there's so many different ways that you know people can use us we have minimal and generic meta transactions for all year C 20s for anyone who receives that email or that SMS text so they've the option now to use meta transactions so if you just send them die that's okay they can use it they can actually use it and then it's a nice way to introduce you know those who are new to crypto so these are the big takeaways the roadmap for this little micro project so you can go to Nick PACOM right now and try it I spent a lot of money getting that domain so I hope you do try it although it's it's janky like it'll work but like not all the cases are covered but it will function mind you you are locking crypto up in a contract that isn't verified on either scan and that has no verifiable source yet so that's up to you now publish version two of the contracts almost done publish a front-end library that's going to be for the wallets so that that will come as soon as I can the server on the front end code will be published to so that you two can run your own nikpay you can run matt pay you know Rebecca pay you can run any payment you want and then formal contract on it which I'll pay for and then it's well fun thing what if they use Nick pay and then they receive funds with Nick pay and then with Nick pay they get an ENS address and Nick pay Dottie's these are just the fun fun things that happen at Nick pay that you can be a part of - you could be a part of Nick pay you can have your own Nick pay that's what's thrilling about this lastly I've already talked to wallets and I won't tell you which ones but they're excited they have verified this crazy idea and they think it's good and they think they'll use it so you will technically have to do nothing to use Nick pay eventually because Nick pay will come to you in all of your favourite wallets and that's basically it some references and then the code will be at Nick PACOM because I haven't decided to get hub link yet it's more important to me Donna I'm done all right hit me cowboy was a very interesting just a quick question is that so you have to run you see this alarmed at several functions to turning an AWS or something like that yeah you can run the land on anything so my question is how do you how do you expect to pay for that because how will you make revenue from it ah so when the the user is approving funds to Nick pay right let's say I want to send one dollar to you right what get what happens is you would tag on a four cent fee something like that in dice so it's charged and died that the recipient the fee recipient of the process of the person running the lambda would take in and then they have their own risk models and everything given gas price fluctuations how long the expiry is etc where they can take a cut so if the gas cost is two cents they can take one cent or two cents there so you can take a cut yeah make something cute yeah any other questions Oh got a question there that's a long way okay okay this is the last question so just ask me outside if you have a question thanks like super fun really really I may have missed it but what about the email addresses is available on the block shape can you now see people's email addresses yeah I just saw that so that's really cool I would say that that gives you certain functionality but with this this is more of what I would consider to be an interactive thing so interacting transfers just like a bank transfer with a password so it can be done through anything so it can be done through email it can be done through SMS it's basically just password locked crypto with the availability of a meta transaction on top so so the eath mail dot CC is really cool it allows you to be addressable but you have to remember now there is some trust involved with that email server and how that's routed and how that stuff's done I'm not quite sure how he's making that secure but with nikpay there's no there's no real trusted middle-middle authority so if i do if i just send an email and then the server decides they're not gonna send the email to who i want it to go to there's many different faults there that it either expires they can't use it they can't access the funds they have an incentive to send it's the right person and then I just won't use that provider again to send the email so effectively this is much simpler it has a lot less faults than having to rely on a particular server a particular thing at any one time I'm creating a check for aetherium and that's it and we can use this in many many different ways and on top of it you take the check and you use it now you're in a meta transaction system and that helps just for user experience in general yeah so that's the last question anyway thank you done [Applause]
Automatic transcript — names and jargon may be misspelled.