Coder Social home page Coder Social logo

paritytech / banana_split Goto Github PK

View Code? Open in Web Editor NEW
266.0 266.0 41.0 3.76 MB

Shamir's Secret Sharing for people with friends

Home Page: https://bs.parity.io

License: GNU General Public License v3.0

HTML 0.31% Vue 16.13% JavaScript 1.41% TypeScript 82.14%
browser crypto html5 javascript paper-wallet shamir-secret-sharing vuejs webapp

banana_split's People

Contributors

alexvansande avatar bjornwgnr avatar dependabot[bot] avatar dvdplm avatar emostov avatar gitter-badger avatar goldsteinsveta avatar kirushik avatar niklasad1 avatar prybalko avatar sergejparity avatar stefie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

banana_split's Issues

proposal: encrypt "t"/"What is this thing?" with the secret

currently "What is this thing?" ends up plain text in the qr codes as field "t"
There might be use-cases where you only want to reveal this information once the secrets get combined (e.g. in the case of death or having forgotten what this is about)

Show error messages on the page

When there is an error on the page
I'd like to see a banner showing what went wrong
So I don't have to open browser console.

For example,
when I select 300 number of shards,
There is an error in the browser console saying Number of shares must be an integer between 2 and 2^bits-1 (255), inclusive. To create 300 shares, use at least 9 bits.
But the page itself doesn't show any errors

Display own IPFS address on printable pages

Printing the IPFS address of the current version of BananaSplit on the shards would make it much more future-proof to store secrets in BS.
Unfortunately, we need to generate those addresses while offline, so just using ipfs.js won't cut it.
What we can do instead is to read the actual blob with the currently opened file, hash it and generate an IPFS content-based ID from it.

This would require some reverse-engineering of IPFS chunking and CID generation (currently team is not eager to provide any specs for CID generation, see this forum thread for example).

Note: it might be better to avoid chunking here, since it really complicated things. If making the resulting binary to take under 256Kb might not be possible right away, using --chunker=size-1048576 might be a workaround. (The instructions would need to be printed on the shards as well then, concisely.)

Add spinner

When I press "Generate QR codes" and UI gets unresponsive
I'd like to see a spinner
So I know the app is busy and not crashed

Find a way to fit more info into QR codes

Current maximum size of QR payload is limited by the truncation which happens in the QR generation library after certain size of the payload.
If we choose a library which allows larger QR codes (and then making sure that the QR reading library also supports those sizes), we might increase the maximum size fitting to a A4 page significantely.
We should also investigate compression, QR encoding alphabets and redundancy options.

(Meaningful size target here would be ascii-armored 4096 bit GPG RSA key.)

Support camera-less devices

As a user with a desktop computer
When I restore my secret
I'd like to insert QR code content as text
Because I don't have a camera on my PC but have one on my phone.

Also, this feature will ease the process of gathering secrets from multiple people.

Hide the secret behind a password field

first, thank you for this implementation of SSSS, which is one of the nicest and most accessible I've seen on the web.

Here the use case : We're 3 people sharing a common space, and we installed cameras. Our camera system only allows 1 admin (email + password, no 2FA). We do NOT want anybody accessing the recordings unless someone reports something being stolen.
We want to create an admin password so that each member only knows parts of it, and never the full password. Person 1 will have the 4 first characters, person 2 the next 4, and person 3 the last four characters. The email will be a gaggle email that will send all emails to us, also secured by this password. Thus preventing a stealth "forgot password" method.

When an item is reported as stolen, every member regroups and they, each after one other, enter their string into the Camera app an can resolve the issue together.
Now, if one member IS the robber, then they will not disclose their part, by faking it's correct when it's not.

Your implementation of SSSS is good for that, but it needs some options for this kind of use case. As each member "ENTERS" its own strings one after another, the next member to add its series of trings should NOT see the firsts parts of the secret.

So I guess :

1 . Would it be possible to add a button/switch next to the SECRET field to hide its content (and, for example, lock/grey the switch button it for 1 minute so no one can intervene?)
2. A way/option to display the QR codes 1 by 1, so each member can, 1 after the other, take a picture of the one for them, without the need of a printer.

I don't know if everything makes sense here.

thank you for your implementation and your software.

N/2+1 as default, but customizable like in SLIP-0039 spec

I asked it some years ago in this project :
https://github.com/seedhodler/seedhodler/issues/125

For the UI, ideally it would look like this :
shard-UI
with 3 grey dot as drag area to add or remove shards.

