Skip to content

[BUG] No data is displayed upon unlocking a password #261

Backlog

Description

@bstaletic

Describe the bug

Proper integration with OpenKeyChain is awesome.
I can pull the git repo from my laptop and I can unlock an entry in the password store.
However, unlocking an entry presents no data.

My test entry (not actually a test entry - I'm actually using it) was produced in two steps:

  1. pass generate -c gitlab.kitware.com -n 100
  2. pass edit gitlab.kitware.com

After editing, the entry looks like this:

super_secret_password
username: bstaletic
url: kitware.com

Steps to reproduce

On the system hosting the git repo:

  1. pass init
  2. pass git init
  3. pass generate whatever -n 100

On the android phone:

  1. Clone the repo from the other machine
  2. Import the other machine's PGP key
  3. Unlock whatever entry.

Expected behavior

Upon unlocking, the contents of the password store entry should be displayed.

Screenshots

I'm currently using the upstream version, so tell me if you want screenshots.

Device information

  • Device: Pixel 7a
  • OS: Android 17
  • App version: 1.28.1

Additional context

I have not tested what happens if I create a password on the application itself.

I did use OpenKeyChain integration, because otherwise I was hitting agrahn#1233 on this fork as well.

Unsurprisingly, this breaks autofill as well.

Activity

  1. pando85 commented on Dec 1, 2026

    @pando85
    Owner

    Thanks for the detailed report and for testing the OpenPGP provider integration! The fact that both the password screen and autofill are affected is particularly useful. I have checked the shared decryption path and found that we currently accept a successful provider response even if it contains no plaintext, which could explain the blank screen. I haven't established yet whether that is what happens on your device.

    Could you help us narrow this down with a few details?

    • Which OpenKeychain version and distribution are you using (F-Droid, Play Store, GitHub, etc.)? I assume by upstream version you mean OpenKeychain, rather than APS 1.28.1; please correct me if not.
    • When opening an entry, do you see an OpenKeychain permission/passphrase prompt? After accepting it, does APS show the entry name with an empty list, or does it return to the previous screen? Are the copy/edit actions available? Does opening the same entry a second time (when the provider has cached the unlock) behave differently?
    • Can OpenKeychain itself decrypt a newly generated, non-sensitive .gpg test file from the same store using its file-decryption UI? If possible, does an entry created in APS also exhibit the issue?
    • Regarding [BUG] If PGP key ID is a substring the application won't find it agrahn/Android-Password-Store#1233 in the other fork: is your .gpg-id a partial name rather than a full fingerprint? Does the same problem occur in a disposable test store initialized with the full fingerprint? The GnuPG version and the key/subkey algorithm (e.g. RSA or Curve25519) would also be useful.

    If you are comfortable with ADB, a short, redacted logcat excerpt around the failed operation (OpenPGP API/APS errors only) may help identify whether the problem is in the IPC stream or in the authentication continuation. Please use a dummy entry and do not post any actual passwords, secret keys, passphrases, session keys or unredacted logs. No screenshots of real credentials are needed.

    Thanks again!

  2. bstaletic commented on Dec 1, 2026

    @bstaletic
    Author
    • Which OpenKeychain version and distribution are you using (F-Droid, Play Store, GitHub, etc.)?

    F-droid, version 6.0.4

    I assume by upstream version you mean OpenKeychain, rather than APS 1.28.1; please correct me if not.

    When I said "upstream" I was referring to agrahn/Android-Password-Store implementation.

    I currently am still in the testing phase of the whole pass thing in general, so I don't mind setting up things again and testing stuff multiple times.

    When opening an entry, do you see an OpenKeychain permission/passphrase prompt?

    I do.

    After accepting it, does APS show the entry name with an empty list, or does it return to the previous screen?

    It shows the entry name and and empty list. No return to the previous screen.

    Are the copy/edit actions available? Does opening the same entry a second time (when the provider has cached the unlock) behave differently?

    No and no.

    Can OpenKeychain itself decrypt a newly generated, non-sensitive .gpg test file from the same store using its file-decryption UI? If possible, does an entry created in APS also exhibit the issue?

    Apologies, but I'm not sure what you have in mind there. I've only installed OpenKeyChain today because of APS.

    Regarding agrahn#1233 in the other fork: is your .gpg-id a partial name rather than a full fingerprint?

    It was until I changed it so the other fork could work at all.

    Does the same problem occur in a disposable test store initialized with the full fingerprint?

    Not sure what is "a disposable test store", but if I use the full fingerprint, then everything works.

    The GnuPG version

    On the linux machine? Here:

    gpg (GnuPG) 2.5.24
    libgcrypt 1.12.4-unknown
    Copyright (C) 2026 g10 Code GmbH
    License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    
    Home: /home/bstaletic/.gnupg
    Supported algorithms:
    Pubkey: RSA, Kyber, ELG, DSA, ECDH, ECDSA, EDDSA
    Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
            CAMELLIA128, CAMELLIA192, CAMELLIA256
    Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
    Compression: Uncompressed, ZIP, ZLIB, BZIP2
    

    and the key/subkey algorithm (e.g. RSA or Curve25519)

    Credential, sign and auth key use ed25519. Encryption key says cv25519.

    ADB

    It's been many years since I've last used it and never for logcat. I can set it up and post the results.

  3. bstaletic commented on Dec 1, 2026

    @bstaletic
    Author

    Can OpenKeychain itself decrypt a newly generated, non-sensitive .gpg test file from the same store using its file-decryption UI? If possible, does an entry created in APS also exhibit the issue?

    Apologies, but I'm not sure what you have in mind there. I've only installed OpenKeyChain today because of APS.

    Ah, re-reading this, I'm pretty sure I know what you mean. Get a random file with no no sensitive info, encrypt it, the same way pass does, then attempt to decrypt it with OpenKeyChain. If that's what you want me to try, that should be easy.

    To clarify a few things:

    Regarding agrahn#1233 in the other fork: is your .gpg-id a partial name rather than a full fingerprint?

    It was until I changed it so the other fork could work at all.

    That means that I have used a partial name for as long as I had your fork installed.

    Does the same problem occur in a disposable test store initialized with the full fingerprint?

    Not sure what is "a disposable test store", but if I use the full fingerprint, then everything works.

    That was meant to be "everything" with respect to agrahn#1233. I have not tested your fork with the full fingerprint. If you want me to, I can do that.
    Also, the other fork's autofill works if I use the full fingerprint, but that one is using the internal PGP key store, so I don't know how diagnostically useful that is.

  4. pando85 commented on Dec 1, 2026

    @pando85
    Owner

    Thanks for clarifying, that is very helpful! And yes, your interpretation of the standalone OpenKeychain test is exactly what I meant.

    Could we try just two things first, before setting up ADB?

    1. With our fork and OpenKeychain still selected as the external provider, try the same dummy entry with the full fingerprint in .gpg-id rather than the partial name. Ideally keep the encrypted .gpg file unchanged in a test copy of the repository, so we isolate the recipient identifier from the encrypted message format.
    2. On Linux, create a harmless test file using the same encryption key, for example:
    printf 'test-password\nusername: test-user\n' > aps-test.txt
    gpg --output aps-test.gpg --encrypt --recipient YOUR_FULL_FINGERPRINT aps-test.txt

    Transfer only aps-test.gpg to Android and try opening it with OpenKeychain's Encrypt/Decrypt file functionality. Does OpenKeychain itself recover the expected dummy text?

    I've also opened #262 to improve the provider response handling. All CI checks have passed, but we have not reproduced your specific issue on a device yet. Depending on the two results, we can decide whether a test build or logcat is needed. No need to share any actual passwords or key material.

    Thanks again for your willingness to test!

  5. pando85 commented on Dec 1, 2026

    @pando85
    Owner

    Update: your exact OpenKeychain version and GnuPG version led me to a concrete bug in OpenKeychain 6.0.4 itself. Its CachingDataDecryptorFactory fails to return the delegated decryptor for AEAD packets and then dereferences a helper that is not initialized for imported software keys. This would cause a decryption error after the passphrase prompt. APS 1.28.1 can leave an empty screen when that error is returned.

    Rather than reinstalling or setting up ADB, could you check the packet type of one affected file locally on Linux?

    gpg --list-only --list-packets path/to/entry.gpg

    Please only tell us whether the encrypted data packet is tag=20 (AEAD), or tag=18 and which version it reports. No need to share the full output, key identifiers or any credentials. If it is tag 20, that would strongly corroborate the OpenKeychain bug. No need to perform the other tests for now.

  6. pando85 commented on Dec 1, 2026

    @pando85
    Owner

    Thanks again for the detailed information. I think the best solution is to preserve your existing keys and encrypted store rather than change the encryption format to work around a provider bug.

    For immediate use, since your key is a software key and you have already confirmed that the internal PGP backend of the other fork works with its full fingerprint, I would recommend using our internal PGP backend with the full primary-key fingerprint in .gpg-id as well. If the key is not already imported into our internal backend, import it locally. There should be no need to change your key or re-encrypt the existing entries merely to identify the same recipient by fingerprint. This is a recommended workaround, not something we have yet reproduced on your specific device. If you specifically want to keep private-key operations delegated to OpenKeychain, the proper fix belongs in OpenKeychain itself.

    We have found an independently reported upstream bug: open-keychain/open-keychain#2973. Both AEAD decryptor overloads discard the result of the wrapped decryptor instead of returning it, then fall through to a helper that is uninitialized for software keys. Returning the delegated result in both overloads is the appropriate minimal correction. The existing upstream PR proposes a different approach and is still open. Your packet-format check would tell us whether this is the same failure you are experiencing; it is not necessary to reinstall anything or provide logs at this stage.

    On our side, #262 has now been merged after all CI checks passed. It improves external provider transaction handling and makes decryption failures explicit instead of leaving a blank password screen. It does not repair the provider's internal AEAD implementation. I do not recommend disabling AEAD or re-encrypting your entire store as the first solution, and we will not silently fall back to another private-key backend.

    We should keep this issue open until the underlying failure is confirmed or you have verified that the recommended workaround works for you. Thank you for helping us identify these issues!

  7. bstaletic commented on Dec 2, 2026

    @bstaletic
    Author

    With our fork and OpenKeychain still selected as the external provider, try the same dummy entry with the full fingerprint in .gpg-id rather than the partial name. Ideally keep the encrypted .gpg file unchanged in a test copy of the repository, so we isolate the recipient identifier from the encrypted message format.

    That still presents me with an empty list.

    On Linux, create a harmless test file using the same encryption key, for example:

    printf 'test-password\nusername: test-user\n' > aps-test.txt
    gpg --output aps-test.gpg --encrypt --recipient YOUR_FULL_FINGERPRINT aps-test.txt
    

    Transfer only aps-test.gpg to Android and try opening it with OpenKeychain's Encrypt/Decrypt file functionality. Does OpenKeychain itself recover the expected dummy text?

    No. It errors with "Encountered OpenPGP Exception during operation". The log says this:

    Processing input data
        Attempting to process OpenPGP data
            Encountered OpenPGP Exception during oeration!
    
    gpg --list-only --list-packets path/to/entry.gpg
    

    Please only tell us whether the encrypted data packet is tag=20 (AEAD), or tag=18 and which version it reports.

    Redacted output:

    # off=0 ... tag=1 ...
    :pubkey enc packet: version 3, ...
            data: ...
            ...
    # off=96 tag=20 ...
    :ocb encrypted packet: ...
            length: ...
    
  8. bstaletic commented on Dec 2, 2026

    @bstaletic
    Author

    Oh, this is definitely a bug in OpenKeyChain.
    I've installed PGPony, to test and APS started working.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions