Page MenuHome GnuPG

Kleopatra: give warning if file will only be encrypted to self
Testing, NormalPublic

Description

It seems to be a recurring error that a message is not encrypted to the intended recipient, who then gets the error "no secret key" when trying to decrypt it.

To avoid that there should be a warning if the check box before "encrypt to others" is checked, but no recipient is given. Or encryption should not be possible and the button for it greyed out.

I'd prefer the former, as otherwise people might wonder why they can not click the button.
I suggest a dialog box with "Please add a recipient" and then after acknowledging this the cursor should blink in the appropriate field.

Event Timeline

aheinecke added a subscriber: aheinecke.

We can do an added status line "Note: Only your key will be able to decrypt this file". But I don't think that will be very accessible.

But this is a common use case. e.g. encrypt some files before putting them in cloud storage etc.
Also if you use a shared secret key across a group this might also be the "usual" way for them to encrypt.

aheinecke lowered the priority of this task from Normal to Wishlist.Jun 9 2023, 12:22 PM

Maybe there just shouldn't be an "encrypt to others" checkbox. I mean, either you add keys of others or you don't. What's the point of the checkbox? Okay. I guess now you could encrypt to others but not to yourself. But that would still be possible. What wouldn't be possible is to add keys of others and then decide "Nah. I'll just encrypt to myself/with password."

If you only want to encrypt to one key you could do this without warning if you remove the check before "encrypt to others".

As it is now, the checkbox is redundant, it does not have any effect.

aheinecke raised the priority of this task from Wishlist to Normal.Jun 9 2023, 1:00 PM

Ah, I was not even thinking about the checkbox, yes you are both right. The encrypt to others should not be a checkbox but can be implicit regarding the selection of keys in the group "Encrypt to others."

If I understand you correctly, you want to remove the checkbox before "Encrypt to others"?

My proposal was to keep the checkbox and make it functional:

  • checkbox ticked and no key given for "Encrypt to others": Warning
  • checkbox not ticked and no key given for "Encrypt to others": no Warning

Yes thinking about this a bit more the checkbox is as redundant as any warning. The user interface clearly indicates that if you want to encrypt for others that you have to enter a name or email in this group. If the user does not notice that then a warning message or other explicit action will not help but make the user experience for most other users (requiring a click to check the checkbox) worse.

TobiasFella changed the task status from Open to Testing.Jul 24 2024, 1:57 PM
TobiasFella set External Link to https://invent.kde.org/pim/kleopatra/-/merge_requests/176.

https://invent.kde.org/pim/kleopatra/-/merge_requests/176 removed the checkbox for encrypting to others