Skip to main content

Introduction

In brief, gpgdo decreases effort of using gpg encrypted files. Example use-case:

$ gpgdo edit my-text-file.gpg

It is equivalent to doing:

$ gpg -d -o /dev/shm/plain-text my-text-file.gpg
$ edit /dev/shm/plain-text
$ gpg -e -r USER-ID -o my-text-file.gpg /dev/shm/plain-text
$ rm -f /dev/shm/plain-text

gpgdo automates manual decryption and encryption when executing a specific Command that operates on content that is located in encrypted files.

Security of gpgdo relies on at least 3 factors:

  • security of /dev/shm (which is the security of virtual memory)
  • file permissions (uses mkstemp() to create a file under /dev/shm)
  • deleting the plain text file after use

Installation

$ sudo make install

Or,

$ sudo python3 setup.py install

Usage

Run gpgdo --help.

Details

Terminology: Command (with capital C) refers to the executable that gpgdo executes.

gpgdo takes a Command with arguments to run, decrypts its gpg file arguments under /dev/shm, executes the Command for plain text files, and finally re-encrypts modified files. If the Command fails, plain text files are not re-encrypted. The plain text files are removed always.

Argument processing for gpgdo specific option arguments ends at "--". Giving "--" is only necessary if option arguments are given for gpgdo.

gpgdo finds the recipients from decrypted files by the information provided by gpg and automatically uses the same recipients when re-encrypting files.

The given gpg name on command line does not need to exist. In this case, the recipient must be provided with -r USER-ID and "--" must be used to terminate gpgdo argument list:

gpgdo -r USER-ID -- edit non-existing-file.gpg

A plain text file is encrypted to replace the original gpg file only if two conditions hold:

  1. The sha256sum of its content changes
  2. Command returns success

CAVEATS

Only filenames that end with ".gpg" are decrypted.

BUGS

Option arguments with a gpg filename directly attached are not recognized. This does not work:

$ gpgdo Command --argument=foo.gpg

Command will read the encrypted file and most probably fail or do the wrong thing. But this works:

$ gpgdo Command --argument foo.gpg

License

Read LICENSE file.

Authors

Read AUTHORS file.

Metadata

Release files for gpgdo 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gpgdo 1.0.2
File Size Uploaded Provenance Actions
gpgdo-1.0.2.tar.gz 7.5 kB Without provenance Details for gpgdo-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gpgdo 1.0.2
File Interpreter ABI Platform Actions
gpgdo-1.0.2-py3-none-any.whl Python 3 none any Details for gpgdo-1.0.2-py3-none-any.whl

Total release size: 16.5 kB

Release files / gpgdo-1.0.2.tar.gz

Download URL gpgdo-1.0.2.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ddb642e09e1fc7a72934b7ea3fd4b2c52b418d62abe5b726da420d102fb36115
BLAKE2b-256 checksum
How to use checksums
f38ee95544b7c56b1c1e7883f92b0be433e35cd7a4a54ed0d93104354dfc8b43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release files / gpgdo-1.0.2-py3-none-any.whl

Download URL gpgdo-1.0.2-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0347b06be94102a5eabb19b945fd6d49f2a5b1b047d9b1aca4fdca757b9d427e
BLAKE2b-256 checksum
How to use checksums
84fd20759d47d0113d6a93098faedd688872082dda01242f5390393c0b7e12e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Security for gpgdo 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page