Skip to content

[FEATURE] Support importing/retrieving keys via the OpenPGP API (as offered by some keyring apps) #152

Description

@HGBits

Is your feature request related to a problem? Please describe.

Some OpenPGP provider apps expose their keys through the standard OpenPGP API (the same Remote API used by clients like K-9 Mail/Thunderbird), which lets a compatible app request public/secret keys, key IDs, and related key-management operations directly from the provider without the user manually exporting/importing .asc/.gpg files. Android-Password-Store currently seems to rely on manual key export/import (or a fixed set of intents), so users of keyring apps that support this richer API have no way to pull keys directly through it — they have to fall back to manual file handling, which is more error-prone and less convenient, especially when managing multiple keys/identities.

Describe the solution you'd like

Add support for the OpenPGP API's operation calls (ACTION_ENCRYPT, ACTION_DECRYPT_VERIFY, ACTION_SIGN, ACTION_GET_KEY_IDS) as an optional external keyring backend, alongside the current internal Key Manager. Instead of importing the secret key into APS, the user would select a key exposed by a compatible OpenPGP provider (OpenKeychain or any other app implementing the same API), and APS would delegate encrypt/decrypt/sign operations to that provider through the standard service call — the secret key stays inside the dedicated keyring app at all times. This keeps key custody isolated from APS's own storage while still letting APS perform its normal pass-compatible file operations.

Describe alternatives you've considered

Continuing to export the key from the provider app and import it into APS manually via file/intent.
Using OpenKeychain's Intent API only (import via .gpg/.asc file, ACTION_VIEW), which works but always requires manual user interaction with files instead of a scoped API-based grant.
Keeping key management entirely external to APS and just referencing key IDs, which still doesn't solve retrieval/sync when the source app is the one holding the keys.

Additional context

Reference implementation of the API: https://github.com/open-keychain/openpgp-api — it's the same API OpenKeychain exposes and that clients like K-9 Mail already integrate with for encrypt/decrypt/sign/verify and key lookup. Support for the key-retrieval side of this API (not just crypto operations) would make APS interoperable with any provider implementing it, not just OpenKeychain specifically.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions