Skip to content

add gpgcrypt plugin#44

Open
vkareh wants to merge 1 commit into
masterfrom
gpgcrypt
Open

add gpgcrypt plugin#44
vkareh wants to merge 1 commit into
masterfrom
gpgcrypt

Conversation

@vkareh
Copy link
Copy Markdown
Member

@vkareh vkareh commented Mar 25, 2026

Add a plugin that opens and saves GPG-encrypted files (.gpg, .pgp). On open, the file is decrypted via the gpg CLI; on save, it is re-encrypted using the original method (symmetric or asymmetric with the same recipients). New files saved with a GPG extension default to symmetric encryption.

To test, enable the plugin, and make sure you have gpg and a working gpg-agent.

For symmetric encryption:

  1. echo "hello world" | gpg --symmetric -o /tmp/test1.gpg
  2. pluma /tmp/test1.gpg
  3. edit file, save
  4. gpg --decrypt /tmp/test1.gpg
  5. verify decryption is symmetrical (i.e. password prompt)
  6. verify decrypted text

For assymmetric encryption:

  1. echo "hello world" | gpg --encrypt --default-recipient-self -o /tmp/test2.gpg
  2. pluma /tmp/test2.gpg
  3. edit file, save
  4. gpg --decrypt /tmp/test2.gpg
  5. verify decryption is asymmetrical (i.e. smart card or yubikey required)
  6. verify decrypted text

"Save As" to GPG:

  1. Open plaintext file or create new one
  2. Save As /tmp/test3.gpg
  3. (there should be a password prompt)
  4. gpg --decrypt /tmp/test3.gpg
  5. verify decrypted text

"Save As" away from GPG:

  1. pluma /tmp/test3.gpg
  2. Save As /tmp/test4.txt
  3. verify file saved plaintext with no encryption

@vkareh vkareh requested a review from a team March 25, 2026 19:04
Add a plugin that opens and saves GPG-encrypted files (.gpg, .pgp). On
open, the file is decrypted via the gpg CLI; on save, it is re-encrypted
using the original method (symmetric or asymmetric with the same
recipients). New files saved with a GPG extension default to symmetric
encryption.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant