Skip to content

feat: PGP signing and encryption#438

Draft
andrinoff wants to merge 4 commits intofloatpane:masterfrom
andrinoff:feat/pgp-signing
Draft

feat: PGP signing and encryption#438
andrinoff wants to merge 4 commits intofloatpane:masterfrom
andrinoff:feat/pgp-signing

Conversation

@andrinoff
Copy link
Copy Markdown
Member

@andrinoff andrinoff commented Apr 1, 2026

What?

Adds comprehensive PGP/OpenPGP support alongside the existing S/MIME implementation, using github.com/emersion/go-pgpmail (RFC 3156 compliant PGP/MIME).

Outgoing emails:

  • Sign emails with PGP detached signatures (multipart/signed)
  • Encrypt emails for recipients with known public keys (multipart/encrypted)
  • Sender's own public key automatically included so sent mail remains readable

Incoming emails:

  • Decrypt PGP-encrypted messages using the account's private key
  • Verify PGP detached signatures
  • Status badges in email view: [PGP: 🔒 Encrypted], [PGP: ✅ Verified], [PGP: ⚠️ Unverified]

Settings & configuration:

  • Per-account PGP key paths (public + private), sign-by-default, and encrypt-by-default toggles
  • Integrated into the existing crypto config screen alongside S/MIME
  • Recipient public keys stored in ~/.config/matcha/pgp/<email>.asc
  • Supports both ASCII-armored (.asc) and binary (.gpg) key formats

Composer:

  • New "Encrypt Email (PGP)" toggle in the compose view
  • PGP signing driven by account setting (sign-by-default)
  • S/MIME and PGP are mutually exclusive per message

Why?

Closes #386

Co-authored-by: Steve Evans <steve@floatpane.com>
Co-authored-by: Lea <lea@floatpane.com>
Signed-off-by: drew <me@andrinoff.com>
@andrinoff andrinoff requested a review from a team as a code owner April 1, 2026 19:53
@github-actions github-actions bot added the enhancement New feature or request label Apr 1, 2026
@andrinoff andrinoff marked this pull request as draft April 1, 2026 19:54
Signed-off-by: drew <me@andrinoff.com>
Signed-off-by: drew <me@andrinoff.com>
Signed-off-by: drew <me@andrinoff.com>
@andrinoff
Copy link
Copy Markdown
Member Author

andrinoff commented Apr 2, 2026

Know issues:

  • Signatures are not verified
  • For Yubikey, when Matcha expects you to touch the hardware key, there is nothing that says you have to (need to implement the "Touch the key to continue"
  • The PIN is kept in OS keyring, questionable security

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FEAT: PGP signing/encrypting

1 participant