python-gnupg


gnupg.py is a Python API which wraps the GNU Privacy Guard.

THIS PROJECT HAS NOW BEEN https://bitbucket.org/vinay.sajip/python-gnupg'>MOVED.

The GNU Privacy Guard (gpg, or gpg.exe on Windows) is a command-line program which provides support for programmatic access via spawning a separate process to run it and then communicating with that process from your program.

This project implements a Python library which takes care of the internal details and allows its users to generate and manage keys, encrypt and decrypt data, and sign and verify messages.

Credits

  • The developers of the GNU Privacy Guard.
  • The original version of this module was developed by Andrew Kuchling.
  • It was improved by Richard Jones.
  • It was further improved by Steve Traugott.

The present incarnation uses the subprocess module and so works on Windows as well as Unix/Linux platforms. It's not, however, 100% backwards-compatible with earlier incarnations.

CHANGE LOG

|0.3.6|Note that due to Google Code disabling the Downloads facility, downloads from this release onwards are available on PyPI (link). Note also that this release includes security improvements, so all users are encouraged to upgrade. Fixed Issue #82: Enabled fast random tests on gpg as well as gpg2. Fixed Issue #85: Avoid deleting temporary file to preserve its permissions. Fixed Issue #87: Avoided writing passphrase to log. Fixed Issue #95: Added verify_data() method to allow verification of signatures in memory. Fixed Issue #96. Regularised end-of-line characters. Fixed Issue #98: Rectified problems with earlier fix for shell injection.| |:----|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |0.3.5|Added improved shell quoting to guard against shell injection. Fixed Issue #76: Added search_keys() method (and also a send_keys() method). Fixed Issue #77: Now allow specifying a symmetric cipher algorithm. Fixed Issue #78: Fall back to utf-8 encoding when no other can be determined. Fixed Issue #79: Default key length is now 2048 bits. Fixed Issue #80: Removed the Name-Comment default in key generation. | |0.3.4|Fixed Issue #65: Fixed encoding exception when getting version. Fixed Issue #66: Now accepts sets and frozensets where appropriate. Fixed Issue #67: Hash algorithm now captured in sign result. Fixed Issue #68: Added support for --secret-keyring. Fixed Issue #70: Added support for multiple keyrings. | |0.3.3|Fixed Issue #57: Handle control characters in list_keys. Fixed Issue #61: Enabled fast random for testing. Fixed Issue #62: Handled KEYEXPIRED status. Fixed Issue #63: Handled NO_SGNR status. | |0.3.2|Fixed Issue #56: Disallow blank values in key generation. Fixed Issue #57: Handle colons and other characters in list_keys. Fixed Issue #59 and Issue #60: Handle INV_SGNR status during verification and removed calls requiring interactive password input from doctests. | |0.3.1|Fixed Issue #45: Allow additional arguments to gpg executable. Fixed Issue #50: Use latin-1 encoding in tests when it's known to be required. Fixed Issue #51: Test now returns non-zero exit status on test failure. Fixed Fixed Issue #53: Now handles INV_SGNR and KEY_NOT_CREATED statuses. Fixed Issue #55: Verification and decryption now return trust level of signer in integer and text form. | |0.3.0|Fixed Issue #49: Reinstated Yann Leboulanger's change to support subkeys (accidentally left out in 0.2.7). | |0.2.9|Fixed Issue #36: Now handles CARDCTRL and POLICY_URL messages. Fixed Issue #40: Now handles DECRYPTION_INFO, DECRYPTION_FAILED and DECRYPTION_OKAY messages. The random_binary_data file is no longer shipped, but constructed by the test suite if needed. | |0.2.8|Fixed Issue #29: Now handles IMPORT_RES while verifying. Fixed Issue #30: Fixed an encoding problem. Fixed Issue #33: Quoted arguments for added safety. | |0.2.7|Fixed Issue #24: License is clarified as BSD. Fixed Issue #25: Incorporated Daniel Folkinshteyn's changes. Fixed Issue #26: Incorporated Yann Leboulanger's subkey change.Fixed Issue #27: Incorporated hysterix's support for symmetric encryption. Also did some internal cleanups of Unicode handling. | |0.2.6|Fixed Issue #14: Should be able to accept passphrases from GPG-Agent. Fixed Issue #19: Should be able to create a detached signature. Fixed Issue #21, Issue #23: Better handling of less common responses from GPG. | |0.2.5|Fixed Issue #11, Issue #16: Detached signatures can now be created. Fixed Issue #3: Detached signatures can be verified. Fixed Issue #12: Better support for RSA and IDEA. Fixed Issue #15, Issue #17: Better support for non-ASCII input. | |0.2.4|Fixed Issue #9: Now allows encryption without armor and the ability to encrypt and decrypt directly to/from files. | |0.2.3|Fixed Issue #7: Made sending data to process threaded and added a test case. With a test data file used by the test case, the archive size has gone up to 5MB (the size of the test file). | |0.2.2|Fixed Issues #5 and #6: Added --batch when specifying --passphrase-fd and changed the name of the distribution file to add the python- prefix. | |0.2.1|Fixed Issue #2: Added handle_status method to the ListKeys class. | |0.2.0|Various changes made to support Python 3.0. | |0.1.0|Initial release. |

Project Information

Labels:
python gnupg GPG PGP