Kleopatra: improvements regarding paperkey import
Open, LowPublic

Assigned To
None
Authored By
ebo
May 2 2025, 12:51 PM
Subscribers

Description

We noticed during tests triggered by a user question regarding difficulties to restore a key, that Kleopatra gives an unhelpful error message "Failed to restore any secret keys." in the case of

a) trying to import a printed backup of a key were the secret key is already in the keyring and
b) trying to import the printed backup of another key (i.e. the wrong import file was selected).

a) should be addressed by greying out the action "Restore printed backup" in case all the secret key are there

In case b) Paperkey on the cli does not give an error message.
Therefore the best possible (and easiest) solution would be to add more info to the default error message.
I suggest: "Did you choose the right import file? Check the fingerprint in the first (commented) line."
(The person seeking advice did delete the commented lines, thinking they might interfere.)

If we want to go over the top, we could maybe display the import file and check for the fingerprint and/or format errors (e.g. missing whitespaces)…

Event Timeline

ebo created this task.

In version VSD-3.3.7 there is still the offer to restore the printed backup, even if all secret keys of a pubkey are available locally:

This occurs only if no (sub)key is selected. If one is selected, only the export is offered instead.

ebo renamed this task from Draft: Kleopatra: improvements regarding paperkey import to Kleopatra: improvements regarding paperkey import.Wed, Jul 8, 3:34 PM
ebo updated the task description. (Show Details)