And to be SLIP-0039 fully compliant, and advanced version would look like :
shard-adv-UI
With each group (column) with user choosen custom name to print.
At print, it would be generalSeedName, group groupName writen on each page, to help recovery process.

But i'm not sure it's usefull to be SLIP-0039 compliant, i think the simple UI can do the job ;)

Make E2E tests work

Currently the only tests guaranteed to work are unit tests for serialization and encryption.
We need to make e2e tests work (and ensuring some reasonable coverage) and add them to the CI.
The task would require some clever solutions for handling file downloads OCRing the canvas-rendered passphrase and then faking the PDF page into camera. (Alternatively, those three would be separate tests, but then it will be harder to check that the "golden path" indeed works when everything is assembled.)

Improve the texts

Especially on the "landing" page -- it currently does a pretty poor job at explaining what the hell is going on.

Offline mode instructions are obsolete

Follow-up from the HackerNews thread

Firefox doesn't ship the Offline mode in the menu anymore; our recommendation for Chrome is weird and confusing.

My suggestion would be to just drop the browser-specific offline recommendations (as geeky and quick to obsolete) and sticking to the more mainstream "unplug your cord, disable the WiFi" route.

QR upload is needed for desktop-only flow

Now

  1. User on desktop creates QR codes with app
  2. Wants to restore
  3. The only option is to scan QR with webcam

This flow expects either of those
a/ A second device with secrets on it (smartphone)
b/ A printer and printing action

Expected

UI allows uploading PNG files created by app

Failed to execute 'decode' on 'TextDecoder'

  1. Create a secret
  2. Try to combine
  3. Error in console, app seems not working

telegram-cloud-photo-size-2-5307724849755566974-y

telegram-cloud-photo-size-2-5307724849755566973-y

Pass "will-pill-enter-coach"

TypeError: Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'.
    at c (BananaSplit.html:25)
    at Object.g [as reconstruct] (BananaSplit.html:25)
    at a.reconstruct (BananaSplit.html:25)
    at rt (BananaSplit.html:7)
    at HTMLButtonElement.r (BananaSplit.html:7)
    at HTMLButtonElement.Zi.o._wrapper (BananaSplit.html:7)

Bug reproduced in MacOS Chrome and Safari

Feature Request for offline decoding options

Great project, love functionality! After working through some use cases I have some ideas, if we are thinking about long term storage and recovery:

  1. Include manual instructions to recover secret if unable to access Banana Split (Some combination of scrypt and ssss-combine maybe)

  2. Include the decode page as QR codes that can be scanned in at recovery time if the project page is not available?

Migrate to Typescript

This app has a lot of different imports and moving parts; Typescript will help to hold this all together, there's really no reason to not use it.

Get rid of VueJS

Well, there's nothing in BananaSplit which requires reactivity and advanced templating.
VueJS worked really well during the prototyping phase, but now when the project is more mature, it both increases the resulting html size, introduces a lot of dependencies to trust, and complicates the build.

Bonus points for moving to a build system which would be supported by LavaMoat to make #36 possible.

Add security scanners

This projects has a focus on security, that why I think it's important to use security scanners.

Swap the wordlist

The words in the bip32 dictionary might contain triggering references.
Since words in the encryption phrase are just used as a seed for scrypt and not as dictionary keys anywhere, it should be trivial to swap.
At a cursory glance, openethereum wordlist is better in this sense.

That dictionary is 60Kb of data, though. Depending on the size constraints set by #33 (and probably changed by a huge margin after #34 is addresses) it might be too much, and the dictionary would need to be truncated.

Find a better-compressing encoding

Currently we the maximal size of the QR code limits the maximal size of allowed text rather heavily.
There are two ways this can be improved:
a) it makes sense to compress the original text -- and compression should work efficiently enough on both natural text and ascii-based serializations like armored GPG exports.
b) the actual way of recording the shard into QR code might need tweaking -- since used QR alphabet (see here) and shard's serialization mode should allow better storage efficiency.

It goes without saying that BananaSplit should retain backwards compatibility indefinitely, so in addition to this new serialization format all previous ones should be supported as well.

Add a demo switch to enable online UI discovery

For debug, UI demo and probably other stuff, it would be wonderful to have a switch in the disclaimer warning to say :

  • I don't want to use it for real stuff, let me test it as is (with all spy and theft ready to stole my dummy secrets) !
    and a simple refresh will reset the switch to be sure it will never still one for real stuff.

Update Readme

Currently Readme doesn't contain much information about the project.
It should be clear what the project does without actually running the project

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.