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

Inconsistency with output of GUI decrypt #116

Open
grempe opened this issue Jul 30, 2020 · 1 comment
Open

Inconsistency with output of GUI decrypt #116

grempe opened this issue Jul 30, 2020 · 1 comment

Comments

@grempe
Copy link

grempe commented Jul 30, 2020

If you paste armored text into GUI decrypt tool (whether created with mode encrypt or signcrypt) the GUI will display the decrypted plaintext directly within the GUI.

However, if you instead choose a binary file from the filesystem to decrypt it will always save plaintext back to the filesystem as a file with the .dec (presumably for decrypted) back to the same folder.

This differing treatment can be confusing. I can see how saving the file to the filesystem would be useful for files that are non-textual in nature (e.g. an encrypted .zip or .png), but the heuristic of assuming that ascii armored ciphertext represents something able to be displayed within the GUI won't apply universally.

One possible solution might be to examine the file when it is decrypted (and before displaying or saving it) and checking if it contains only GUI safe characters with a regex and if so display it in the GUI directly whenever possible. This is a much friendlier way of dealing with the output (and likely safer as there won't be a plaintext artifact for the user to cleanup afterwards).

As an example here is a screenshot of a .jpg file I encrypted and armored. Pasting this armored text results in unpleasant output. I would have to resort to the command line to actually open this file.

keys encrypt -r grempe@github -s grempe@github -a -in testing.jpg -out testing.jpg.enc

https://share.getcloudapp.com/7KuLJekl

@gabriel
Copy link
Contributor

gabriel commented Jul 31, 2020

Yeah the UI could detect if not ascii and output to file or provide some alternative option.

Thanks for trying this out, so many edge cases :)

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

No branches or pull requests

2 participants