-
-
Notifications
You must be signed in to change notification settings - Fork 307
.gpg-id has 'invalid key ID' when selecting a specific subkey with exclamation mark ABC...XYZ! #1451
Description
Password-store for Android does not recognise a specific subkey selection, e.g. 141E0FE3342C4914! (note the exclamation mark at the end). The password-store program for UNIX does accept this, and in fact this feature is necessary in order to encrypt for a specific set of subkeys associated with a given identity. If you use only 141E0FE3342C4914 then gpg will select the newest encryption key it finds for the identity associated with 141E0FE3342C4914.
This feature is necessary in order to manage multiple encryption keys on different devices, which are aware of each other's public encryption keys as part of the user's identity.
To Reproduce
Steps to reproduce the behavior:
- On GNU/Linux run
pass init <myencryptionkey_in_0x_long_format>!including the exclamation mark at the end. - Synchronise
password-storefor Android with the createdgitrepository. - Try creating a new password and saving it, as this is the step where the program tries to encrypt using the key recorded in
.gpg-id. When you click the save button, you will receive the errorFound .gpg-id, but it contains an invalid key ID, fingerprint or user ID
Expected behavior
password-store for Android should recognise the encryption key contained in .gpg-id and pass the encryption key straight to gpg with the exclamation mark on the end. gpg understands that a key with an exclamation mark at the end means to encrypt specifically for the given key, instead of the stupid default behaviour (where selecting the most recent encryption key available which is associated with the same identity).
Device information (please complete the following information):
App version is 1.13.4.
Additional context
Specific key selection is supported by both gpg and password-store on the desktop application. It should be supported here too. It's possible that all that needs to be done is to relax the error-checking of .gpg-id to allow keys with an exclamation mark at the end. I don't think any special treatement is required to handle these specific keys. They just need to be passed to gpg including the exclamation mark at the end.