Page MenuHome GnuPG

Kleopatra: Don't use checkboxes to configure signing and encryption
Closed, ResolvedPublic

Description

Edit 2025-02-14:

This ticket was originally named "Kleopatra: give warning if file will only be encrypted to self".
It morphed to "Don't use Checkboxes to configure signing and encryption in SignEncryptWidget" in the corse of discussion, see below.

Original text:

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

ebo renamed this task from Kleopatra: give warning if file will only be encrypted to self to Kleopatra: Don't use checkboxes to configure signing and encryption.Fri, Feb 14, 12:00 PM
ebo updated the task description. (Show Details)
ebo edited projects, added gpd5x; removed Restricted Project.
ebo moved this task from Backlog to QA on the gpd5x board.
ebo moved this task from QA to Done on the gpd5x board.

Gpg4win-5.0.0-beta125

The button for "Encrypt to others" is gone:

ebo mentioned this in Unknown Object (Phriction Wiki Document).Wed, Feb 26, 10:49 AM