Skip to content
This repository has been archived by the owner on Jun 18, 2019. It is now read-only.

"Recover Secret" textarea will always be too small #48

Closed
garrettr opened this issue Jun 16, 2017 · 0 comments
Closed

"Recover Secret" textarea will always be too small #48

garrettr opened this issue Jun 16, 2017 · 0 comments
Assignees
Milestone

Comments

@garrettr
Copy link
Contributor

Bug

Description

Before @FredericJacobs implemented post-quantum signatures, each secret share was approximately the same size as the secret, and it was reasonable to assume that there might be cases where people would input secret shares manually, by typing them on a keyboard. Now that we are using post-quantum signatures, the minimum size of a secret share is ~130KB. I don't think we should expect that users will want to enter such large shares manually.

Steps to Reproduce

  1. Open Sunder. Split a secret into shards and save a quorum of shards. The choice of secret and parameters are irrelevant to reproducing this issue.
  2. From the home view, click Recover It to start the recovery flow.
  3. Change the default method of secret share entry from From File to As text.
  4. Open one of your secret shards from Step 1 in a text editor, and copy it to the clipboard.
  5. Return to where you were in Sunder.
  6. Paste the secret shard into the textarea in the Recover Secret view.

Expected Behavior

An error should not be encountered, since this is a perfectly reasonable course of action for the user to take.

Actual Behavior

A warning is displayed:

This is too large to display (don't worry, we can still use it).

This is holdover from before we integrated the post quantum signatures, when it was possible for a secret share to be just a handful of bytes. It misleadingly implies that it it is possible for the share to be small enough to display, but since we've implemented the post-quantum signature scheme that is impossible—even a 1-byte secret results in shares that are each 130KB in size, which is over the maximum display size.

Comments

This is a little tricky since I think we're going to have to get creative with the UI/UX.

I would argue that it doesn't make sense for this input to be a textarea, since the smallest possible share is so large that I don't think we should realistically expect users to type them in. On the other hand, it would be nice if we still supported pasting shares from the clipboard in the recovery flow.

Here's one proposal: replace the As text input option in the recovery flow with a From clipboard option. This would be a new React component with a Paste from Clipboard button. We should also ensure the default {Cmd,Ctrl}-V keyboard shortcut works in a convenient manner, and pastes the share from the clipboard.

@garrettr garrettr added this to the 1.0 milestone Jun 16, 2017
@GabeIsman GabeIsman self-assigned this Jul 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants