Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encrypt and byte generation UX feedback #34

Open
atoponce opened this issue May 8, 2020 · 2 comments
Open

Encrypt and byte generation UX feedback #34

atoponce opened this issue May 8, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@atoponce
Copy link

atoponce commented May 8, 2020

On encryption, I think there should be some easier way to default to a sender, rather than needing to specify it all the time. Maybe the first key created? For example, I have four keys in my keyring:

% keys list -t edx25519
kex1cff9ug3yflntlwjcjrh4amsdpwcvu4rsnsaru2e4z2rdqerwlagsd7gwd2 aarontoponce@twitter
kex1l0vr4xn8xzmyk8gemvtuh6dw93glujn9apwhrkh528t5fkw62weqel0ymw atoponce@github
kex1c0jp03hpuall9rphcn3syzncsqn9m2hswpj6ca3d66hy65vpvraq57yepu atoponce@reddit
kex13jf47j9492ck7twu8wstq68ezjggruv06vfr39s8s2xa2434c77sec6lyk pthree.org@https

Twitter was the first key I created, so maybe " (default)" could be appended at the end of the line, with functionality to change the default, say to my Reddit or Github keys. Then, I can do:

% echo 'super secret message' | keys encrypt -a -r user@example

Rather than needing to:

% echo 'super secret message' | keys encrypt -a -r user@example -s atoponce@reddit

Also, I find it curious that --mode, -m signcrypt isn't default. I'm curious if there is a larger usecase for sending deniable messages that aren't signed versus ones that are.

Last thing. One thing I always felt missing from the Keybase CLI was the ability to generate passwords or passphrases. With the fact that you're supplying keys rand to generate random bytes and encode them, works for most cases I think. You have various encodings, including BIPS-39. But the help on error is confusing:

% keys rand -n 8 -e bip39
Entropy length must be [128, 256] and a multiple of 32

But I can do:

% keys rand -n 16 -e bip39
powder kitchen stove already range ignore prison group recall elite hedgehog alpha

It took some fiddling, but what you're saying in the STDERR output is that you must supply at least 128 bits (16 bytes), but no more than 256 bits (32 bytes), and it must be a multiple of 32 bits (4 bytes). That means when using BIPS39 encoded, there are really only five options: 16, 20, 24, 28, and 32 bytes. I would also recommend standardizing on a unit (bytes or bits) and remain consistent. So maybe something like this instead:

% keys rand -n 8 -e bip39
bip39 must be 16, 20, 24, 28, or 32 bytes in length
@gabriel
Copy link
Contributor

gabriel commented May 9, 2020

Thanks for the feedback. Yeah the bip39 error is too confusing.

I'm not sure yet about default keys... I have to think about it more. From a UX perspective it seems better to not have to explicitly specify keys especially if you only have 1, but it becomes easy to accidentally use the wrong keys later on if you have multiple... so idk yet.

@gabriel gabriel added the enhancement New feature or request label May 10, 2020
@gabriel
Copy link
Contributor

gabriel commented Jul 30, 2020

BTW, the bip39 error is fixed in the latest release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants