explaingit

flejz/pinentry-win

Analysis updated 2026-05-18

1RustAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

A lightweight Windows password-entry dialog for GnuPG, written in Rust using native Win32 APIs, with no Cygwin or Qt dependency required.

Mindmap

mindmap
  root((pinentry-win))
    What It Does
      Password dialog for GnuPG
      Native Win32 dialog
      No Qt or Cygwin needed
    Features
      Full Assuan IPC support
      Clears passphrase from memory
      High DPI aware
    Tech Stack
      Rust
      Win32 API
      windows-rs crate
    Setup
      Download prebuilt exe
      Edit gpg-agent.conf
      Restart gpg-agent
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Replace the default GnuPG pinentry dialog on Windows with a faster, native one that starts instantly without extra dependencies.

USE CASE 2

Build from source with the Rust toolchain to create a customized passphrase dialog for a Windows GnuPG setup.

USE CASE 3

Drop pinentry.exe into a portable GnuPG installation on Windows to enable passphrase prompts without installing Qt or GTK.

What is it built with?

RustWin32 APIwindows-rs

How does it compare?

flejz/pinentry-winabyo-software/ferro-stashariasbruno/glyph
Stars111
LanguageRustRustRust
Setup difficultyeasymoderateeasy
Complexity2/54/52/5
Audiencedeveloperops devopsdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Download the prebuilt .exe and add one line to gpg-agent.conf, no compiler needed unless building from source.

MIT license: use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

pinentry-win is a small Windows program written in Rust that shows a password dialog box when GnuPG needs you to enter a passphrase. GnuPG is widely used for encrypting files and emails, and it relies on a separate program called pinentry to securely collect passwords from the user. The standard pinentry programs available for Windows tend to depend on heavy software like Qt or GTK, or require a Unix compatibility layer like Cygwin. This project replaces them with a lightweight alternative that uses Windows' own native dialog system directly. The program speaks the same communication protocol that GnuPG expects, so it works as a direct drop-in replacement with no changes needed on the GnuPG side. It supports the full set of commands that GnuPG sends to a pinentry program, including prompting for a PIN or passphrase, showing confirmation dialogs, and displaying informational messages. It clears the entered passphrase from memory immediately after use. The dialog is high-DPI aware and renders with modern button styles. To use it, download the prebuilt pinentry.exe from the Releases page and point GnuPG at it by editing one line in the GnuPG agent configuration file. You then restart the GnuPG agent and the new dialog appears the next time GnuPG needs a passphrase. Building from source requires the Rust toolchain and the MSVC compiler target for Windows. The license is MIT.

Copy-paste prompts

Prompt 1
I use GnuPG on Windows with gpg4win. Show me how to configure gpg-agent.conf to point to pinentry-win instead of the default pinentry.
Prompt 2
Walk me through building pinentry-win from source on Windows using Cargo with the x86_64-pc-windows-msvc target.
Prompt 3
What GnuPG Assuan IPC protocol commands does pinentry-win support, and how does the GETPIN command flow work?

Frequently asked questions

What is pinentry-win?

A lightweight Windows password-entry dialog for GnuPG, written in Rust using native Win32 APIs, with no Cygwin or Qt dependency required.

What language is pinentry-win written in?

Mainly Rust. The stack also includes Rust, Win32 API, windows-rs.

What license does pinentry-win use?

MIT license: use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is pinentry-win to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is pinentry-win for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub flejz on gitmyhub

Verify against the repo before relying on details.