Repository navigation
PGPony 4.0.4
PGPony 4.0.4 — Making the Succession Work
A fast follow-up to 4.0.3. That release shipped the OpenPGP provider API, the headline feature of the Succession, and then a user's crash log showed it did not survive minification: in release builds it crashed every mail client that asked PGPony to decrypt. This release fixes that, along with six other faults reported in the days since. No new features, and no migration needed.
🔌 Provider API: release builds now work with other apps
Release builds renamed part of the org.openintents.openpgp contract, so the parcelable that carries a decrypt result back to the client could not be resolved on the other side. Thunderbird for Android, K-9 Mail, and FairEmail all crashed on decrypt. Debug builds were unaffected, which is why provider testing missed it. Keep rules added, verified in the release mapping and on hardware against a real client.
Two problems in the passphrase prompt that clients see are also fixed:
The prompt opened already reporting "wrong passphrase" before anything was typed. On a cold start PGPony's in-process cache is empty, and a protected key with no passphrase in hand was being reported as an invalid one rather than a missing one.
Entering the passphrase once was not enough. The prompt returned an empty result, so the client had nothing to re-run and only succeeded on a second Unlock press. It now hands the original request back, the same contract the key picker has always used.
📁 Large files no longer crash
Encrypt and Decrypt used to hold whole files in memory: the input, an output buffer that doubles as it grows plus a copy at the end, and the result. A 13 MB file peaked around 60 MB, which fails on a device with a normal heap. Files are now streamed straight to and from disk, so peak memory is a fixed 64 KB regardless of size. A 105 MB file costs the same as a 105 KB one.
This covers the Encrypt and Decrypt tabs, files opened or shared into PGPony, and the share sheet Quick Action, for both key-based and password-based encryption.
Large files also now show a progress bar with a running byte count and a Cancel button, so a long operation looks like work rather than a hang. Decrypting also no longer runs on the interface thread, which was causing freezes and unresponsive buttons on some devices.
One limit: hardware key (NFC) operations still need the file in memory, because the card session stays open for the whole operation. Large files with a card key now say so plainly instead of failing.
💳 Hardware keys with KDF enabled
OpenPGP cards configured with kdf-setup were being sent a plain PIN and answering 0x6982. PGPony now reads the card's KDF data object and derives the PIN exactly as the card expects. Verified on a YubiKey across decrypt, sign, and PIN change, with the retry counter intact. Cards without KDF are unaffected.
🗝️ Keyring
Importing a file containing several keys, such as the output of gpg --export a b c, imported only the first key and reported success. All keys in the file are now imported. The file picker also no longer hides valid key files behind a MIME filter that some file providers apply too strictly.
✍️ Sign and encrypt
Three faults in the signing passphrase flow, all reachable only with a passphrase-protected signing key:
Pressing Encrypt after entering the passphrase appeared to do nothing. The encrypt succeeded every time; the dialog simply never closed and sat over the result. It now closes as soon as the work starts, so the progress bar is visible.
"Encrypt without signing" ran the text encryptor regardless of which mode you were in, so from File mode it encrypted the message box instead of your file.
A retry with the wrong passphrase blanked the field with no message. It now says what happened.
Under the hood
Encrypt and Decrypt now stream through the crypto core rather than buffering; password-based encryption gained a streaming path with the same Argon2id parameters as before, so output is unchanged
Message inspection can now read the session-key packets from the head of a file, so a large file can be classified without being loaded
354 unit tests, including a new suite covering streamed and buffered round-trips in both directions
Reproducible build verified before publishing: v4.0.4 built twice from two independent fresh clones of the tag produces byte-identical output outside the signature block, and the published APK is one of those builds
versionCode 404 · versionName 4.0.4 · Android 8.0+ (API 26)
Thanks to the people who reported these with logs, versions, and file sizes. Several of them were only findable because the reports were specific.