GitHunt
LH

lhelwerd/gpg-exchange

Simplified GPG exchange wrapper

Simplified GPG exchange wrapper

PyPI

This module abstracts some of the data types and operations performed by the
GPG Made Easy library in order to provide
a single means of key generation,
public key exchange, encryption and decryption using
GnuPG/PGP.

Features

  • Retrieve passphrase via callback
  • Key generation
  • Key search and deletion
  • Key import and export
  • Encryption and decryption using normal string types or open files

Requirements

The expression parser has been tested to work on Python 2.7 and 3.6. This
package depends on the gpg library, which
itself depends on SWIG and recent versions of the
GPGME library plus
associated development headers. GPGME then depends on GnuPG 2.1+ and its
libraries. You can install some of these packages through your package manager
if it is recent enough (search for gpg2). Even then you may still need a more
recent version of libgpg-error, for example.

You can install the missing or outdated packages from source using the latest
tarballs
.
Start with the library packages, then make sure you have GnuPG and finally
install GPGME for the easiest workflow. Each time, use ./configure, make
and finally sudo make install. If the first two steps fail then the output
will usually indicate which packages are missing. GPGME may fail its tests if
you are using an older version of GnuPG, which can be overcome by running only
./configure and sudo make install or by sed -i 's/gpgconf --kill all/gpgconf --kill gpg-agent scdaemon/' tests/gpg/Makefile tests/gpgsm/Makefile lang/python/tests/Makefile lang/qt/tests/Makefile when the compilation fails.

For GnuPG 2.1, you may need to add allow-loopback-pinentry to
$HOME/.gnupg/gpg-agent.conf in order to use passphrase callbacks. This is no
longer required in GnuPG 2.2. Key generation must provide a passphrase in GnuPG
2.2+.

Installation

Install the latest version from PyPI using:

pip install gpg-exchange

License

The GPG wrapper library is licensed under the GNU General Public License.

Languages

Python100.0%

Contributors

GNU General Public License v3.0
Created January 30, 2018
Updated October 23, 2018