Banana Split: Secret sharing tool for people with friends - Kirill Pimenov - GoerliCon 0|17
ETHBerlin·Wed, Oct 9, 2019, 12:00 AM
https://ethberlin.com https://decentralala.com/ https://goerli.net
Transcript
yeah hello hello my name is Kiera I work with parity but today I'm going to talk about the project which was concepted here in the F Berlin and so far it's my personal project which I hope piratey will at some point adult but not yet fully and paper backups actually backups on paper like your personal archives and everything else are wonderful and I know that on paper things which outlived generations like you can still read you like letters from your grandma or something like that storing info on paper is really age-old and it works perfectly and I doubt that our digital artifacts our files with password walls or our seat phrases or something like that at the current state that they're as reliable as on paper backups but there are actually a lot of problems with just printing out your seat phrase for a Bitcoin wallet or printing out I don't know the directions where you buried the family silver or something like that and just storing it and the obvious problem is that if you store it with plain text then it's really easy to lick that secret it's really trivial for someone to make a copy of it and you will not even know that the copy has been made or that your secret is retrieved that it's not longer secret so what you're doing obviously next you're going to encrypt your secret and it's sort of like exhibit meme because now you need to remember the secret for the encrypted secret you have on paper which sort of makes little sense especially if you're thinking about like say inheritance like what happens with your Bitcoin wallet after you die if you was the only one to remember that's secret for that encrypted secret then it's all lost for your children or whoever is going to inherit you value and maybe we can just you know split it in pieces and hand it out to your friends like you have friends you have family you have I don't know called for some people you trust and if you just shared your secret in several pieces and hand them out they can later reconstruct it without you but since you trust them then as long as people say no to the entire attack occurs then it's sort of safe right except they can lost one of you sharks and then the secret is not to constructible anymore and that sucks that basically the probability of enough for something completely different right okay so if you have five pieces of paper hand it out to five of your messy friends the chances of you losing the part of your secrets and not being able to reconstruct it later is like way higher than in comparison with only having one secret on one paper stored in some secure place so maybe we can do better we can add redundancy we can split our secret like this and like say you have three friends like really many free you can split it with redundancy and you can like then use any two of those free copies to hand out and you can then any two of three of your friends can request a secret except it is terrible because now it is only one third of a day it is missing on each of the shards so it's rather trivial to guess what your secret is and this is not good and this is where the special trick which is called premieres fresh hold secret sharing comes from a rescue and it is possible to do the charting in a way which doesn't disclose any info about you unless you have all the required amount of charts and let me briefly explain how it works imagine you have like purple equation and basically your secret is the point where your parabola just intersects with a zero axis then you can have two points somewhere and each point will be secret you give to one over friends and with two of the points there is completely zero hints on where that parabola intersects with the zero axis but as soon as you add the third point somewhere you clearly indicate what is your parabola and then it's trivial to reconstruct what is the zero point of it and nice thing is that you can have moved it like we can have five you can have twelve points on it and you still require free to reconstruct so you can have em out of n constructions like this really easy and if you need more required charts on this you just increase the order of polynomial you have the only problem is our secrets and not rational numbers this works perfectly with rational numbers but if our secrets tend to be integers because this is how we encode most of the information like the phrases or even like seeds for our coin wallet so sama quartet actually unfortunately just doing that straightforwardly won't work because there is only a limited amount of integer coefficients for the polynomials which intersects the zero axis in the zero axis in the integer point so actually it won't be zero secret knowledge-- secret sharing it will be a little bit more than theoretical sharing so actually they are not using just the regular polynomials they are using the special polynomials over finite fields which look like this but they are explicitly used for the natural number arithmetic and they used everywhere where you do something like multiplication of integers you are doing like everywhere encrypted basically so that's the idea and yeah there are libraries like that and we are going to use that to build our tool but having strong theoretical foundation for our tool is not enough to make it secure because there are a lot of practical very very like you know real attacks which are observed in the real world so we'll just do the secret sharing I will print out the papers I will hand them out to other people I can still get compromised and I will just have like imaginary security I won't have a real security improvement but I will feel myself better and that will bite me in the end so what can go wrong yeah malicious printer like I am going to print to the printer and printers are terribly insecure and they have like memory of a backlog of a pages like like last thousand pages which they have printed so I print all the shirts on a single printer okay then attacker can download that from the internal memory of the printer and reconstruct my secrets right away or I'm doing going to send the printing document via Wi-Fi and then someone can eavesdrop on my Wi-Fi communication and can extract the file so basically printing everything which you need to reconstruct is no girl and the only pragmatic solution to that I am there like I found is let's encrypt the secrets and let's shard our encrypted pieces and then let's not write down the decryption code directly on the paper when you print it but you should use pen and paper to transfer it from screen to the printouts later it is not ideal from your ex perspective but at least it's secure enough because now if people steal all of the pages without knowing the decryption secret they have no use for the printouts it won't help them to reconstruct the actual secret you have what can else can go wrong yeah just compromised up because whatever is going to be it's going to be a piece of software and we need to really feel a lot how make it less compromisable how don't allow third party to somehow what can go wrong first I can just treat user to use the malicious app to share the secret and then the secret will be at the same time with sharing it will be just uploaded to the attacker server and secret is leaked that's really terrible scenario but another terrible scenario is like after the far lock after the people are going to reconstruct the secret they vet up can leak the secrets and we want application to be immutable from the time you started to share the secrets till the time you try to recover it and the pragmatical solution to that is design it somehow in the way that surface of attack is minimized so it is offline only application application we should only work when your work offline and doesn't work with any online technologies enabled on your computer and it should be something you can really easily distribute something portable you can download and you can hand out to friends on a USB stick or like send them via mail and it should continue working so basically the thing I'm describing right now is a self-contained HTML page with some JavaScript embedded and that JavaScript just does the trick and it requires you to save the page to your hard drive and only after you saved it and opened it locally it starts to work and actually yeah I started and I wrote an MPP of this tool and it is available on the really really easy to memorize URL be S stands for banana split obviously and yeah it's GPL licensed and it's available at the github organization of my employer pirate attack and any help is welcome yes also thanks to the guys who provided the icons and if we have five minutes it is like I will be able to just show you how terrible the application I wrote it actually is yeah so basically this equation and when it's I think I can zoom it in yeah that's bad split clearly yeah that's the problem with a self-contained HTML you don't want to include too many images in it right so first it requests to for the page to be saved and we save it and when we open it and now it asks to go fine because as I said if it won't enforce it then malicious applications can trick you to upload into the secrets to the third party and that's not desired so we are now going offline luckily there is a steely checkbox in Firefox to do that so we do work offline and now we can just click share and this terrible secret to every blue yeah I can't spell and like is best once again I cannot and we generate QR codes and this is our secret which is not copyable even like you cannot copy paste it and save it in a password manager but that will be ridiculous there is a lot of space for UI improvement in how we enforce you to actually write it down before you close the page but what happens in here if we print it I do not going to print it anywhere in basically in a printed version those QR codes into the really nice shorts with a space for a recovery phrase which you expect it to write down on every page in here and when when you click combined you just allow your webcam to look and it will detect the car codes you are showing it from the paper and it will reconstruct it and then with it will prompt for the secret so basically all the technical underpinnings are done and I briefly showed it to my colleagues to verify that all the crypt I used in there is sort of sound and there is nothing terrible is happening in there and I really welcome those of you who like the GS and actually ui/ux on the web to contribute an improvement [Applause] [Music]
Automatic transcript — names and jargon may be misspelled.