Skip to content

Pinentry support for access via GUI apps #44

Description

@SohamG

I want to use age to encrypt notes in emacs, and if I wanted to use the key from this plugin, I would need a convenient way to enter the pin for decryption. Currently the only supported way is through env vars, which is inconvenient as there isn't a good way to ensure the var is set when the key is requested.

Would this project be open to support for pinentry? The interface is quite simple (stdin/out based) and the feature could be behind a envvar/cli flag toggle. Pinentry is also whats used by GPG.

I wouldn't mind taking a crack at adding this in, but I'd like to know if it has a place in this project. I expect no additional dependencies.

Activity

  1. Foxboron commented on Feb 22, 2026

    @Foxboron
    Owner

    I removed pinentry as it relies heavily on the gnupg configuration of your system. It should preferably use a better mechanism for PIN retrieval.

    See: #36

  2. SohamG commented on Feb 22, 2026

    @SohamG
    Author

    The same functionality could be implemented without any library by using the stdin/out interface of pinentry, which means we exec pinentry if its in the path.

    I too dislike that pinentry is wholly embedded in the gpg suite, but I dunno what else could solve for this. Not having a way to enter a pin, and not having any caching for said pin is likely not gonna work for my usecase (bouncing around org-mode notes), guess I can try sequoia....

  3. Foxboron commented on Feb 22, 2026

    @Foxboron
    Owner

    We can't tell which pinentry binary to use. So I'd prefer if we didn't reimplement this.

    I would prefer if this was dealt with in the main age binary as we do a callback for the pin. I don't think the plugin should be the one solving this.

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